How to create Case record only when Chat is transferred to an Agent in Salesforce Einstein Bot?

1. In the Embedded Chat, make sure only Contact is selected in the Pre-Chat.
 

2. Create a Flow to Create Case record and Update Chat Transcript with the Case Id.

Case Assignment:

Create Case:

Chat Transcript Assignment:

Update Chat Transcript:

3. Update "Transfer to Agent" Dialog in the BOT. Get the Subject for Case. Call the Flow to create a the Case and update Chat Transcript with the Case Id.


4 comments:

  1. Hi I need help with this guide... ASAP

    ReplyDelete
  2. I am tring to implement this with same details as you described in the images but its not creating any case after assigning and also I am getting this error:

    Flow API Name: create_Case_when_Chat_is_transferred_to_an_Agent
    Type: Autolaunched Flow
    Version: 1
    Status: Active
    Org: Petcube, Inc. (00D2h00000017XV)
    Flow Interview Details
    Interview Label: Assign 11/19/2021 6:54 AM
    Interview GUID: 8538ca7cabc9aafbf6db315eb28317d388f26c-077c
    Current User: Platform Integration User (0051N0000070ihr)
    Start time: 11/19/2021 6:54 AM
    Duration: 0 seconds
    How the Interview Started
    Platform Integration User (0051N0000070ihr) started the flow interview.
    API Version for Running the Flow: 53
    Some of this flow's variables were set when the interview started.
    objChatTranscript = null
    objCase = null

    ReplyDelete
    Replies
    1. As discussed in the Messenger, try trigger on AgentWork.

      Delete