Our requirement is to use the Genesys recordings API /api/v2/conversations/${input.conversationId}/recordings and get the transcript and send the transcript to user after ACW using triggers.
I am using below output contract
{
"title": "Transcript",
"type": "object",
"properties": {
"Transcript": {
"type": "array",
"items": {
"title": "MessageO",
"type": "object",
"properties": {
"purpose": {
"type": "string"
},
"messageText": {
"type": "string"
}
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}
and below is my response template
{
"translationMap": {
"MessageO": "$..messagingTranscript[*]['purpose', 'messageText']"
},
"translationMapDefaults": {},
"successTemplate": "{\"Transcript\" : $MessageO}"
}
I am using below link for my reference
https://developer.genesys.cloud/forum/t/translate-data-action-response/24238/7
I am getting output like this if I don't flatten the output while testing inside data action test menu
{
"purpose": "customer"
},
{
"messageText": "Hi There, an Agent will be with you soon",
"purpose": "workflow"
},
{
"purpose": "agent"
}
]
When I am using same data action inside architect flow, I am getting it like 2 separate variables
{
"Transcript.purpose": [
"customer",
"workflow",
"customer",
"workflow",
"
],
"Transcript.messageText": [
"hi",
"In order to connect you to the right team, please tell us the reason for your contact today in a few words. For example 'Book a repair' or \"Change address\"\n \nPlease don't share any personal details that aren't requested. Domestic & General won't ask for information such as credit card details to verify your identity.",
"human",
"You want to speak to an advisor. Is that correct?",
"Yes",
]
}
Instead of 2 variables, I want my output to be in one variable, because I want to send purpose followed by messageText as transcript to user using email. Please help me in rectifying this issue. Expected output in email is this
{
"purpose": "customer"
},
{
"messageText": "Hi There, an Agent will be with you soon",
"purpose": "workflow"
},
{
"purpose": "agent"
}
#API/Integrations------------------------------
sravanthi dhurjety
Hexaware Technologies Limited
------------------------------