vania-janet/multiturn-rag-retrieval-data huggingface dataset:
You can add these to your skill and start using them immediately. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-system-entities). 
 Try it out A chat window that you use to test as you build. For example, from the dialog skill's "Try it out" pane, you can mimic the behavior of a customer and enter a query to see how the assistant responds. You can test only the current skill; you cannot test your assistant and all attached skills from end to end. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-tasks). 
 Variable A variable is data that a customer shares with the assistant, which is collected and saved so it can be referenced later. In an actions skill, you can collect action and session variables. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-actions-overviewactions-overview-step-variables). 
 Web chat An integration that you can use to embed your assistant in your company website. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chat). 
 Webhook A mechanism for calling out to an external program during a conversation. For example, your assistant can call an external service to translate a string from English to French and back again in the course of the conversation. [Learn more](https://cloud.ibm.com/docs/assistant?topic=assistant-webhook-overview). 



* I can't log in

If you are having trouble logging in to a service instance or see messages about tokens, such as unable to fetch access token or 400 bad request - header or cookie too large, it might mean that you need to clear your browser cache. Open a private browser window, and then try again.



* If accessing the page by using a private browsing window fixes the issue, then consider always using a private window or clear the cache of your browser. You can typically find an option for clearing the cache or deleting cookies in the browser's privacy and security settings.
Overview: Securing the web chat 

If you enable security, you can configure the web chat to authenticate users, protect private data, and restrict access to your assistant.

All messages that are sent between the web chat and the assistant are encrypted using Transport Layer Security (TLS), which protects sensitive data as it travels through the network. However, there are still potential security exposures that you might need to protect against. By enabling the web chat security feature and updating your website code appropriately, you can add the following protections:



* You can prevent unauthorized websites from sending messages to your assistant, even if they copy your web chat embed script. (The unique identifiers in the embed script, such as the integration ID and service instance ID, are visible to anyone who has access to your website.)
* You can securely authenticate customers in order to control access to features of your assistant that require authorization.
* You can encrypt sensistive data so that customers cannot see it, while still allowing your assistant to access it.



Web chat security uses JSON Web Tokens (JWTs), which are data objects that are sent with each message from your website to the Watson Assistant service. Because a JWT is digitally signed using a private encryption key that only you have, it ensures that each message originates with your website. The JWT payload can also be used to securely authenticate users and carry encrypted private data.

For detailed information about JSON Web Tokens, see the [JWT specification](https://tools.ietf.org/html/rfc7519)).

Enabling web chat security involves making the following customizations:



* Implementing web application server code that generates a JWT signed with your private encryption key
* Customizing the web chat configuration to provide the generated JWT
* Enabling security in the web chat security settings

After you enable web chat security, any message received by the web chat integration that is not accompanied by a properly signed JWT will be rejected.



For detailed information about how to complete these steps, see [Enabling web chat security](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-security-enable).
[This link](https://www.ibm.com/products/watson-assistant/demos/lendyr/demo.html){{target="_self" rel="noopener noreferrer"}} opens in the same tab.



For detailed information about the Markdown format, see the [CommonMark specification](https://spec.commonmark.org/).







 Live agent transfer 

The web chat supports transferring the customer to a human in situations the assistant can't handle. If you configure one of the supported contact center integrations, the web chat can open a separate chat window in which the customer can communicate with a live agent.

Your assistant can then initiate a transfer in situations when the assistant is unable to handle a customer's requests. (For more information about initiating a transfer, see [Connecting to a live agent](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-human-agent).)

For information about how to add a contact center integration to the web chat, see [Adding contact center support](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-web-chat-haa).





 Technical details 

The web chat is displayed on your web site by a short JavaScript code snippet, which calls additional JavaScript code that is hosted by IBM Cloud. The hosted code is automatically updated with new features and fixes, so by default you will always have the latest version. (You can optionally [lock to a specific version](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-versions) if you prefer to control upgrades yourself.)

The code snippet that creates the web chat widget includes a configuration object, which you can modify to change the appearance and behavior of the web chat. The configuration object also specifies details that enable the web chat to connect to your assistant. If you are comfortable writing JavaScript code, you can customize the web chat by modifying the code snippet and using the web chat API.

The web chat uses the Watson Assistant v2 stateful API to communicate with the assistant.
* [NICE inContact](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/incontact/webChat)
* [Twilio Flex](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/flex/webChat)
* [Bring your own (starter kit)](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter)



6. Follow the instructions that are provided on the screen to complete the integration process.



After you integrate the assistant, test it from the target channel to ensure that the assistant works as expected.

![Plus or higher plans only](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/plus.png) For environments where private endpoints are in use, keep in mind that these integrations send traffic over the internet. For more information, see [Private network endpoints](https://cloud.ibm.com/docs/assistant?topic=assistant-securitysecurity-private-endpoints).





 How service desk platform integrations work 

Watch a 4-minute video about integrating your assistant with a live agent integration, such as Zendesk:

To learn about how service desk integrations with your assistant can benefit your business, [read this blog post](https://medium.com/ibm-watson/contact-center-post-394dff427c8).





 Integration limits 

The number of integrations you can create in a single service instance depends on your Watson Assistant plan.



Service plan details

 Service plan Integrations per assistant 

 Enterprise 100 
 Premium (legacy) 100 
 Plus 100 
 Trial 100 
 Lite 100
The identifiers in the embed script (such as integrationIDserviceInstanceID) are not considered secret, and are visible to anyone who has access to your website. For more information, see [Security](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-architectureweb-chat-architecture-security).
6. If the system that hosts your website has limited Internet access (for example, if you use a proxy or firewall), make sure the URLs that host the web chat are accessible. For more information, see [Access to web chat hosts](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-architectureweb-chat-hosts).
7. Open the web page (or local test file) in your browser. You should see the launcher icon displayed on the page:

![Web chat launcher icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/web-chat-icon.png)
8. Click the launcher icon to open the chat window.

![Web chat window](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/web-chat-window.png)
9. Paste the same embed script into each web page where you want the assistant to be available to your customers.

You can paste the same script tag into as many pages on your website as you want. Add it anywhere where you want users to be able to reach your assistant for help. However, be sure to add it only once on each page.



You can now test your assistant and see its responses just as your customers would.
Configuring style and appearance 

On the Style tab, you can configure the overall appearance of the web chat widget. You can make the following changes:



*  Set the assistant name. Click Assistant's name as known by customers to specify the name that is displayed in the header of the chat window. The name can be up to 64 characters in length.
*  Change the colors used in the web chat widget. You can set the following colors:



*  Primary color: The color of the web chat header.
*  Secondary color: The color of the customer input message bubble.
*  Accent color: The color of interactive elements such as the following:



*  Web chat buttons such as the suggestions button and the "send message" button
*  The border around the input text field (when in focus)
*  The markers that appear beside the assistant’s messages
*  The borders that appear around buttons and drop-down lists when customers select from options
*  The home screen background





Each color is specified as an HTML hexadecimal color code, such as FF33FC for pink and 329A1D for green. To change a color, type the HTML color code you want to use, or click the dot next to the field and choose the color from the interactive color picker.
*  Enable or disable the Built with IBM Watson watermark that is displayed in the web chat widget. To disable the watermark, click to toggle the IBM Watermark switch to the off position. (The watermark cannot be disabled on the Lite plan.)
*  Provide an avatar image to represent your assistant or organization in the web chat header. Click Add an avatar image to add an image, or Change avatar image to change an image you have previously added.

Specify the URL for a publicly accessible hosted image, such as a company or brand logo or an assistant avatar. The image file must be between 64 x 64 and 100 x 100 pixels in size.



Style changes you make are immediately reflected by the web chat preview that is shown on the page. However, no configuration changes are applied to the environment until you click Save and exit.
When the web chat widget is being interacted with by a user, we track the features that are being used, and events such as how many times the widget is opened and how many users start conversations. This information does not include Assistant training data or the content of any chat interactions. The information being sent to Amplitude is not Content as defined in the Cloud Service Agreement (CSA); it is Account Usage Information as described in Section 9.d of the CSA and is handled accordingly as described in the [IBM Privacy Statement](https://www.ibm.com/privacy). The purpose of this information gathering is limited to establishing statistics about use and effectiveness of the web chat and making general improvements.





 Private network endpoints 

You can set up a private network for Watson Assistant instances that are part of a Plus or Enterprise service plan. Using a private network prevents data from being transferred over the public internet, and ensures greater data isolation.

![Plus or higher plans only](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/plus.png) This feature is available only to users of paid plans.

Private network endpoints support routing services over the IBM Cloud private network instead of the public network. A private network endpoint provides a unique IP address that is accessible to you without a VPN connection.

For implementation details, see [Public and private network endpoints](https://cloud.ibm.com/docs/watson?topic=watson-public-private-endpoints).



 Important private network endpoint notes 



* The integrations that are provided with the product require endpoints that are available on the public internet. Therefore, any built-in integrations you add to your assistant will have public endpoints. If you only want to connect to a client application or messaging channel over the private network, then you must build your own custom client application or channel integration.
* Before you can use a search integration or search skill, you must create a Discovery instance with a private network endpoint. The list of Discovery instances that are displayed for you to connect to includes only instances with private network endpoints.
We've removed the need to navigate between intents, entities, and dialog to create conversational flows. Building can all now be done in one simple and intuitive interface.

Web chat integration is created automatically
: When you create a new assistant, a web chat integration is created for you automatically (in addition to the preview link integration, which was created previously). These integrations are added also to the assistant that is auto-generated (named My first assistant) when you create a new service instance. For more information, see [Integrating the web chat with your website](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chat).

Text messaging integration was renamed
: The Twilio messaging integration was renamed to SMS with Twilio.





 9 October 2020 

Search skill update
: Support was added for a new version of the Discovery API which adds the following capabilities:



* The search skill can now connect to existing Premium Discovery service instances.
* When you connect to a Box, Sharepoint, or Web crawl data collection, the result content fields are automatically populated for you. The Title now uses the title field from the source document instead of the extracted_metadata.title field, which provides better results.







 1 October 2020 

Introducing the Phone integration!
: Your customers are calling; now your assistant can answer. Add a phone integration to enable your assistant to answer customer support calls. The integration connects to your existing Session Initiation Protocol (SIP) trunk, which routes incoming calls to your assistant. For more information, see [Integrating with phone](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-phone).

Introducing the Twilio messaging integration!
: Enable your assistant to receive and respond to questions that customers submit by using SMS text messaging. When you enable both new integrations, your assistant can send text messages to a customer in the context of an ongoing phone conversation. For more information, see [Integrating with Twilio messaging](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-sms).
To change the size of the web chat window, you can use the [updateCSSVariables()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsupdatecssvariables) instance method to modify the CSS styling.

If you need to change the position of the web chat window, or you need to change the size beyond the limits allowed in the CSS, you can use a custom DOM element to contain the web chat window. To do this, use the [element](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-configurationoptionselement) configuration option.

![development icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/development-icon.png)Tutorial: For a tutorial that shows how render the web chat in a custom element, see [Tutorial: Customizing the size and position of the web chat](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-size-position).

Adding the web chat to your mobile application
: You can use a WebView with a JavaScript bridge to add the web chat to your mobile application. For more information, see [Adding the web chat to your mobile application](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-mobile).





 Customizing the conversation 

Intercepting and modifying messages
: By [subscribing to events](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventssummary), your code can intercept messages that are sent and received between the customer and the assistant, and even modify their content.
The web chat uses the sandbox attribute of the iframe element to grant only the following permissions:



 Permission Description 

 allow-downloads Allows downloading files from the network, if the download is initiated by the user. 
 allow-forms Allows submitting forms. 
 allow-scripts Allows running scripts, but not opening pop-up windows. 
 allow-same-origin Allows the content to access its own data storage (such as cookies), and allows only very limited access to JavaScript APIs. 



A script running inside a sandboxed iframe cannot make changes to any content content outside the iframe, if the outer page and the iframe have different origins. Be careful if you use an iframe response to embed content that has the same origin as the the page where your web chat widget is hosted; in this situation the embedded content can defeat the sandboxing and gain access to content outside the frame. For more information about this potential vulnerability, see the sandbox attribute [documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframeattr-sandbox).







 Adding an Option response type 

Add an option response type when you want to give the customer a set of options to choose from. For example, you can construct a response like this:



Response options

 List title List description Option label User input submitted when clicked 

 Insurance types Which of these items do you want to insure? 
 Boat I want to buy boat insurance 
 Car I want to buy car insurance 
 Home I want to buy home insurance 



Most integrations display the options as buttons if there are only a few items (4 or fewer, for example).

![Shows a small options list in the Preview that is displayed as buttons.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/options-buttons.png)

Otherwise, the options are displayed as a list.

To add an Option response type, complete the following steps:



1.
Enabling web chat security 

To enable web chat security, you must make changes to your web application server code and the web chat embed script, as well as the web chat integration settings.



 Before you begin 

Before you enable security, you must create an RS256 public/private key pair. You can use a tool such as OpenSSL or PuTTYgen.

For example, to create the key pair at a command prompt using OpenSSL, you would use the command openssl genrsa -out key.pem 2048.

Save the generated key pair in a secure location.

Make sure these keys are accessible only by your server code. Never pass them to a client browser through your website.





 Generating a JWT 

To use web chat security, you must configure the web chat on your website to send a JSON Web Token (JWT) with each message to the assistant. The JWT is used to verify the origin of messages sent from your website, and optionally to carry additional encrypted data. Your website will need to be able to generate a new JWT at the beginning of each session, and also whenever an existing JWT expires.

Do not hardcode a JWT in your website code or share JWTs between users.

On your server, implement a function that generates and returns a JSON Web Token (JWT) that is signed with your private key. You will use this token to verify the origin of messages sent from your website, and optionally to carry additional encrypted data.

Most programming languages offer JWT libraries that you can use to generate a token. To validate signed JWTs, the web chat integration uses the [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken) library with the RS256 algorithm.

The JWT payload must specify the following claims:



* sub: A unique user ID that identifies the customer who is interacting with the web chat. This can be either a generated unique identifier (for anonymous users) or an authenticated user ID.
For more information, see [Instance methods](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodswriteableelements).
* Gave the Send button a new look

Changed the icon from ![Arrow send icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/web-chat-send-old.png) to ![Paper airplane send icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/web-chat-send.png).
* Securing your web chat is easier: You no longer need to specify the acr claim when you define the JWT. The Authentication Context Class reference is managed by the web chat automatically.
* Improved the quality of non-English translations.
* Made a few minor bug fixes.







 2.1.2 

Release date: 2 July 2020



* Fixed a loading issue: Addressed an issue that prevented the web chat from loading properly for some deployments with short JWT expiration claims.







 2.1.1 

Release date: 1 July 2020



* Service desk agent initials are displayed: When the web chat transfers a user to a service desk agent, the agent's avatar is displayed in the chat window to identify messages sent from the service desk agent. If the agent does not have an avatar, the first initial of the agent's given name is displayed instead.







 2.0 

Release date: 16 June 2020



* Versioning was added to web chat: For more information, see [Versioning](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=key-conceptsversioning).