Skip to main content

Editing an event

The event editor has three tabs:

  • Conditions
  • Attributes
  • Settings

If email delivery is turned on in the event conditions, a fourth tab, Email logs, appears with a log of sent emails: a paged table with the Date, Recipient, Status (Sent, Failed, or Skipped), and Reason / error columns. Until any emails are sent, the tab shows No records yet. Only administrators with permission to view users can see it, because the log contains recipients' emails and IDs.

Conditions​

The "Conditions" tab has the fields for editing the event: its main data, Name and unique identifier used to retrieve the entity, and the conditions that trigger it. Click Save to save changes on this tab.

Workflow template​

While no module is selected, a Use as a template for workflow checkbox appears under Name and Marker. Select it if the event should be called from a workflow in the Integrations section rather than triggered by changes in a module. If you need a module trigger, leave the checkbox clear and select the module below.

For a template event, a Template section replaces the module selection:

  • Whom to send to: All users, User group (with a group selector), Users from request (by ID), or By email addresses from request. With the first two options, the system selects the recipients; with the last two, the workflow passes them at call time.
  • Channels: Email, Push Notification, Socket IO. The Push Notification and Socket IO checkboxes aren't available with By email addresses from request.
  • Template variables. Add variable adds a row with the Marker (latin) field (Latin letters, digits, and _; the marker must be unique) and the Label (optional) field. The notification node in the workflow asks for these variables and passes them to the template.

Modules​

In the conditions, select the module (the Module field) that determines when the event is sent. The following modules are available:

  • catalog
  • forms
  • discounts
  • orders
  • payments
  • users

Conditions for the catalog module​

For the catalog module, set the Type field to Status to subscribe to catalog items changing status (opens in a new tab), then select a specific status.
Alternatively, select Attribute to subscribe to an attribute change: choose an attribute set (opens in a new tab) (Attribute Set) and a specific attribute (Attribute). For a list attribute, also choose a value (List Item) or Any.

Numeric attributes get extra settings:

  • Send if: when to send, Attribute changed, Decreased, or Increased;
  • Additional condition: compares the new value with a number, equal to, not equal to, more, or less.

Conditions for the forms module​

For the forms module, select the event type in the Form Type field. The following options are available:

  • Registration
    The event is created when a new user registers through the Content API or in the CMS.
  • Send Code
    The event is created when a new confirmation code is generated for a user (including at registration).
  • Change Password
    The event is created when a user changes their password.
  • Submit form data
    The event is created when data from the selected form is submitted through the API.

For Submit form data, select a form in the Form field (the list shows only forms of the "Data submission" type) and a mode in the Mode field:

  • Any data: the event fires on any submission of the form. In the Emails field, specify where to send the email: select the form's string attributes in which users enter an email, or type an address. If the form has no attribute set, you can only type an address.
  • Reply: the event fires when a reply (comment) with the approved status is added to form data.
  • Status: the event fires when form data gets the status selected in the Status field: sent, banned, deleted, moderation, or approved.

For more about forms, see the Forms (opens in a new tab) chapter.

All events from the forms module include user information. Registration and Send Code events also include the confirmation code.

Conditions for the discounts module​

For the discounts module, select the event type in the Event Type Discounts field:

  • Discount Start: a discount starts;
  • Discount End: a discount ends;
  • Bonus Accrual: bonuses are accrued;
  • Bonus Expiration: bonuses expire.

For Discount Start, Discount End, and Bonus Expiration, set the Notification Time. Discount End and Bonus Expiration also have the Days Before Expiration field (how many days before the end to notify) and the Daily Reminders checkbox.

Conditions for the orders module​

For the orders module, select a specific order storage (opens in a new tab) (Orders Storage) and the status (opens in a new tab) (Status) whose change the event is linked to.

Conditions for the payments module​

For the payments module, select a payment account (Payment account) and a payment type (Payment type). The only type available is Refund.

Conditions for the users module​

For the users module, select a users attribute set (opens in a new tab) (Attribute Set) and an operation mode (Operation mode):

  • Event: the event fires when an attribute changes. Select the attribute in the Attribute field, or Any for any attribute. Numeric attributes also get the Send if setting (see the catalog module).
  • Mailing: a recurring scheduled mailing, see Mailing to users.

When you set up a mailing, you can use special conditions:

  • today (shown in the interface as equal to the current date) checks that the current date matches the date in the user's date or dateTime attribute.
  • now (shown as equal to the current time) checks that the current time (hours and minutes) matches the value in a time or dateTime attribute.

Delivery method​

In the Where to send block, check the delivery methods:

  1. Push Notification: push notifications
  2. Email: email
  3. Socket IO: WebSockets, suitable for subscribing to real-time events such as price changes. For details, see the Socket.IO documentation.
  4. Integrations: passes the event to a workflow in the Integrations module.

The available methods depend on the module and settings:

  • for the forms module in Any data mode (and for the Registration, Send Code, and Change Password types), only Email and Integrations are available; the Email checkbox is selected and can't be changed, and checking Integrations clears it (in Any data mode, the Emails field is hidden as well);
  • for the catalog module, Email is hidden when Whom to send is set to Everyone;
  • for the users module, Email is available only in Mailing mode or with the To specific user only recipient.

Recipients​

For the catalog module, choose the recipients in the Whom to send field: Everyone (all users of your or app) or Subscribers.

For the users module in Event mode, the Whom to send field offers To specific user only, To all registered users, and To everyone.

Frequency​

For catalog events, choose how often to send in the How to send field:

  • Once: when the event occurs,
  • Every time: each time it triggers again.

This field isn't shown for the Status type.

Attributes​

The "Attributes" tab has a drop-down list for selecting an attribute set (opens in a new tab).

After you select the attribute set, fill in the values. For example:

  • event_send_date (Date and Time type)
  • event_desc (String type)

You can use these attributes in the message template on the Settings tab. They are available under the event key:

{{ event.attribute_marker }}

The timeInterval attribute for mailing schedules
If the selected attribute set has an attribute of the timeInterval type, you can select it in the mailing schedule settings (Mailing mode, According to schedule frequency).
The mailing then follows the intervals set in this attribute's value on the Attributes tab (for example, only on Mondays and Fridays).

Settings​

The "Settings" tab has the Message Template card with the template of the message that users of your or app receive:

  • Subject of the message: the message subject;
  • the message text. The template has two versions, switched with Email and Push next to the field: the email text and the push notification text.

Under the email text, the Accessibility check button shows the result of the accessibility check of the email HTML: the number of issues found (for example, images without alt), or no issues.

If the template isn't filled in for every language, the warning The template is configured not for all languages appears above the card. The event's row in the event list shows the same warning as an icon.

At the bottom of the tab, the Emails sent counter shows how many emails the event has sent.

Available variables

Below the template is a list of variables you can insert (for example, {{ email }}, {{ user.attribute_marker }}, {{ event.attribute_marker }}, and others). The variables depend on the event's module: for example, catalog has the product title and product attributes, orders has order attributes, and payments has {{ refund.amount }} and {{ refund.note }}.

Mailing to users (Mailing mode)​

You can set up recurring email mailings to users who match given conditions. Unlike standard events, a mailing is not triggered by data changes: it runs on a schedule when the conditions are met.

Setting up a mailing​

  1. Create an event

    • Module (Module): users
    • Operation mode (Operation mode): Mailing
  2. Set up the schedule

    • Time: the starting point (for example, Monday at 10:00)
    • Frequency:
      • Every day
      • Every N days: once every N days (the Number of days field, 1 to 31)
      • Every week
      • Every month
      • Every year
      • According to schedule: uses a timeInterval attribute from the event's attribute set (the Attribute field). The mailing follows the intervals set in this attribute's value on the Attributes tab. If the set has no such attribute, a hint below the field asks you to add one.
  3. Set the user selection conditions (the Conditions block)

    • Examples:
      • Registration date > 2024-01-01
      • Mailing subscription = true
      • today: current date = the user's date/dateTime attribute value
      • now: current time (hh:mm) = the user's time/dateTime attribute value

Example​

  • Setup:

    • Time: 10:00
    • Frequency: According to schedule, with "Mon, Wed, Fri" selected in the event's timeInterval attribute
    • Conditions:
      • Subscription = true
      • today: user.birthday_date = today
  • Result:
    On Mondays, Wednesdays, and Fridays at 10:00, the system:

    1. Finds users with an active subscription whose birthday is today
    2. Sends them a personalized greeting

Event setup examples​

Below are event setup examples for each of the six available modules.

Catalog​

Forms​

Discounts​

Orders​

Payments​

Users​