garimabalodi | 2023-08-17 07:05:42 UTC | #1
Hi Dev forum ,
I am working on a usecase where as a portion of it , i need to force wrap up on an email conversation after a certain amount of time has lapsed . I am making my test in the api explorer first , before i move to transform this as a data action.
I am using 2 apis for this as follows :
- /api/v2/analytics/conversations/{conversationId}/details ; to get participantid and session id where purpose matches agent
- substitute these values for participantid and communicaition id in the following api - /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup . In the body i am giving the wrapupcode id and name that i want to enforce,.
Although , on api explorer I do see a 202 success , but when i go and check interactions view , my email interaction is not updated with the enforced wrapup code.
Can someone confirm my understanding of these api's , if correct then what might be the issue ?
Regards Garima.
Charaf | 2023-08-17 12:38:56 UTC | #2
Hi @garimabalodi,
Once you get the conversationId and the participantId of the participant whose purpose is set to agent, you can make a call to the following API endpoint:
PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}
The body of the request should include:
{
"wrapup": {
"code": "wrapup-id-here"
},
"state": "disconnected"
}
(Other properties are optional)
Let me know if it works for you.
Best regards,
Charaf
garimabalodi | 2023-08-29 09:34:54 UTC | #3
Thanks Charaf , that worked !
system | 2023-09-29 09:35:17 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 21559