I'm playing around with Einstein Bots and have created a simple bot that is consumed inside a customer community.
I'd like to get the current User inside an Apex action used in a bot dialog.
The UserInfo.getUserId()
, as expected, returns the Automated Process system user.
Are there system slots (like LiveAgentSessionId
) that can be used for this porpouse?
In my mynd the only way to get the running user is to create a custom lightning component that would grab the UserId and pass it to the Bot without actually asking for anything from the running user...but honestly it seems more a workaround.
Any suggestions?
UPDATE I found a workaround on this but it seems robust enough. Here are the details: https://blog.enree.co/2018/11/salesforce-dealing-with-the-running-user-on-einstein-bot-dialogs.html