Legacy Dev Forum Posts

 View Only

Sign Up

How to identify a conversation start and end from subscribed notification events?

  • 1.  How to identify a conversation start and end from subscribed notification events?

    Posted 06-05-2025 18:14

    markmou | 2019-01-15 16:57:29 UTC | #1

    Hi ,

    I'm writing a program to receive the conversation (call only) events for a specific queue from notification service, currently I am subscribing the topic "v2.routing.queues.{id}.conversations.calls". I am able to ge event data from the subscription now, the data presented in eventBody is different from the response of the conversation detail API (https://api.mypurecloud.com/api/v2/analytics/conversations/{id}/details).

    How to identify a conversation start and end from the event data (eventBody) of this topic?

    I've found a method in https://developer.mypurecloud.com/api/tutorials/calls/#javascript to check if all participants are disconnected, but I'm not for sure this is the way to identify a conversation ends. Can't find a detailed doc which has instructions for this task.

    I have go overed following docs already:

    • [DEV_HOST]/api/rest/v2/notifications/
    • [DEVHOST]/api/rest/v2/notifications/availabletopics.html
    • [DEV_HOST]/api/tutorials/presence/#javascript
    • [DEV_HOST]/api/tutorials/calls/#javascript

    (two links allowed in a post)

    Thanks in advance. Mark


    tim.smith | 2019-01-15 16:57:14 UTC | #2

    markmou, post:1, topic:4345
    How to identify a conversation start and end from the event data (eventBody) of this topic?

    Look at the participants. The earliest value for connectedTime is when the conversation started. If all participants have a value for endTime the conversation is disconnected and the latest value is when the conversation ended.


    markmou | 2019-01-16 16:58:14 UTC | #3

    Got it, thanks tim!


    system | 2019-02-16 16:58:18 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 4345