In the Flow Builder, click the Toggle Toolbox icon at the top-left, and then click New Resource.
From Resource Type, select Variable.
Enter recordId as the API Name.
From Data Type, select Text, and then select Available for input.
Click Done.
In the Flow Builder layout, click the + (Add element) icon and then click Route Work. For more information on the Route Work element, see Route Work Items to an Enhanced Bot.
For the Route Work element, provide a label and API name.
Under Set Input Values, complete the required fields.
For Record ID Variable, select the recordId variable that you created.
For Route To, select External Conversation Bot to populate the list of enhanced bots.
For External Conversation Bot, select the bot you created. Only active bots are available in this field. If your bot doesn’t appear in the list, set isActive to true in your ExternalConversationBotDef record, refresh Flow Builder, and try again. If you deactivate your bot later, it’s still associated with any flows that you added it to.
Under Fallback Queue, select Select Queue, for the fallback Queue ID, select a fallback queue where the Omni-Channel Flow sends the conversation if routing is unsuccessful.