Skip to main content

Notifications

Customer Service forum
Suggested answer

Not receiving "End of Conversation Activity" from directline apis

Posted on by 2
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?
  • KI-24101446-0 Profile Picture
    KI-24101446-0 2 on at
    Not receiving "End of Conversation Activity" from directline apis

    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.

  • abhishekYellow1 Profile Picture
    abhishekYellow1 2 on at
    Not receiving "End of Conversation Activity" from directline apis
    Hi Dengliang Li

    Am already using GET activity api but  "End of Converstion" activity is not coming in the response.
     
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Not receiving "End of Conversation Activity" from directline apis
    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
     

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

News and Announcements

Forum Structure Changes Coming Soon!

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,734 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,021 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,150

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans