0

Hi I'm working with einstein bot for user to be able to chat to the bot thru slack, without any pre-chat form, user can just type anything and bot will response with welcome dialog. I'm trying to make a welcome dialog with visitor name being mentioned. e.g

'Welcome [Visitor Name], Thank you for reaching out to helpdesk, how can I help you?'

I followed this guidance to put visitorName. But I couldn`t find this visitorName anywhere. And the visitor name populated on LiveChatTranscript record is auto number, not the visitor name.

https://developer.salesforce.com/docs/atlas.en-us.226.0.live_agent_rest.meta/live_agent_rest/live_agent_rest_request_bodies.htm#ChasitorInit

Any solution?

1 Answer 1

0

Found the answer. By creating new custom field on LiveChatTranscript to store the visitor name, and from slack, when sending the JSON to salesforce, add the field in PrechatDetails.

{ “organizationId”: “”, “deploymentId”: “”, “buttonId”: “”, “AgentId”: “”, “sessionId”: “b274f2fa-66e4-4b9c-9bc2", “userAgent”: “”, “language”: “en-US”, “visitorName”: “Florent”, “prechatDetails”: [ { “label”: “Visitor Name”, “value”: “Florent”, “displayToAgent”: true, “transcriptFields”: [ “Visitor_Name__c” ], “entityFieldMaps”: [] } ], “prechatEntities”: [], “receiveQueueUpdates”: true, “isPost”: true }

And then create an action in einstein bot to call flow/apex and query for the liveChatTranscript using {!$Context.RoutableId}. e.g:

SELECT Id, Visitor_Name__c FROM LiveChatTranscript WHERE Id = RoutableId

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .