Hello,
I want to make a data action that gets the name of a wrapup code via the conversationID. This works if I know in which line the wrapup code is located in section "participants.wrapup.name"of the conversation details. However, the line can vary from interaction to interaction. Can someone tell me how I have to formulate the translation map so that the first entry that is not null is fetched?
Configuration of the data action:
{
"requestUrlTemplate": "/api/v2/conversations/${input.conversationId}",
"requestType": "GET",
"headers": {},
"requestTemplate": "${input.rawRequest}"
}
{
"translationMap": {
"participantwrapupname": "$.participants[3].wrapup.name"
},
"translationMapDefaults": {
"participantwrapupname": "\"\""
},
"successTemplate": "{ \"participantwrapupname\": ${participantwrapupname} }"
}
Details of example conversation are:
"participants.wrapup.name": [
null,
null,
null,
"CLE Private Altersvorsorge",
null,
null,
null
],
#ArchitectureandDesign------------------------------
Thomas Repking
Canada Life Group Services Limited
------------------------------