Data Action with Nested Arrays- Call action in Architect flow

Hi All,

I have built custom Data action which has nested Arrays, I Get back required outputs succesfully in a template only when I uncheck "Flatten" while testing.

Customer wants to do end to end testing to see if it works , When I try to call data action I get it like below(maybe because it is not flattened). I need to know if we can manage it in Architect to get just ID rather body.account.Id in the output fields. How we make sure Agent gets a screenpop with all output values or some of output values we want agent to see on screenpop? Do we need to create a script and call this new script into our architect flow ?

By the way I see Data action is succesul with NO errors in workspace.

Here is DATA ACTION PUT PUTS in FLOW when I call Data action

image

Translation Map:
image

Appreciate any help !!

Hi @AshaIT
To get the data action to return "ID" rather than "body.account.Id", you would configure the translation map and success template to do that. This Resource Center article gives an example of using a translation map, and there a several threads on this forum you can find by searching "translationMap" that can help

@jacobshaw Thanks for reply !!

I am trying to figure out how I should come up with Translation map to get specific fields incorporated/Called into my Data action as outputs in Architect flow.

Here is output contract:

"body": {
"type": "array",
"items": {
"type": "object",
"properties": {
"priority": {
"type": "string"
},
"account": {
"type": "object",
"properties": {
"Id": {
"type": "string"
},
"Account_Name": {
"type": "string"
},
"PrimaryLanguage": {
"type": "string"
},
"Language__c": {
"type": "string"
},
"PersonBirthdate": {
"type": "string"
},
"VIP__c": {
"type": "boolean"
},
"Salesforce_ID": {
"type": "string"
},
"PersonMailingPostalCode": {
"type": "string"
)

"InsurancePolicies": {
"type": "object",
"properties": {
"records": {
"type": "array",
"items": {
"type": "object",
"properties": {
"InsuredId": {
"type": "string"
},
"Id": {
"type": "string"
},
"Name": {
"type": "string"
},
"PolicyType": {
"type": "string"
},
"ExpirationDate": {
"type": "string"
},

Currently I have Raw and I get fields I want in Data action template but when I try to call into flow I am not getting it.

Thanks for any direction !!

Can you provide the output from the remote endpoint so that we can help you with your translation map?

You can get it by running you action in test mode, and then clicking on "7. Execute". That step will expand and provide the output from the remote endpoint. Feel free to redact anything sensitive in the response, but don't change the "shape" of the response.

--Jason

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