Legacy Dev Forum Posts

 View Only

Sign Up

How to get working Developer Tools query into PureCloud data action

  • 1.  How to get working Developer Tools query into PureCloud data action

    Posted 06-05-2025 18:41

    Tobias_Junghans | 2019-09-10 13:27:24 UTC | #1

    Hi, I was spending couple of days for taking over a working request ( post /api/v2/analytics/conversations/aggregates/query) into a PureCloud data action but without success. Can anybody give me a hint what's wrong in my data action? You can find my data action attached.

    <a class="attachment" href="/forum/uploads/db6296/original/2X/2/224984114bc4f1000d299c31bd0ce7927de38ab1.json">A1PostConversationsAggregatesQuery-20190909203417.custom.json</a> (1.8 KB)

    Thanks a lot! Tobias


    Jason_Mathison | 2019-09-09 19:06:12 UTC | #2

    Hi Tobias,

    Can you describe in what way the action isn't working for you? If it is outright failing please post the failure message from test mode.

    --Jason


    Tobias_Junghans | 2019-09-10 06:58:45 UTC | #3

    Hi Jason, sorry I forgot to mention what's my problem with this data action. The problem is, that I get no response or the response is empty. If I test this data action the response is the following:

    But if I run the same request body template in Developer Tools I get a json response (rawresult).

    But I cannot find any description what I have to use as Response configuration in my data action. And I don't know why my variables, which I have set as Output Contract, are empty.

    Tobias


    Jason_Mathison | 2019-09-10 18:08:21 UTC | #4

    I can't really tell why you are not getting any data back from your data action. One gotcha is that when you are testing in developer tools your query runs as "you", while data actions run with the rights of the roles assigned to the client credential you created. If you are using divisions then make sure that the role that you assigned to the client credentials includes any relevant divisions.

    Once you are getting data back you will need to use a translation map and a success template to extract the data that you want from the response and format it to match your output contract. See: https://help.mypurecloud.com/articles/response-configuration-data-actions/

    --Jason


    system | 2019-10-11 18:08:23 UTC | #5

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