Open the assistant from your own search bar
This page uses the standard HawkAI Assistant (latest version from the CDN) on the Outdoor Demo production engine. The assistant opens from the Ask AI button next to the search bar. By default the usual floating button is hidden, and the window drops down below Ask AI instead of sitting in the bottom-right corner. Use the options below to switch either one back.
Open it from anywhere
Any element on your page can call HawkAI.Assistant.toggle() to open or close the assistant.
Try the Ask AI button in the header.
Send a question for the shopper
HawkAI.Assistant.sendMessage() opens the assistant and asks a question for the shopper.
Try these buttons:
Move the window with CSS
The documented ui.styles option moves the window and hides the floating button.
When the floating button is hidden, the standard headerButtons option adds a close (X) button, because the floating button normally does that job.
No JavaScript overrides are needed.
The code running on this page
Shown live from the script below
Settings in ui take priority over the assistant's dashboard configuration. This page sets
display: 'window', position: 'right' and open: false, so the dashboard's
drawer layout doesn't apply here. Everything else (heading, logo, colors, prompts) still comes from the dashboard.