Defining the event and parameters for the Wait for Event trigger

Marketing managers require technical information from store developers to set up the Wait for Event trigger in a Dialog activity. This information includes the event name and the parameters that the marketing services use to detect that the event occurred. To gather this information, you must determine the type of event to match and then complete some steps to define the event and its parameters. Depending on the type of event, you might need to implement a service call with a custom URL, calling the event REST API, or by using custom Java code.

Before you begin

To understand how marketing managers can use the Wait for Event trigger for Dialog activities, read Trigger: Wait for Event.

About this task

The Wait for Event trigger can support two types of events. The following table lists the two types in the left column. To use the Wait for Event trigger, the event you want to detect must be one of these two types.
Note: The Wait for Event trigger does not support events that occur when a controller command exits. An example is when the LogonCmd controller command successfully exits, indicating that a customer has logged on.

Procedure

Decide on the type of event that starts or continues a Dialog activity that contains the Wait for Event trigger; then follow the relevant procedure in the right column of the table.
Type of event Example Procedure for defining event and parameters the Wait for Event trigger
1. An event that occurs on the storefront – the event is triggered by a custom URL you create or by calling the event REST API Examples:
  • A customer clicks a link on a store page to subscribe to promotional offers for a category.
  • A customer clicks a button on a store page to start a live chat session with customer service.
  • A customer searches for a specific search term in the search bar, for example, faucets.
  • A customer enters a promotion code, for example, BLACKFRIDAY.
Defining the event and parameters for a storefront event trigger via a custom marketing event URL or the marketing event REST API
2. An event that occurs on a system external to HCL Commerce, such as a point-of-sale system or a call center Example:
  • An external credit card fraud detection system detects that fraud occurred for a certain customer's credit card.
Defining the event and parameters: external event