By default, to detect the end of a handover with Genesys Cloud Open Messaging, Cognigy.AI establishes a WebSocket connection that subscribes to a channel created through the Notifications API. However, this approach has limitations and may not always be reliable. As an alternative, you can use HTTP webhooks, which require creating triggers in a workflow and using the Web Services Data Actions extension on the Genesys platform to send requests to Cognigy.AI. This approach ensures that events from ongoing conversations are reliably captured, especially during high volumes or complex flows with multiple queue transfers in Genesys. In this guide, you will configure HTTP webhooks in Genesys Cloud Open Messaging for the following Genesys analytics events:Documentation Index
Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
Use this file to discover all available pages before exploring further.
- AfterCallWorkEvent. The event is triggered when a human agent finishes after-call work by applying a wrap-up.
- UserEndEvent. The event is triggered when a user or human agent session ends, indicating that the interaction has been completed. Cognigy.AI uses this event to detect when a session ends, which helps avoid prematurely wrapping up the chat in the middle of a transfer or after receiving an
AfterCallWorkEventevent.
Prerequisites
- Configured Genesys Cloud Open Messaging.
- Applies to Cognigy.AI 4.99 and earlier versions. If you use Cognigy.AI 4.100 or later, migrate to Amazon EventBridge.
Configuration Steps
1. Install the Web Services Data Actions Extension
1. Install the Web Services Data Actions Extension
- In the Genesys Cloud interface, click Menu in the upper-left corner and go to IT and Integrations > Integrations.
- Click Add Integration, find Web Services Data Actions, then click Install.
- Enter a name for your connection, for example,
Web Services Data Actions Integration. - Click Save & Activate.
2. Create an Action
2. Create an Action
- In the left-side menu, select Data Actions.
- Click + Add Action and select the integration you created.
- Enter a name for the action, for example,
Send Event to Cognigy.
3. Configure the Action
3. Configure the Action
- On the Setup tab, go to the Contracts section.
- In Input Contract > JSON, select JSON and paste the following JSON:
- In the Configuration section, follow these steps:
- Select POST from the HTTP Method list.
- In the Request URL Template, enter the Cognigy API URL in the following format:
https://endpoint-<cognigy-instance-domain>/handover/genesysCloudOM. For example,https://endpoint-trial.cognigy.ai/handover/genesysCloudOM.
- Go to the Test tab, enter a value in the provided fields, for example
123. Click Run Test. - If the test is successful, click Save & Publish. Otherwise, review and correct the previous steps.
4. Create Workflows
4. Create Workflows
- Go to Orchestration > Architect, hover over the
icon on the Flows tab and select Workflow.
- Create a new flow for the
AfterCallWorkEventevent and name itWorkflow conversation.id.acw. - In the left-side menu, select Resources > Data and create the following String-type variables in the Add Variable section:
addressTodisconnectType
- In the left-side menu, select Initial State, then click the Data section on the Toolbox tab. Drag Call Data Action to the desired location in the flow editor.
- Name your action and select Web Services Data Action from the Category list.
- From the Data Action list, select the action you created previously.
- Fill in the following fields:
userId— enterFlow.addressToand select Literal from the list next to the field.topic— enterv2.detail.events.conversation.id.acwand select Literal from the list next to the field.disconnectType— enterFlow.disconnectTypeand select Literal from the list next to the field. Save and publish your flow.
- Create a new flow for the
UserEndEventevent and repeat steps 1–7 with the following changes:- Name the workflow
Workflow conversation.id.user.end. - For the
topicfield, select Literal and enterv2.detail.events.conversation.id.user.end.
- Name the workflow
5. Create Triggers
5. Create Triggers
- Go to Orchestration > Triggers.
- Create a trigger for the
AfterCallWorkEventevent and name itTrigger conversation.id.acw. - Configure the following fields:
- Topic Name — select
v2.detail.events.conversation.{id}.acw. - Workflow Target — select
Workflow conversation.id.acw.
- Topic Name — select
- Click + Add Condition and define the criteria:
- Criterion 1:
- JSON Path — enter
mediaType. - Operator — select Equals (==).
- Value — enter
MESSAGE.
- JSON Path — enter
- Criterion 2:
- JSON Path — enter
messageType. - Operator — select Equals (==).
- Value — enter
OPEN.
- JSON Path — enter
- Criterion 1:
- Click Save and toggle the Inactive option next to the trigger name to activate it.
- Create a new trigger for the
UserEndEventevent and repeat steps 1–5 with these changes:- Topic Name — select
v2.detail.events.conversation.{id}.user.end. - Workflow Target — select
Workflow conversation.id.user.end.
- Topic Name — select