This is a tutorial series that's cumulative in nature. To start from the beginning, start here.
In this tutorial, you take things to the next level. Instead of using patterns to trigger a dialog, you use an intent. LivePerson offers several trained and pre-built domains to help you get up and running quickly with intents. For this tutorial, we’ll take advantage of the Cross-vertical pre-built domain, which is designed as a great starting point for any brand with an online presence.
Step 5: Import the Cross-vertical domain
Since you’re going to be using an intent in this tutorial, you need to leave the Conversation Builder application for a moment.
-
Open the menu on the left side of the page, and select Automate > Intent Manager.
Intent Manager is where you create domains, which are collections of intents and entities. (Learn more about Intent Manager.)
Now let’s create a domain.
-
Locate the domain list in the Intent Manager dashboard. In the upper-right corner, click Add a domain.
-
On the Add Domain page, select the Prebuilt domains option along the top. Move the mouse over the "Cross-vertical" option, and select Add.
Adding the Cross-vertical pre-built domain provides you with a robust, trained domain with several intents designed to quickly get you up and running.
-
Take some time to look at the intents provided along the left side. Clicking any of them displays the intent name and its training phrases, which can be modified to suit your specific needs.
For now, you won’t add any additional content, but keep in mind that any new intents you add will need a minimum of 15 training phrases, and that any changes will result in the model needing to be re-trained.
-
In the Test User Input panel on the right, you can test utterances and see how they score against the provided intents. You will be using the "make payment" intent in this tutorial, so enter an utterance that you would expect to trigger this particular intent, such as, “I want to make a payment.” Then click Test.
-
Continue to test utterances to see how the confidence scores differ from phrase to phrase. The following test phrases should all score either Very Good or Good, signifying that they will successfully trigger the dialog this intent is attached to.
- How can I make a payment?
- I need to pay my bill
- Can I pay off my statement balance?
Step 6: Link the intent to a Make Payment dialog
With the "Make Payment" intent configured, let’s return to Conversation Builder and use the intent to trigger a new dialog.
-
Open the menu on the left side of the page, and select Automate > Conversation Builder.
- In the dashboard, select the bot you previously created.
-
Create a new regular dialog named "Make Payment."
By default, a regular dialog includes a Dialog Starter interaction, but it isn't configured yet. You'll use the Assist tool to do this.
- Open the Assist tool by clicking (Assist icon) beside the Dialog Starter interaction.
-
In Assist, search for the name of the domain that you created, i.e., "LP_Cross-vertical."
-
Select the domain to associate it with the dialog starter.
In Assist, the intents within the domain are displayed.
-
Type in a sample user message to use the NLU engine to identify the correct intent.
-
Select the "Make payment" intent that you tested. This associates the intent with the dialog starter.
Step 7: Add custom rules
Now you can begin to build out the Make Payment dialog.
- Add a Text statement that says, “Sure, I can help with that."
-
Add a Multiple Choice question that asks, "Got your preferred payment method on hand?" Enter "Yes" and "No" as the choices.
When someone says "yes," you'll want to show them a specific message. The same applies when someone says, "no."
-
Add a Text statement to respond to a reply of "yes". Name the interaction "Yes" in the upper-left corner. For the statement's text, enter, "Great! To pay your bill, please go to our billing portal at example.com.” Select "End Interaction" as the Next Action. Click the Save icon in the interaction's upper-right corner.
You make the last change because the default behavior for statements is to display the next interaction. In our example, the No statement will be next. Since the dialog flow should stop after the Yes statement, the Yes statement's next action should be to end.
-
Add a Text statement to respond to a reply of "no". Name the interaction "No" (in the upper-left corner). For the statement's text, enter, “Ok, we’ll be here to help when you're ready." Select "End Interaction" as the Next Action. Click Save.
You've got the dialog fleshed out; now you need to add custom rules to detect when a user says "yes" or “no” and direct them to the correct text statement.
-
Return to the multiple choice question, and select the Next Action dropdown.
- Add a rule to handle a "yes" response: Click + Custom Rule in the Next Action dropdown. In the Add Next Action Rule window, configure the Yes rule as follows:
- Rule name: Enter "Yes".
- Condition: Click + Add Condition. Select "Pattern" from the drop-down list of match types, and enter "yes" and "y" as patterns.
- And Go To: Select the "Yes" statement as the next action.
Click Save.
- Add a rule to handle a "no" response: Click the + Custom Rule button that's displayed once you have at least one rule defined. In the Next Action Rule window, configure the No rule as follows:
- Rule name: Enter "No".
- Condition: Click + Add Condition. Select "Pattern" from the drop-down list of match types, and enter "no" and "n" as patterns.
- And Go To: Select the "No" statement as the next action.
Click Save.
The multiple choice question should now look like this:
Now let's see the dialog in action.
- Open the Preview window, and start a new session by clicking Reset.
-
Enter an utterance that should match the Make Payment intent, like, "Can you help me to make a payment?" You should see the Make Payment dialog's flow and the multiple choice question. Tap or enter “Yes” or “No” and see what response you get.
You now understand the basics of intents and branching dialog flows.
What's next?
Continue on to the next tutorial in the series.