Hello,
Please, I would need your help to clarify the following issue:
Premise: Salesforce and the Bot are already integrated and working properly, meaning I can create Cases in Salesforce.
Use Case: Create Case in Salesforce
Main Tasks: Installation | Activation | Refund
Individual Tasks: Create Case
Issue: Unable to create Cases based on the intent recognition
Example: The user starts the Bot and based on the user’s utterances the Bot recognizes the intent as Installation. The user proceeds with the conversation with the Bot normally and at the end of the support, we need to create a Case (Ticket) in our system (Salesforce) based on the support provided/intent recognized, in this situation Bot provided support for Installation. then we need to a Case in Salesforce with parameters related to the intent “Installation”.
The main issue is that within the dialog tasks “Create Case” I need to create a script to get the intent that was recognized by the Bot and then create some context variables that will be used to pass the values to Salesforce finally create the Case, according to the intent (here I am considering, for now, only 2 intents: Installation and Activation):
if (context.intent.Installation) I am making this up… Is it possible to get the intent via context?
{
context.sfRecordTypeId = “012b0000000DsMxAAK”;
context.sfCategory = “XXXXXX”;
context.sfProduct = “ABCDE”;
context.sfIssue = “Install”;
context.sfSubissue = “How to Install”;
context.sfOrigin = “Chat”;
context.sfSubject = “Test Case Creation for Intent Installation”;
context.sfDescription = “I am the Bot”;
context.sfStatus = “New”;
context.sfPriority = “Medium”;
}
else
{
context.sfRecordTypeId = “012b0000000DsMxAAK”;
context.sfCategory = “XXXXX”;
context.sfProduct = “WYXAW”;
context.sfIssue = “License/Subscription”;
context.sfSubissue = “Activation/Registration”;
context.sfOrigin = “Chat”;
context.sfSubject = “Test Case Creation for Intent Activation”;
context.sfDescription = “I am the Bot”;
context.sfStatus = “New”;
context.sfPriority = “Medium”;
}
This script will not work, but I need to know if the intent recognized is stored in some variable that I can call anytime? Please, is it possible to help me out with this query?
If not, an alternative solution would be not using a dialog task “Create Cases”, but putting the service nodes/scripts for each intent dialog (Installation | Activation | Refund).
However, I would like to avoid it.
Thank you in advance for your inputs.