Hook an API call with wrap-up code selection

hi team,

I'm working on a Genesys project with messaging mediaType. We have an agent setup for handling the incoming messages. After the agents close the conversation, they select a wrap-up code which denotes the final outcome of the conversation (success/failure/abandoned, etc). Our requirement is to hook an API call to this wrap-up code selection, so that we can capture the final outcome in our own database.
Please suggest some way for achieving this.

Please fine below the screenshot of the wrap-up code screen.

Thanks in advance!

Regards
Manvendra

1 Like

Hi Mavendra
Maybe the PATCH /api/v2/conversations/{conversationId}/participants/{participantId} api endpoint is what you're looking for. This one takes a wrapup code in the request body and allows you to update a participant in a conversation.
The api explorer gives more detail
https://developer.genesys.cloud/openapi-explorer/index.html?openApiUrl=https://api.mypurecloud.com/api/v2/docs/swagger&host=api.mypurecloud.com&shareUrl=https://developer.genesys.cloud%2Fdeveloper-tools%2F%23%2Fapi-explorer%3F#request0

hi Jacob,

Thanks for the quick response!

I think this API we need to manually trigger to change the wrap-up code for a participant. But what I'm looking for is hook an external API call when a user (agent) selects a wrap-up code after conversation close, so that this API automatically gets called. Actually here, no extra action is required from the user, they just need to select the wrap-up code as usual. But the hooked API call here will help us capture the wrap-up code in our database as well (apart from Genesys).

Thanks

My company has the exact same problem. I created a form using a script, and this form writes information to our database, calling a data action when the submit button is pressed. We'd like to associate the wrap up code the agent selects with this form that the agent is submitting.

How can we hook into the moment the wrap up code is assigned to the conversation, so that we can send that wrap up code to our database? We know the wrap up code is stored in Genesys, but we would like to store the wrap up code WITH the form data in OUR database.

I saw in the Roadmap Webinar that there is a project in development. In the webinar, this project was called "Data Action Pre-Call/Post-Call Rule Action" and it says "This feature will allow admins to use a data action as a rule 'output'. For example, customers will be able to write a wrap up code to an external database after each interaction." The URL for this project was listed as https://genesyscloud.ideas.aha.io/ideas/CLOUT-I-257, but when I go to that URL, it tells me that the project either doesn't exist, or I don't have permission to view it. How do we join the Beta for this feature, as it's a much needed feature for our company?

If the above mentioned project is the same as /ideas/OTB-I-432, then it might not be exactly what we need. We need to be able to do this for all calls: inbound as well as outbound.

See also: Wrap Up Code Back End integration

Hi Mavendar,

This sounds more like an event-driven approach where based on event X you want to call a piece of custom code. Genesys Cloud currently has two event streaming models: Notifications and AWS Event Bridge.

  1. The notifications service allows you to open a web socket and listen for events. So you could use the v2.routing.queues.{id}.conversations.calls event to listen for a call being terminated and then look for a wrap up in the corresponding message body. One thing to be aware of is that if you lose your connection to the websocket and events that are published to the websocket are lost and will not be replayed. The notifications service has traditionally been used for near-time integrations within a front-end facing application. Documentation it can be found here

  2. If you use AWS, you should also take a look at using the AWS Event Bridge integration Genesys offers. The event bridge is currently in beta, but it allows you to receive events over the event bridge and then process the events in your AWS account using an AWS lambda. Event Bridge has a few messages that are not available over the notification service. However, I think the event you would want to look at in the case of Event Bridge is the v2.detail.events.conversation.{id}.acw. Since Event Bridge is still in beta, you would need to reach out to @Becky_Powell and ask to become part of the beta. Becky can also point you to the beta documentation,

I hope that helps.

Thanks,
John Carnell
Manager, Developer Engagement

Thanks for the update @John_Carnell, I'll give these a try and update my findings here.

Regards
Manvendra

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.