Create a trigger
The following permissions:
- Process Automation > Trigger > All
- Process Automation > Trigger > Add
- Process Automation > Trigger > Delete
- Process Automation > Trigger > Edit
- Process Automation > Trigger > View
- Process Automation > Trigger > Test
Triggers provide an effective way to automate your Genesys Cloud workflows. When you create a trigger, you configure Genesys Cloud to take a specific action when a certain event occurs. For more information about trigger components, see Overview of triggers.
To create a trigger, follow these steps:
- Click Admin.
- Under Architect, click Triggers.
- Click Add Trigger.
- Enter a name and description for the trigger, and then click Add.
- Under Topic Name, select a topic.
- Under Workflow Target, select the workflow to invoke.
- Under Data Format, select TopLevelPrimitives or Json as the data format in which the input parameters route to the workflow.
Notes:
-
The top-level primitives such as, strings, enums, numbers, and Boolean are sent to the workflow.
-
For JSON data format, the entire event is sent to the workflow as a JSON object. The workflow must be configured to have an input variable named jsonData of type JSON.
-
- (Optional) You can specify the conditions that must be met to invoke the trigger. To add a condition, click Add Condition.
- Under JSON Path, enter the attribute of the event schema that you want to compare.
- Under Operator, select an operator for comparing the JSON Path with the user-defined values.
- Enter the values according to the type of operator selected.
- String and array – JSON input
- Numeric – Numbers
- Boolean – True or False
Note: Genesys Cloud formats the value based on the selected operator. For some values, you must present them in JSON format. Therefore, it is important to test the triggers for the conditions to ensure that the values format correctly in JSON.
- Select the timing configuration for the trigger. The Default selection does not add time restriction to the trigger and the workflow executes instantly. You can also select:
- TTL – The threshold time to wait after which the trigger will not execute when there is a delay in processing the events. Enter the time in seconds.
- Delayed Start – Delay the execution of the workflow. This option is especially useful when you want to postpone the follow-up actions after an interaction. Enter the value in the range of 60–900 seconds.
- Click Create.
- (Optional) Click Save & Test. In the Test Trigger window, enter the test event in JSON format and click Test. The results show the validation of the test event, and verification of the target and conditions applied to the trigger.
- To activate the trigger, switch the toggle to Active.
- Click Save.
Test the trigger
Before you activate a trigger, test it to validate the configuration. You can use the Notifications in the Developer toolbox to generate an example event for the test. Testing helps you to identify any errors in the configuration.