The bot in this article simply replies to any chat messages that the visitor sends to the bot. The engagement targets a specific skill group, to isolate the bot from other agents in your organization. When the visitor sends transfer to human, the bot transfers the chat to the skill group human with human agents in it.

Requirements

To produce Bots as Agents you need the following:

A Live Assist for Microsoft Dynamics 365 Enhanced License. Each bot can handle 3 concurrent chats for each Live Assist license allocated.

A Microsoft Azure Subscription, with access to the Azure Bot Service. Register for a free trial.

Important: This article demonstrates Microsoft's Web App Bot. If you are deploying a Function Bot, the surrounding code samples may need alteration.

Apply Live Assist Code

1. Overrides the Bot SDK ActivityHandler classes OnTurnAsync method to handle all Live Assist ChannelData types received in the Direct Line channel except the visitorMessage type

2. In the existing OnMessageActivityAsync when the bot receives a visitorMessage via the Direct Line Channel Data. The sample:

Checks the message begins with the String "transfer to " (This is the wording to signify that the visitor wants to be transferred to an agent with the following skill, In the sample case this is the 'human' skill)