Legacy Dev Forum Posts

 View Only

Sign Up

Wrapup segment not showing when conversation active

  • 1.  Wrapup segment not showing when conversation active

    Posted 06-05-2025 18:29

    filiabel | 2024-02-16 14:48:02 UTC | #1

    Hi,

    I am building a call center monitoring app to keep track of presence, timing and routing status. For on queue users in routing status INTERACTING we want to show the current segment type to get a proper deep dive.

    Presence and routing status is fetched from GET /users?expand=presence,routingStatus which is working well. According to this forum answer I should get data from POST /analytics/conversations/details/query and filter either on conversation without end (and segments).

    When doing a test call and pinging the details endpoint it is working well when interacting, but when moving on to wrapup - this segment is not shown until after conversation is over.

    When interaction is over, we get these agent segments - when we in fact are in wrapup:

    "segments": [
      {
        "conference": false,
        "queueId": "x",
        "requestedRoutingSkillIds": [
          "x"
        ],
        "segmentEnd": "2024-02-16T14:29:37.230Z",
        "segmentStart": "2024-02-16T14:29:36.304Z",
        "segmentType": "alert"
      },
      {
        "conference": false,
        "disconnectType": "peer",
        "queueId": "x,
        "requestedRoutingSkillIds": [
          "x"
        ],
        "segmentEnd": "2024-02-16T14:31:07.519Z",
        "segmentStart": "2024-02-16T14:29:37.230Z",
        "segmentType": "interact"
      }
    ]

    Wrapup turns up after conversation is over, which defeats the purpose of live monitoring:

    "segments": [
    {
      "conference": false,
      "queueId": "x",
      "requestedRoutingSkillIds": [
        "x"
      ],
      "segmentEnd": "2024-02-16T14:29:37.230Z",
      "segmentStart": "2024-02-16T14:29:36.304Z",
      "segmentType": "alert"
    },
    {
      "conference": false,
      "disconnectType": "peer",
      "queueId": "x",
      "requestedRoutingSkillIds": [
        "x"
      ],
      "segmentEnd": "2024-02-16T14:31:07.519Z",
      "segmentStart": "2024-02-16T14:29:37.230Z",
      "segmentType": "interact"
    },
    {
      "conference": false,
      "disconnectType": "peer",
      "queueId": "x",
      "requestedRoutingSkillIds": [
        "x"
      ],
      "segmentEnd": "2024-02-16T14:31:41.379Z",
      "segmentStart": "2024-02-16T14:31:07.519Z",
      "segmentType": "wrapup",
      "sipResponseCodes": [
        200
      ],
      "wrapUpCode": "x"
    }
    ]

    Am I missing something or does this depend on any queue configuration or similar?

    Thanks a lot for any help 🙌


    filiabel | 2024-02-22 16:18:31 UTC | #2

    So I actually ended up extrapolating wrap status based on segment interaction having ended. This is my JSON body to endpoint POST /analytics/conversations/details/query. From there I could get all user IDs and start date of wrapup (actually end date of interact).

    {
        "interval": `${startTime}/${endTime}`,
        "conversationFilters": [
            {
                "type": "and",
                "predicates": [
                    {
                        "dimension": "conversationEnd",
                        "operator": "notExists"
                    }
                ]
            }
        ],
        "segmentFilters": [
            {
                "type": "and",
                "predicates": [
                    {
                        "dimension": "segmentType",
                        "value": "interact"
                    },
                    {
                        "dimension": "segmentEnd",
                        "operator": "exists"
                    },
                    {
                        "dimension": "purpose",
                        "value": "agent"
                    }
                ]
            }
        ]
    }

    system | 2024-03-23 16:18:42 UTC | #3

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


    This post was migrated from the old Developer Forum.

    ref: 24694