Creating Cases (Tickets) in Salesforce

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.

The name of the current intent is available in context.intent

if (context.intent === "Installation") {...}

Hello @andy.heydon,

Thank you very much for the information.

I will use/test it in some other use case that might appear.
I achieved to create cases for the specific intent (Installation | Activation | Refund) by creating context variables and passing its values to the sub-task “Create Case”, and it is working fine!

Best regards,
Henry

Can you let me know how I can create cases in Salesforce using my Bot?
I don’t find anything useful on the internet, if you can refer me some reference that’d be great.

I already have Kore Bot to Salesforce agent transfer in place.