In order to route the Salesforce Enhanced WhatsApp channel messages to the Einstein BOT, we have to make use of Omni-Channel Flow. In the Omni-Channel Flow, use Route Work Flow element and invoke the BOT.
1. Create an Einstein BOT with type as “Enhanced”. Don’t create Standard Einstein BOT. Activate the BOT.
2. Create an Omni-Channel Flow. User Route Work Flow element.
Here, recordId is an input variable. When the Messaging Session is routed, the Omni-Channel will contain or hold the Messaging Session record Id in the recordId input variable. The API Name of the input variable is case-sensitive.
3. Go to Messaging Settings in Salesforce Setup. Edit the Enhanced WhatsApp Channel. In the Omni-Channel Routing Section, use Routing Type as “Omni-Flow” and select the Omni-Channel Flow that was created to route the Messaging Session to the Einstein BOT in the Flow Definition.