raw_result.json (2.2 KB)
Hi there! I will say first off that I am a Genesys Engineer that dabbles in Data Action creation, rather than a developer. I have a feeling my ask is quite rudimentary.
I am developing a data action response for account lookups via phone number in a custom CRM we have deployed. Most of the information we need is in an array with multiple objects. This is needed because we are trying to identify if a phone number returns multiple account results.
I can return most of the information just fine using ${rawResult} if I only call for one of the objects - the information appears to return fine. If I do this, I can capture, for example, account_number just fine.
As soon as I add a second object to grab data from, such as items.customer_oid, test stops showing the data collected. I assume I need to do some work with the translation map.
I have tried storing everything in an items array, and pulling the data there - once I do this, I get a "too many results" error.
Here's that response template I tried:
"response": {
"translationMap": {
"items": "$.items",
"account_number": "$.items[0].account_number",
"account_number2": "$.items[1].account_number"
},
"translationMapDefaults": {
"account_number": ""oopsie"",
"account_number2": ""oopsie""
},
"successTemplate": "$items,{\r\n"account_number":${account_number},\r\n"account_number2":${account_number2}"
I've uploaded the raw result I get if I just pull the GET, and also a copy of my data action containing my response template.
I can make this work with rawResult and a single object for account_number, but I am looking to pull in more data than that. It feels to me like getting the first one right, I will be able to use that to create the rest.
Get-Account-By-Phone-Number-Azure-Dip-2023010394704.custom.json (1.5 KB)
raw_result.json (2.2 KB)
raw_result.json (2.2 KB)