Skip to content

Rich content trust

Rich content — product cards, offer carousels, media tiles — renders in the widget only when it originates from a successful, verified tool execution. The LLM cannot fabricate structured cards from plain text.

SourceRenders in chat?
Tool result with valid result_transformYes
Tool result without transform (raw JSON)No — text summary only
LLM-generated JSON in message textNo — stripped
Knowledge base citationsText + citation links only
Failed tool callError message; no cards

This prevents prompt-injection attacks that try to inject fake product listings or phishing links as structured UI.

flowchart LR
A[User message] --> B[LLM selects tool]
B --> C[Tool executes against your API]
C --> D{Success?}
D -->|Yes| E[result_transform maps JSON to card schema]
D -->|No| F[Text error — no rich content]
E --> G[Sanitize URLs and fields]
G --> H[Render in widget]

Tools declare how API JSON maps to card fields:

{
"result_transform": {
"type": "carousel",
"mapping": {
"items": "$.offers",
"title": "$.name",
"image_url": "$.image",
"link_url": "$.booking_url"
}
}
}

Only fields defined in the transform schema are rendered. Unknown fields are dropped.

CheckAction
javascript: URLsBlocked
Non-HTTPS links (production)Blocked unless allowlist configured
Off-domain imagesAllowed if HTTPS; flagged in logs
HTML in text fieldsEscaped — no inline HTML in cards

Configure an optional image/link domain allowlist under Tools → Rich content → Trust policy.

Visitors never see:

  • Raw tool API responses
  • Credential headers or tokens
  • Internal tool error stack traces

They see user-friendly text and sanitized cards.

Use Tools → Test to preview rich content output before attaching to an assistant. The preview shows exactly what the widget will render.