Follow-up
Follow-up covers the second turn (and beyond) within the same conversation: the user asks "why are you recommending the Fox?", "what's the difference vs the other one?", and the agent responds with a detailed explanation referencing specific products.
Types at.
How it works
- The user asks a new question within the same
conversationId. - The backend identifies it as a follow-up (not a new search) and returns
followUp: FollowUpResponseinSearchResponse. - The widget renders with
InlineFollowUp.
Shape
interface FollowUpResponse {
question: string // the user's question
answer: string // the agent's explanation
referencedProducts: FollowUpProduct[]
recommendation: string // final verdict
}
interface FollowUpProduct {
productId: string
name: string
price: number
salePrice?: number
currency?: string
imageUrl: string
url: string
inStock?: boolean
rating?: number
reviewCount?: number
brands?: string[]
badge?: 'BESTSELLER' | 'TRENDING' | 'TOP_RATED'
highlights: string[] // 2-3 highlights max
verdict: string // contextual product verdict
externalId?: string
}
.
- Main block with formatted
answer. - Collapsible list of
referencedProducts, each showing highlights + verdict. - Final CTA "Show products" / "Hide products" (
followUp.showProducts/hideProducts). - Footer with the highlighted
recommendation.
Conversation state
The widget keeps the conversationId received in the first response and forwards it on subsequent requests. If the user closes the widget and reopens it within the same browser session, the conversationId is preserved (sessionStorage). On the other hand, switching tab / SPA reload starts a fresh conversation.
i18n
followUp.aiResponse, followUp.referencedProducts, followUp.recommendation, followUp.showProducts, followUp.hideProducts, followUp.viewProduct at