'Microsoft botframework chatbot integration with Dynamic 365 customer service omnichannel

I am trying to integrate chatbot with D365 customer service omnichannel for agent handoff. I have followed all the steps as per Microsoft documentation. still no details related how the messages are sending to the omnichannel from chat bot using webchat using direct line (not the widget from omnichannel) .

I was able to initiate handoff from chat widget provided by the omnichannel. But I would like to know is it possible to use my own webchat to initiate the handoff through directline channel?

following links are used as reference for doing this.

Provision Omnichannel for Customer Service

Integrate an Azure bot



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source