Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Get agent's conversation

    Posted 06-05-2025 18:17

    yuezhong | 2020-05-24 23:59:56 UTC | #1

    Hi

    is there an API to return the one agent's conversation by passing the agent's id to the request?

    I had a look the below two API, it doesn't meet my requirements, /api/v2/conversations Get active conversations for the logged-in user

    /api/v2/analytics/conversations/details/query Query for conversation details


    mikehardie | 2020-05-26 04:17:23 UTC | #2

    POST /api/v2/analytics/conversations/details/query

    { "interval": "2019-09-12T22:00:00.000Z/2019-09-12T23:59:00.000Z", "order": "desc", "orderBy": "conversationStart", "paging": { "pageSize": "10", "pageNumber": 1 }, "segmentFilters": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "userId", "operator": "matches", "value": "USER ID GOES HERE" }, { "type": "dimension", "dimension": "segmentType", "operator": "matches", "value": "interact" } ] } ] }

    Hope this helps


    yuezhong | 2020-05-26 05:01:35 UTC | #4

    thank you .

    :grinning:


    yuezhong | 2020-05-26 05:06:05 UTC | #5

    just adding the conversationFilters to ensure the agent is still dealing with the customer.

    {
     "interval": "2020-05-26T04:56:00.000Z/2020-05-26T05:00:00.000Z",
     "order": "asc",
     "orderBy": "conversationStart",
     "paging": {
      "pageSize": 25,
      "pageNumber": 1
     },
     "segmentFilters": [
      {
       "type": "and",
       "predicates": [
        {
         "type": "dimension",
         "dimension": "userId",
         "operator": "matches",
         "value": "USERIDSSSSSSSSSSSSSSSSSSSSSS"
        },
        {
         "type": "dimension",
         "dimension": "segmentType",
         "operator": "matches",
         "value": "interact"
        }
       ]
      }
     ],
     "conversationFilters": [
      {
       "type": "or",
       "predicates": [
        {
         "type": "dimension",
         "dimension": "conversationEnd",
         "operator": "notExists",
         "value": null
        }
       ]
      }
     ]
    }

    Jeffr | 2020-05-29 14:21:07 UTC | #6

    I 'think' I am using this query in Python (analyticsapi.postanalyticsusersdetailsquery) but I am not getting any conversation information, just routingstatus & primary_presence?

    Any suggestions?

    :slight_smile:


    Jerome.Saint-Marc | 2020-05-29 14:30:31 UTC | #7

    Hello,

    "POST /api/v2/analytics/conversations/details/query" -> analyticsapi.postanalyticsconversationsdetails_query


    Jeffr | 2020-05-29 14:46:58 UTC | #8

    Thanks Jerome,

    Not sure how I missed that!

    j.


    system | 2020-06-29 14:47:00 UTC | #9

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