Hi Mohannad
To help test your data action against a completed interaction (as per subject of your post), here is what I suggest.
First use /api/v2/conversations/calls/{conversationId} instead of /api/v2/analytics/conversations/{conversationId}/details api to extract the wrapup to simplify your data action.
Second, execute /api/v2/conversations/calls/{conversationId} in API Explorer against a sample Interaction ID and make sure wrapup code is assigned against a participant, usually the agent.
Now that you are using "id" as input contract in your data action, under Configuration > Request URL Template use /api/v2/conversations/calls/${input.id} and leave the response configuration to default.
Under Output Contract, switch to JSON and copy below code
{
"type": "object",
"properties": {
"participants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"wrapup": {
"type": "object",
"properties": {
"code": {
"type": "string"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}
Now test your data action against same Interaction ID you used earlier in API Explorer.
Design Considerations:
- As there are multiple participants involved in an interaction, expect to receive some empty elements in the response array.
- You might as well get more than one wrapup codes if there are multiple agents involved.
I hope this helps.
Cheers
Zubair
------------------------------
Muhammad Zubair Awan
------------------------------
Original Message:
Sent: 03-24-2023 06:18
From: Mohannad haddad
Subject: get wrap-up code from historical conversation
Dear @Muhammad Zubair
thank you for your response, Kindly note that I'm struggling to get the "participants.wrapup.code" as I designed datat action to retrieve it with no use
Kindly find the configuration that I did
------------------------------
Mohannad haddad
Fourth Dimension Systems LLC
------------------------------
Original Message:
Sent: 03-22-2023 16:30
From: Muhammad Zubair Awan
Subject: get wrap-up code from historical conversation
Hi,
Is it failing when you test Data Action or its failing when you call the Data Action within Architect flow? Can you share screenshot of DA config (remove any sensitive info)
Cheers
------------------------------
Muhammad Zubair Awan