This article serves as a comprehensive guide on setting up and integrating the chat widget into your website, thus providing your customers with the option to contact your services and agents through chat.
Follow the steps detailed in this article to use the chat channel to its full potential. Add value to your website by seamlessly setting up and integrating the chat widget, ensuring its availability to customers.
For easier navigation, please use the index listing below:
- Firewall Exceptions
- Chat App
- Creating a Chat Touchpoint
- Chat Touchpoint
- Quickstart Section
- Chat Widget Integration
- Chat Widget Secure CSP Mode Integration
- Chat Widget Customization
- Contact Experiences
- Context Variables
- Visitor Identification
- Additional Resources
Firewall Exceptions
When a website has a Content Security Policy (CSP) enabled, it restricts the types of content that can be loaded on the site. To ensure that chat functionalities run properly, specific sources must be whitelisted.
Content Security Policy (CSP) - Chat Widget V1
Below is a description of the CSP configuration needed for Chat Widget V1, including td-us-1, td-eu-1, td-ca-1, and td-usfed-1 Talkdesk regions, to ensure chat functions properly on the website.
| Talkdesk Region | CSP Rules |
| td-us-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskapp.com wss://tsock.us1.twilio.com https://mcs.us1.twilio.com https://*.dynatrace.com; img-src 'self' data: blob: https://talkdeskchatsdk.talkdeskapp.com https://qa-cdn-talkdesk.talkdeskdev.com https://media.us1.twilio.com; video-src 'self' data: blob: https://media.us1.twilio.com; audio-src 'self' data: blob: https://media.us1.twilio.com; frame-src 'self' https://api.talkdeskapp.com; font-src 'self' https://talkdeskchatsdk.talkdeskapp.com; |
| td-eu-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskapp.eu wss://tsock.ie1.twilio.com https://mcs.ie1.twilio.com https://*.dynatrace.com; img-src 'self' data: blob: https://talkdeskchatsdk.talkdeskapp.com https://qa-cdn-talkdesk.talkdeskdev.com https://media.ie1.twilio.com; video-src 'self' data: blob: https://media.ie1.twilio.com; audio-src 'self' data: blob: https://media.ie1.twilio.com; frame-src 'self' https://api.talkdeskapp.eu; font-src 'self' https://talkdeskchatsdk.talkdeskapp.com; |
| td-ca-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskappca.com wss://tsock.us1.twilio.com https://mcs.us1.twilio.com https://*.dynatrace.com; img-src 'self' data: blob: https://talkdeskchatsdk.talkdeskapp.com https://qa-cdn-talkdesk.talkdeskdev.com https://media.us1.twilio.com; video-src 'self' data: blob: https://media.us1.twilio.com; audio-src 'self' data: blob: https://media.us1.twilio.com; frame-src 'self' https://api.talkdeskappca.com; font-src 'self' https://talkdeskchatsdk.talkdeskapp.com; |
| td-usfed-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskapp-pubsec.com wss://tsock.us1.twilio.com https://mcs.us1.twilio.com https://*.dynatrace.com; img-src 'self' data: blob: https://talkdeskchatsdk.talkdeskapp.com https://qa-cdn-talkdesk.talkdeskdev.com https://media.us1.twilio.com; video-src 'self' data: blob: https://media.us1.twilio.com; audio-src 'self' data: blob: https://media.us1.twilio.com; frame-src 'self' https://api.talkdeskapp-pubsec.com; font-src 's`elf' https://talkdeskchatsdk.talkdeskapp.com; |
CSP Domains
Below is the description of the purpose of CSP domains. Each of these domains plays a crucial role in enabling chat services by specifying trusted sources from which content can be loaded, ensuring both functionality and security for users in their respective regions.
| CSP Domains | Description |
| https://talkdeskchatsdk.talkdeskapp.com | TalkDesk Chat Widget JSSDK remote host |
| https://qa-cdn-talkdesk.talkdeskdev.com | TalkDesk Chat Widget JSSDK default remote image host |
| https://api.talkdeskapp.com | TalkDesk Gateway US region host |
| https://api.talkdeskapp.eu | TalkDesk Gateway EU region host |
| https://api.talkdeskappca.com | TalkDesk Gateway CA region host |
| https://api.talkdeskapp-pubsec.com | TalkDesk Gateway FedRAMP region host (This is a special area that non-FedRAMP customers do not need to configure) |
| https://*.dynatrace.com | TalkDesk Chat Widget JSSDK log reporting gateway, used to record error logs |
| wss://tsock.us1.twilio.com | Conversation WebSocket channel in td-us-1 or td-ca-1 |
| wss://tsock.ie1.twilio.com | Conversation WebSocket channel in td-eu-1 |
| https://mcs.us1.twilio.com | Chat attachment service in td-us-1 or td-ca-1 |
| https://mcs.ie1.twilio.com | Chat attachment service in td-eu-1 |
| https://media.us1.twilio.com | Chat preview attachment service in td-us-1 or td-ca-1 |
| https://media.ie1.twilio.com | Chat preview attachment service in td-eu-1 |
| data: | Chat Widget JSSDK sometimes displays local files, so this host is needed |
| blob: | Chat Widget JSSDK sometimes displays local files, so this host is needed |
Content Security Policy (CSP) - Chat Widget V2
Starting July 19th, 2024, when creating a chat touchpoint, the system will automatically generate Chat Widget V2. Below is a description of the CSP configuration needed for Chat Widget V2, including td-us-1, td-eu-1, td-ca-1, and td-usfed-1 Talkdesk regions, to ensure chat functions properly on the website.
| Talkdesk Region | CSP Rules |
| td-us-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; frame-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskapp.com; |
| td-eu-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; frame-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskapp.eu; |
| td-ca-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; frame-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskappca.com; |
| td-usfed-1 |
script-src 'self' https://talkdeskchatsdk.talkdeskapp.com; frame-src 'self' https://talkdeskchatsdk.talkdeskapp.com; connect-src 'self' https://api.talkdeskapp-pubsec.com; |
CSP Domains
Below is the description about the purpose of CSP domains. Each of these domains plays a crucial role in enabling chat services by specifying trusted sources from which content can be loaded, ensuring both functionality and security for users in their respective regions.
| CSP Domains | Description |
| https://talkdeskchatsdk.talkdeskapp.com | TalkDesk Chat Widget JSSDK remote domain |
| https://api.talkdeskapp.com | TalkDesk Gateway domain for US region |
| https://api.talkdeskapp.eu | TalkDesk Gateway domain for EU region |
| https://api.talkdeskappca.com | TalkDesk Gateway domain for CA region |
| https://api.talkdeskapp-pubsec.com |
TalkDesk Gateway domain for FedRAMP region
Note: The domain is used for FedRAMP, if you don’t need to deploy to FedRAMP, you can ignore it. |
OneTrust Security
If your website uses OneTrust, please note that as part of its functionality, OneTrust uses the OtAutoBlock.js script to block suspicious behavior, so it can be blocked from loading and, as a result, the chat launcher may not appear on the website.
We recommend adding Talkdesk Chat to your trusted OneTrust settings. To do so:
- Log in to your OneTrust account.
-
Navigate to the script management settings.
-
- Settings for managing script loading are usually found in the "Cookie consent" or "Script management" sections.
-
-
Define whitelisted scripts:
-
- Add your trusted JavaScript remote files (https://talkdeskchatsdk.talkdeskapp.com/v2/talkdeskchatsdk.js) or domains to the configuration.
- Note: Any script not in the whitelist will be blocked until user consent is obtained.
-
Chat App
In Workspace, go to Admin > Channels. The “Channels list” tab includes the “Chat” channel, which is where all chat touchpoints are configured.
The “Channels” application includes the following elements:
- Channels list: Lists all the channels available in the account. Selecting “Chat” opens the configuration of the chat touchpoints.
- Global settings: Contains settings applicable to one or more channels, such as the occupancy weight of each conversation for each channel.
- Templates: Creates pre-written messages that help agents be more efficient.
- Chat channel: To configure this channel, click the “Chat” section within the “Channels” application.
- Number of touchpoints: Indicates the number of touchpoints already configured for chat.
The “Chat” channel lists the configured touchpoints, including the friendly name, domain, and status of each touchpoint.
- Create touchpoint: Creates a new touchpoint. The button opens a pop-up window that requests the website domain and a friendly name for the touchpoint.
-
Touchpoint options: The “More options” button (...) allows the following actions:
- Edit the chat touchpoint.
- Edit the chat appearance.
- Duplicate the appearance configurations to a new touchpoint. The domain and friendly name are requested.
- Activate or deactivate the touchpoint.
- Delete the touchpoint. Deleting is only possible if the chat is deactivated first.
Note: When deleting a touchpoint, the widget code must also be removed from the website.
- Return: Returns to the “Channels” section.
The status of the touchpoint determines the behavior of the chat widget:
- Active: Once the widget code is added to the website, the chat widget appears for every website visitor.
- Inactive: The chat widget disappears from the website. Ongoing conversations are not lost, but visitors cannot start another conversation.
Creating a Chat Touchpoint
Creating a Chat Touchpoint
To create a new chat touchpoint, go to Admin > Channels > Chat, and click the Create touchpoint button. A pop-up window requests the domain and the friendly name of the new chat touchpoint. Both fields are mandatory. Click Create.
The new chat touchpoint is added to the list and is inactive by default. Click the domain of the touchpoint to complete its configuration.
Open the “Touchpoint” tab, click Edit, select the Studio flow to assign to the new chat touchpoint, and click Save. For more information, see Touchpoint Tab in this article.
Open the “Chat widget” tab, click Edit, and customize the chat widget, such as the appearance, the Welcome page, and the settings. For more information, see the Chat Widget Tab in this article.
Integrate the chat widget on the desired pages of your website. This can be done via an iframe (recommended option) or via a script. Check the “Widget Integration” section for more details.
After integrating the chat widget on your website, go to “Admin” > “Channels” > “Chat” > Touchpoint.
In the Touchpoint tab, click Edit.
You can now activate the chat touchpoint by sliding the “Status” toggle. Save your progress.
Reload your website, and you should be able to see the chat widget in the web pages where it was integrated.
While configuring the chat touchpoint, please have the following guidelines in mind:
Domain
- Protocols and ‘www.’
The system differentiates between the two available protocols (‘http:’ and ‘https:’) and does not differentiate between domains that include ‘www.’ and domains that do not include ‘www.’.
However, it is possible to remove the protocol information, and it will work for all combinations.
Deploy to a Domain and its Subdirectories
| TOUCHPOINT DOMAIN | URL |
|
talkdesk.com |
|
|
https://talkdesk.com | |
| https://www.talkdesk.com/abc | |
| http://talkdesk.com/def |
Notes:
- All subdirectories such as https://www.talkdesk.com/abc under www.talkdesk.com are supported for deploying the chat touchpoint.
- The chat conversation will carry over as the contact navigates between pages and subpages within the domain. This ensures uninterrupted communication.
Deploy to Subdomains
| TOUCHPOINT DOMAIN | URL |
| *.talkdesk.com |
https://def.talkdesk.com |
| *.abc.talkdesk.com | http://hij.abc.talkdesk.com |
Notes:
- Subdomain deployment uses a wildcard (*) to match subdomains. All subdomains ending with talkdesk.com are supported to deploy the chat touchpoint.
- The chat conversation WILL NOT carry over when a contact person navigates to a different subdomain. This provides a clear separation of conversations across subdomains.
Deploy to One Page
| TOUCHPOINT DOMAIN | URL |
| http://www.talkdesk.com/abc | http://www.talkdesk.com/abc |
| http://talkdesk.com/abc | http://talkdesk.com/abc |
| https://www.talkdesk.com/abc | https://www.talkdesk.com/abc |
| https://talkdesk.com/abc | https://talkdesk.com/abc |
Note: The system uses ‘http:’ and ‘https:’ to identify the link to be deployed. Any domain starting with these terms will only be deployed to the specific link. The subdirectories under the domain link, such as http://www.talkdesk.com/abc/def.html, are not supported for deploying the chat touchpoint
Create Regional Chat Instance
When a chat touchpoint is created, a regional instance of the chat is created based on the deployment region of the chat touchpoint. Chat regional instances serve as distinct data centers globally, facilitating the essential processing and storage for your application's communication functionalities. For example:
- Admins creating a chat touchpoint in the US region will automatically create a chat regional instance in the US region.
-
Admins creating a chat touchpoint in the EU region will automatically create a chat regional instance in the EU after May 30th, 2024.
-
The following firewall exceptions for the EU region are required to be added.
-
- https://api.talkdeskapp.eu
- wss://tsock.ie1.twilio.com/v3/wsconnect
- https://mcs.ie1.twilio.com
- https://media.ie1.twilio.com
-
-
The following CSP security policies for EU regions are required to be added.
-
- https://api.talkdeskapp.eu
- wss://tsock.ie1.twilio.com
- https://mcs.ie1.twilio.com
- https://media.ie1.twilio.com
-
-
The following firewall exceptions for the EU region are required to be added.
Notes:
- Chat touchpoints created in the US region before May 30th, 2024, will continue to connect with the corresponding regional chat instance located in the US. If you want to migrate the existing EU region Chat App to the Chat EU instance, please follow the instructions in the Migrating EU Chat Touchpoints article. The downloadable document can also be found at the bottom of this article.
- Chat touchpoints created in the CA region still connect with the chat regional instance located in the US.
Chat Touchpoint
Each chat touchpoint includes three tabs:
- “Touchpoint”.
- “Chat widget”.
- “Settings”.
Touchpoint: This tab sets the domain of the website, assigns a Studio flow, connects a Feedback flow, and provides the widget code to add to the website.
Note: The code snippet is only available in view mode.
Chat widget: This tab customizes the appearance of the chat widget, such as brand color, brand logo, chat launcher, and Welcome page, and configures the general settings of the chat widget.
Settings: This tab configures the conversation preview permission in the Inbox app based on touchpoints and roles.
Opening a chat touchpoint displays the “Touchpoint” tab in view mode. To switch the selected tab from view mode to edit mode, click the Edit button.
Touchpoint Tab
Opening the “Touchpoint” tab displays view mode. To start configuring the chat touchpoint, click the Edit button to switch to edit mode.
The following fields are available in edit mode:
- Domain: Adds the website URL where the widget appears. For guidelines, see Domain in this article.
- Friendly name: Sets the name shown to agents, which makes it easier to identify the origin of a conversation.
- Studio flow: Assigns the Studio flow to the touchpoint. When configuring the chat for the first time, the Configure a Studio flow link opens Studio, where a Studio flow can be created.
- Feedback flow: Assigns a Feedback flow to the touchpoint. For more information, see Connecting to Feedback Flow in this article.
- Status: Activates or deactivates the chat touchpoint.
Note: The Save button is only enabled after the domain is added and a Studio flow is selected. The assigned Studio flow can be switched as often as needed without changing the code snippet on the website.
The status of the touchpoint determines the behavior of the chat widget:
- Active: Once the widget code is added to the website, the chat widget appears for every website visitor.
- Inactive: The chat widget disappears from the website. Ongoing conversations are not lost, but visitors cannot start another conversation.
After saving the configuration, the page returns to view mode, which displays the following:
- Configuration preview: Shows the domain, the domain’s friendly name, the assigned Studio flow, and the attached Feedback flow.
- Widget code: Generated after saving the touchpoint configuration. For instructions on adding the widget code to the website, see Chat Widget Integration in this article.
Note: The widget code section is only shown in view mode.
Connecting to Feedback Flow
In edit mode, the “Feedback flow” field assigns a Feedback flow to the touchpoint. To connect a Feedback flow, select it from the dropdown. The Configure a Studio flow link opens the Feedback flow, where a chat survey can be created.
To disconnect a chat survey from the chat touchpoint, click the cancel icon next to the name of the flow.
Chat Widget Tab
Opening the “Chat widget” tab displays view mode. To start configuring the appearance, the Welcome page, and the settings of the chat widget, click the Edit button to switch to edit mode.
The “Chat widget” tab includes the following:
- Appearance: Customizes the theme color, header, chat launcher, Quickstart, viewport, disclaimer and information, and custom CSS.
- Welcome page: Configures the Welcome page and the initial form.
- Settings: Enables, disables, and configures general settings of the chat widget, such as the close conversation button, chat transcript download, typing indicator, agent name display, and Autopilot customization.
- Preview: Displays a preview of the chat widget screens.
Appearance
Expanding the “Appearance” section displays the features available for configuration.
Theme Color and Header
- Theme color: Sets the color used in buttons and links of the chat widget to match brand preferences. A color can be selected from the predefined colors or from the color picker.
- Logo URL: Customizes the brand logo in the header of the chat widget. The preview updates with the URL entered.
- Header title and Header subtitle: Customize the title and subtitle displayed in the header of the chat widget. The preview updates with the text entered.
Chat Launcher
- Launcher color: Customizes the background color of the chat launcher. The preview updates with the color selected.
- Icon url: Customizes the chat launcher icon. The preview updates with the URL entered.
Quickstart
- Messages: Adds static messages that appear once the visitor is on the chat screen. By default, one input box is available, but the message is only shown if configured. More messages can be added with the Add message button. Emptying a message prevents it from appearing on the chat screen. Each message has a drag-and-drop tool that changes the order of the messages on the chat screen.
- Quickstart: Associates a Quickstart from the list with the chat touchpoint. When the chat widget opens, the selected Quickstart appears instantly. For more information, see the Quickstart Section in this article.
- Preview quickstart: Displays the color and style of the selected Quickstart in the chat widget. When the flyout option of the Quickstart is enabled, the preview shows the Quickstart floating outside the chat bubble.
On a desktop browser, a Cancel button appears when a user hovers over the flyout Quickstart. If the user dismisses the Quickstart, the flyout is not displayed again for 24 hours.
Viewport
The chat widget supports dynamic, flexible layouts, which allow users to shift the display into a compact, a centered expanded, or a side panel view. The “Viewport” section includes the following options:
- Available views: Enables one or more views. Users can switch between the enabled layouts during a chat session. The available views are Compact (floats in the corner), Expanded (centers on the page), and Side panel (floats on the page edge).
- Default view: Selects the primary layout (Compact, Expanded, or Side panel) displayed when a user opens the chat widget for the first time.
Disclaimer and Information
When the “Display privacy policy disclaimer” toggle is on, administrators can configure a Privacy Policy disclaimer that appears directly in the chat widget. The disclaimer supports rich formatting, such as embedded links, and typically informs users about how their data is collected, stored, and used before they interact with the system. Users can click the Cancel button to dismiss the disclaimer.
Custom CSS
The “Custom CSS” feature customizes the appearance of the chat widget to match brand needs. The editor supports the following customizations:
- Fonts.
- Colors and hover states for primary, secondary, and outline action buttons.
- Background and text colors of message bubbles, for both sent and received messages.
- Mobile-only responsive styling overrides.
- Custom dimensions for the launcher button.
All color properties can be defined using hexadecimal codes, RGB or RGBA color values, or direct mapping to existing Talkdesk CSS token variables.
Tip: To discard all changes and restore the original Talkdesk styling, click the Reset to default button in the top-right corner of the editor.
Welcome Page
The Welcome page is the landing screen of the chat widget. It welcomes visitors and sets expectations before the conversation starts. The “Welcome page” section includes the following options:
- Welcome page toggle: Turns the Welcome page on or off. When off, visitors go directly to an active conversation flow.
- Background: Applies a gradient or textured pattern to the landing screen of the widget. The available styles are “None”, “Glow”, “Haze”, “Grain”, and “Drift”.
- Pattern color: Changes the accent theme of the selected background style. A color can be selected from a list of predefined colors or entered as a custom hexadecimal code.
- Message and text color: Sets the welcome message, of up to 50 characters, and a text color to ensure readability.
- Preview: Displays the background, text, and form configuration as visitors see them in the chat widget.
Form
When the Welcome page is enabled, expanding the “Form” section configures a pre-conversation form that collects information from visitors. The information can be used for routing or to provide additional context to agents.
By default, the form includes a custom message, a custom field, a custom dropdown, and a custom button. These default components cannot be removed, but they are only shown if configured. The following options are available:
- Title and Subtitle: Add a title of up to 50 characters and a subtitle of up to 120 characters to the form.
- Preview style: Displays the form and updates with every change to its components.
- Add field: Adds a custom component to the Welcome page. The available types are “Message”, “Field”, “Dropdown”, and “Button”.
- Delete field: Removes the corresponding custom component from the Welcome page.
- Required: Sets which fields must be filled in before visitors proceed to the chat screen.
- Drag and drop: Changes the order in which the components appear on the Welcome page.
The custom components work as follows:
- Custom message: Adds a message to the Welcome page. When the “Chat bubble” toggle is on, the message is shown inside a chat bubble.
Note: URLs added to a custom message are clickable links.
- Custom field: Adds an input field that lets visitors enter information. The label of the field is entered in the text box and mapped to the value being collected. For example, to request the email address of the visitor, type “Email” as the name of the field and select “Contact email” from the dropdown. For other types of information, such as an order number, define the value of the field as “Custom option”.
- Custom dropdown: Adds a single-choice question. The label of the dropdown is entered in the first text box, followed by the options to appear in the dropdown.
- Custom button: Adds a button that triggers an action. The label of the button is entered in the text box, and the action is selected from the list. The only available action is “Start the chat”.
After saving the configuration, the page returns to view mode, which displays the applied configuration and the content shown in the chat widget:
- Preview style: Displays the form.
- Studio arguments: A Studio argument value is generated for each custom field and custom dropdown. The arguments can be used in Studio flows to give agents more context or to route conversations. For more information, see Context Variables in this article.
Chat Widget Settings
Expanding the “Settings” section and clicking Edit displays the following configurable options:
- Chat immediately: Starts chat conversations without requiring any input from the visitor. For more information, see Chat Immediately in this article.
- Enable end chat button: Enables or disables the option that allows visitors to end the chat conversation. The button is shown in the chat widget header.
- Enable typing indicator: Enables or disables the indicator that shows contacts when an agent is typing or the virtual agent is preparing a reply, and shows agents when a contact is typing.
- Enable chat transcripts download: Allows contacts to download the chat transcript. For more information, see Downloading Chat Transcripts in this article.
- Enable minimize button: Enables or disables the option that allows visitors to minimize the chat conversation. The button is shown in the chat widget header.
- Display agent’s name: Shows the name of the agent in the chat widget. For more information, see Displaying the Agent’s Name in this article.
- Customize Autopilot’s name and avatar: Customizes how Autopilot appears in the chat widget. For more information, see Customizing the Autopilot’s Name and Avatar in this article.
- Clear chat history: Clears the conversation history from the browser after a chat session ends. For more information, see Clearing Chat History in this article.
Chat Immediately
The “Chat immediately” toggle starts chat conversations without requiring any input from the visitor. When the toggle is enabled and the initial form is disabled:
- The chat conversation starts as soon as the visitor clicks the chat launcher icon.
- The contact is routed to Autopilot or a live agent based on the configured Studio flow, which reduces friction and enables immediate assistance.
Note: In chat widget V2, this feature replaces the “Route conversation immediately after the user clicks this button” checkbox. Existing chat touchpoints transition automatically to the new configuration, which triggers Studio flows as soon as the visitor interacts with the chat button.
Downloading Chat Transcripts
The chat transcript download feature allows contacts to view or archive the history of a conversation by downloading the transcript directly from the chat widget. When the “Download transcript” toggle is enabled, contacts can find the “Download transcript” option in the chat widget menu. Clicking the option generates the transcript in plain text format and downloads it automatically. The file is available from the download list of the browser for future reference and record keeping.
Displaying the Agent’s Name
When the “Display agent’s name” toggle is on, contacts see the name of the agent under the agent’s messages. A message such as “Graham Shaw will handle your chat” is displayed when the agent takes over the conversation. Administrators can configure the display to show the full name, first name, last name, or a specific name of the agent.
Customizing the Autopilot’s Name and Avatar
- Customize Autopilot’s name: When the toggle is on, the name of Autopilot can be customized. Contacts see the name next to the corresponding messages. The default name is “ChatBot”.
- Customize Autopilot’s avatar: When the toggle is on, the avatar of Autopilot can be customized by providing an avatar URL. Contacts see the avatar under the corresponding messages.
Clearing Chat History
When the “Clear chat history” toggle is on, the chat widget automatically clears the conversation history from the client side after a chat session ends. The browser does not store personal information, including conversation history, names, email addresses, phone numbers, and other data entered by the user. This protects customer privacy on shared or public devices by preventing subsequent users from accessing previous conversations, which maintains customer trust and strengthens data privacy protection.
Important: When this mode is enabled, the chat widget runs independently in each browser tab and does not share data across tabs. When the mode is disabled, all tabs share a single conversation session. When the mode is enabled, users can run multiple standalone chat conversations simultaneously in different tabs of the same browser. All users are treated as new users, and the chat cannot recognize returning users for proactive chat support conditions.
Settings Tab
In the “Settings” tab, you can configure settings at the touchpoint level, as well as overview the current configuration of the available settings. Click the desired touchpoint’s Edit button to configure the settings.
Conversation Preview
With the “Conversation Preview” option, you have the ability to grant or restrict certain roles from previewing chat conversations directly from the “Inbox” app.
- Allow previews: Toggle to enable or disable the conversation preview. When enabled, all the conversations of this touchpoint will be able to be previewed by authorized users.
- Authorized roles: When the “Allow previews” option is enabled, you can select the roles that can preview the touchpoint’s conversations.
Quickstart Section
In the chat channel, there are 2 tabs: “Touchpoint” and “Quickstart”. Once you click the Quickstart tab, you are forwarded to the quickstart list.
The Chat Quickstart allows the contact person to view rich components—such as quick replies and rich messages—immediately upon opening the chat widget. This eliminates waiting time, enabling users to engage in conversations instantly without delays. With instant access to interactive elements, users can seamlessly start the chat and engage with an autopilot or with a live agent.
The Quickstart list [1] details the type, created time, and last updated time of quickstarts. Note: Message and quick reply type of the quickstart template are created by default.
Use the Create quickstart button [2] to create a new quickstart. Once clicked, it will prompt you to introduce the name and template (e.g. message and quick reply) selection. More details are available in the Creating a Quickstart section.
With the “More Options” (...) button you will be able to perform the following actions:
- Duplicate [3: Used to clone a quickstart.
- Delete [4]: Click it to delete a quick start.
Creating a Quickstart
After clicking the Create quickstart button, a pop-up will appear. Here, Admins can provide a name for the quickstart [1] and choose a template [2] to create it (e.g. “Message”, “Quick reply”). After clicking the Create button [3], the quickstart will be created.
Editing a Quickstart: Message
Note: Quickstart messages support rich formatting, including bold, italic, underline text, bullet points, embedded links, emojis, and more.
Admins can edit the message while creating a quickstart or by clicking on an existing quickstart from the list.
To begin editing, select the Edit icon [1]. You will now be able to use the Quickstart Message editor [2] to compose messages using rich text formatting. The editor supports:
- Bold, Italics, Underline.
- Bullet points and numbered lists.
- Hyperlink insertion to direct users to relevant resources.
To complete your editing, click the Save button [3].
If you wish to eliminate this quickstart click the Delete button [4]. In this case, a confirmation dialog will pop up to confirm the deletion of the quickstart.
Editing a Quickstart: Quick Reply
Quick Reply displays interactive buttons to encourage user engagement. When a user clicks one of the buttons, a message containing the postback value is sent to initiate the chat conversation. If Autopilot is enabled, it will handle and respond to the postback message automatically.
In order to manage a reply, click on it to Edit [1] its label and to insert the desired postback message [2]. This is the message that Autopilot receives and responds to.
The reply sequence can be altered, by dragging and dropping the replies.
To delete a reply message, simply click the message’s respective “Delete” [3] icon.
Click the Confirm [4] button to confirm the changes.
Note: The number of replies allowed is up to 10 buttons. At least one button is required.
Editing a Quickstart: Buttons
Quickstart Buttons provide an interactive interface that encourages user engagement. When a user clicks one of the buttons, a message containing the postback value is sent to initiate the chat conversation. If Autopilot is enabled, it will handle and respond to the postback message automatically.
To modify a button, click on it to edit its content. You can modify the “Label” [1] in the respective field. On the “Action type” dropdown [2] you will find the following options:
- Postback: The message that Autopilot receives and responds to.
- Open URL: To configure a valid URL to open the web page in a new tab from the chat widget.
- Call to number: Configure a valid number to make a call from the chat widget.
The button sequence can be altered by dragging and dropping the respective buttons.
Click the Confirm [3] button to confirm the changes.
Note: The number of replies allowed is up to 10 buttons. At least one button is required.
Editing a Quickstart: Enable Fly Out
The Proactive Chat Fly-Out Message displays a floating invitation outside the chat launcher bubble to instantly capture visitor attention. When enabled, it appears proactively, inviting users to start a conversation without first opening the launcher. This helps increase engagement and conversion by making chat invitations more visible and timely.
To enable, turn on the “Fly out” toggle [1]. The setting applies across all Quick Start types, including messages, quick replies, and buttons.
Note: Fly-Out Message is supported only on Chat Widget V2. For V2 chat touchpoints using custom code to modify the chat launcher, the feature may not display as expected. If you would like to enable the Fly-Out Message in this scenario, please submit a support ticket.
[Preview] Editing a Quickstart: Edit Conditions
Note: This is a preview feature. To enable this capability, please contact your Talkdesk representative.
Proactive chat leverages a combination of behavioral data (like Time on website and Number of pages visited), Page URL visits, and Custom Variables to trigger a personalized message.
This shifts support from reactive to proactive, ensuring timely, contextual intervention on high-value pages to prevent friction, increase conversions, and enhance the overall customer experience.
Locate the specific quick start you wish to edit. Click on the Edit icon to open the conditions editor view.
Visitor [1]
- All: The condition set applies to every visitor on the website.
- New Visitor: The condition set only applies to users who are visiting the site for the first time.
- Returning Visitor: The condition set only applies to users who have previously visited the site.
Note: The chat widget identifies whether a visitor is a new or returning user based on their interactions with web pages where the widget is deployed. User identification is based on the device and browser used. A contact person will be considered a new user if they:
- Use a different browser,
- Use a different device.
- Clear their browser’s local storage.
Match [2]
- Matches ALL of these conditions: The fly out will only trigger if the visitor satisfies every single condition listed (e.g., they must be on the cart page AND have a low survey score AND have visited 3 pages).
- Matches ONE of these conditions: The fly out will trigger if the visitor satisfies any one of the conditions listed.
Time on Website [3]
Time on website tracks the duration of the visitor's active engagement within the website, specifically on pages deployed by the chat widget. The configurable range is from 10 to 1800 seconds. Periods of inactivity or idle time (such as viewing other browser tabs or closing the window) are excluded to ensure accurate measurement of focused time.
Number of Pages Visited [4]
This condition requires the visitor to have viewed a minimum specified total count of pages during the current browsing session. Every page view, including repeat visits to the same page, contributes to this total.
Page URL [5]
The Page URL condition allows you to trigger the proactive chat based on the specific address of the page the visitor is viewing. This is essential for targeting or excluding specific high-value pages.
The condition uses four main operators:
- 'is' triggers the chat only if the URL is an exact match.
- 'is not' triggers it if the URL is anything but the exact match.
- 'contains' is flexible, triggering the chat if any part of the URL includes the specified keyword.
- 'doesn't contain' triggers the chat if the URL lacks the specified keyword.
Custom Variable [6]
Allows for personalized targeting by key-value pairs transmitted from the website using the webchat.setContextParam() SDK method.
These variables, which provide context such as user language or a VIP status, can be evaluated using several operators: 'is,' 'is not,' 'is greater than,' 'is less than,' 'contains,' and 'doesn't contain.'
This allows administrators to create rules based on dynamic data received from the customer's browser to precisely control the chat fly out trigger. Refer to Chat Widget v2 for how to set context.
Important Note: The Proactive Chat feature monitors user behavior within a one-hour time window. This means: If a visitor remains active on the website for more than one hour, any behavior after that period will not be tracked.
Chat Widget Integration
Widget Integration via Script
Access “Admin” > “Channels” > “Chat” > “Touchpoint”. In the Touchpoint tab in view mode, locate the widget code section.
Select the code snippet and click the Copy button. Paste the code snippet before the following closing tag on your own website:
- </body>
Note: Copy it onto every page where you want the chat widget to appear.
Chat Widget Secure CSP Mode Integration
The Chat Widget integration script injects inline <style> tags at runtime. In regulated healthcare environments (e.g., DigiD/GDPR), security policies prohibit 'unsafe-inline' in the style-src CSP directive. As a result, the browser blocks the injected styles, preventing the widget from loading and potentially causing an unhandled error.
When your website enforces a strict Content Security Policy (CSP) with 'unsafe-inline' disabled, the default Chat Widget JS-SDK snippet will not function because it relies on dynamically generated inline styles. This behavior is restricted in secure CSP environments.
To deploy the Chat Widget successfully under these conditions, follow the best practice “Chat Widget Secure CSP Mode Integration with Disabled unsafe-inline CSP” section in Chat Widget V2.
Chat Widget Customization
In order to better adapt the chat widget to your website’s characteristics, you can customize the widget’s look and the user experience. Please refer to this article for more information.
Contact Experiences
Displaying Markdown Format
Chat widget now supports Markdown format rendering directly within the chat, allowing messages generated by the Agentic AI platform to display rich formatting. This enhances message clarity, readability, and engagement in chat interactions, making AI-assisted responses more visually structured and user-friendly.
- Configurations: Admins do not need to enable or configure this feature. The system automatically renders Markdown content generated by the AI Agent.
-
Supported markdown: Most commonly used Markdown outputs from Agentic AI are supported
- Headers
- Bold, italics
- Lists
- Tables
- Embedded links
- Code Blocks
- Blockquotes
Note: Markdown rendering is supported only in the chat channel. For channels such as WhatsApp and SMS, it is recommended to use prompts to prevent markdown output from Agentic AI, ensuring messages remain plain text for optimal display.
Context Variables
The initial node on the “Incoming Message” flow in Studio allows you to bring context coming from the chat widget.
It is possible to collect context variables in the following ways:
- Data provided by the visitor: Asking for information in the initial screen through custom fields and custom dropdowns. The visitor will then fill in the requested information.
- Data provided by your system: Receiving information from your website when the visitor opens the chat widget or when the visitor starts a chat conversation.
Note: You can use both ways at the same time.
Collected variables must be mapped to the “Incoming Message” node of the Studio flow that is assigned to the chat touchpoint. After that, you can use them either to manage which variables you would like to present to your agents as additional context for routing purposes, or build integrations with other Talkdesk Products.
Context Variables Received from the Initial Screen
Go to “Admin” > “Channels” > “Chat” > “Touchpoint”, open the “Appearance” tab, and click the Edit button. Enable the initial screen and add the fields that will be collecting the context you need. For more details, please see this section.
Check the Studio arguments related to each field of the initial screen. To know more about Studio arguments, please read the following articles:
Open the touchpoint’s Studio flow in edit mode. Select the Incoming Message node, add the arguments, and map the respective flow variables:
- “Argument name”: Copy the field’s argument name that is shown on the “Appearance” tab (view mode) and paste it into the argument input box.
- “Map to flow variable”: For the contact details variables, the following naming should be applied:
- field_name1 > contact_name
- field_number1 > contact_number
- field_email1 > contact_email
- For any other argument, any other variable name can be applied.
Finish the configuration according to your requirements and click Save.
Context Variables Received from the Website
In the widget code, locate the commented section with the function shown below, and decomment it:
- setContext()
Example: Receiving variables when the conversation is initiated (with static variables).
Next, locate the function shown below and modify its parameters to pass in the desired data:
- webchat.setContextParam()
You will now choose when you want to receive the context variables from your website.
To receive them when the conversation is initiated, keep the function:
- webchat.onConversationStart = function() { setContext() }
And then delete the function:
- webchat.onOpenWebchat = function() { setContext() }
To receive them when the chat widget is open, keep the function:
- webchat.onOpenWebchat = function() { setContext() }
And then delete the function:
- webchat.onConversationStart = function() { setContext() }
The name of the variables you added to the function shown below correspond to the Studio arguments:
- webchat.setContextParam()
Open the touchpoint’s Studio flow in edit mode. Select the Incoming Message node, add the arguments, and map the respective flow variables:
- “Argument name”: Copy the variable name you added to the widget code within the “webchat.setContextParam” function and paste it into the argument input box.
- “Map to flow variable”: For the existing variables, the following naming should be applied:
- argument that collects name ➞ contact_name
- argument that collects number ➞ contact_number
- argument that collects email ➞ contact_email
- For any other argument, any other variable name can be applied.
Finish your Studio flow configuration and Save your configurations.
Possible Applications for Context Variables
Show Additional Context to Agents
In the “Manage context” section of the touchpoint’s Studio flow, you can define the context that will be shown to your agents. To do so, open the Studio flow in edit mode, and click on this button: . Then, select the variables you would like your agent to have access to during the chat conversation.
Examples received from the initial screen and an example received from the website.
Prefill contact details card
By receiving the visitor’s name, phone number and/or email address, you can populate the contact details card.
For that, you need to expose those variables as context in the “Manage context” section. Open the Studio flow in edit mode, and click: . Then, select the variables corresponding to the contact details.
Note: If you get a valid phone number, the agent will have the ability to choose that number when clicking-to-call the visitor.
Route Conversations Based on Conditional Statements
With the Conditional Statement node, you can route a chat conversation to a queue that matches the predefined conditions.
You can use the context variables to set these conditions and later use the “Assign agents to message” node to set the queue to which the chat conversation should be routed to.
Other Possible Applications
There are several uses for context variables within different Studio’s nodes, for instance, assigning a conversation to a queue based on the variable’s value in the “Assign agents to message” node.
These variables can also be passed to external systems through integrations or automations that it is possible to configure within Talkdesk’s system.
Visitor Identification
In the Conversations app, a visitor will be identified as “Visitor #NNN” if no Contact is created or assigned to the visitor during the chat conversation.
Note: If the “Name” field of the “Contact Details” card is populated, the visitor will be identified by that name in the Assigned to you tab, even if the Contact is not saved.
In Reporting, a visitor will be identified by “Visitor #NNN” if no Contact is created or assigned to the visitor when a chat conversation is being handled.
Visitor identification can be done manually or automatically based on how contact information is obtained. The possibilities are:
-
Contact is created or identified manually when the data is provided by the visitor:
- Option 1: The visitor will provide the requested information, and the agent will populate the “Contact Details” card and then save it as a new contact or merge with an existing contact.
- Option 2: The visitor will fill in the requested information in the chat widget’s initial screen, and the agent will validate the information that was populated in the “Contact Details” card. It can then be saved as a new contact or merged with an existing one.
In these scenarios, if the same visitor contacts again and the same contact information is provided, Talkdesk will not identify the visitor automatically.
Note: The Contact is not created automatically to allow agents to verify the reliability of the information provided. This step is essential as there is no prevention in place for incorrect or mistaken contact details entered by users in the pre-conversation form, including the possibility of entering someone else's contact information.
- Contact is created or identified automatically when the data is provided by your system by receiving the contact information from your website, using the “Chat User Identification” feature.
This feature allows you to send the email address or the phone number of the visitor to Talkdesk, through a designated variable in the chat widget’s code. When the visitor initiates a chat conversation, the system receives the visitor’s phone number or email address, and then it automatically saves it as a new contact or matches it with an existing contact.
In this scenario, if the same visitor contacts again, Talkdesk will identify the contact.
The “Chat User Identification” feature is useful for website sections that demand user authentication. With this feature, visitors can be reliably identified, ensuring that the information being sent originates from the user initiating the chat conversation.
Note: Talkdesk will only create the Contact if the received phone number or email address is in a valid format.
Creating and Identifying a Contact Manually
When the contact information is provided by the visitor, agents must decide whether to create (or not) a new contact, or assign (or not) the chat conversation to an existing contact. This is due to the agent needing to validate the provided information.
Using a Pre-Conversation Form to Collect the Contact Information
Head to “Admin” > “Channels” > “Chat” > “Touchpoint”. Open the “Appearance” tab and click Edit.
Expand the initial screen section. Now, add custom fields and define them as “Contact name”, “Contact number”, and “Contact email”.
Click “save” and check the Studio arguments.
Open the touchpoint’s Studio flow in “Edit” mode. Select the Incoming Message node and add the arguments, and add the arguments as follows:
- field_name1 > contact_name
- field_number1 > contact_number
- field_email1 > contact_email
Finish the configuration according to your requirements and press Save.
Click the button and select the variables of the contact details:
How It Works
If you are not requesting the contact information in advance, your agents will have to request that information during the chat conversation.
They must then copy/paste that information into the “Contact Details” card and then save as a new contact or merge it with an existing one.
If you are using the initial screen to request contact information in advance, the “Contact Details” card will be populated with that information.
Then, agents must validate which information they want to keep and save as a new contact or merge it with an existing one.
Creating and Identifying a Contact Automatically
The “Chat User Identification” feature provides an automated process to create and identify visitors that initiate a chat conversation with your agents.
Visitors can be identified by phone number or email address.
Configuration steps
First, locate the following function in the widget code:
- webchat.setContextParam()
To send the visitor’s phone number (in E.164 format) or email address from your website to Talkdesk system, use the variable:
- td_contact_person_identification
Note: The data must be received in a valid format.
Make sure you keep one or both of the following functions in that section of the widget code:
- webchat.onConversationStart = function() { setContext() }
- webchat.onOpenWebchat = function() { setContext() }
How It Works
If the “td_contact_person_identification” variable is populated with a valid phone number or email address, the system will search for a matching phone number and email address in the “Contacts” list.
- If it does not find a match, a new contact is automatically created. The name and the phone number/email address will be populated with the variable’s value.
- If it finds a single match, the contact will be identified.
- If it finds multiple matches, the system will give the option to choose from several matching contacts.
Notes:
- If the variable’s value is empty or is in an invalid format, the system will not create or identify visitors automatically. The manual procedure will be the one to follow. To know more, please check this section.
- If the phone number or email address is provided in the initial screen, the system will override that information regarding contact creation and identification.