Chris_Carr | 2021-10-10 19:15:30 UTC | #1
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.
Chris_Carr | 2021-10-12 18:28:38 UTC | #2
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\")}}" }
system | 2021-11-10 21:08:21 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: 12315