Skip to content

Commit

Permalink
adding 1.125
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-miller committed Nov 13, 2020
1 parent 5b51286 commit ab583b2
Show file tree
Hide file tree
Showing 10 changed files with 317 additions and 25 deletions.
30 changes: 17 additions & 13 deletions deploy-integration-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

copyright:
years: 2015, 2020
lastupdated: "2020-10-29"
lastupdated: "2020-11-13"

subcollection: assistant

Expand Down Expand Up @@ -30,15 +30,6 @@ subcollection: assistant
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.
{: shortdesc}

## How service desk platform integrations work
{: #deploy-integration-service-desk-integrations}

Watch this 3-minute video to learn more about integrating your assistant with a service desk platform, such as Intercom.

![Overview of how service desk integrations work](https://www.youtube.com/embed/pJSCZLQVgCY){: video output="iframe" id="youtubeplayer" frameborder="0" width="560" height="315" webkitallowfullscreen mozallowfullscreen allowfullscreen}

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){: external}.

## Add an integration
{: #deploy-integration-add-task}

Expand All @@ -65,22 +56,35 @@ Follow these steps to add integrations to your assistant:

- [Preview link](/docs/assistant?topic=assistant-deploy-web-link)
- [Web chat](/docs/assistant?topic=assistant-deploy-web-chat)
- [Web chat with Salesforce support](/docs/assistant?topic=assistant-deploy-salesforce)
- [Web chat with Zendesk support](/docs/assistant?topic=assistant-deploy-zendesk)
- [Intercom](/docs/assistant?topic=assistant-deploy-intercom) ![Plus or Premium plan only](images/plus.png)
- [Facebook Messenger](/docs/assistant?topic=assistant-deploy-facebook)
- [Slack](/docs/assistant?topic=assistant-deploy-slack)
- [Phone](/docs/assistant?topic=assistant-deploy-phone)
- [SMS with Twilio](/docs/assistant?topic=assistant-deploy-sms)
- [WhatsApp with Twilio](/docs/assistant?topic=assistant-deploy-whatsapp)
- [Custom application](/docs/assistant?topic=assistant-deploy-custom-app)

Service desk integrations:

- [Web chat with Salesforce support](/docs/assistant?topic=assistant-deploy-salesforce)
- [Web chat with Zendesk support](/docs/assistant?topic=assistant-deploy-zendesk)
- [Intercom](/docs/assistant?topic=assistant-deploy-intercom) ![Plus or Premium plan only](images/plus.png)

1. 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 Premium plan only](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-security#security-private-endpoints).
{: note}

## How service desk platform integrations work
{: #deploy-integration-service-desk-integrations}

Watch this 3-minute video to learn more about integrating your assistant with a service desk platform, such as Intercom.

![Overview of how service desk integrations work](https://www.youtube.com/embed/pJSCZLQVgCY){: video output="iframe" id="youtubeplayer" frameborder="0" width="560" height="315" webkitallowfullscreen mozallowfullscreen allowfullscreen}

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){: external}.

## Integration limits
{: #deploy-integration-add-limits}

Expand Down
5 changes: 4 additions & 1 deletion deploy-web-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

copyright:
years: 2019, 2020
lastupdated: "2020-11-03"
lastupdated: "2020-11-13"

subcollection: assistant

Expand Down Expand Up @@ -160,6 +160,9 @@ Customers often don't know how to interact with your assistant at first. They ar
1. Add a greeting that is engaging and invites the user to interact with your assistant.

A greeting is required and replaces the greeting that is specified in the welcome node of the dialog.

Do not reference context variables in the message. The home screen cannot access contextual information.
{: note}

1. Add three conversation starter messages.

Expand Down
177 changes: 177 additions & 0 deletions deploy-whatsapp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---

copyright:
years: 2015, 2020
lastupdated: "2020-11-10"

subcollection: assistant

---

{:shortdesc: .shortdesc}
{:new_window: target="_blank"}
{:external: target="_blank" .external}
{:deprecated: .deprecated}
{:important: .important}
{:note: .note}
{:tip: .tip}
{:pre: .pre}
{:codeblock: .codeblock}
{:screen: .screen}
{:javascript: .ph data-hd-programlang='javascript'}
{:java: .ph data-hd-programlang='java'}
{:python: .ph data-hd-programlang='python'}
{:swift: .ph data-hd-programlang='swift'}

# Integrating with WhatsApp ![Beta](images/beta.png)
{: #deploy-whatsapp}

Integrate with Whatsapp messaging so your assistant can exchange messages with your customers where they are.
{: shortdesc}

Many customers use WhatsApp because it provides fast, simple, secure messaging for free, and is available on phones all over the world. WhatsApp uses the phone Internet connection to send messages so customers can avoid SMS fees.

This integration creates a connection between your assistant and WhatsApp by using Twilio as a provider.

This integration is available as a beta feature.
{: note}

## Before you begin
{: #deploy-whatsapp-twilio-setup}

If you don't have one, set up a Twilio messaging account and get a phone number.

1. Go to the [Twilio website](https://www.twilio.com/){: external}.
1. Create an account.
1. From the *All Products and Services* menu ![Twilio All products and services icon](images/twilio-products.png), click *Phone numbers*.
1. Follow the instructions to get a phone number.

When you get a Twilio phone number, it supports voice, SMS, and MMS automatically. Your new phone number is listed as an active number.

## Ask WhatsApp for permission to enable your Twilio number for WhatsApp.
{: #deploy-whatsapp-prereqs}

WhatsApp has a rigorous process that they use to review all businesses that want to interact with customers over their network. WhatsApp, which is owned by Facebook, requires that you register your business with the Facebook business directory.

1. To register, go to the [Facebook Business Manager](https://business.facebook.com/overview) website, and click *Create account* and follow the instructions to create an account.

1. Make a note of your Facebook Business Manager ID. You will need this in the next step.

1. Submit the *Request to enable your Twilio numbers for WhatsApp* form from the [Twilio API for WhatsApp](https://www.twilio.com/whatsapp/request-access) web page.

Tips for specifying the following values:

- *Phone Number*: Specify the Twilio phone number that you created earlier.

Consider provisioning more than one phone number and going through the process of getting permission for the numbers in parallel. If your number was used by a different business previously (because Twilio assigned you a number that was used before, for example), WhatsApp will reject it.
{: tip}
- *Are you working with an ISV*: No
- *Twilio Account SID*: From the Twilio site, click the home icon to go to your project dashboard to find the SID.
- *Facebook Business Manager ID*: Add the ID for the account that you created in the previous step.

1. 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
{: #deploy-whatsapp-setup}

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.

1. From the Integrations section, click **Add integration**.

1. Click **WhatsApp with Twilio**.

1. Click **Create**.

1. 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

1. 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**

1. Click **Sync account**.

1. 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.

1. Copy the value from the **WhatsApp Webhook** field.

1. Click **Save and exit**.

## Testing the integration
{: #deploy-whatsapp-sandbox}

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. To create a sandbox, go to the [Twilio Try WhatsApp](https://www.twilio.com/console/sms/whatsapp/learn) web page. An *Activate your sandbox* modal is displayed. Agree to have a sandbox created, and confirm your choice.

1. Follow the instructions to create the sandbox.

1. Connect to the sandbox by sending a WhatsApp message from your device to the Sandbox phone number.

1. From the *Programmable Messaging* menu, expand *Settings*, and then click *WhatsApp Sandbox Settings*.

1. In the *Sandbox Configuration* section, paste the webhook URI that you copied earlier into the *when a message comes in* field, and then save the configuration.

1. You can test the integration by sending a message from WhatsApp to the shared phone number that is assigned to your Twilio sandbox.

## Finish the product integration
{: #deploy-whatsapp-finish}

After WhatsApp grants permission for your Twilio phone number or number to access the WhatsApp network, update the integration to use your dedicated Twilio phone number instead of the sandbox number.

1. From the *WhatsApp with Twilio* integration setup page, scroll to the *Setup instructions* section, and then copy the value from the **Webhook URI (uniform resource identifier)** field.

1. Go to your Twilio account web page and add the webhook you copied to the Twilio configuration to complete the connection to the WhatsApp integration in Twilio.

## Give your customers fast access to your assistant
{: #deploy-whatsapp-click-to-chat}

You can add an icon to your web page that customers can click to start a conversation over WhatsApp with your assistant.

To add an icon to your web page, complete the following steps:

1. From the *WhatsApp with Twilio* integration setup page, click the **Click to chat** tab.

1. In the **Prefilled message** field, add text that you want WhatsApp to send to your assistant on the customer's behalf to get the conversation started.

Specify a message that you know your assistant can answer in a useful way.

1. Copy the embed link and add it to your web page. Consider adding text in front of the icon that explains what the icon does. For example, you might add a `<span>` HTML tag in front of the icon's `<span>` element that says `Have a question? Ask Watson Assistant for help`.

When a user clicks the icon in your web page, it opens a WhatsApp messaging session that is connected to your assistant, and adds the text you specify into the user's text field, ready to be submitted.

## Dialog considerations
{: #deploy-whatsapp-dialog}

For the best customer experience, design your dialog with the capabilities of the WhatsApp integration in mind:

- A text response that contains more than 1,600 characters is broken up into multiple responses.
- Do not include HTML elements in your text responses.
- The WhatsApp with Twilio integration does not support chat transfers that are initiated with the *Connect to human agent* response type.
- If you use Markdown syntax, see the *Supported Markdown syntax* table.
- To include a hypertext link in a text response, specify the url directly. Do not use markdown syntax for links. For example, specify `Contact us at https://www.ibm.com.`

| Format | Syntax | Example |
|------------|--------|---------|
| Italics | `We're talking about _practice_.` | We're talking about *practice*. |
| Bold | `There's *no* crying in baseball.` | There's **no** crying in baseball. |
{: caption="Supported Markdown syntax" caption-side="top"}

If you want to use the same dialog for an assistant that you deploy to many different platforms, add custom responses per integration type. You can add a conditioned response that tells the assistant to show the response only when the *WhatsApp with Twilio* integration is being used. For more information, see [Building integration-specific responses](/docs/assistant?topic=assistant-dialog-integrations#dialog-integrations-condition-by-type).
3 changes: 2 additions & 1 deletion dialog-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ To take advantage of the `context.integrations` object, you can create context v
| Salesforce service desk from web chat | `$integrations.salesforce` |
| SMS with Twilio | `$integrations.text_messaging` |
| Web chat (and Preview link) | `$integrations.chat` |
| WhatsApp with Twilio | `$integrations.twilio_whatsapp` |
| Zendesk service desk from web chat | `$integrations.zendesk` |
{: caption="Integration-specific context variables" caption-side="top"}

<!-- | Facebook | `$integrations.facebook` | -->
<!-- | Generic service desk connection from Web Chat | `$integrations.service_desk` |-->
<!-- | Intercom | `$integrations.intercom` | -->
<!-- | Slack | `$integrations.slack` | -->
<!-- | Whatsapp | `$integrations.twilio_whatsapp` |-->

<!--If you previously set up a connector to integrate with Facebook or Slack, you can use context variables. If you update you API calls to use the `2020-04-01` version of the v2 `/message` API, you can use `$integrations.facebook` and `$integrations.slack` for Facebook and Slack.-->
The following sections describe how to use integration-specific context variables to do common tasks.
Expand Down Expand Up @@ -106,6 +106,7 @@ The rich response types often behave differently when they are displayed in diff
<!--- [Slack](/docs/assistant?topic=assistant-deploy-slack#deploy-slack-dialog)-->
- [SMS with Twilio](/docs/assistant?topic=assistant-deploy-sms#deploy-sms-dialog)
- [Web chat](/docs/assistant?topic=assistant-deploy-web-chat#deploy-web-chat-dialog)
- [WhatsApp with Twilio](/docs/assistant?topic=assistant-deploy-whatsapp#deploy-whatsapp-dialog)

## Web chat: Accessing sensitive data
{: #dialog-integrations-chat-private}
Expand Down
35 changes: 32 additions & 3 deletions dialog-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

copyright:
years: 2015, 2020
lastupdated: "2020-10-15"
lastupdated: "2020-11-06"

subcollection: assistant

Expand All @@ -23,18 +23,29 @@ subcollection: assistant
{:python: .ph data-hd-programlang='python'}
{:swift: .ph data-hd-programlang='swift'}

# Starting the dialog
# Starting and ending the dialog
{: #dialog-start}

You cannot use the built-in welcome node to start a dialog in the Slack and Facebook integrations. Use this workaround instead.
Learn more about how to use the nodes that are added to your dialog automatically to start and end the conversation.
{: shortdesc}

When you add a dialog to your dialog skill, the following dialog nodes are added to it automatically:

- **Welcome**: Defines how the assistant greets the user and starts the conversation.
- **Anything else**: What the assistant says when a customer's request cannot be satisfied by any of the defined intents.

## Starting the conversation
{: #dialog-start-welcome}

The response you define for the welcome node in the dialog is displayed to initiate a conversation from the "Try it out" pane, and from other integrations, like *Web chat* or *Preview link*. However, it is not displayed from the *Slack* and *Facebook* integrations because nodes with the `welcome` special condition are skipped in dialog flows that are started by users. Assistants that are deployed to messaging channels typically wait for users to initiate conversations with them, not the other way around.

Unlike the `welcome` special condition, the `conversation_start` special condition is always triggered at the start of a dialog. You can use a combination of nodes with these two special conditions (`welcome` and `conversation_start`) to manage the start of your dialog in a consistent way.

For more information, see [Special conditions](/docs/assistant?topic=assistant-dialog-overview#dialog-overview-special-conditions).

You cannot use the built-in welcome node to start a dialog in the Slack and Facebook integrations. Use this workaround instead.
{: tip}

Complete the following steps to manage the dialog start:

1. Add a dialog node above the Welcome node that is automatically added to the top of the dialog tree when you create the dialog.
Expand All @@ -56,3 +67,21 @@ This design results in a dialog that works like this:
- Whatever the integration type, the `conversation_start` node is processed, which means any context variables that you define in it are initialized.
- In integrations where the assistant starts the dialog flow, the `Welcome` node is triggered and its text response is displayed.
- In integrations where the user starts the dialog flow, the user's first input is evaluated and then processed by the node that can provide the best response.

## Ending the conversation gracefully
{: #dialog-start-anything-else}

The *Anything else* node is designed to recognize the `anything_else` special condition, which understands when user input does not match any of the intents in the skill's training data.

- Don't delete the *Anything else* node. You might not recognize it's value at first, but it serves an important function. It prevents your assistant from going silent and failing to respond at all to your customers. The *Anything else* node is what enables your assistant to - if nothing else - say, `I'm sorry, I didn't understand.` or `I can't help you with that.`

- Don't change the name of the *Anything else* node. If you want the skill's analytics to be able to recognize topics that your dialog couldn't address, keep the node name as-is. The *coverage metric* looks for occurrences of a node named *Anything else* being processed in the user conversation logs. It uses this metric to determine the frequency with which your dialog is unable to match user requests to intents that can address them.

You can configure your assistant to redirect queries to the search skill if the dialog is unable to address the request. When a customer's message reaches the *Anything else* node in your dialog, the message is sent to the search skill to find a relevant answer in your configured data collections. Messages that trigger search in this way are registered by the coverage metric as not covered messages. For more information about searching for an answer when your dialog can't provide a response, see [Search triggers](/docs/assistant?topic=assistant-skill-search-add#skill-search-add-trigger).

For more information about the coverage metric, see [Graphs and statistics](/docs/assistant?topic=assistant-logs-overview#logs-overview-graphs).

If you spend time training your assistant to ignore certain topics of conversation, consider adding a separate dialog node earlier in the tree that recognizes the `irrelevant` special condition.
{: tip}

In the text response for the *Irrelevant* node, you can state plainly that your assistant understands the request, but is not designed to help with queries of this type. Doing so frees you up to use language in the *Anything else* node that encourages the customer to reword the question and ask again. This approach also prevents the Coverage metric from counting topics that you have chosen explicitly not to cover in its `Conversation not covered` totals.
Loading

0 comments on commit ab583b2

Please sign in to comment.