Legacy Dev Forum Posts

 View Only

Sign Up

Callback - Verify and Cancel Callbacks

  • 1.  Callback - Verify and Cancel Callbacks

    Posted 06-05-2025 18:20

    fabianopinheiro | 2021-08-11 19:10:07 UTC | #1

    Hello, I'm having problems checking and canceling calls that have callbacks

    I check at the beginning of the flow if the client has a callback in the queue in question using the following api: /api/v2/analytics/conversations/details/query

    query used:

    { "interval": "${input.interval}", "order": "asc", "orderBy": "conversationStart", "paging": { "pageSize": 25, "pageNumber": 1 }, "segmentFilters": [ { "type": "or", "clauses": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "mediaType", "operator": "matches", "value": "callback" }, { "type": "dimension", "dimension": "callbackNumber", "operator": "matches", "value": "${input.callbackNumber}" }, { "type": "dimension", "dimension": "queueId", "operator": "matches", "value": "${input.queueId}" } ] } ] } ] }

    If it already has, I offer an opportunity to be transferred immediately, in this case I collect all conversationsId that return in the query above and use it as input in the following api: /api/v2/conversations/callbacks/${input.conversationId}

    with the body:

    { "state": "disconnected" }

    To cancel.

    The problem is that if he reconnects the api returns that it has callbacks scheduled even though they are cancelled. Is there any way to check callbacks if they are active or not?

    Could you help me with this case?

    Thanks,


    mikehardie | 2021-08-12 23:39:26 UTC | #2

    Add to check that the conversation has not ended

    "conversationFilters": [ { "type": "or", "predicates": [ { "type": "dimension", "dimension": "conversationEnd", "operator": "notExists", "value": null } ] } ]


    fabianopinheiro | 2021-08-16 20:47:49 UTC | #3

    Hello mike

    It worked!!!

    Thank you very much!

    Fabiano Pinheiro


    system | 2021-09-16 20:48:41 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: 11720