Legacy Dev Forum Posts

 View Only

Sign Up

How to store count of accounts?

  • 1.  How to store count of accounts?

    Posted 06-05-2025 18:40

    SergioRota | 2018-03-01 15:19:17 UTC | #1

    Hi,

    I have to store in data action RESPONSE the count of the accounts

    In request I have: { "requestUrlTemplate": "/api/data/v8.1/accounts?${esc.dollar}select=accountid,name&${esc.d}filter=$esc.url($msdynamics.phoneNumberFilter(\"$input.PHONE_NUMBER\", [\"telephone1\", \"telephone2\"]))&${esc.d}count=true", "requestType": "GET", "headers": { "UserAgent": "PureCloudIntegrations/1.0" }, "requestTemplate": "${input.rawRequest}" }

    thanks Sergio


    Jason_Mathison | 2018-03-01 15:46:09 UTC | #2

    Hi Sergio,

    I don't know what your question is. What is failing? Including your response configuration, contracts and the output of test mode would also help people help you.

    --Jason


    Jason_Mathison | 2018-03-01 18:01:02 UTC | #4

    Is your question "How do I get a value out of the response from the third party API?"

    There are a couple of solutions to this. One is to add "@odata.count" to the output contract. The other is to use a translation map to extract out the data so you can put it wherever you want into your successTemplate. This article should run you through setting up your response configuration:

    https://help.mypurecloud.com/articles/response-configuration-data-actions/


    Jason_Mathison | 2018-03-07 13:42:03 UTC | #6

    Hi Sergio, were you able to get this to work?


    system | 2018-04-07 13:42:03 UTC | #7

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