> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/vsm-guides/value-stream-designer/process-components/triggers.md).

# Triggers

Learn about triggers that initiate value streams.

Triggers are the elements that initiate value streams. You can use them to start a new process instance or to resume an existing one that was previously paused.

## Events

Use an event trigger when a value stream needs to react to something that happens in Commerce Engine or in an external system, for example a new order or a stock level change.

External systems send events to the VSM event-receiver endpoint as authenticated Cloud Events. VSM matches the `ce-type` of each incoming event to the **Event name** registered in the [Event Registry](https://developer.emporix.io/vsm-guides/settings-and-configuration/events/event-registry.md), and starts or resumes the value streams that use this event as a trigger. To set up the connection, see [Events Authentication and Configuration](https://developer.emporix.io/vsm-guides/settings-and-configuration/events/events-authentication-and-configuration.md).

You can choose from two kinds of events in **Event Type**:

* **CE events** – Commerce Engine events that are available out-of-the-box. You can use them only as starting triggers.
* **Custom events** – events that you create for your tenant in the Event Registry. You can use them as starting triggers and as wake-up triggers between steps. A custom event appears in **Event Type** only after you create it in the Event Registry.

<figure><img src="https://1024162941-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrSc4haeKWrTrOPHzdrMO%2Fuploads%2Fgit-blob-f4cfde1c12a12fb88c3a1a8254305fc8e5d15ab8%2Fevent.png?alt=media" alt="Trigger step with Events selected and an event chosen in Event Type" width="350"><figcaption><p>Event trigger</p></figcaption></figure>

{% hint style="info" %}
To learn more about events, see the [Events](https://developer.emporix.io/vsm-guides/settings-and-configuration/events.md) documentation.
{% endhint %}

## Make scenarios as triggers

Use a Make scenario as a trigger when the trigger comes from an application that Make connects to, or when you need to prepare data before the value stream starts. For example, the scenario can enrich or filter incoming data and pass the result to the value stream.

<figure><img src="https://1024162941-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrSc4haeKWrTrOPHzdrMO%2Fuploads%2Fgit-blob-67a5da0902ac6276883f9b564603373a3df40066%2Fscenario_trigger.png?alt=media" alt="Trigger step with Scenarios selected and a scenario chosen in Select scenario" width="350"><figcaption><p>Scenario trigger</p></figcaption></figure>

A scenario must contain the right Emporix module to work as a trigger:

* **Starting trigger** – the scenario must contain the **Start New Orchestration** module, which starts a new value stream instance. Scenarios without this module are not available in **Select scenario**.
* **Wake-up trigger** – the scenario must end with the **Completion Event** module, which notifies VSM that the scenario finished and resumes the paused process.

{% hint style="info" %}
To learn more about the modules, see [VSM and CE Make Modules](https://developer.emporix.io/vsm-guides/value-stream-designer/integration-with-make/make-modules.md). To resume a paused process, see [Setting a Trigger to Wake Up a Paused Value Stream](https://developer.emporix.io/vsm-guides/value-stream-designer/creating-value-stream.md#setting-a-trigger-to-wake-up-a-paused-value-stream).
{% endhint %}

### Scenario naming best practices

When multiple scenarios have similar names in Make, use a consistent naming convention so you can identify the correct one without opening each scenario.

Use this as a baseline:

* Include the value stream name first, so related scenarios are grouped together.
* Include the step purpose, so the scenario role is clear.
* Include the trigger or key event, so the invocation context is visible.
* Keep names stable and avoid generic names like `Send email` or `Validation`.

{% hint style="info" %}
If you import or copy value streams, duplicated scenario names can temporarily appear. You can identify the correct scenario by checking its folder in Make, where scenarios are grouped by the related value stream.
{% endhint %}

## Timer Events

Use a timer event to start a value stream on a schedule, or to decide how long a process stays paused before it continues. Like a custom event, a timer can be a starting trigger or a wake-up trigger between steps.

You can configure the timer in three ways:

* **Use Context Variable** – Wake the process at a time stored in the process context. Use this for a trigger between steps, when a Make scenario or a cloud function provides the wake-up time.
* **Single Event** – Run the timer once, at a date and time you choose.
* **Repeating Event** – Run the timer on a recurring schedule, such as every Tuesday, every 30 minutes, or once a month at a set time.

<figure><img src="https://1024162941-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrSc4haeKWrTrOPHzdrMO%2Fuploads%2Fgit-blob-eb396caaf37578ac5355a43a739b8a097a7a2608%2Ftimer_event_vsm.png?alt=media" alt="Trigger step with Timer Events selected and a repeating schedule configured" width="350"><figcaption><p>Repeating timer schedule</p></figcaption></figure>

### Context variable

A context variable timer reads a value from the process context. The value must be a cron expression or an ISO 8601 date. A Make scenario or a cloud function writes that value before the process reaches the timer.

Enter the variable as a JQ expression in the `.<event_name>.<content_variable_name>` format. For example, `.sleeping_until.sleep_until` points to the `sleep_until` property of the `sleeping_until` event.

In that example:

* `sleeping_until` is the event name. In the Make **Completion Event** module, select it as **Event Type**.
* `sleep_until` is the content variable. Map it in the **JSON String** of the **Completion Event** payload.

{% hint style="warning" %}
Include the dot before the event name, and the dot between the event name and the content variable name.
{% endhint %}

To calculate the time in Make, add a **Set variable** module before **Completion Event**. Set the variable to the wake-up time, for example the current time plus a number of minutes, then map that variable into the event payload.

### Single event

Select the date and time when the value stream starts, or when a paused process wakes up.

### Repeating event

Define how often the timer runs. In **Timer Configuration**, set **Run** and **Every**. **Current Expression** shows the cron expression for the schedule you selected.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/vsm-guides/value-stream-designer/process-components/triggers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
