Widget Tools

Widget tools let you create, customize, and connect your chat widgets. You can configure appearance, colors, navigation menus, behavior settings, and link chatbots, knowledge bases, and other resources to your widgets.

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, getting install codes, and linking them to chatbots and knowledge bases.

Permission required:Copilot.Widgets

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

ParameterTypeRequiredDescription
idstringNoWidget ID. Omit to create a new widget, provide to update.
isDefaultbooleanNoOnly for creation — links default KB, roadmap, and docs to the new widget.
namestringNoDisplay name for the widget.
languagestringNoWidget language: "en" or "hu".
replyTimestringNoExpected reply time shown to visitors (e.g., "a few minutes", "in a few hours").
feedbackButtonPositionstringNoLauncher position: "BOTTOM_RIGHT" or "BOTTOM_LEFT".
buttonIconstringNoLauncher icon style: "button" (message bubble) or "button-2" (AI icon).
backgroundTypestringNoHome screen decoration: "decoration", "decoration_blobs", "decoration_lighting", "decoration_gradient", "decoration_ripple", "decoration_grid", "full_image", "small_image", or "none".
hideBrandingbooleanNoHide Yaplet branding in the widget.
showTeambooleanNoShow team member avatars in the widget.
askForEmailbooleanNoAsk visitors for their email address.
collectRatingbooleanNoAsk for a conversation rating when the chat ends.
askForRatingLabelstringNoCustom text for the rating prompt.
menusobjectNoNavigation menu configuration. Each key (home, messages, news, roadmap, help) can have show (boolean) and title (string).
generalBackgroundstringNoMain chat background hex color (e.g., "#FFFFFF"). Sub-colors are auto-generated.
generalAccentstringNoPrimary accent/UI hex color (e.g., "#083BD9"). Sub-colors are auto-generated.
homeTopBackgroundstringNoHome screen top/header background hex color.
homeBackgroundstringNoHome screen body background hex color.
homeHighlightLeftstringNoHome decoration left accent hex color.
homeHighlightRightstringNoHome decoration right accent hex color.

How It Works

Creating a widget:

  • Omit the id parameter. A new widget is created with default settings.
  • You can immediately customize it by passing additional parameters alongside the creation.
  • Use isDefault: true to automatically link the organization's default knowledge base, documentation, and roadmap.

Updating a widget:

  • Provide the id of 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, generalAccent for chat; homeTopBackground, homeBackground, homeHighlightLeft, homeHighlightRight for the home screen).
  • All derived sub-colors (text colors, border shades, bubble colors, etc.) are automatically generated from these main colors.

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."
  • "Move the launcher button to the bottom left."
  • "Rename my widget to 'Customer Portal'."

get_widget_install_code

Generates the JavaScript snippet needed to install a widget on your website.

Parameters

ParameterTypeRequiredDescription
widgetIdstringYesThe 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."

Links or unlinks a chatbot, knowledge base, documentation, or roadmap to a widget.

Parameters

ParameterTypeRequiredDescription
widgetIdstringYesThe widget to link to.
typestringYesWhat to link: "chatbot", "knowledgebase", "documentation", or "roadmap".
idstring or nullYesID of the resource to link. Pass null to unlink.

How It Works

Chatbot linking:

  • Links the chatbot to the widget so it can respond to visitors.
  • Pass id: null to unlink the chatbot from the widget.

Knowledge base / Documentation / Roadmap linking:

  • Updates the widget's linked resource.
  • When you change a linked knowledge base or documentation, old AI training data is automatically cleaned up.
  • The response will note if training data needs to be refreshed (this happens from the dashboard widget settings).

Example Prompts

  • "Link my Support Bot chatbot to my default widget." (finds both resources first, then links them)
  • "Connect my Help Center knowledge base to the widget."
  • "Unlink the chatbot from my widget."
  • "Switch the knowledge base on my widget to the new one I just created."
  • "Link the documentation and roadmap to my default widget."

Common Workflow Patterns

Full Widget Setup

A complete widget setup typically involves:

  1. Create the widgetmanage_widget
  2. Customize appearancemanage_widget (update with colors, menus, etc.)
  3. Link a chatbotlink_to_widget with type: "chatbot"
  4. Link a knowledge baselink_to_widget with type: "knowledgebase"
  5. Get the install codeget_widget_install_code

Example prompt: "Set up a complete widget: create one called 'Support Chat' with a blue theme, link my AI chatbot to it, connect my knowledge base, 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."