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
Original Message:
Sent: 03-21-2023 16:51
From: Mohannad haddad
Subject: get wrap-up code from historical conversation
Dears
I hope you are doing well,
I'm trying to invoke Genesys API inside Genesys, but I failed, as I followed the below steps:
1- create client ID auth
2- Install genesys integration and insert the secret with its ID
3- call Data action
after all of this its didn't work as its show me the following error "Response from web service: {"message":"This request requires a user context. Client credentials cannot be used for requests to this resource.","code":"not.a.user","status":400,"contextId":"591ebe54-fb12-477e-86e4-c6f55d942aed","details":[],"errors":[]} [d34c4ed1-82d7-47a3-b425-7df4923d6839]"
However I'm trying to invoke "/api/v2/analytics/conversations/{conversationId}/details" to bring up the wrap-up code ID, could anyone give me a hand in this and show me a clear steps as this first time for me trying to do this
#Reporting/Analytics
------------------------------
Mohannad haddad
Fourth Dimension Systems LLC
------------------------------