Widget Tools
Widget tools let you create and customize your chat widgets — appearance, colors, navigation menus and behavior settings — and get the install code for your website.
Overview
Widgets are the customer-facing chat interfaces that you embed on your website. The Widget tool category gives you full control over creating new widgets, customizing their appearance and behavior, and getting install codes.
Brands — shown as Brands & chat widgets in the permission list.manage_widget
Creates a new widget or updates an existing one. This is a powerful tool that handles everything from naming to full theme customization.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | Widget ID. Omit to create a new widget, provide to update. |
name | string | No | Display name for the widget. |
language | string | No | Widget interface language: "en" or "hu". |
replyTime | string | No | Expected reply time shown to visitors (e.g., "a few minutes", "in a few hours"). |
feedbackButtonPosition | string | No | Launcher position: "BOTTOM_RIGHT" or "BOTTOM_LEFT". |
buttonIcon | string | No | Launcher icon style: "button" (message bubble) or "button-2" (AI icon). |
backgroundType | string | No | Home screen decoration: "decoration", "decoration_blobs", "decoration_lighting", "decoration_gradient", "decoration_ripple", "decoration_grid", "full_image", "small_image", or "none". |
showTeam | boolean | No | Show team member avatars in the widget. |
askForEmail | boolean | No | Ask visitors for their email address. |
collectRating | boolean | No | Ask for a conversation rating when the chat ends. |
askForRatingLabel | string | No | Custom text for the rating prompt. |
menus | object | No | Navigation menu configuration. Each key (home, messages, news, roadmap, help) can have show (boolean) and title (string). |
generalBackground | string | No | Main chat background hex color (e.g., "#FFFFFF"). Sub-colors are auto-generated. |
generalAccent | string | No | Primary accent/UI hex color (e.g., "#083BD9"). Sub-colors are auto-generated. |
homeTopBackground | string | No | Home screen top/header background hex color. |
homeBackground | string | No | Home screen body background hex color. |
homeHighlightLeft | string | No | Home decoration left accent hex color. |
homeHighlightRight | string | No | Home decoration right accent hex color. |
feedbackButtonStops | array | No | Launcher button colors, 1–3 hex values. One entry is a solid color; two or three make a linear gradient. The first entry is the primary color. |
feedbackButtonAngle | number | No | Gradient angle in degrees (0–360). Ignored with a single color stop. Defaults to 90. |
feedbackButtonIconColor | string | No | Hex color for the launcher icon. Derived automatically from contrast if omitted. |
How It Works
Creating a widget:
- Omit the
idparameter. A new widget is created with default settings. - You can immediately customize it by passing additional parameters alongside the creation.
- A new brand is created to hold the widget. That brand starts empty — it does not inherit your existing knowledge base, documentation or roadmap. If you meant to restyle the widget you already have, pass its
idinstead.
Updating a widget:
- Provide the
idof the widget to update. Only the fields you pass will be changed — everything else stays the same. - Menu updates are merged: if you only change
news.show, all other menu settings remain unchanged.
Color system:
- You only need to set the main colors (
generalBackground,generalAccentfor chat;homeTopBackground,homeBackground,homeHighlightLeft,homeHighlightRightfor the home screen). - All derived sub-colors (text colors, border shades, bubble colors, etc.) are automatically generated from these main colors.
language. The widget designer no longer shows a language picker — language is chosen on Brand settings → General, and saving it there writes the value down onto the widget. language here writes that same widget-level value directly, so the change takes effect immediately, but the brand still holds its own copy: the next time anyone saves the brand's language, the brand's value wins and overwrites yours. For a lasting change, set it on the brand.Example Prompts
- "Create a new widget."
- "Create a widget called 'Premium Support' with a dark blue accent color."
- "Change my widget's theme to use #1A1A2E background and #E94560 accent."
- "Hide the news and roadmap tabs from my widget."
- "Set my widget to collect conversation ratings with the message 'How did we do?'"
- "Enable the 'ask for email' setting on my default widget."
- "Change the home screen background to a gradient decoration with warm colors."
- "Make the launcher a gradient from #6C63FF to #FF6B6B at 45 degrees."
- "Rename my widget to 'Customer Portal'."
get_widget_install_code
Generates the JavaScript snippet needed to install a widget on your website.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
widgetId | string | Yes | The ID of the widget to get the install code for. |
How It Works
Returns the widget's details along with a ready-to-use <script> tag that you can paste into your website's HTML. The script loads the Yaplet widget asynchronously and won't slow down your page.
Example Prompts
- "Give me the install code for my default widget." (lists widgets first to find the default, then gets the code)
- "How do I install the Premium Support widget on my website?"
- "Generate the embed script for my widget."
link_to_widget
Links or unlinks a chatbot, knowledge base, documentation set, or roadmap board to a widget.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
widgetId | string | Yes | The widget to link to. |
type | string | Yes | What to link: "chatbot", "knowledgebase", "documentation", or "roadmap". |
id | string or null | Yes | ID of the resource to link. Pass null to unlink. |
How It Works
Chatbot linking:
- Sets the widget's AI agent. Only a chatbot of type AI is accepted — a chat workflow cannot be put in this slot, and the tool refuses it with an explanation.
- The same choice is written onto the widget's brand, which is what the AI actually reads from.
- Pass
id: nullto clear the widget's AI agent. This is not the inverse of the step above: it takes the bot off the widget only. The brand keeps its Vex agent and it still appears on Brand → Vex, and the brand's chat workflows are left alone.
Knowledge base / Documentation / Roadmap linking:
- Updates the widget's linked resource, and — for a knowledge base or documentation set — writes the same choice onto the widget's brand, which is what the AI and the public help site actually read from.
- Nothing is deleted and nothing is re-processed. Everything a source has learnt belongs to that source, not to whichever widget happens to display it, so re-attaching it later is instant and free.
- It is not invisible, though. Linking a knowledge base or documentation set also makes it the one served at the brand's public web address, which takes the previous one off that address; passing
id: nullleaves the brand publishing nothing there. - The response still carries
training_data_clearedandtraining_data_needs_refreshflags and a note about refreshing training data from the widget settings. That wording is left over from the old behaviour — ignore it. No indexed content is removed and there is nothing to refresh.
Example Prompts
- "Connect my Support knowledge base to the widget."
- "Switch the knowledge base on my widget to the new one I just created."
- "Link the documentation and roadmap to my default widget."
- "Which knowledge base is my widget currently serving?"
- "Clear the roadmap link on my widget."
Common Workflow Patterns
Full Widget Setup
A complete widget setup typically involves:
- Create the widget →
manage_widget - Customize appearance →
manage_widget(update with colors, menus, etc.) - Get the install code →
get_widget_install_code
Example prompt: "Set up a complete widget: create one called 'Support Chat' with a blue theme, and give me the install code."
Theme Customization
You can do complete visual overhauls in a single call:
Example prompt: "Give my widget a dark theme with #0F0F23 background, #6C63FF accent, and a gradient decoration on the home screen with #1A1A2E top background and #6C63FF / #FF6B6B highlights."