Automations: triggers, blocks, conditions and actions
This page is for administrators: the operations described require access to the administration area.
An automation updates products on your behalf: when something happens, or at scheduled times, it checks conditions and, if they are true, sets attribute values or records an event. For example, once the promotion end date has passed, it can set the promotion status to ‘Ended’.
Automations apply to products, one entity type at a time.
The trigger: when the automation starts
Each automation has one of two types of trigger:
- On attribute change: the automation starts when a product is saved and one of the attributes selected in Watch attributes changes value. This applies to saves from the product page, bulk edit, Excel imports and AI functions. The automation runs during the save itself;
- Time: the automation starts at its scheduled times, in the openlane server's time zone, and processes products of the entity type that meet the pre-filters.
With On attribute change, if the automation fails, the product save also fails. Test new automations on a few products before using them for bulk changes.
Channels
An automation can have one or more channel configurations, each specifying a channel, country and language. The automation runs once for each configuration: attribute values are read in the configured language and country, stock levels from the channel's warehouse, and categories from the channel's category family. Without channel configurations, the automation runs only once, without this context.
Blocks
An automation's logic is divided into up to 5 blocks, evaluated in order. Each block has:
- variables calculated from attribute values, for example ‘more than 15 days have passed since the promotion end date’;
- conditions that must all be true for the block to run its actions. These can check a variable's value or product attributes, like product search filters. A block without conditions always runs its actions;
- up to 2 actions to perform.
With Stop after first match, only the first block whose conditions are true runs its actions; otherwise, all blocks whose conditions are true run their actions in order.
Actions
A block can:
- set an attribute value, as in bulk edit. The value is fixed and the same for all channels. Only certain attribute types can be set, as listed in Automation settings;
- record an event for the product and channel, selected from the ProductChannelEventType reference data list, with text that can include the SKU, channel and variable values.
Changes made by an automation do not trigger other automations. If a save triggers multiple automations, their execution order is not guaranteed.
Who is recorded as the author of changes
With On attribute change, changes are attributed to the user who saved the product. With Time, they are attributed to PIM-SERVER.
Each run that performs actions is recorded in the history, described in How to view automation history. You manage automations in the Automations administration area, as described in How to create an automation.