Hi guys,
I'm struggling to get the data I want from a data action.
I'm using /api/v2/analytics/conversations/details/query to get the active conversations for a user - and also managed to return an array of the desired conversation IDs already - which is the state of the attached version.
(ok - or not, because as a new user I'm not allowed to upload attachments obviously... )
Now I want to add additional properties to the array - making it an array of objects instead of strings.
The output contract I already prepared would be like this:
{
"type": "object",
"properties": {
"conversationData": {
"type": "array",
"items": {
"title" : "conversation",
"type" : "object",
"properties" : {
"conversationId" : { "type" : "string" },
"participantId" : { "type" : "string" },
"communicationId" : { "type" : "string" }
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}
The thing I'm struggling with now is the translation map. My goal is to add the following data for each conversation (id) returned:
- The participant ID of the user ID that I passed to the data action in the body template: ${input.UserId}
Is it even possible to reference the input variables in the translation map? - The session ID (=communicationId") from that participant.
Any help cosntructing the translation map would be highly appreciated.
Thanks