DataAction - can we use input variable into TranslationMap condition

Hello folks,

Is it possible to use input variable into TranslationMap field filter / condition in DataAction. Here i have provided sample json

{
"name": "InteractedTimeforGivenUser_v1",
"integrationType": "purecloud-data-actions",
"actionType": "custom",
"config": {
"request": {
"requestUrlTemplate": "/api/v2/conversations/${input.conversationId}",
"requestType": "GET",
"headers": {},
"requestTemplate": "${input.rawRequest}"
},
"response": {
"translationMap": {
"LastAgentInteractedStartTime": "$.participants[?(@.purpose=='agent' && @.userId=${input.UserId})].calls[*].segments[?(@.type == 'Interact')].startTime",
"LastAgentInteractedEndTime": "$.participants[?(@.purpose=='agent' && @.userId=${input.UserId})].calls[*].segments[?(@.type == 'Interact')].endTime"
},
"translationMapDefaults": {
"LastAgentInteractedStartTime":"[]",
"LastAgentInteractedEndTime":"[]"

  },
  "successTemplate": "{

"LastAgentInteractedStartTime":${LastAgentInteractedStartTime},
"LastAgentInteractedEndTime":${LastAgentInteractedEndTime}}"
}
},
"contract": {
"input": {
"inputSchema": {
"title": "Input",
"type": "object",
"properties": {
"conversationId": {
"type": "string"
},
"UserId": {
"type": "string"
}
},
"additionalProperties": true
}
},
"output": {
"successSchema": {
"title": "Output",
"type": "object",
"properties": {
"LastAgentInteractedStartTime": {
"type": "array",
"items": {"title": "Item 1","type": "string"}
},
"LastAgentInteractedEndTime": {
"type": "array",
"items": {"title": "Item 1","type": "string"}
},
},
"additionalProperties": true
}
}
},
"secure": false
}

Thanks for your response

Hello,

No, it is not possible to leverage an input parameter (of the data action) in the translationMap.

Regards,

You can vote for this feature here:
https://genesyscloud.ideas.aha.io/ideas/OTB-I-224

We are aware that this issue is impacting a lot of people, but voting for it definitely helps us give it extra priority.

--Jason

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