Legacy Dev Forum Posts

 View Only

Sign Up

Conversation endTime question

  • 1.  Conversation endTime question

    Posted 06-05-2025 18:14

    Chris_Phillips | 2018-09-24 20:09:44 UTC | #1

    We are processing all conversations by checking the system for any updated conversations every N seconds (where N currently == 60).

    We need to do special processing when a conversation is first detected to be "completed".

    Is checking for the existence of the 'endTime' value at the root of the full conversation returned by 'v2/conversations/{id}' the true indicator of a completed conversation?

    Thanks

    Chris


    tim.smith | 2018-09-24 20:21:41 UTC | #2

    Is checking for the existence of the 'endTime' value at the root of the full conversation returned by 'v2/conversations/{id}' the true indicator of a completed conversation?

    Yes and no. If there is an end time, that means there was a condition encountered where the conversation could be considered ended. However, having an end time does not imply that there won't be additional activity in that conversation in the future. A good example of this is threaded emails. The conversation will end when the agent sends the reply, but the same conversation will be used when the customer sends a reply.


    Chris_Phillips | 2018-09-24 20:35:07 UTC | #3

    Hi Tim

    Thanks for the quick response. In our case we are only looking at voice calls, so would it be true in that case?

    I'm trying to figure out how to handle voicemail callbacks as our uses consider those to be 2 different conversations, even though they seem to be (for the most part) generating 1 conversation object.

    Thanks

    Chris


    tim.smith | 2018-09-24 21:16:41 UTC | #4

    Callbacks are the big one for voice conversations that could yield an end time and still have future activity. But it can be as simple as the wrap up code being updated after the conversation has ended. Because there is no concept in PureCloud of a conversation being "sealed" where it cannot be changed, I can't make a guarantee that any conversation can't be updated in the future.

    I would suggest making a list of the scenarios that you expect to encounter in your usage of PureCloud, then collect example conversation IDs for each scenario and inspect the resulting data. This will help you understand what gets updated at what points for those conversation. You can then build your application's logic around the observed behavior and data.


    Chris_Phillips | 2018-09-24 21:31:38 UTC | #5

    Hi Tim

    Would you be able to tell me what events will add an endtime?

    Thanks

    Chris


    tim.smith | 2018-09-24 21:41:45 UTC | #6

    A slight oversimplification would be to say "the end time is set when all participants are no longer active in the conversation." I can't provide an exhaustive list of all edge cases though; it's determined by the sum of the logic in the conversation processing services within PureCloud. That's why I suggested identifying the scenarios you expect to encounter per your business practices and analyzing the conversation data for those examples.


    Chris_Phillips | 2018-09-24 22:32:07 UTC | #7

    Okay we were doing some of that already, but had made assumptions about endtime being something more absolute.

    In the case of a customer leaving a VM in a Queue, and the callback being handled 1, 2 or event more days later, will that callback interaction end up going in to the original conversation, so we need to be able to handle a voice conversation that spans multiple days?

    Thanks

    Chris


    tim.smith | 2018-09-25 15:35:35 UTC | #8

    Chris_Phillips, post:7, topic:3614
    will that callback interaction end up going in to the original conversation, so we need to be able to handle a voice conversation that spans multiple days?

    If you add the callback to the original conversation, yes.


    Chris_Phillips | 2018-09-25 16:22:38 UTC | #9

    How do you add a callback to the conversation explicitly? From the conversations I was looking at the Voice Mail generated a callback that seemed to stay in the Queue until it was handled 1 hr later by an agent.

    Is there some documentation about how callbacks are handled relative to Conversations?

    thanks

    Chris


    tim.smith | 2018-09-25 19:29:05 UTC | #10

    https://developer.mypurecloud.com/api/rest/v2/conversations/index.html

    • POST /api/v2/conversations/{conversationId}/participants/{participantId}/callbacks - Create a new callback for the specified participant on the conversation
    • POST /api/v2/conversations/callbacks - Create a Callback

    For docs about how callbacks work, see the About callbacks article on the resource center or you can post product questions in the PureCloud Community Forum.


    system | 2018-10-26 19:42:45 UTC | #11

    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: 3614