//core/com.kustomer.core.models.chat/KusUrlUnfurled
[androidJvm]
@JsonClass(generateAdapter = true)
data class KusUrlUnfurled(val title: String? = null, val description: String? = null, val url: String? = null, val image: String? = null, val favicon: String? = null, val structuredData: KusUrlUnfurledStructuredData? = null, val preferredOrder: Int? = null)
Rich link preview data for a URL in a chat message. Populated from URL unfurling events (kustomer.app.chat.url.unfurled.send / receive).
When rendering or opening the URL, append utm_source=kustomer_url_preview for tracking. Favicon URLs should be validated (e.g. supported image extensions) before display.
preferredOrder (carousel / grouping): Kustomer chat settings expose Group multiple unfurled URLs as groupMultipleUnfurledUrls. chat-api reads that org flag when unfurling; when grouping applies (flag on and the parent message has multiple URLs), the server assigns preferredOrder on unfurl payloads. The UI layer gates horizontal carousel layout on wire preferredOrder (see com.kustomer.ui.utils.helpers.shouldUseCarouselForUrlPreviews) rather than re-reading groupMultipleUnfurledUrls on the client—parity with chat-web / iOS.
| KusUrlUnfurled | [androidJvm] constructor(title: String? = null, description: String? = null, url: String? = null, image: String? = null, favicon: String? = null, structuredData: KusUrlUnfurledStructuredData? = null, preferredOrder: Int? = null) |
| Name | Summary |
|---|---|
| description | [androidJvm] val description: String? = null |
| favicon | [androidJvm] val favicon: String? = null |
| image | [androidJvm] val image: String? = null |
| preferredOrder | [androidJvm] val preferredOrder: Int? = null Non-negative slide index when chat-api grouped multiple unfurls for one message; null when omitted on the wire. |
| structuredData | [androidJvm] val structuredData: KusUrlUnfurledStructuredData? = null |
| title | [androidJvm] val title: String? = null |
| url | [androidJvm] val url: String? = null |
| Name | Summary |
|---|---|
| unfurledPreviewTitleDisplay | [androidJvm] fun KusUrlUnfurled.unfurledPreviewTitleDisplay(): Pair<String?, String?> Headline and optional price for link preview UI — matches chat-web / iOS unfurledPreviewTitleDisplay(). |