Create event subscriptions from the Admin

data-variant=info
data-slots=text1
Adobe Commerce as a Cloud Service (SaaS) customers can create event subscriptions from the Admin or by using REST calls. (Platform as a Service (PaaS) customers must either use REST or create a custom module.) SaaS does not support all possible events. To view the list of supported events, select System > Events > Events List. Contact Customer Support if you would like to implement other events.

View event subscriptions

In the Admin, select System > Events > Events Subscriptions to display the Events Subscriptions grid page.

Events Subscriptions grid page

The rows of this grid show configuration settings for all event subscriptions, both enabled and disabled.

Create a new event subscription

Click Add New Subscription from the grid page to display the form for creating a new event subscription.

New event subscription

The Event subscription settings configuration panel contains the following fields:

Field
Description
Event Name
Select one of the supported Commerce event names from the dropdown. SaaS does not support all possible events. Open a support ticket to request additional events.
Event Name Alias
A unique alias name for the event. An alias is required for events that have rules configured.
Event Provider
Select the event provider to which the event should be delivered. If a workspace configuration is set for the provider, event metadata will be created and linked to the provider when the event subscription is saved.
Is Enabled
Indicates whether the event is enabled. Commerce does not emit disabled events.
Priority
Indicates whether the event has priority status. Priority events are sent within a second, whereas non-priority events can take up to 59 seconds to send.

Configure event subscription fields

The Event Subscription Fields configuration panel allows you to define the fields of the event payload to transmit from Commerce. The name provides the path to the field in the event payload.

data-src=/_includes/event-size-limitation.md
data-src=/_includes/sample-event.md
data-variant=info
data-slots=text
If you do not specify any fields, Commerce sends the entire event payload. Adobe recommends sending a limited number of fields per event. If you send all fields, you increase the risk of including sensitive or PCI compliance data in the event. In addition, specifying only the fields that are applicable to your business case is recommended for optimal performance and cost effectiveness.

The following example shows how three fields can be configured for the observer.catalog_product_save_after event:

Name: entity_id
Name: sku
Name: is_new

The contents of an observer.catalog_product_save_after event are similar to the following:

{
    "entity_id": "3",
    "sku": "test2",
    "is_new": "0"
}

Array of nested objects

data-src=/_includes/nested-event.md
Name: order_id
Name: items[].sku
Name: items[].qty

The contents of the transmitted event are similar to the following:

{
   "order_id": "8",
   "items": [
      {
         "sku": "simple-product-2",
         "qty": "3.000000"
      },
      {
         "sku": "simple-product-1",
         "qty": "5.000000"
      }
   ]
}

Configure event subscription rules

You may decide that you want Adobe I/O Events for Adobe Commerce to notify the client application when certain conditions occur. For example, by default, if you register an event that tracks the remaining quantity of a product, the eventing service sends that information to your client application each time Commerce emits the event. However, you might be interested in the remaining quantity only when it reaches a specific threshold, such as 20 units. Conditional events allow you to define exactly when to send events to your application. Otherwise, the client application must include code to filter out the unimportant and unnecessary data.

A conditional event acts as an extension of a custom or native Commerce event. You must specify the source, or parent, event and define one or more rules that evaluate the data that is present in the parent event payload. If all the individual rules defined in a conditional event evaluate as true, then the eventing service sends the conditional event to the application. If one or more rules evaluate as false, the service sends neither the parent event nor the conditional event, unless the parent has been subscribed separately, without any rules.

All conditional events contain the following information:

Each rule contains the following:

Example

Field: qty
Operator: lessThan
Value: 20

Field: category_id
Operator: in
Value: 3,4,5

Field: name
Operator: regex
Value: /^TV .*/i

Field: category.store_id
Operator: in
Value: 1,2

Events Subscriptions grid actions

Click Select > Edit in the Action column of an event subscription's row to display a form for editing the subscription.

Edit event subscription

Click Select > Delete in the Action column to delete an event subscription.