Legacy Dev Forum Posts

 View Only

Sign Up

Filtering by a custom attribute

  • 1.  Filtering by a custom attribute

    Posted 06-05-2025 18:23

    marisa.grasso | 2022-10-10 11:21:49 UTC | #1

    Hi

    I have the following conversation participant taken from GET CONVERSATION BY ID:

    "participantId": "6917b110-0283-4728-8787-4d1742c746bf", "purpose": "agent", "userId": "101cc70d-940f-4539-8bb2-cdcb7998fc38", "sessions": [ { "activeSkillIds": [ "6149a24c-2f1d-4f14-9f8f-f14452776323", "3197e858-070c-4335-84b5-1e12b67bf1c5", "61bc6b20-f610-41d2-8dd3-9fdcadce717b" ], "agentBullseyeRing": 1, "ani": "tel:+34981219800", "direction": "inbound", "dnis": "tel:+34910474357", "edgeId": "412ac5ef-de89-4060-8a72-69a50658e294", "mediaType": "voice", "peerId": "513cc9ce-65b9-449a-a4fd-826ccc0f4d46", "protocolCallId": "ab1b1d8a-2e33-48cb-b981-03b2586db774", "provider": "Edge", "remote": "Coruña, Spain", "requestedRoutings": [ "Standard" ], "routingRing": 1, "selectedAgentId": "101cc70d-940f-4539-8bb2-cdcb7998fc38", "sessionDnis": "sip:62b1bcf5b75e371c7062a50e+scadeslas.orgspan.com;tgrp=1bd7f96e-ad6d-4264-bfb3-b136173b3ed1;trunk-context=scadeslas@localhost", "sessionId": "feb242a2-aa50-4f66-b9b3-ac9067eb5c47", "usedRouting": "Standard", "mediaEndpointStats": [ { "codecs": [ "audio/opus" ], "eventTime": "2022-10-01T00:41:08.395Z", "maxLatencyMs": 30, "minMos": 4.882337214040182, "minRFactor": 92.44046020507812, "receivedPackets": 2577 }, { "codecs": [ "audio/opus" ], "discardedPackets": 10, "eventTime": "2022-10-01T00:41:08.398Z", "maxLatencyMs": 80, "minMos": 4.840798727889465, "minRFactor": 90.74057006835938, "receivedPackets": 2570 } ], "metrics": [ { "emitDate": "2022-10-01T00:40:16.874Z", "name": "tAlert", "value": 800 }, { "emitDate": "2022-10-01T00:40:16.874Z", "name": "tAnswered", "value": 1043 }, { "emitDate": "2022-10-01T00:41:08.367Z", "name": "tTalk", "value": 51493 }, { "emitDate": "2022-10-01T00:41:08.367Z", "name": "tTalkComplete", "value": 51493 }, { "emitDate": "2022-10-01T00:41:18.367Z", "name": "tAcw", "value": 10000 }, { "emitDate": "2022-10-01T00:41:18.367Z", "name": "tHandle", "value": 61493 } ], "segments": [ { "conference": false, "queueId": "b461afdf-7766-444e-9533-6803e26befb2", "requestedRoutingSkillIds": [ "61bc6b20-f610-41d2-8dd3-9fdcadce717b", "3197e858-070c-4335-84b5-1e12b67bf1c5", "6149a24c-2f1d-4f14-9f8f-f14452776323" ], "segmentEnd": "2022-10-01T00:40:16.874Z", "segmentStart": "2022-10-01T00:40:16.074Z", "segmentType": "alert" }, { "conference": false, "disconnectType": "peer", "queueId": "b461afdf-7766-444e-9533-6803e26befb2", "requestedRoutingSkillIds": [ "61bc6b20-f610-41d2-8dd3-9fdcadce717b", "3197e858-070c-4335-84b5-1e12b67bf1c5", "6149a24c-2f1d-4f14-9f8f-f14452776323" ], "segmentEnd": "2022-10-01T00:41:08.367Z", "segmentStart": "2022-10-01T00:40:16.874Z", "segmentType": "interact" }, { "conference": false, "disconnectType": "peer", "q850ResponseCodes": [ 16 ], "queueId": "b461afdf-7766-444e-9533-6803e26befb2", "requestedRoutingSkillIds": [ "61bc6b20-f610-41d2-8dd3-9fdcadce717b", "3197e858-070c-4335-84b5-1e12b67bf1c5", "6149a24c-2f1d-4f14-9f8f-f14452776323" ], "segmentEnd": "2022-10-01T00:47:46.897Z", "segmentStart": "2022-10-01T00:47:46.897Z", "segmentType": "wrapup", "wrapUpCode": "3ee49cba-9189-4c0b-8e4e-61d02cc93c79", "wrapUpTags": [ "Resultado[-]10125", "Contacto[-]1-2BQ287Z" ] }

    I want to use the following endpoint /api/v2/analytics/conversations/details/query to find a given conversation filtering by the "wrapUpTags" attribute, more specifically, by the second value, the "Contacto[-]1-2BQ287Z" value at the end of the JSON object. Is this posible?

    I have been trying with the following body:

    { "interval": "2022-10-01T00:00:00.000Z/2022-10-03T00:00:00.000Z", "segmentFilters": [ { "type": "and", "predicates": [

    { "propertyType": "string", "property": "wrapUpTags", "value": "Contacto[-]1-2BQ287Z" }

    ] } ]

    }

    but it returns 0 results.

    Any help much appreciated.

    Thank you


    Jerome.Saint-Marc | 2022-10-24 14:13:53 UTC | #2

    Hello,

    Unfortunately, wrapupTag is not a searchable field (it cannot be used in a query filter). You can see the list of available dimensions for Conversation Details Query in this page. The Searchable column specifies if the dimension can be used in a query filter or not.

    Regards,


    system | 2022-11-24 14:14:42 UTC | #3

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