Exercise 4 - Test the Mobile device access and waiver request service
After the service is published, the next step is to test the use case using a variation of utterances to determine if you will need to add additional Intent and/or Entity values.
For this use case, before looking at making updates to the Intents, we first create the following entities to represent the different "corporate applications" and "devices" that could be used in the Intent utterances. This is done as there is a pattern where most of the user's utterance use one or more variations for corporate applications and device names.
Entities:
- @mobileDeviceAccessAndWaiver_corporateApplications
- Entity Values:
- Concur; Synonyms: Concur, expense
- Corporate Application; Synonyms: Corporate Application, Corporate Applications, applications
- Corporate data; Synonyms: Corporate data, data
- Email; Synonyms: Email, Corporate Email
- My Company Portal; Synonyms: My Company Portal; portal
- Office 365 One Drive; Synonyms: Office 365 One Drive, One drive, 1 drive, OneDrive, 1 drive, Office 365, Office365
- OpenAir; Synonyms: OpenAir, open air
- Salesforce; Synonyms: Salesforce, Lightning, sales force
- SharePoint; Synonyms: SharePoint, share point
- Teams; Synonyms: Teams, MS Teams, Microsoft Teams
- Entity Values:
- @mobileDeviceAccessAndWaiver_deviceNames
- Entity Values:
- cell; Synonyms: cell, cell phone
- device; Synonyms: device
- mobile; Synonyms: mobile, mobile device
- phone; Synonyms: phone, Samsung, Galaxy, Google Pixel, iPhone
- tablet; Synonyms: iPad
- Entity Values:
Now that we have created the following entities to represent the different "corporate applications" and "devices" we can update our original Intents to leverage these entities. Note, that for this use case, there is one published entity created, @mobileDeviceAccessAndWaiver_pleaseReviewAndAgreeWithMobileDevice. This entity was not modified after it was published.
The following Intents are created to replace the original Intents, found within #mobileDeviceAccessAndWaiver, that were created from the publishing wizard.
Intents:
- Can I get access to @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- Can I get my @mobileDeviceAccessAndWaiver_deviceNames access to @mobileDeviceAccessAndWaiver_corporateApplications
- Can I have access to @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- Can I have my @mobileDeviceAccessAndWaiver_deviceNames have access to @mobileDeviceAccessAndWaiver_corporateApplications
- Can you help me access @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- Can you help me get access to @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- Can you help me open @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- Can you help me open email from mobile
- I need @mobileDeviceAccessAndWaiver_deviceNames to access Salesforce
- I need access to @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- I need access to Salesforce from my @mobileDeviceAccessAndWaiver_deviceNames
- I need my @mobileDeviceAccessAndWaiver_deviceNames to be connected to @mobileDeviceAccessAndWaiver_corporateApplications
- I need my @mobileDeviceAccessAndWaiver_deviceNames to connect to @mobileDeviceAccessAndWaiver_corporateApplications
- I need my @mobileDeviceAccessAndWaiver_deviceNames to have access to @mobileDeviceAccessAndWaiver_corporateApplications
- I want to access @mobileDeviceAccessAndWaiver_corporateApplications from my @mobileDeviceAccessAndWaiver_deviceNames
- Mobile Device Access and Waiver
Because the application "Salesforce" is used in other Intents and Entities, we have to create specific intent values that use the text "Salesforce" to enable the Chatbot to identify the correct intent. The identification of the correct intent will occur within IBM Watson Assistant, however the Chatbot may give you other options as well if the relevance values are close. Watson will place a higher relevance score for literals used in intent values than entity variables used to represent the same.
For more information about this intent please review the values by using your IBM Watson Assistant instance where this chatbot skill has been installed because we have not documented all the values here.
Dialogs Nodes:
In order to be able to handle the feature of being able to accept or not accept the Waiver agreement terms, we must make modifications to the published Dialog node, "BMC - Mobile Device Access and Waiver":
All changes made to dialog nodes in IBM Watson will get overwritten the next time you publish a Catalog service where these changes were made. Therefore, it is important to document and track these changes so that you can manually re-apply them.
- Create a child node," Evaluate Terms Response", under the existing dialog node "Fill Questions - Mobile Device Access and Waiver". We will set the "If assistant recognizes" condition to "true" so that this node runs when we call it.
- Create a child node, "Cancel", under the new dialog node "Evaluate Terms Response". We will set the "If assistant recognizes" condition to "@mobileDeviceAccessAndWaiver_pleaseReviewAndAgreeWithMobileDevice:Cancel" so that this node runs when the requester selects "Cancel".
- Create a child node, "Agree", under the new dialog node "Evaluate Terms Response" (placed under the "Cancel" dialog node. We will set the "If assistant recognizes" condition to "@mobileDeviceAccessAndWaiver_pleaseReviewAndAgreeWithMobileDevice:Agree" so that this node runs when the requester selects "Agree".
- Now that the nodes are in place we will circle back to add some "Jump to" functions within the "Then assistant should" section of the nodes. Note, all the "Jump to" functions will use the "If assistant recognizes (condition)" selection as shown below:
The first The first "Jump to" function will be made from the "Fill Questions - Mobile Device Access and Waiver" dialog node and the jump will be to the "Evaluate Terms Response" dialog node. - The second "Jump to" function will be made from the "Evaluate Terms Response" dialog node and the jump will be to the "Cancel" dialog node.
- The third "Jump to" function will be made from the "Cancel" dialog node and the jump will be to the "BMC - Anything I can help with?" dialog node.
- The fourth "Jump to" function will be made from the "Agree" dialog node and the jump will be to the "Confirmation - Mobile Device Access and Waiver" dialog node.
With the addition of the Intent and Entity values, the chatbot is now better able find the service using various utterances. The requester is also able to "Cancel" the request should they not wish to accept the Waiver agreement terms.
For example, if users request, "I need access to OneDrive and Teams from my iPhone", the chatbot will be able to find the correct Intent.
One of the ways to address this issue is to look at the intents to see if they can be reworded to be less similar between the use cases. For these use cases it is more difficult as they deal with mobile devices. Another way to address this issue is to build and use entities, with specific words that would only show up in their respective intents, within the Dialog Nodes 'If assistant recognizes' conditions.For our example use case here, we have implemented a third method that uses the intent confidence rating as part of the "If assistant recognizes" statements within the use case's parent dialog node.
For example, after performing some tests in IBM Watson Assistant, we can see that the confidence rating for all the intent utterances for success are typically values => 0.9.
Using the utterance, "I need to be able to access email from my phone", we can see that the confidence rating for the Intent #mobileDeviceAccessAndWaiver is 0.99, however the confidence rating for the Intent #mobileDeviceNewCorporateWirelessPlanReportAnIssue is 0.6 and #requestNewMobileDevice is 0.47. 
Since both values are close in range, this may trigger disambiguation which will cause the Chat bot to ask "Did you mean …" as shown below. 
To overcome this, we need to add the following intent confidence rating syntax to the "If assistant recognizes" statement in the parent dialog node. The syntax for this statement is
