
{!$Context.VariableName} should be used to display Context Variable in Salesforce Einstein BOT.
1. Extract the BOT.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>WhatsApp_Bot</members>
<name>Bot</name>
</types>
<version>59.0</version>
</Package>
2. Add Context Variables to the BOT.
<contextVariables>
<contextVariableMappings>
<SObjectType>MessagingSession</SObjectType>
<fieldName>MessagingSession.ChannelType</fieldName>
<messageType>WhatsApp</messageType>
</contextVariableMappings>
<dataType>Text</dataType>
<developerName>ChannelType</developerName>
<label>Channel Type</label>
</contextVariables>
<contextVariables>
<contextVariableMappings>
<SObjectType>MessagingSession</SObjectType>
<fieldName>MessagingSession.ChannelName</fieldName>
<messageType>WhatsApp</messageType>
</contextVariableMappings>
<dataType>Text</dataType>
<developerName>ChannelName</developerName>
<label>Channel Name</label>
</contextVariables>
3. Deploy the changes to the org.

4. Make sure the Variables are created in the BOT.


5. Use the format {!$Context.VariableName} to display Context Variable in Salesforce Einstein BOT Builder or Dialog.

Output:
