Open a screen from your header
Keep header buttons in your application and open the corresponding app UUID:contactbutton:ready and check event.detail.buttonId against your button’s external ID before opening a queued screen. apps.open() returns false if that app is not ready or available.
Keep authenticated account actions in the host
The copied Ask AI app displays a placeholder until your application registers its own renderer. Mount your authenticated assistant UI in the button instead of passing account credentials into a public widget or iframe:ContactButton.apps.close(assistantAppUuid) closes the registered host screen; openContactButton(buttonExternalId) returns to its menu. Registration affects only this browser document. It does not store or execute JavaScript from widget settings.
Your assistant continues calling your authenticated, same-origin backend. Derive the active account/workspace on the server, validate editor context, and require an explicit user approval for account writes. A public widget ID, copied template, or postMessage must never grant account access or approve an action.
What the template copies
The template creates fresh apps and IDs. Native support chat routes to the destination workspace’s Inbox. It does not copy another workspace’s messages, AI credentials, authentication, account permissions, or private editor context. For a public website Agent, configure the native Agent app with your own Gemini or OpenAI model and approved knowledge instead of the authenticated host adapter. The Contact Button portal uses this same renderer API. Its optional deployment settings,PORTAL_HELP_BUTTON_ENABLED and PORTAL_HELP_BUTTON_ID, select a published help button on the server. They default off. The source help workspace receives support messages; account actions remain scoped to the signed-in user’s active workspace.
Help articles inside the menu
The Help Center item uses the HTML widget’s iframe integration. Point it at a published Help Center or the compact/help/button/{button_public_id} reader.
The compact reader only includes public, published Knowledge Base articles from
that Button’s source workspace; it does not use the signed-in portal workspace.
Authors manage these articles under Posts → Knowledge Base. Article search and
article-to-article navigation stay inside the menu.
The AI & Support recipe leaves this item disabled until its URL is configured.
Copying the recipe never copies private articles or account permissions.