vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Supporting global audiences 

You can build an assistant that understands customer messages in any of the languages that are supported by the service. The responses from your assistant are defined by you and can be written in any language you want.

However, some of the phrases that are displayed in the web chat widget are part of the web chat itself and do not come from the assistant. By default, these hardcoded phrases are specified in English, but you can apply a different language by adding lines to the embedded web chat script.

The hardcoded phrases used by the web chat widget are specified in language pack files. The web chat provides language packs that contain translations of each English-language phrase that is used by the web chat. You can instruct the web chat to use one of these other languages files by using the instance.updateLanguagePack() method.

Likewise, the web chat applies an American English locale to content that is added by the web chat unless you specify something else. The locale setting affects how values such as dates and times are formatted.

To configure the web chat for customers outside the US, follow these steps:



1.  To apply the appropriate syntax to dates and times and to use a translation of the English-language phrases, set the locale. Use the instance.updateLocale() method.

For example, if you apply the Spanish locale (es), the web chat uses Spanish-language phrases that are listed in the es.json file, and uses the DD-MM-YYYY format for dates instead of MM-DD-YYYY.

The locale you specify for the web chat does not impact the syntax of dates and times that are returned by the underlying skill.
2.  To change only the language of the hardcoded English phrases, use the instance.updateLanguagePack() method.

For more information, see [Instance methods](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodslanguages).
3.  To change the text direction of the page from right to left, use the direction method. For more information, see [Configuration](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-configurationconfigurationobject).
* [Integrating with SMS with Twilio](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-sms)



Preview link change
: When you create a preview link, you can now test your skill from a chat window that is embedded in the page. You can also copy the URL that is provided, and open it in a web browser to see an IBM-branded web page with the web chat embedded in it. You can share the URL to the public IBM web page with others to get help with testing or for demoing purposes. For more information, see [Testing your assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-link).

Import and export UI changes
: The label on buttons for importing skills changed from Import to Upload, and the label on buttons for exporting skills changed from Export to Download.

Coverage metric change
: The coverage metric now looks for nodes that were processed with a node condition that includes the anything_else special condition instead of nodes that are named Anything else. For more information, see [Starting and ending the dialog](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-start).





 15 January 2021 

Use new webhooks to process messages!
: A set of new webhooks is available as a beta feature. You can use the webhooks to perform preprocessing tasks on incoming messages and postprocessing tasks on the corresponding responses. You can use the new log webhook to log each message with an external service. For more information, see [Webhook overview](https://cloud.ibm.com/docs/assistant?topic=assistant-webhook-overview).

New service desk support reference implementation
: You can use the reference implementation details to integrate the web chat with the NICE inContact service desk. For more information, see [Adding service desk support](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chatdeploy-web-chat-haa).

Phone and SMS with Twilio integration updates
This means that enabling web chat security disables the shareable preview link, which does not send JWTs with messages. For more information about the preview link, see [Copying a link to share](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-preview-sharepreview-share-link).

To enable security, complete the following steps:



1. On the Security tab of the web chat integration settings, set the Secure your web chat switch to On.
2. In the Your public key field, paste your [public key](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-security-enableweb-chat-security-enable-prereq).

Watson Assistant uses the public key to verify that incoming messages originate from your website.



The following diagram shows the flow of messages between the web chat and the assistant when web chat security is enabled:

![Web chat security message flow](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/web-chat-security.png)
[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.
* 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).

With web chat security enabled, you can optionally implement additional security measures as needed:



* You can use JWTs to securely [authenticate customers](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-securityweb-chat-security-authenticate) by user ID, which makes it possible for your assistant to control access to functions that require authorization.

Without web chat security enabled, each customer who uses your assistant is identified only by the user_id property that is part of the message request. This is sufficient for identifying unique users for billing purposes, but it is not secure, because it could be modified.

By encoding user identity information as part of the JWT payload, you can authenticate users securely. The JWT is signed and cannot be modified by the user.

For more information about using JWTs for secure authentication, see [Authenticating users](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-security-authenticate).
* You can [prevent unauthorized access](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-securityweb-chat-security-encrypt) to sensitive customer information by encrypting it and including it as part of the JWT user payload.

The user payload is a part of the JWT you can use to send information you want your assistant to have access to, but that you do not want customers to see. This information is stored only in private variables, which cannot be seen by customers and are never included in logs.
You can return responses with multimedia or interactive elements such as images or clickable buttons to simplify the interaction model of your application and enhance the user experience.

In addition to the default response type of Text, for which you specify the text to return to the user as a response, the following response types are supported:



* Connect to human agent: The dialog calls a service that you designate, typically a service that manages human agent support ticket queues, to transfer the conversation to a person. You can optionally include a message that summarizes the user's issue to be provided to the human agent.
* Channel transfer: The dialog requests that the conversation be transferred to a different channel (for example, from the Slack integration to the web chat integration).
* Image: Embeds an image into the response. The source image file must be hosted somewhere and have a URL that you can use to reference it. It cannot be a file that is stored in a directory that is not publicly accessible.
* Video: Embeds a video player into the response. The source video must be hosted somewhere, either as a playable video on a supported video streaming service or as a video file with a URL that you can use to reference it. It cannot be a file that is stored in a directory that is not publicly accessible.
* Audio: Embeds an audio clip into the response. The source audio file must be hosted somewhere and have a URL that you can use to reference it. It cannot be a file that is stored in a directory that is not publicly accessible.
* iframe: Embeds content from an external website, such as a form or other interactive component, directly within the chat. The source content must be publicly accessible using HTTP, and must be embeddable as an HTML iframe element.
* Option: Adds a list of one or more options. When a user clicks one of the options, an associated user input value is sent to your assistant. How options are rendered can differ depending on the number of options and where you deploy the dialog.
* Pause: Forces the application to wait for a specified number of milliseconds before continuing with processing. You can choose to show an indicator that the assistant is working on typing a response.
This integration, which is now generally available, creates a connection between your assistant and WhatsApp by using Twilio as a provider. For more information, see [Integrating with WhatsApp](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-whatsapp).

Web chat home screen now generally available
: Ease your customers into the conversation by adding a home screen to your web chat window. The home screen greets your customers and shows conversation starter messages that customers can click to easily start chatting with the assistant. For more information about the home screen feature, see [Configuring the home screen](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chatdeploy-web-chat-home-screen). The home screen feature is now enabled by default for all new web chat deployments. Also, you can now access context variables from the home screen. Note that initial context must be set using a conversation_start node. For more information, see [Starting the conversation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-startdialog-start-welcome).

Connect to human agent response type allows more text
: In a dialog skill, the response type Connect to human agent now allows 320 characters in the Response when agents are online and Response when no agents are online fields. The previous limit was 100 characters.

Legacy system entities deprecated
: In January 2020, a new version of the system entities was introduced. As of April 2021, only the new version of the system entities is supported for all languages. The option to switch to using the legacy version is no longer available.





 6 April 2021 

Service API endpoint change
: As explained in [December 2019](https://cloud.ibm.com/docs/assistant?topic=assistant-release-notesassistant-dec122019), as part of work done to fully support IAM authentication, the endpoint you use to access your Watson Assistant service programmatically is changing. The old endpoint URLs are deprecated and will be retired on 26 May 2021.
* [Kustomer](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/kustomer/webChat)
* [eGain Advisor Desktop](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/egain/webChat)
* [Enghouse Interactive CCaaS](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/tree/main/src/enghouse)
* [Bring your own (starter kit)](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter)



The starter kit reference implementations, while functional, are examples only, and have not been vetted for production use. You should perform robust testing before deploying these integrations in production.

After you set up a contact center integration, you must update your actions to ensure they understand user requests to speak to someone and can transfer the conversation properly.
You can make simple changes to the color of things like the text font and web chat header from the Style tab of the web chat configuration page. To make more extensive style changes, you can set the CSS style color theme to a different theme or specify your own theme.



* You can choose to use a different base Carbon Design theme. The supported base themes are color themes that are defined by [IBM Carbon Design](https://www.carbondesignsystem.com/guidelines/color/usage/). For more information, see [Theming](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodstheming).
* Alternatively, you can set individual variables within the theme to customize specific UI elements. For example, the text that is displayed in the chat window uses the fonts IBMPlexSans, Arial, Helvetica, sans-serif. If you want to use a different font, you can specify it by using the instance.updateCSSVariables() method.
* Apply style settings to user-defined response types. If you enable the web chat to return custom response types, be sure to apply existing or custom CSS classes to them. For more information, see [Custom content](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-render).
* Change the style of the home screen that can be displayed when the web chat is opened. For more information about the home screen, see [Adding a home screen](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chatdeploy-web-chat-home-screen). For more information about how to customize it, see [HTML content](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-renderhtml)



The web chat is embedded directly on your page, not inside an iframe. Therefore, the cascading style sheet (CSS) rules for your website can sometimes override the web chat CSS rules.
Tutorial: Displaying a pre-chat or post-chat form 

This tutorial shows how you can display pre-chat form before the web chat opens, or a post-chat form that opens after the web chat closes.

For a complete, working version of the example described in this tutorial, see [Pre and post-chat forms for Watson Assistant web chat](https://github.com/watson-developer-cloud/assistant-toolkit/tree/master/integrations/webchat/examples/pre-post-chat-forms).

If you want to gather information from your customers before starting a chat session, you can display a pre-chat form before opening the web chat. Similarly, you might want to display a form after the web chat closes (for example, a customer satisfaction survey). You can use the same approach for either situation.

When the web chat is opened or closed, it fires an [event](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-events) that you can subscribe to. In your event handler, you can use the [custom panels](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-rendercustompanel) feature to open a panel with custom content.

By returning a promise that is resolved when the custom panel closes, you can pause the process of opening or closing the web chat until after the customer completes the form.

This example shows how to create a pre-chat form. To create a post-chat form, follow the same steps, but subscribe to the window:pre:close event instead of the window:open event.

To display a pre-chat form, follow these steps:



1. Create a handler for the [window:open](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventswindowpreopen) event, which is fired when the web chat opens.
For more information about how to pass data, see [Passing sensitive data](https://cloud.ibm.com/docs/assistant?topic=assistant-web-chat-securityweb-chat-security-encrypt).

To access the payload data, you can reference the context.integrations.chat.private.user_payload object from the dialog node condition.

You must know the structure of the JSON object that is sent in the payload.

For example, if you passed the value "mvp:true" in the JSON payload, you can add a dialog flow that checks for this value to define a response that is meant for VIP customers only. Add a dialog node with a condition like this:



Private variable as node condition

 Field Value 

 If assistant recognizes $integrations.chat.private.user_payload.mvp 
 Assistant responds I can help you reserve box seats at the upcoming conference! 







 Web chat: Accessing web browser information 

When you use the web chat integration, information about the web browser that your customer is using to access the web chat is automatically collected and stored. The information is stored in the context.integrations.chat.browser_info object.

You can design your dialog to take advantage of details about the web browser in use. The following properties are taken from the window object that represents the window in which the web chat is running:



* browser_name: The browser name, such as chrome, edge, or firefox.
* browser_version: The browser version, such as 80.0.0.
* browser_OS: The operating system of the customer's computer, such as Mac OS.
* language: The default locale code of the browser, such as en-US.
* page_url: Full URL of the web page in which the web chat is embedded. For example: https://www.example.com/products
* screen_resolution: Specifies the height and width of the browser window in which the web page is displayed. For example: width: 1440, height: 900
* user_agent: Content from the User-Agent request header.
You do not need to convert the URL to an embeddable form; the web chat will do this automatically.

You can embed videos hosted on the following services:



* [YouTube](https://youtube.com)
* [Facebook](https://facebook.com)
* [Vimeo](https://vimeo.com)
* [Twitch](https://twitch.tv)
* [Streamable](https://streamable.com)
* [Wistia](https://wistia.com)
* [Vidyard](https://vidyard.com)









 Example 

This example displays an video with a title and descriptive text.

{
"generic":[
{
"response_type": "video",
"source": "https://example.com/videos/example-video.mp4",
"title": "Example video",
"description": "An example video returned as part of a multimedia response."
}
]
}
Although journeys are part of the web chat integration, you can make it possible for your customers to start a journey directly from your website without opening the web chat window at all. For example, you might want to include a Show me button on your website that customers can click to launch an interactive tour of the page.

To start a journey without opening the web chat:



1. In the action that sends the journey response, edit the JSON that defines the journey. Include "skip_card": true to bypass the introductory card.
2. On your website, use the [send()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodssend) instance method to send a message to the assistant that triggers the action that starts the journey (such as Give me a tour). Send the message in response to whatever event you want to use to trigger the journey (such as a button click or page load).



Your customers can now start the interactive journey directly from your website without having to open the web chat first. (If the web chat window is opened later, the introductory card for the journey appears in the chat history.)





 Limitations 

This beta feature currently has the following limitations:



* The preview pane does not support journeys. If you want to preview a journey, use the shareable preview link. (For more information about the preview link, see [Copying a link to share](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-preview-sharepreview-share-link).)
* Journeys currently do not meet accessibility requirements.
* Journeys are not supported if you are using the [element configuration option](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-configurationoptionselement) to render the web chat in a custom DOM element.
* When the customer starts a journey, the web chat window temporarily closes, but will reopen when the journey finishes.
* New property in web chat state object: In the object returned from the [getState()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsgetState) instance method, the new isDebugEnabled property indicates whether the web chat debug flag is set to true.







 7.0.0 

Release date: 5 December 2022



* Streamlined live agent handoff: The live agent handoff experience has been streamlined and simplified. Instead of opening the live agent chat in a separate window, the web chat now shows the live agent entering the conversation in the same window.

Because of this change, the [updateCustomMenuOptions](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsupdatecustommenuoptions) instance method has changed to reflect the fact that there is now only a single view, with a single list of custom menu options. If you want to customize menu options only during a live agent chat, you can subscribe to the [agent:pre:startChat](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventsagentprestartchat) and [agent:endChat](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventsagentendchat) events to trigger your customizations.
* agent:endChat changes: The [agent:endChat](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventsagentendchat) event now also fires if the customer cancels a live agent request before the agent has joined. If you want to show a post-chat form only after a live agent chat, you can use the new requestCancelled flag on the event to determine whether the request was canceled.
* New configuration options: The following new options are available in the configuration object: