• Kevin 13
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi Salesforce enthousiasts,

We are currently working on a Einstein bot, but we are facing difficulties tackling potential performance issues. Based on the dialog that the customer has with the bot, we know the Type of question the customer has. We want to save this information to the Case object, on the Type field. We want to run this flow when the chat is transferred to an agent - and not in each dialog - because it queries the Case object. 

Ideally we thus set variables during the chat, and finally push those values to the Case object at the end of the bot conversation. For example, custom had a question about Store and Opening Hours.

However we found that we cannot store values to a variable, using "Set Variable" in a Rule. Source Variable can only be Context Variables, and Destination variable not a value like you can when calling a flow.

User-added image

The current work around we have in place is that we call a flow with the custom value. This flow then just assigns the value and outputs back to the Einstein bot. The output is saved in the custom variable. When we transfer the chat to an agent, we then have a seperate flow that updates the fields on the Case object. This is not ideal - although we are not quering objects - because we are still calling many flows throughout the bot conversation.

User-added image

But this leads to running flows in almost all dialogs, which does not seem optimal. There must be a better way that I'm currently missing out on. Any idea how we can best tackle this problem? Thanks!
Hi Salesforce enthousiasts,

We are currently working on a Einstein bot, but we are facing difficulties tackling potential performance issues. Based on the dialog that the customer has with the bot, we know the Type of question the customer has. We want to save this information to the Case object, on the Type field. We want to run this flow when the chat is transferred to an agent - and not in each dialog - because it queries the Case object. 

Ideally we thus set variables during the chat, and finally push those values to the Case object at the end of the bot conversation. For example, custom had a question about Store and Opening Hours.

However we found that we cannot store values to a variable, using "Set Variable" in a Rule. Source Variable can only be Context Variables, and Destination variable not a value like you can when calling a flow.

User-added image

The current work around we have in place is that we call a flow with the custom value. This flow then just assigns the value and outputs back to the Einstein bot. The output is saved in the custom variable. When we transfer the chat to an agent, we then have a seperate flow that updates the fields on the Case object. This is not ideal - although we are not quering objects - because we are still calling many flows throughout the bot conversation.

User-added image

But this leads to running flows in almost all dialogs, which does not seem optimal. There must be a better way that I'm currently missing out on. Any idea how we can best tackle this problem? Thanks!
var recordId = cmp.get("v.recordId");
       var Fields = { ToAddress: {value: "to@to.com"}, 
                     ParentId	: {value: recordId}, 
                     HTMLBody: {value: "the text body", insertType: "cursor"} }
        var args = {actionName :"Case.Send_Email"};
        actionAPI.selectAction(args).then(function(result){
            console.log('Available Fields are ', JSON.stringify(result));
            //actionAPI.invokeAction(args);

        }).catch(function(e){
            if(e.errors){
                console.log('Action Field Log Errors are ',e.errors);
                console.error('Full error is ', JSON.stringify(e));
            }

try to using the "quickActionAPI" and gettting the 

below error "We can’t execute the API because the parent record isn’t selected."
Calling the Quickaction from lightning component and it's not working. please let me if i am doing anything wrong..

Thanks in advance.Full Screen