vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* Updated Zendesk agent app: The agent app for Zendesk has been updated for compatibility with Zendesk workspaces.
* In the service desk starter kits, the instance of the web chat integration has been added to the [serviceDeskFactory parameters](https://github.com/watson-developer-cloud/assistant-web-chat-service-desk-starter/blob/main/src/common/types/serviceDesk.ts) to make it accessible to custom service desk implementations.
* New instance methods: The new [elements.getMessageInput()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodselements-get-message-input) and [elements.getHomeScreenInput()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodselements-get-home-screen-input) instance methods enable access to the input fields used by the customer to send messages. You can use these methods to change the input or to take action as the user is typing (for example, to implement for a type-ahead feature).
* New event: The new [agent:pre:sessionHistory](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventsagentpresessionhistory) event enables you to filter potential PII from messages sent from a customer or service desk agent before the messages are sent to the assistant for storage in the session history.
* 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.
* For information about the results of a speech recognition request, see [Understanding speech recognition results](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-basic-response).





 Data limits 

The interfaces accept the following maximum amounts of audio data with a single request:



* The WebSocket interface accepts a maximum of 100 MB of audio.
* The synchronous HTTP interface accepts a maximum of 100 MB of audio.
* The asynchronous HTTP interface accepts a maximum of 1 GB of audio.



For more information about using compression to maximize the amount of data that you can send to the service, see [Data limits and compression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-audio-formatsaudio-formats-limits).





 Advantages of the WebSocket interface 

The WebSocket interface has a number of advantages over the HTTP interface. The WebSocket interface



* Provides a single-socket, full-duplex communication channel. The interface lets the client send multiple requests to the service and receive results over a single connection in an asynchronous fashion.
* Provides a much simpler and more powerful programming experience. The service sends event-driven responses to the client's messages, eliminating the need for the client to poll the server.
* Allows you to establish and use a single authenticated connection indefinitely. The HTTP interfaces require you to authenticate each call to the service.
* Reduces latency. Recognition results arrive faster because the service sends them directly to the client. The HTTP interface requires four distinct requests and connections to achieve the same results.
* Reduces network utilization. The WebSocket protocol is lightweight. It requires only a single connection to perform live-speech recognition.
* Enables audio to be streamed directly from browsers (HTML5 WebSocket clients) to the service.
* Returns results as soon as they are available when you use a next-generation model or request interim results.









 Using speech recognition parameters 

The service's speech recognition interfaces share largely common parameters for transcribing speech to text.
For example, you might change Field to host and Field Value to a host in your account. You then might want to group that data by app. The widget will display a table of the counts for the host grouped by app during the past day. You can also change the Duration of time counted and specify a Label for your widget.

If you need a table with more rows, change the Data FormatNumber of Rows to your preferred value.
13. You can resize any of the widgets by clicking the widget and clicking and dragging one of the anchors. Widgets can be moved by clicking the widget and dragging it to your desired location on the screen.
14. Click Save Screen > Save to save your changes.



If you do not save your screen, you will lose all your changes.





 Step 10: Add alert to custom view 

You can configure an alert to be sent by email, Slack, PagerDuty or as a Webhook when specific criteria is met.



1. [Make sure you are logged in to the IBM Cloud and have accessed the IBM Log Analysis web UI](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-tutorial-use-logdnaLA-launch-ui).
2. [Make sure you have a custom view defined.](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-tutorial-use-logdnaLA-create-custom-view).
3. Select the view to change in the navigation. Your view will be listed under the category where it was created, or under UNCATEGORIZED if you didn't specify a category when the view was created. For example, the following shows a view named "My View" that was created without an assigned category.

![Navigation example](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/uncategorized_myview.png)
[development icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/development-icon.png)Tutorial: For a tutorial showing how to use the pre:receive event to intercept and modify incoming messages, see [Tutorial: implementing custom option buttons in the web chat](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-custom-buttons).

Rendering custom response types
: If your assistant sends specialized responses using a custom (user_defined) response type, you can implement a custom view to display these responses in the web chat window. To do this, subscribe to the [customResponse](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventscustomresponse) event, which is fired each time a user_defined response is received. In your event handler method, you can then read the contents of the response and render the output using your own elements.

![development icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/development-icon.png)Tutorial: For a tutorial showing how to render a custom response type as a replacement for the default options response, see [Tutorial: implementing custom option buttons in the web chat](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-custom-buttons).

Implementing a contact center integration
: You can use one of the web chat starter kits to integrate with a contact center (service desk) platform other than the ones available in as built-in Watson Assistant integrations. Fully functional reference implementations are available for several contact center platforms; in addition, you can use a starter kit to develop a custom integration with the platform of your choice.
(https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/tut-neural-enviro.png)

Figure 16. Environment diagram
2. Click the Web chat tile to edit the web chat.

We don't want to add multiple starter questions, so we're going to turn off the home screen for the web chat. Click the Home screen tab. Set the switcher to Off, and then click Save and exit.

Zoom

![Shows the web chat home screen set to Off.](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/tut-neural-web-chat-off.png)

Figure 17. Web chat home screen disabled



You're ready to preview your assistant!





 Step 10: Preview the assistant 

To preview an assistant that connects to data that is stored in Discovery, you must preview the assistant from the Environments page. When you preview the web chat independently, the assistant is not able to retrieve data from Discovery; it needs the environment resources to be able to connect to Discovery.



1. From the Environments page, click Preview this environment.

A sample web page is displayed that includes a chat icon ![Chat icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/chat.svg).
2. Click the chat icon to open the web chat window.

Zoom

!
This documentation is for the classic Watson Assistant experience. To see the documentation for the new Watson Assistant, please go [here](https://cloud.ibm.com/docs/watson-assistant).



 Deploying your assistant 

After you have built and tested your assistant, you can make it available for customers to use.

There are multiple options for deploying your assistant, depending on how you want your customers to interact with it. A channel is a communication platform through which you want to make your assistant available, such as a website or a telephone system; an assistant can be deployed to one or more channels. To deploy to a channel, you use an integration, which is essentially an adapter or interface that enables the assistant to communicate through a channel.

In most cases, an assistant is deployed using one of these integrations:



* [Web chat integration](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-web-chat): The web chat integration provides a secure and highly customizable widget you can add to your website. You can configure how and where the web chat widget appears, and you can use theming to align it with your branding and website design. If a customer needs help from a person, the web chat integration can transfer the conversation to an agent.
* [Phone integration](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-phone): The phone integration enables your assistant to converse with customers on the phone, using the IBM Watson Text to Speech and Speech to Text services. If your customer asks to speak to a person, the phone integration can transfer the call to an agent.





 Other channels 

In addition to the web chat and phone integrations, Watson Assistant provides integrations you can use to deploy your assistant to numerous other channels:



* [Facebook Messenger](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-facebook)
* [Intercom](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-intercom)
* [Slack](https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-slack)
After you specify the JWT for the web chat, you cannot change to a JWT with a different sub claim during the session. If you need to add authenticated login information in the middle of a session, you can store it as part of the user payload instead. For an example of how to do this, see [Tutorial: Authenticating a user in the middle of a session](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-web-chat-develop-security).





 Logging out 

To log out a customer, you must destroy the web chat.

If you reload the page when a customer logs out, call the [destroySession()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsdestroySession) instance method to remove any reference to the current session from the browser's cookies and storage. If you do not call this method, information that is protected by the JWT is not at risk, but the web chat will try to connect to the previous session and fail.

If you do not perform a full page reload when a customer logs out, call the [destroy()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsdestroy) instance method. The destroy method removes the current instance of the web chat that is configured for the current userID from the DOM and browser memory. Next, call the [destroySession()](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-instance-methodsdestroySession) instance method.
The length of time for which messages are retained depends on your service plan. For more information, see [Log limits](https://cloud.ibm.com/docs/assistant?topic=assistant-logslogs-limits).





 How do I create a webhook? 

To define a webhook and add its details, open the skill where you want to add the webhook. Open the Options page, and then click Webhooks to add details about your webhook. To invoke the webhook, call it from one or more of your dialog nodes. For more information, see [Making a programmatic call from dialog](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-webhooks).





 Can I have more than one entry in the URL field for a webhook? 

No, you can define only one webhook URL for a dialog skill. For more information, see [Defining the webhook](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-webhooksdialog-webhooks-create).





 Can I extend the webhook time limit? 

No. The service that you call from the webhook must return a response in 8 seconds or less, or the call is canceled. You cannot increase this time limit.





 I received the message “Query cancelled” when importing a skill 

This message is displayed when the skill import stops because artifacts in the skill, such as dialog nodes or synonyms, exceed the plan limits. For information about how to address this problem, see [Troubleshooting skill import issues](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-skill-dialog-addskill-dialog-add-import-errors).

If a timeout occurs due to the size of the skill but no plan limits are exceeded, you can reduce the number of elements that are imported at a time by completing the following steps:



1. Make a copy of the JSON file that you are trying to import.
2.
[Yes](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/checkmark-icon.svg) ![Yes](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/checkmark-icon.svg) ![Yes](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/checkmark-icon.svg) 





* For information about adding service desk support to the web chat integration, see [Adding contact center support](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-web-chat-haa).
* For information about adding service desk support to the phone integration, see [Configuring backup call center support](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-phone-configdeploy-phone-config-transfer-service).







 Fields 



 Name Type Description Required? 

 response_type string connect_to_agent Y 
 message_to_human_agent string A message to display to the live agent to whom the conversation is being transferred. Y 
 agent_available string A message to display to the user when agents are available. Y 
 agent_unavailable string A message to display to the user when no agents are available. Y 
 transfer_info object Information used by the web chat service desk integrations for routing the transfer. N 
 transfer_info.target.zendesk.department string A valid department from your Zendesk account. N 
 transfer_info.target.salesforce.button_id string A valid button ID from your Salesforce deployment. N
Two new history events, [history:begin](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventshistorybegin) and [history:end](https://web-chat.global.assistant.watson.cloud.ibm.com/docs.html?to=api-eventshistoryend) announce the beginning and end of the history of a reloaded session. These events can be used to view the messages that are being reloaded. The history:begin event allows you to edit the messages before they are displayed.

See this example for more information on saving the state of [customResponse](https://web-chat.global.assistant.watson.cloud.ibm.com/testfest.html?to=api-eventscustomresponse) types in session history.

Channel switching
: You can now create a dialog response type to functionally generate a connect-to-agent response within channels other than web chat. If a user is in a channel such as Slack or Facebook, they can trigger a channel transfer response type. The user receives a link that forwards them to your organization's website where a connection to an agent response can be started within web chat. For more information, see [Adding a Channel transfer response type](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-channel-transfer).





 11 March 2021 

Actions skill improvement
: Updated the page where you configure a step with an Options reply constraint. Now it's clearer that you have a choice to make about whether to always ask for the option value or to skip asking. For more information, see [Apply reply constraints](https://cloud.ibm.com/docs/assistant?topic=assistant-actionsactions-response-types).





 4 March 2021 

Support for every language!
: You now can build an assistant in any language you want to support. If a dedicated language model is not available for your target language, create a skill that uses the universal language model.
* Paste the chat button code snippet into the Chat button code field in the Watson Assistant Salesforce configuration page, and then click Next.



4. Add a chat app that enables the Salesforce agent to see a history of the chat. To do so, create a Visualforce page, and then add a chat app to the page.
5. Add custom fields to the Salesforce chat transcript layout.

This is a one-time task. If the fields already exist for your organization, you can skip this step.

These custom fields are referenced from the Visualforce page code that you will use in the next step.

See [Create Custom Fields](https://help.salesforce.com/articleView?id=adding_fields.htm&type=5).

From the Salesforce Data>Objects and Fields>Object Manager>Chat Transcript>Fields & Relationships page, create the following custom fields:



* Token: Stores a Watson Assistant authentication token that secures the communication between Salesforce and your assistant.



* Data Type: Text Area (Long)
* Field Label: x-watson-assistant-key
* Field Length: Specify the maximum length allowed to ensure it can hold a token that might contain over 100,000 characters.





6. Create a Visualforce page.

Visualforce pages are the mechanism that Salesforce provides for you to customize a live agent's console by adding your own pages to it. A Visualforce page is similar to a standard web page, but it provides ways for you to access, display, and update your organization’s data. Pages can be referenced and invoked by using a unique URL, just as HTML pages on a traditional web server can be. See [Create Visualforce Pages](https://help.salesforce.com/articleView?id=pages_creating.htm&type=5)



* From the web chat integration page in Watson Assistant, copy the code snippet from the Visualforce page markup field.
* Switch to your Salesforce web page. Search for Visualforce Pages. Create a page. Add a label and name to the page. Select the Available for Lightning Experience, Lightning Communities, and the mobile app checkbox.
After writing a function that ensures that name and email values are always provided, set the Authenticate anonymous user chat transfers switch to On.







 Adding transfer support to your dialog 

Update your dialog to make sure it understands when users request to speak to a person, and can transfer the conversation properly. For more information, see [Adding chat transfer support](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-supportdialog-support-transfers).





 Adding routing logic for transfers 

When you enable transfers to the Zendesk service desk, no routing preferences are specified. The conversation is sent to any available agent. However, there might be times when you want to route a customer to a specific Zendesk department. For example, your dialog might have a root dialog node that conditions on a close_account intent. For that branch of the conversation only, you want to transfer customers to agents in the Sales department who are authorized to offer incentives as a way to retain customers. You can direct transfers to specific departments by adding routing logic to your dialog.

You can specify alternate routing preferences based on:



* browser information
* the current topic of conversation





 Routing based on browser information 

When a customer interacts with the web chat, information about the current web browser session is collected. For example, the URL of the current page is collected. You can use this information to add custom routing rules to your dialog. For example, if the customer is on the Products page when a transfer to a human is requested, you might want to route the chat transfer to agents who are experts in your product portfolio. If the customer is on the Returns page, you might want to route the chat transfer to agents who know how to help customers return merchandise.

For more information, see [Web chat: Accessing browser information](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrationsdialog-integrations-chat-browser-info).





 Routing by topic 

You can specify a routing preference for specific topics of conversation in your dialog. When specified, the chat is transferred to the department that you designate.
The next response has a more generic greeting.

![Shows multiple conditioned responses in a dialog node, one of which references the ismember context variable](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/web-chat-use-context-var.png)

If you enable security, you can encrypt the data that you pass to your dialog. For more information, see [Passing sensitive data](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-deploy-web-chatdeploy-web-chat-security-encrypt).

Remember that a session ends if there's no interaction with the user after 1 hour (or whatever inactivity timeout setting you specify, which can be up to 7 days). Any contextual information that you pass or collect is reset after the inactivity time period is passed. For more information, see [Changing the inactivity timeout setting](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-assistant-settings).





 Adding user identity information 

If you do not enable security, and you want to perform tasks where you need to know the user who submitted the input, then you must pass the user ID to the web chat integration.

If you do enable security, you set the user ID in the JSON Web Token instead. For more information, see [Authenticating users](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-deploy-web-chatdeploy-web-chat-security-authenticate).

Choose a non-human-identifiable ID. For example, do not use a person's email address as the user_id.

User information is used in the following ways:



* The user_id is used to measure the number of monthly active users who interact with the web chat integration.