web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Not receiving "End of Conversation Activity" from directline apis

(1) ShareShare
ReportReport
Posted on by 6
We are using Direct Line APIs to create chats on behalf of users in a customer service workspace. I am able to send messages to agents and receive the agents' messages as well using the Direct Line APIs. However, the problem arises when the chat is ended by the agents, as I do not receive any information from the Direct Line Get Activity API that can indicate the conversation's closed.

Is there a way to obtain data from the Direct Line APIs or receive an event from the customer service workspace when a chat is ended by an agent on the portal?

Here are the APIs I am using:

To Start a Conversation:
POST https://directline.botframework.com/v3/directline/conversations
Body:
{
/from/: {
/id/: /1234abcd/,
/name/: /customer 123/
},
/channeldata/: {
/customercontext/: {
/email/: /test@gmail.com/,
/phonenumber/: /1234567890/
}
}
}

To Receive Message Activities (Agent Messages):
GET https://directline.botframework.com/v3/directline/conversations/3444334xxx-in/activities

To Send Messages to Agents:
POST https://directline.botframework.com/v3/directline/conversations/3444334xxx-in/activities
Body:
{
/locale/: /en-EN/,
/type/: /message/,
/from/: {
/id/: /1234abcd/,
/name/: /customer 123/,
/email/: /abhishek_test@gmail.com/
},
/text/: /Hello from user111/
}

I'm facing two main problems here:
  1. Not receiving any activity when the chat is ended by the agent in the customer service workspace.
  2. How can I send user information to the agent when creating a conversation, such as contact number and email, so that they can identify the user? What fields need to be set in the API body to achieve this?
I have the same question (0)
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Maybe the following documentation will help.
    Receive activities from the bot - Bot Service | Microsoft Learn
    This official documentation mentions that you can use WebSocket and HTTP GET to retrieve the /endOfConversation/ activity.

    Best Regards,
    Dengliang Li
     
  • abhishekYellow1 Profile Picture
    6 on at
    Hi Dengliang Li

    Am already using GET activity api but  "End of Converstion" activity is not coming in the response.
     
  • KI-24101446-0 Profile Picture
    2 on at

    Hi Abhishek,


    I hope you are doing great.


    We are currently facing an issue in the process of escalating chats from Azure AI Bot to Omnichannel using the Direct Line API. We are unable to send and receive agent messages.


    Could you please help us by sharing how you have set up your Omnichannel or Azure AI Bot so that they communicate with each other?


    This would help us overcome a blocker we are currently facing. Your prompt response would be highly appreciated.


    Thanks and regards,
    Kashif Inam.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
NeerajPawar Profile Picture

NeerajPawar 31

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 23 Super User 2026 Season 1

#3
Encore Business Solutions Profile Picture

Encore Business Sol... 14

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans