vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Click on Launch Watson Assistant to get to the Watson Assistant Tool.
3. In the welcome dialog, create a new assistant by using slackbot as Assistant name, then click Next to start personalizing.
4. For the first question on deployment pick Web.
5. For the other questions answer for your role or with Other / Not sure at this time.
6. Click Next for the opportunity to customize the chat UI if desired.
7. Click Next and finalize by clicking Create.

The new page includes a guided tour which you might want to complete if you are new to Watson Assistant.







 Step 3: Add and configure a custom extension 

Next, you are going to add and then configure a custom extension to Watson Assistant and the newly created assistant.



1. In the dashboard on the lower left, click on Integrations, then on Build custom extension under Extensions.
2. In the multi-step dialog click Next, then enter events as Extension name and API for events database as Extension description. Click Next.
3. Select and upload the local file slackbot-openapi-spec.json, then click Next.
4. The last step lets you review the extension with included servers and operations. Once done click Finish.
5. Back on the Integrations page note the new events tile in the Extensions section. Click Add on that tile to configure the extension for the assistant.
6. The new dialog starts with a short overview. Click Next to get to the actual configuration. In the dropdown for Authentication type select API key auth and enter your chosen API key (MY_SECRET replacement).
7. For the Server variables use your deployment region, slackbot-backend as appname, and the Code Engine projectid of your app. Thereafter, the generated URL should match that of your Code Engine app. When done, click Next to get to the review page, then Finish and Close to get back to the Integrations page.







 Step 4: Create the first action 

First, you are going to create an action to retrieve information about a single event identified by its name.



1.
Adding integrations 

Add integrations to your assistant so that you can publish your bot to the channels where your customers go for help.

To deploy an assistant to customers, a channel integration must be added. By default, a web chat integration is created, allowing an assistant to be embedded in a website. Other channel integrations are available in the Integrations catalog. For more information about deploying to your website, see [Adding the web chat to your website](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-web-chat).

![Image of the Integrations catalog](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/integrations-catalog.png)

When you add an integration, that integration is added to both the draft and live environments, or to all your enviroments if you are using [multiple environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-multiple-environments). Test content and integrations before you deploy your assistant to customers. For more information about adding integrations to your assistant, see [Adding integrations](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-integration-add). After a live channel is added and configured, it is ready to deploy your assistant on its corresponding platform.



 Add an integration 

Follow these steps to add integrations to your assistant:



1. Go to the Integrations page by clicking the integrations icon (![Integrations icon](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/integrations-icon.png)) in the left menu.
2. Scroll to see available integrations.

Why do I have the Web chat integration?
Adding the Twilio Flex Project 

If you don't already have a Twilio Flex project, you can create one by following these steps:



1. From the project drop-down menu, click Create New Project. Specify a name for the project and verify your account information.
2. On the welcome page, select Flex as the Twilio product for your new project. Fill out the questionnaire and then click Get Started with Twilio.

After your Flex project has been provisioned, return to the [Twilio console](https://www.twilio.com/console). Make sure you have selected the correct project from the drop-down list.
3. In the navigation menu, click the All Products & Services icon.
4. Click Twilio Programmable Voice > Settings > General.
5. Under Enhanced Programmable SIP Features, toggle the switch to Enabled.







 Creating the call flow 

After you have your phone integration and Twilio Flex project configured, you must create a call flow with Twilio Studio and provision (or port) the phone number you want your assistant to work with.

To create the call flow:



1. In the navigation menu, click the All Products & Services icon.
2. Click Studio.
3. Click + to create a new flow.
4. Name the new flow and then click Next.
5. Select Start From Scratch and then click Next.
6. At this point you should have a Trigger widget at the top of your flow canvas.
7. Click the Trigger widget.
8. Make note of the value from the WEBHOOK URL field. You will need this value in a subsequent step.







 Configuring the phone number 



1. In the navigation menu, click the All Products & Services icon.
2. Click Phone Numbers.
3. Under Manage Numbers, configure the phone number you want your assistant to use. Select Buy a Number to buy a new number, or Port & Host to port an existing phone number.
4.
Adding integrations 

To deploy your skill, add it to an assistant, and then add integrations to the assistant that publish your bot to the channels where your customers go for help.

The built-in integrations were introduced with version 1.5.0.



  Add an integration 

There is currently no way to pass an ongoing conversation from one integration channel to another.

Follow these steps to add integrations to your assistant:



1.  Click the Assistants icon ![Assistants menu icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/nav-ass-icon.png).
2.  Click to open the tile for the assistant that you want to deploy.
3.  Go to the Integrations section.
4.  Click Add integration.
5.  Click the tile for the channel with which you want to integrate the assistant. The options include:



*  [Web chat](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-deploy-web-chat)
*  [Custom application](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-deploy-custom-app)



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.





  Integration limits 

You can add 100 integrations per assistant.
"text": "I will send you a text message now with a link to our website."
}
],
"selection_policy": "sequential"
},
{
"response_type": "channel_transfer",
"message_to_user": "Click the link to connect with an agent using our website.",
"transfer_info": {
"target": {
"chat": {
"url": "https://example.com/webchat"
}
}
}
}
]
}
}
Show more





 Ending the call 

You can instruct your assistant end a phone call by using the end_session response type, as shown in this example.

{
"output": {
"generic": [
{
"response_type": "end_session"
}
]
}
}

You can optionally include custom headers to include with the SIP BYE request that is generated when the phone integration receives this response type.

This example shows the end_session response type with custom SIP headers:

{
"output": {
"generic": [
{
"response_type": "end_session",
"channel_options": {
"voice_telephony": {
"sip": {
"headers":
{
"name": "Customer-Header1",
"value": "Some-Custom-Info"
},
{
"name": "User-to-User",
"value": "XXXXXX"
}
]
}
}
}
}
]
}
}
Show more





 Sending a text message during a phone conversation 

There are some situations when it is useful to be able to send a text message during an ongoing voice. For example, you might want the customer to specify a street address, which is easier to communicate accurately in writing than by transcribing voice input.
Click SMS with Twilio tile.
4. Click Confirm.
5. From the Twilio site, click on your account name in the upper left menu to go to your account dashboard.

Copy the following values and store them temporarily, so you can paste them into the SMS with Twilio integration setup page in the upcoming steps.



* Account SID
* Auth token



6. Return to the SMS with Twilio integration setup page. Click Next to go to Step 1 of your SMS with Twilio integration setup.
7. Enter your Account SID information. Click Next to go to Step 2 of your SMS with Twilio integration setup.
8. Enter your Auth token information. Click Next to go to Step 3 of your SMS with Twilio integration setup.
9. Optional: Enter the phone number that your Twilio account uses for SMS integration. The webhook URI is used to transfer messages, but if you add your phone number in this optional field, you can easily refer to it later. Click Next to go to Step 4 of your SMS with Twilio integration setup.
10. Copy the value from the Webhook URI field.

You will add this URI to the webhook configuration in Twilio. If you want to support more than one phone number, you must add the URI to the webhook for each phone number separately.
11. Go to your Twilio account web page. From the Develop tab in the sidebar, click Phone Numbers > Manage > Active numbers.
12. From the Active Numbers page, click one of your phone numbers.
13. Scroll to the Messaging section, and then find the Webhook field that defines what to do when A message comes in.

Paste the value that you copied from the Webhook URI field into it.
14. If you want to support multiple phone numbers, repeat the previous step for each phone number that you want to use.
15. Click Save.
16. From the Develop tab in the sidebar, click Messaging > Settings > Geo permissions.
* The indicated channel integrations support initiating a channel transfer (currently, the web chat integration is the only supported transfer target).
* Initiating a channel transfer from the phone integration requires that the SMS integration also be configured.







 Fields 



 Name Type Description Required? 

 response_type string channel_transfer Y 
 message_to_user string A message to display to the user before the link for initiating the transfer. Y 
 transfer_info object Information used by an integration to transfer the conversation to a different channel. Y 
 transfer_info.target.chat string The URL for the website hosting the web chat to which the conversation is to be transferred. Y 







 Example 

This example requests a transfer from WhatsApp to the web chat. In addition to the channel_transfer response, the output also includes a text response to be displayed by the web chat integration after the transfer. The use of the channels array ensures that the channel_transfer response is handled only by the WhatsApp integration (before the transfer), and the connect_to_agent response only by the web chat integration (after the transfer). For more information about using channels to target specific integrations, see [Targeting specific integrations](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-response-types-referenceassistant-responses-json-target-integrations).

{
"generic": [
{
"response_type": "channel_transfer",
"channels":
{
"channel": "whatsapp"
}
],
"message_to_user": "Click the link to connect with an agent using our website.",
"transfer_info": {
"target": {
"chat": {
"url": "https://example.com/webchat"
}
}
}
},
{
"response_type": "connect_to_agent",
"channels":
{
"channel": "chat"
}
],
* Subscription name: name of the subscription.
* Subscription description: add an optional description.



* Under the Subscribe to a topic section, select a topic from the drop-down list and select a destination from the destination drop-down list.
* Destination type: select type under Destination and click Add.







 Step 6: Set up Event Notifications Firefox web SDK 

The Firefox web SDK enables Firefox websites to receive push notifications. Complete the following steps to install Event Notifications Firefox web SDK, initialize the SDK, and register for notifications for your website.



* To include the SDK in your project, add the ENPushSDK.js,ENPushServiceWorker.js and manifest_Website.json files to your project root folder.
* Edit the manifest_Website.json file.

{
"name": "YOUR_WEBSITE_NAME"
}
* Change the manifest_Website.json file name to manifest.json.
* Include the manifest.json in the <head> tag of your html file.

<link rel="manifest" href="manifest.json">
* Include IBM Cloud web push SDK to the script.

<script src="ENPushSDK.js" async></script>
* Complete the following steps to enable the website to initialize the SDK.

var enPush = new ENPush()

function callback(response) {
alert(response.response)
}

var initParams = {
"instanceGUID": "<instance_guid>",
"apikey": "<instance_apikey>",
"region": "<region>",
"deviceId": "<YOUR_DEVICE_ID>",
"firefoxDestinationId": "<firefox_destination_id>",
"firefoxApplicationServerKey": "<Firefox_VapId_public_key>"
}

enPush.initialize(initParams, callback)
For more information, see [Targeting specific integrations](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-responses-jsondialog-responses-json-target-integrations).

To add a rich response, complete the following steps:



1. Click the dropdown menu in the Assistant responds field to choose a response type, and then provide any required information.

For more information, see the following sections:



* [Connect to human agent](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-connect-to-human-agent)
* [Channel transfer](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-channel-transfer)
* [Image](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-image)
* [Option](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-option)
* [Pause](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-pause)
* [Search skill](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-add-search-skill)![Plus or higher plans only](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/plus.png)

This response type is only visible to users of paid plans.
* [Text](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-simple-text)



2. To add another response type to the current response, click Add response type.
* Facebook Business Manager ID: Add the ID for the account that you created in the previous step.



4. Click Request Now.



Give WhatsApp time to evaluate and approve your request. It can take up to 7 days for your request to be approved.





 Set up the integration 

To set up the integration, complete the following steps:



1. From the Assistants page, click to open the assistant tile that you want to deploy.
2. From the Integrations section, click Add integration.
3. Click WhatsApp with Twilio.
4. Click Create.
5. From the Twilio site, click the home icon to go to your project dashboard.

Copy the following values and store them temporarily, so you can paste them into the phone integration setup page in the next step.



* Account SID
* Auth token



6. Return to the WhatsApp integration setup page.

Paste the values that you copied in the previous step into the fields with the corresponding names in the Twilio account information section.



* Account SID
* Auth token



7. Click Sync account.
8. Add the Twilio messaging phone number that you created previously to the Company phone number field.

Specify the number by using the international phone number format: +1 958 555 0123. Do not include parentheses ((958)).

The phone number must be unique per WhatsApp integration.
9. Copy the value from the WhatsApp Webhook field.
10. Click Save and exit.







 Testing the integration 

While you wait for WhatsApp to approve your request, you can test the integration by using the Twilio sandbox. With the sandbox, you can send and receive preapproved template messages to numbers that join your sandbox, using a shared Twilio test number.

Do not use the Twilio sandbox in production. Sandbox sessions expire after 3 days.



1.
You might need to remove the @sys-person and @sys-location entities from your training data, and any references to them from dialog nodes, for example.
3. Try again to import the edited skill.







 Adding the skill to an assistant 

You can add one skill to an assistant. You must open the assistant tile and add the skill to the assistant from the assistant configuration page; you cannot choose the assistant that will use the skill from within the skill configuration page. One dialog skill can be used by more than one assistant.



1. Click the Assistants icon ![Skills menu icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/nav-ass-icon.png) to open the Assistants page.

v1.3: Click the Assistants tab.
2. Click to open the tile for the assistant to which you want to add the skill.
3. Click Add Dialog Skill.
4. Click Add existing skill.

Click the skill that you want to add from the available skills that are displayed.



When you add a dialog skill from here, you get the development version. If you want to add a specific skill version, add it from the skill's Versions tab instead.







 Downloading a dialog skill 

You can download a dialog skill in JSON format. You might want to download a skill if you want to use the same dialog skill in a different instance of the Watson Assistant service, for example. You can download it from one instance and import it to another instance as a new dialog skill.

To download a dialog skill, complete the following steps:



1. Find the dialog skill tile on the Skills page or on the configuration page of an assistant that uses the skill.
2. Click the !
(https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/tut-convo-enviro-1aa.png)

Figure 26. Web chat home screen configuration
3. 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/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/tut-convo-enviro-1bb.png)

Figure 27. Web chat home screen disabled
4. We want to connect the web chat to a search extension. Click the Add button in the Search extension tile.

Zoom

![Shows the draft environment with the search extension option.](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/tut-convo-enviro-1.png)

Figure 28. Search extension in draft environment

The Search Integration page is displayed.
5. Select the Discovery instance where your project is stored, and then select the Federal Reserve research project that you created earlier. Click Next.

Zoom

![Shows the search extension with the instance and project selected.](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/tut-convo-enviro-2.png)

Figure 29. Search extension configuration
6.
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).

The Phone and Twilio messaging integrations are available as beta features in Watson Assistant service instances that are hosted in Dallas, Frankfurt, and Washington, DC.

The web chat integration is added to new assistants automatically
: Much like the Preview link integration, the Web chat integration now is added to the My first assistant assistant that is created for new users automatically.





 24 September 2020 

Introducing the containment metric!
: Want a quick way to see how often your assistant has to ask for help?
End the action under And then.
13. Create a new step with the condition for 8 Ran successfully being false. Use something like It seems there was a problem creating the new event record for the Assistant to say and end the action under And then. Save and close the action with the icons in the upper right.
14. Test the new action by clicking on Preview on the left and using the webchat. Type add new event and submit. When prompted by the bot, enter my conference as name, home office as location, pick dates for begin and end, and use [http://localhost](http://localhost) as URL. Thereafter, confirm that the data is correct.



When creating a chatbot, you may want to [publish a chatbot](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish). It is the controlled release of a version which allows rolling back changes and to continue with development without impacting the chatbot interacting with real customers.





 Step 6: Integrate with Slack 

Now, you will integrate the chatbot with Slack.



1. On the lower left, click on Integrations.
2. In the integrations overview, in the section Channels, locate Slack and click Add.
3. Follow the step by step instructions to integrate the Draft environment of your chatbot with Slack. More information about it is available in the topic [Integrating with Slack](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-deploy-slack).
4. Once done, open up your Slack workspace. Begin a direct chat with the bot and say show me event details. Then, similar to above, answer with Think when prompted for an event name.



Zoom

![Slack with the eventbot](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution19/Slackbot_event.png)

Slack with the eventbot