Updating the search dialog node in IBM Watson Assistant Skills
As an administrator, you can publish the chatbot response to a user query as answered or unanswered by setting the context variables in the BMC – Search dialog node in IBM Watson Assistant Skills. Before setting the context variables, you must understand how IBM Watson Assistant Skills publishes the conversation event and how BMC Helix Chatbot out-of-the-box workspace determines answered or unanswered intents.
How IBM Watson Assistant Conversation Event is published
When customers ask a query to a chatbot, the chatbot receives the user input and the IBM Watson Assistant Skills travels through the dialog tree from the first dialog node in the tree to the last dialog node. Each dialog node of the tree has a condition.
As it travels down the tree, if a dialog node matches the condition, it triggers that dialog node and the conversation event is published with the matched intent.
It then moves along the triggered node to check the user input against any child node conditions. As it checks the child nodes, it moves again from the first child node to the last. When the IBM Watson Assistant Skills reaches the end of a branch, or cannot find a condition that evaluates to true from the current set of child nodes it is evaluating, it jumps back out to the base of the tree.
If no dialog node in the tree matches the condition, then the IBM Watson Assistant Skills triggers the anything_else/Do not understand node. The assistant publishes the conversation event with Irrelevant intent as no intents are matched.
For more information, see IBM Watson dialog flow.
To set the bmc_user_question_unanswered context variable
- Log in to your IBM Cloud account.
- Navigate toIBM Watson Assistant Skills that is configured with BMC Helix Chatbot.
- Take a back up of Skills.
- Click Dialogs, select the BMC – Search node, and update the following child nodes:
In the $responseStatus == Success node, locate the child node option = no, and set the context variable bmc_user_question_unanswered to "$userQuestionForMessage".
If you open the JSON editor, the code will look like the following text:
{
"output": {
"text": {
"values": [
""
],
"selection_policy": "sequential"
}
},
"context": {
"summary": "$userQuestion",
"bmc_user_question_unanswered": "$userQuestionForMessage"
}
}In the $responseStatus == "Not Found" node, set the context variable bmc_user_question_unanswered to <? $userQuestion != null ? $userQuestion : $userQuestion_deleted ?>.
If you open the JSON editor, the code will look like the following text:
{
"output": {
"text": {
"values": [
"I couldn't find anything related to your issue. Do you want me to a file ticket for you?"
],
"selection_policy": "sequential"
}
},
"context": {
"userQuestion_deleted": "<? context.remove('userQuestion') ?>",
"bmc_user_question_unanswered": "<? $userQuestion != null ? $userQuestion : $userQuestion_deleted ?>"
}
}
}
Customizing the published intent as answered
Optionally, you can customize the published intent as answered. To publish the intent as answered, you must add the bmc_custom_intent_matched context variable in your BMC - Search dialog node. Adding the bmc_custom_intent_matched context variable overrides the default behavior of publishing the intent.
(Optional) To set the bmc_custom_intent_matched context variable
- Log in to your IBM Cloud account.
- Navigate to the IBM Watson AssistantSkills that is configured with the BMC Helix Chatbot.
- Click Dialogs.
- To override the default behaviour of publishing intent, navigate to the node which you want customize.
Add the bmc_custom_intent_matched context variable. You can set the following values:
Value
Description
"bmc_custom_intent_matched" : ""
When the bmc_custom_intent_matched context variable is defined as null or an empty string, no intent is published. This value can be used when intent is matched but you do not want to publish.
"bmc_custom_intent_matched" : <customized intent name>
When the bmc_custom_intent_matched context variable is defined as <customized intent name>, it is published as answered.
Related topics
Viewing-BMC-Helix-Chatbot-reporting-dashboard
Configuring-IBM-Watson-Assistant-to-work-with-BMC-Helix-Chatbot