Creating an Event Handler

The following operation must be performed before creating an Event Handler:

To add an Event Handler:

  1. Sign in to the Operator Control Panel.
  2. On the Navigation Bar, click Settings > Notification > Event Handlers. The Workspace displays the List of Event Handlers (see Viewing the List of Event Handlers).
  3. Click the Create button on the Toolbar.



  4. In the Event list of the New Event Handlers page, select the type of event, for which will be sent the notification.
  5. In the Notification template type list, choose one of the following ways to send a notification message: SMSEmail or Client Panel.
  6. In the Notification template list, select a template that will be used to create a notification message (see Creating a Notification Template).
  7. In order to configure sending messages in the certain time:
    • Clear the checkbox. The 
    • In the
  8. In the Query field, type a request and condition of the handler. Use Placeholders if necessary.

    The following operation with Placeholders are possible during the query creation:

    • >

    • <

    • >=

    • <=

    • =

    • !=

    • include? (for example, order.type = "SalesOrder" and (order.plans_ids include? 2000030)) - the Event Handler works if the Plan with id =2000030 is included in the Order)

    • exclude? (to exclude the certain entities (using an id, key or name) from the massive of entities. For example, in order to exclude sending messages about an order creation, which includes the Plan with the id = 2000000, use the following rule: order.plans_ids exclude? 2000000)
    • and

    • or

    You can use the Liquid language, which allows creating more complicated Notification. For more information see https://shopify.github.io/liquid/basics/introduction/.

    subscription.days_left = 10 AND subscription.status = "active" 
    This query is used for all active Subscriptions that expire after 10 days.
  9. Click Create. New Event Handler will be created and displayed on the List of Event Handler (see Viewing the List of Event Handlers).