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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 75 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans