Mind Expression Docs
Mind Expression Docs
Search…
⌃K
Links

Case 3. TV Problem

Before you begin

  • This tutorial requires a webhook setup. Add a test webhook URL http://mock-webhook.mind.ai to your webhook settings.
  • This tutorial requires a "customer-id" global key in the Scope.
  • This tutorial requires an entity type. Add a regex entity type "MSISDN" in Knowledge.
MSISDN

Add a Subject

1. Click + Add Subject on the Scope details page.
2. Select the Diagnosis tab.
3. Enter a Subject name.
4. Enter Problem Statement which is the expected customer query as "The TV is not working."
5. Click Recognize Statement to get the Recognition Results.
6. Click Add.

Build the Subject

Step 1: TV Account

1. Name the first Step "TV Account".
2. Click + Add Component in the Components panel.
3. Click Selection Class.
4. Enter a Selection Class name as "Account Quantity" and Selection names as "One", "Multiple".
5. Click Add.
6. In the Component Settings panel, enter a Selection Term for the Selection One as "single".
7. Click Save.
8. Go to the other Selection Multiple.
9. In the Component Settings panel, enter a Selection Term for the Selection Multiple as "multiple".
10. Click Save.
11. Click + Add Action in the Conversational panel.
12. Under Check for Selection Class, click Check.
13. Select the Webhook tab.
14. Choose a webhook URL http://mock-webhook.mind.ai to use from the dropdown and enter URL Parameter (domain path and/or query string) as tutorial/tv-account?code=200&out=m. It will return a "multiple" Selection Term for the Selection Class.
Webhook URL (Method: GET)
Response Body
BASE URL
http://mock-webhook.mind.ai
URL PARAMETER
tutorial/tv-account?code=200&out=m
{
"mind-visions-quantity": "multiple",
"mind-visions": [
{
"name": "Mind Vision",
"id": "92741023",
"etc": "Mind Economy Package",
"desc": "Mind Economy Package with 120 channels"
},
{
"name": "Mind Vision",
"id": "91244132",
"etc": "Mind Sports Extra Package",
"desc": "Mind Sports Extra Package with 180 channels"
},
{
"name": "Mind Vision",
"id": "72364018",
"etc": "Mind Movie Lover Package",
"desc": "Mind Movie Lover Package with 250 channels"
}
]
}
15. Select the GET request method.
16. Select an error message display method as Template and select an action as Terminate to take in case of HTTP 400. If Passthrough is selected, the webhook response will be displayed without modification.
17. Enter an error message that will be displayed to the customer.
Sorry, I am terminating the session.
18. Enter the Term Matching JSONPath.
$.mind-visions-quantity
19. Click Save.
20. Click + Add Child Component in the Components panel.
21. Click Parameter Bundle.
22. In the popup, enter a Parameter Bundle name as "Account ID" and Parameter names as "ID". Set it as required.
23. Click Add.
24. To set up the ID Parameter, stay in the Compound Value tab in the Component Settings panel.
25. For the Binding Key, select the Global tab and choose the customer-id global binding key.
26. Click Set up Entity Type.
27. In the popup, stay in the My Entities tab.
28. Select the MSISDN entity type.
29. Click Submit.
30. Enter Designator. Key Path.
$.tv-accounts.id
31. Click Save.
32. Click + Add Action in the Conversational panel.
33. Click Check under Check for Parameter.
34. In the Action Settings panel, select the Combined tab.
35. Choose a webhook URL http://mock-webhook.mind.ai to use from the dropdown and enter URL Parameter (domain path and/or query string) as tutorial/tv-account?code=200&out=m.
Webhook URL (Method: GET)
Response Body
BASE URL
http://mock-webhook.mind.ai
URL PARAMETER
tutorial/tv-account?code=200&out=m
{
"mind-visions-quantity": "multiple",
"mind-visions": [
{
"name": "Mind Vision",
"id": "92741023",
"etc": "Mind Economy Package",
"desc": "Mind Economy Package with 120 channels"
},
{
"name": "Mind Vision",
"id": "91244132",
"etc": "Mind Sports Extra Package",
"desc": "Mind Sports Extra Package with 180 channels"
},
{
"name": "Mind Vision",
"id": "72364018",
"etc": "Mind Movie Lover Package",
"desc": "Mind Movie Lover Package with 250 channels"
}
]
}
36. Select the GET request method.
37. Select an error message display method as Template and select an action as Try again to take in case of HTTP 400. If Passthrough is selected, the webhook response will be displayed without modification.
38. Enter an error message that will be displayed to the customer.
Please try again.
39. Under Keys to Reset, enter "customer-id".
40. Enter Key and JSONPath pairings for Result Mapping.
Result Mapping
Result Mapping Pair 1
KEY
tv-account-count
JSONPATH
$.mind-visions-quantity
Result Mapping Pair 2
KEY
tv-accounts
JSONPATH
$.mind-visions
41. Enter the prompt.
Please select which account you have a problem with.
{{#tv-accounts}}
{{name}} {{id}}
{{/tv-accounts}}
42. Click Save.
43. Now in the Conversation panel, you will see the flow label after the Check action. Since it requires a Validate Result for the Subject, click Validate Result above the Steps panel on the left hand side of the screen.
44. In the Set up Validate Result popup, stay in the Customer tab.
45. Enter a prompt.
Does the TV work now?
46. Set the Expected Response as Affirmation.
47. Click Save.
48. Click Close.

Step 2: Diagnosing Problem

1. Add another Step and name it "Diagnosing Problem".
2. Click + Add Component in the Components panel.
3. Click Diagnostic Selection Class.
4. Enter a Diagnostic Selection Class name as "Possible TV Problems" and Diagnostic Selection names as "Not activated", "Not recognized", "No internet connection".
5. Click Add.
6. In the Component Settings panel, enter a Problem Term for the Not activated Diagnostic Selection as "Not activated".
7. Enter Problem Statement which is the expected customer problem as "The TV is not activated."
8. Click Recognize Statement to get the Recognition Results.
9. Click Save.
10. Go to the Not recognized Diagnostic Selection.
11. In the Component Settings panel, enter a Problem Term for the Not recognized Diagnostic Selection as "Not recognized".
12. Enter Problem Statement which is the expected customer problem as "The smart card is not recognized."
13. Click Recognize Statement to get the Recognition Results.
14. Click Save.
15. Go to the No internet connection Diagnostic Selection.
16. In the Component Settings panel, enter a Problem Term for the No internet connection Diagnostic Selection as "No internet connection".
17. Enter Problem Statement which is the expected customer problem as "There is no internet connection."
18. Click Recognize Statement to get the Recognition Results.
19. Click Set up Reference and select the Another Subject tab.
20. Select the Internet Problem Subject.
21. Click Submit.
22. Click Save.
23. Select the Not activated Diagnostic Selection to build the further flow.
24. Click Add Action in the Conversational panel.
25. Click Check under Check for Diagnostic Selection Class.
26. Select the Combined tab.
27. Choose a webhook URL http://mock-webhook.mind.ai to use from the dropdown and enter URL Parameter (domain path and/or query string) as tutorial/refresh-stb?code=200.
Webhook URL (Method: POST)
Response Body
BASE URL
http://mock-webhook.mind.ai
URL PARAMETER
tutorial/refresh-stb?code=200
{
"result": "STB for 92741023 is refreshed successfully",
"code": "200"
}
28. Select the request method as POST. For the POST request, you can enter the Request Body if needed. Enter the Request Body.
Request Body
{
"account-id": "92741023"
}
29. Select an error message display method as Template and select an action as Try again to take in case of HTTP 400. If Passthrough is selected, the webhook response will be displayed without modification.
30. Enter an error message that will be displayed to the customer.
Please try again.
31. Enter the instruction.
I just sent you a signal to your cable TV set top box. Please wait for 30 secs and tell me what message appears in the TV screen.
32. Enter the prompt.
What message do you see on the TV screen?
33. Click Save.
34. Click + Add Child Component under the Not activated Diagnostic Selection in the Components panel.
35. Click Diagnostic Condition.
36. Enter a Diagnostic Condition name as "Smart Card Problem".
37. Click Add.
38. In the Component Settings panel, enter a Problem Term for the Smart Card Problem Diagnostic Condition as "Smart Card Problem".
39. Enter Problem Statement as "There is a smart card problem."
40. Click Recognize Statement to get the Recognition Results.
41. Click Save.
42. Click + Add Child Component under the Smart Card Problem Diagnostic Condition in the Components panel.
43. Click Parameter Bundle.
44. In the popup, enter a Parameter Bundle name as "Check Serial Number" and a Parameter name as "Serial Number". Set it as required.
45. Click Add.
46. To set up the Serial Number Parameter, stay in the Single Value tab in the Component Settings panel.
47. Enter the local binding key as "smartcard-serial".
48. Click Set up Entity Type.
49. In the popup, select the My Entities tab.
50. Select the MSISDN entity type.
51. Click Submit.
52. Click Save.
53. Click + Add Action in the Conversational panel.
54. Under Check for Parameter, click Check.
55. In the Action Settings panel, stay in the Customer tab.
56. Enter the prompt.
What is the serial number of the smart card?
57. Click Save.
58. Select the Smart Card Problem Diagnostic Condition in the Components panel.
59. Click + Add Action in the Conversational panel.
60. Click Solve under Completion of Diagnostic Condition.
61. In the Action Settings panel, select the Webhook tab.
62. Choose a webhook URL http://mock-webhook.mind.ai to use from the dropdown and enter URL Parameter (domain path and/or query string) as tutorial/activate-stb?code=200&active=active.
Webhook URL (Method: POST)
Response Body
BASE URL
http://mock-webhook.mind.ai
URL PARAMETER
tutorial/activate-stb?code=200&active=active
{
"result": "STB (123311233) for 92741023 is activated successfully",
"code": "200"
}
63. Select the request method as POST. For the POST request, you can enter the Request Body if needed. Enter the Request Body.
Request Body
{
"account-id": "92741023",
"stb-id": "123311233"
}
64. Select an error message display method as Template and select an action as Terminate to take in case of HTTP 400. If Passthrough is selected, the webhook response will be displayed without modification.
65. Enter an error message that will be displayed to the customer.
Sorry, I am terminating the session.
66. Enter the Desired Result Matching Path.
$.code
67. Enter the Desired Result as "200".
68. Click Save.
69. Select the Not activated Diagnostic Selection in the Components panel.
70. Click + Add Action in the Conversational panel.
71. Click Validate result under Completion of Diagnostic Selection.
72. In the Action Settings panel, stay in the Customer tab.
73. Enter the instruction.
I have activated your smart card from our system. If the message is no longer displayed, it means the smart card is activated.
74. Enter the prompt.
Is the smart card activated now?
75. Set the Expected Response as Affirmation.
76. Click Save.
77. Click Publish to publish the Subject.