Continue on a page you host
Three widget controls can send people to a page on your own site: the Search Bar submit, the AI Overview button, and the Compare products control. They all work the same way — the widget appends query parameters to the URL you configured and opens it, and on that page the widget runs full-page and picks the conversation or comparison up from the URL. One hosted page can serve all three.
The question travels in the address as prompt and autoSubmit=true.
The conversation travels in the address as userId and conversationId.
In both cases the page you host runs the Full Page widget. That widget starts from what your page passes to init(). It does not read the address by itself, so your page copies the parameters across.
What each control sends
| Control | You set | The widget appends | Also removed first | Opens in |
|---|---|---|---|---|
| Search Bar submit | display.action.url (action.type: 'external-url') | prompt (the search text), autoSubmit=true | any prompt, autoSubmit, conversationId already on the URL | new tab unless action.newTab: false |
| AI Overview button | display.ctaUrl | userId (when known), conversationId (when a chat is active) | any prompt, autoSubmit, aiModeConfig already on the URL | new tab unless ctaNewTab: false |
| AI Overview quote and ask | display.ctaUrl | userId, conversationId, prompt (the quoted text), autoSubmit=false | any prompt, autoSubmit, aiModeConfig already on the URL | new tab unless ctaNewTab: false |
| Compare products | display.productCompareUrl | catalogId, productIds (JSON array), displayMode=productCompare, plus table presentation keys | — | new tab |
Every other query parameter already on your URL is kept. The URL must be absolute http(s). If it is not, the Search Bar's Send button and Enter reopen the current page with the parameters added (only starter prompt chips do nothing), the AI Overview button also falls back to the current page, and the comparison opens inside the widget.
To resume a conversation, the page needs the same API key as the page that started it and a matching userId. If they do not match, the visitor sees an error. If you do not pass a userId, the widget makes an anonymous one from the visitor's browser and your site's host, so a page on a different host cannot resume an anonymous conversation. The AI Overview button always sends the conversation's own userId for this reason.
The page you host
Mount the Full Page Widget in a flex-column container (see Container layout). What the page passes into init() depends on which control sent the visitor:
<div id="rapidflare-agent" style="display: flex; flex-direction: column;"></div>
<script src="https://cloud.rapidflare.ai/storage/v1/object/public/rapidflare-embed-sdk/latest/agent.js"></script>
<script>
const searchParams = new URLSearchParams(window.location.search);
window.rapidflare.init({
apiKey: 'YOUR_API_KEY',
display: {
type: 'full-page',
container: '#rapidflare-agent'
},
// Search Bar: pre-fill and submit the question.
prompt: searchParams.get('prompt') || undefined,
autoSubmit: searchParams.get('autoSubmit') === 'true',
// AI Overview: resume the same chat. For the quote and ask path,
// autoSubmit is false, so the text is placed in the box and not sent.
userId: searchParams.get('userId') || undefined,
conversationId: searchParams.get('conversationId') || undefined
});
</script>
For Compare products, mount with agent: 'product-selection' instead and pass nothing from the query string — the widget reads catalogId and productIds itself:
<div id="compare-mount" style="display: flex; flex-direction: column;"></div>
<script src="https://cloud.rapidflare.ai/storage/v1/object/public/rapidflare-embed-sdk/latest/agent.js"></script>
<script>
window.rapidflare.init({
apiKey: 'YOUR_API_KEY',
agent: 'product-selection',
display: {
type: 'full-page',
container: '#compare-mount'
}
});
</script>
A single page can do both: read agent from the query string, or route the Compare products URL to a dedicated path such as /compare. Keys the widget does not set for a given control are simply absent, and undefined values are ignored by init().