Data Action Translation Map

Hi Team,

I need a little help with translation maps when creating an action.

My Raw response is: (I removed the qualifier and queue id for this post.)

{
  "systemToOrganizationMappings": {
    "OFFLINE": [
      ""
    ]
  },
  "results": [
    {
      "group": {
        "queueId": ""
      },
      "data": [
        {
          "metric": "oOffQueueUsers",
          "qualifier": "",
          "stats": {
            "count": 1
          }
        }
      ]
    }
  ]
}

I am trying to get the count value but the following is not working for me.

{
"translationMap": {
"count": "$.count"
},
"translationMapDefaults": {},
"successTemplate": "${count}"
}

Any help would be massively appreciated, thank you.

I was able to find the answer on this forum using the below, however, I do not understand how this works but it does.

{
"translationMap": {
"totalArray": "$.results[0].data[?(@.qualifier=='6a3af858-942f-489d-9700-5f454622dae9b')].stats.count"
},
"translationMapDefaults": {
"totalArray": "[]"
},
"successTemplate": "{"Count":${successTemplateUtils.firstFromArray("${totalArray}","0")}}"
}

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.