DirectLine do not preserve the ChannelData node while sending Activity

Christin Joseph 20 Reputation points
2025-10-23T07:55:44.35+00:00

I am sending a message Activity to the DirectLine channel. My aim is to integrate Custom Channel with Dynamics 365 Contact Center (Omnichannel).
I am using DirectChannel in my Azure Bot Service to do the communication.
I have attached the incoming call back Url of the omnichannel to the message end point of Azure Bot Service.

While sending message to the DirectLine channel I can see the message is reaching Omnichannel, but the ChannelData (I need to preserve the conversationcontext property in channeldata) is getting empty (initialised with empty data for the child nodes: channeltype, customercontext, conversationcontext).

This has been verified with the echo message Directline send to all channel when we send the first message.

While sending:

"ChannelData": 
{
   "channeltype":"MyCustomChannel", 
   "customercontext":{"name":"Firstname Lastname","phone":"123456789"},
   "conversationcontext":{"ContextVar1":"Data","ContextVar2":"Data"} 
}

The echo message from DirectLine forwarded to all participant (I guess thsi will be the one being forwarded to Omnichannel as well (via bot message endpoint url))

"ChannelData":
{
   "channeltype":[],
   "customercontext":[],
   "conversationcontext":[]
}

Since the data is not reaching the Dynamics (I guess the data is not being forwarded to dynamics too), the context variables set in Omnichannel Workstream is not getting filled (I checked the Context Item Value table in Dynamics).

My doubt is that if this is the actual behavior of DirectLine channel? Or should I make some changes in the data being send in Activity?

Azure AI Bot Service
Azure AI Bot Service

An Azure service that provides an integrated environment for bot development.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.