Install
- In the portal, open the deployment’s widget settings.
- Optionally set a Title, an Assistant name, and the Allowed domains.
- Copy the snippet and add it to every page of your storefront:
Allowed domains
The widget only loads on the domains you list, for exampleshop.example.com, www.shop.example.com. Enter each host you serve the storefront from. http://localhost is accepted for local development. With no domains listed, the widget loads on any site.
Try it before installing
The VaultGraph Widget On/Off button in the deployment adds the widget to the portal page so you can chat with it. Drag the button to your browser’s bookmarks bar to toggle the widget on any page, such as your live storefront, without changing its code. The widget still only loads on allowed domains.Control it from your page
The script exposeswindow.vgWidget:
Use
open with a message to start a conversation from your own buttons, for example suggestion chips:
window.vgWidget exists before calling it from code that runs on page load.