Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Data Action return array

    Posted 06-05-2025 18:42

    Giacky91 | 2021-02-01 16:40:40 UTC | #1

    Hi all, i'm trying to modify the follow DataAction, that works perfectly:

    { "name": "Agents Availability", "integrationType": "purecloud-data-actions", "actionType": "custom", "config": { "request": { "requestUrlTemplate": "/api/v2/routing/queues/${input.QUEUEID}/users?skills=${input.SKILL}&routingStatus=idle%2Cinteracting&presence=on%20queue", "requestType": "GET", "headers": { "UserAgent": "PureCloudIntegrations/1.0", "Content-Type": "application/x-www-form-urlencoded" }, "requestTemplate": "${input.rawRequest}" }, "response": { "translationMap": { "total": "$.total" }, "translationMapDefaults": {}, "successTemplate": "{\n \"total\": ${total}\n}" } }, "contract": { "input": { "inputSchema": { "title": "QueueIDRequest", "type": "object", "properties": { "QUEUEID": { "type": "string" }, "SKILL": { "type": "string" } }, "additionalProperties": true } }, "output": { "successSchema": { "title": "GetTotalUser", "type": "object", "properties": { "total": { "type": "integer" } }, "additionalProperties": true } } }, "secure": false }

    by modifying the API call to /api/v2/routing/queues/${input.QUEUE_ID}/users?expand=conversationSummary&skills=${input.SKILL}&routingStatus=idle%2Cinteracting&presence=on%20queue and return also

    "conversationSummary": { "call": { "contactCenter": { "active": 0 } }, "chat": { "contactCenter": { "active": 0 } } } for every agents that the call return. How can i modify the output in my DataActions?

    EDIT: My goal is to understand, in architect flow, if a queue has IDLE agent, so i can routed a call to that queue. To do so, i can also retrieve only the call part

    "conversationSummary": { "call": { "contactCenter": { "active": 0 } } }

    Thank you.


    Jason_Mathison | 2021-02-01 17:03:19 UTC | #2

    Hi Giacky91,

    Please provide an example of the JSON that your new query is returning (redacting anything sensitive) as well as an export of your action where you attempted to update the output schema. You can post both as .json files instead of pasting them as text.

    --Jason


    system | 2021-03-04 17:03:20 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: 9859