> 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/value-stream-modeller/learning-trails/trail/setting-up-a-first-value-stream.md).

# Setting up a First Value Stream

In this trail, you create a value stream that responds to a **Hello World** event from a sender. The value stream sends a feedback form to the sender and completes once they submit their response. The sender can be a customer from whom you are collecting feedback.

Work through each section in order from top to bottom.

## Building the initial part of the value stream

A value stream starts with a trigger event, followed by process steps. External events act as triggers and are sent to an event-receiver endpoint. Process steps are actions that run in sequence to complete the flow.

{% stepper %}
{% step %}

#### Create a Hello World event

Create a new **Hello World** event with `hello_world` as the event name. The event name is the technical ID.

In **VSM**, go to **Events** -> **Event Registry**. For details, see the [Event Registry](/value-stream-modeller/settings-and-configuration/events/event-registry.md) and [Events Authentication and Configuration](/value-stream-modeller/settings-and-configuration/events/events-authentication-and-configuration.md) guides.

<figure><img src="/files/r4OmBIkqvKcsakX2yaVO" alt="Hello World event in Event Registry"><figcaption><p>Hello World event in Event Registry</p></figcaption></figure>
{% endstep %}

{% step %}

#### Create a value stream with the Hello World trigger

Create a new value stream that uses the `hello_world` event as a trigger.

* Go to the **Value Streams** dashboard and select **Create value stream**
* Enter **Hello World** as the process name
* Select the **Hello World** event as the trigger
* Select **Publish** to save your changes

When you publish, your changes are saved but the process is not active yet. To activate the process, use the active/inactive toggle in the value stream dashboard.

{% hint style="info" %}
For details on how to create a value stream, see [Creating a Value Stream](/value-stream-modeller/value-stream-designer/creating-value-stream.md).
{% endhint %}

<figure><img src="/files/zN7K7i26l7KVv4cFfKhy" alt="Hello World value stream with trigger configured"><figcaption><p>Hello World value stream with the trigger configured</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Sending an event to trigger the value stream

Before you continue, send data to VSM to complete the event connection. You can use Postman or Celonis Action Flows.

### Postman

{% stepper %}
{% step %}

#### Send the Hello World event

Get the Webhook Target URL and HMAC Secret and send the Hello World event following the instructions in [Events Authentication and Configuration](/value-stream-modeller/settings-and-configuration/events/events-authentication-and-configuration.md). The guide includes a **Postman collection** that shows how to authenticate the request by generating the HMAC signature.

Send a POST request with `{"hello" : "world"}` in the body. The endpoint responds with `200 OK` and a confirmation payload:

```json
{
    "status": "SUCCESS",
    "message": "Request successfully handled. Request ID: req_M4XnFkQm2aPUTGqiteyN",
    "request_id": "req_M4XnFkQm2aPUTGqiteyN"
}
```

{% hint style="warning" %}

* If you receive `401`, verify that your `secret` is configured correctly
* If you receive any other status, verify that the webhook source URL is correct
  {% endhint %}
  {% endstep %}

{% step %}

#### Note the request ID

Note your `request_id`. You can use it later to search for the process in VSM.
{% endstep %}
{% endstepper %}

### Celonis Action Flows

If you are a Celonis customer, you can trigger a value stream from EMS using the Action Flow module. A public [Emporix Orchestration Engine module](https://www.make.com/en/integrations/emporix-oe) enables you to start value streams.

{% stepper %}
{% step %}

#### Add the Emporix module

Add the Emporix module to your Action Flow.
{% endstep %}

{% step %}

#### Configure the connection

Set up the connection to include the `source`, `secret`, and COP API `client` and `secret` following the instructions in [Configuring a connection between VSM and Make modules](/value-stream-modeller/value-stream-designer/integration-with-make/configuring-make-connection.md).
{% endstep %}

{% step %}

#### Send the Hello World payload

* Select the **Hello World** event type
* Send `{ "hello" : "world" }` as the payload
* Trigger the action flow

The endpoint responds with `200 OK` and a confirmation payload:

```json
{
    "status": "SUCCESS",
    "message": "Request successfully handled. Request ID: req_M4XnFkQm2aPUTGqiteyN",
    "request_id": "req_M4XnFkQm2aPUTGqiteyN"
}
```

{% hint style="warning" %}

* If you receive `401`, verify that your `secret` is configured correctly
* If you receive any other status, verify that the `source` value is correct
  {% endhint %}
  {% endstep %}

{% step %}

#### Note the request ID

Note down your `request_id`. You can use it later to search for the process in VSM.
{% endstep %}
{% endstepper %}

## Verifying receipt of the message in the Debugger

Verify that your payload was received and that it activated a new value stream. Use the [Value Streams Debugger](/value-stream-modeller/troubleshooting/value-streams-debugger.md).

{% stepper %}
{% step %}

#### Open debug mode

Go to **Value Streams** and open debug mode for your Hello World value stream. Open the process and select **Go to Debugger** (the bug icon). If the request worked, you see the details of the instance run.

<figure><img src="/files/MpMBi4OpbNyet5nDQW2D" alt="Hello World value stream in debug mode"><figcaption><p>Hello World value stream in debug mode</p></figcaption></figure>
{% endstep %}

{% step %}

#### Check the instance logs

Open the instance and check the logs to confirm the data was received as expected.

<figure><img src="/files/HghftYyEHoY8HsY9HSiG" alt="Instance logs in the debugger"><figcaption><p>Instance logs in the debugger</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Creating a feedback form

After you create and validate the trigger event, add a process step in the Hello World value stream. The step includes a form for the sender to submit feedback.

Use the Form builder integrated with VSM. For details, see the [Forms](/oe/management-dashboard/forms.md) documentation.

{% stepper %}
{% step %}

#### Create the form

Create a new form named **Feedback**.

<figure><img src="/files/BwLwI9HWF9mrkhT8TCeq" alt="New Feedback form in Form builder"><figcaption><p>New Feedback form in Form builder</p></figcaption></figure>
{% endstep %}

{% step %}

#### Add a Sentiment dropdown

Add a **dropdown** component and label it **Sentiment** in the **Display** tab.

<figure><img src="/files/ncrUedyYm5HXLbycbmR8" alt="Sentiment dropdown in the Display tab"><figcaption><p>Sentiment dropdown in the Display tab</p></figcaption></figure>
{% endstep %}

{% step %}

#### Configure dropdown values

In the **Data** tab, configure three **Data Source Values**:

* happy
* sad
* indifferent

<figure><img src="/files/snaIdTtleRvNpNvciolh" alt="Sentiment dropdown data source values"><figcaption><p>Sentiment dropdown data source values</p></figcaption></figure>
{% endstep %}

{% step %}

#### Mark the dropdown as required

In the **Validation** tab, mark the dropdown field as **Required**.

<figure><img src="/files/DAtkXM0hglYCfshWkzKl" alt="Required validation for the Sentiment field"><figcaption><p>Required validation for the Sentiment field</p></figcaption></figure>
{% endstep %}

{% step %}

#### Add name fields

Save the configuration, then add two text fields:

* **First Name** – mark as required in the **Validation** tab
* **Last Name**

<figure><img src="/files/RYgHhyR1Fg04tDYArBFI" alt="First Name and Last Name fields on the form"><figcaption><p>First Name and Last Name fields on the form</p></figcaption></figure>
{% endstep %}

{% step %}

#### Save and preview the form

Save the form and preview it to confirm all fields are present.

<figure><img src="/files/l0EtcFOKVuyzQcfh2g5i" alt="Feedback form preview"><figcaption><p>Feedback form preview</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Creating a skeleton scenario process step

{% stepper %}
{% step %}

#### Update the event payload with replyTo

Update the event you sent previously to include a **replyTo** field with an email address:

```json
{
    "hello" : "world",
    "replyTo" : "your.email@emporix.com"
}
```

{% endstep %}

{% step %}

#### Send the updated event

Send the updated event to VSM using Postman or Celonis Action Flow, as in the previous section.
{% endstep %}

{% step %}

#### Verify the data in the debugger

Open the debugger and confirm the data was received.

<figure><img src="/files/ZanXVsXhvK5GhPjXHbK2" alt="Debugger showing received event data"><figcaption><p>Debugger showing received event data</p></figcaption></figure>
{% endstep %}

{% step %}

#### Copy the Instance ID

Copy the **Instance ID**. You use it in the next steps.

<figure><img src="/files/DWvX2P2wcmvWDHRFz18A" alt="Instance ID in the debugger"><figcaption><p>Instance ID in the debugger</p></figcaption></figure>
{% endstep %}

{% step %}

#### Add a new process step

Go to your **Hello World** value stream and add a new process step. For details, see [Creating a Value Stream](/value-stream-modeller/value-stream-designer/creating-value-stream.md).
{% endstep %}

{% step %}

#### Create a new scenario

In the new process step, select **Create New Scenario**.

<figure><img src="/files/GnnU8msYgHz4OmkV8Hxh" alt="Create New Scenario option in the process step" width="553"><figcaption><p>Create New Scenario option in the process step</p></figcaption></figure>

A new tab opens with a scenario step template in Make, including a starting module and a completion event.

Ensure you are working in the correct Make organization. The name should reflect your tenant name in VSM. Hover over the Make sidebar to see the organization name at the top. Then select the template directly or choose **Start guided setup**.

{% hint style="danger" %}
If you select any Make sidebar node, the template closes and Make redirects you to the selected section. You cannot return to the template directly. Go to the templates section in Make and select it again. In this example, the template name is "COP Wait for execution name".
{% endhint %}
{% endstep %}

{% step %}

#### Name the scenario

Add a name for the scenario, for example **Send a Survey on Hello World**. Save the scenario to keep the name.
{% endstep %}

{% step %}

#### Configure the Trigger Event webhook

Add a webhook name in the **Trigger Event** module.

{% hint style="warning" %}
There is no validation requirement for the name, but we recommend using the same name for the webhook and the scenario. Without the webhook, the value stream is marked as **invalid** in VSM.
{% endhint %}

The webhook connection is established automatically. If you need to set it up manually, select **Add** next to the connection field in the Webhook module and provide the **Connection Name**, **Tenant ID**, and **Event-Receiver Secret**.

<figure><img src="/files/rN6mFo6ZGTfpxV0glukq" alt="Manual webhook connection configuration in Make"><figcaption><p>Manual webhook connection configuration in Make</p></figcaption></figure>

The **tenant ID** is the first part of the value stream ID. You can find it in two places:

* **VSM** -> **Admin** -> **Settings** – displayed next to the Make Team name

<figure><img src="/files/qWteByiZCHjNxVBlkfyy" alt="Tenant ID in VSM Admin settings"><figcaption><p>Tenant ID in VSM Admin settings</p></figcaption></figure>

* The URL of your value stream instance

<figure><img src="/files/m8NoESz7FKGRy9LPsogE" alt="Tenant ID in the value stream instance URL"><figcaption><p>Tenant ID in the value stream instance URL</p></figcaption></figure>
{% endstep %}

{% step %}

#### Create the Hello World Feedback Sent event

The template requires a **completion event** as the last Make scenario step. Create a new event in the Management Dashboard. In **VSM**, go to **Events** -> **Event Registry** and create an event with:

* **Display name** – `Hello World Feedback Sent`
* **Event name** – `hello_feedback_sent`

<figure><img src="/files/ZtTkQHm7Ccqvl2sz2gpV" alt="Hello World Feedback Sent event in Event Registry"><figcaption><p>Hello World Feedback Sent event in Event Registry</p></figcaption></figure>
{% endstep %}

{% step %}

#### Configure the Completion Event connection

In Make, open the **Completion Event** module and select the connection.

If the connection is not established yet, configure it in the module:

* Select **Add** next to the **Connection** field
* Provide the Event-Receiver Endpoint and Environment data

<figure><img src="/files/dif7EPn08vsxgv3XSAlB" alt="Completion Event connection configuration in Make"><figcaption><p>Completion Event connection configuration in Make</p></figcaption></figure>

Use the endpoint data from Admin settings in VSM. Use the environment data from your COP API keys in the Developer Portal.

<figure><img src="/files/uyEPoAlB4mF1sNvGluIh" alt="COP API keys in the Developer Portal"><figcaption><p>COP API keys in the Developer Portal</p></figcaption></figure>
{% endstep %}

{% step %}

#### Select the event type

Select the newly created event as the **Event Type**. If the event is not visible, refresh the list.

<figure><img src="/files/s2G2AklH3fTVGudxrj3Z" alt="Hello World Feedback Sent selected as Event Type"><figcaption><p>Hello World Feedback Sent selected as Event Type</p></figcaption></figure>
{% endstep %}

{% step %}

#### Save the scenario

Select **Save**. The scenario is created. Confirm the name is **Send a Survey on Hello World**.
{% endstep %}

{% step %}

#### Extract the replyTo email address

Use the **Set Variable from Process Context** module to extract the **replyTo** email address from the payload and assign it to a variable named `email`.

* Add the **Set Variable from Process Context** module between the **Trigger Event** and **Completion Event** modules
* Assign the data from the Trigger Event
* Select the Hello World value stream
* Use the Instance ID from the debugger (see step 4) as the **Example Instance**. Select the ID from the drop-down list. The ID at the top is from the latest instance
* Enter `email` in the **Variable Name** field

<figure><img src="/files/xIL1YbqTy4bcmeppCnEE" alt="Set Variable from Process Context module configuration"><figcaption><p>Set Variable from Process Context module configuration</p></figcaption></figure>
{% endstep %}

{% step %}

#### Update the Completion Event payload

In the **Completion Event** module, select **Map as JSON String** in the **Payload** field and add a JSON string. Reference the email from the **Set Variable from Process Context** module, for example: `{ "email" : "{{3.email}}"}`.

{% hint style="warning" %}
If the email variable is not visible in the list, run the scenario once. Even if it does not start, the run updates the data from previous modules.
{% endhint %}

<figure><img src="/files/8Or9SJv459lrrT7gltgN" alt="Completion Event payload with email variable"><figcaption><p>Completion Event payload with email variable</p></figcaption></figure>
{% endstep %}

{% step %}

#### Save the scenario in Make

Make sure to save your updated Make configuration.
{% endstep %}

{% step %}

#### Add the scenario to the value stream

In VSM, go to your **Hello World** value stream and add the **Send a Survey on Hello World** scenario as the next process step. If the scenario is not visible in the drop-down list, refresh VSM.

<figure><img src="/files/pX00suzrKNNN9TbRrCRy" alt="Send a Survey on Hello World scenario added as a process step"><figcaption><p>Send a Survey on Hello World scenario added as a process step</p></figcaption></figure>
{% endstep %}

{% step %}

#### Publish and activate the value stream

Select **Publish**, then activate the new version of the **Hello World** value stream.
{% endstep %}

{% step %}

#### Confirm the value stream status

Confirm the value stream is activated and has a **validated** status.

<figure><img src="/files/PfIzUDK09nAU8DI3DjT6" alt="Hello World value stream with validated status"><figcaption><p>Hello World value stream with validated status</p></figcaption></figure>

An invalid status is usually caused by a missing webhook on the trigger module or an improperly configured completion module. VSM revalidates each value stream with every publish.
{% endstep %}
{% endstepper %}

## Verifying if the scenario step works

{% stepper %}
{% step %}

#### Open the scenario in Make

Go to your scenario editor in Make. If you closed the tab, open the scenario from the process step in the Hello World value stream.

<figure><img src="/files/oLZbPIWlPqob2O1Ap5OR" alt="Opening the scenario from the value stream process step" width="563"><figcaption><p>Opening the scenario from the value stream process step</p></figcaption></figure>
{% endstep %}

{% step %}

#### Run the scenario once

To verify the step before activating the scenario, select **Run once**.

<figure><img src="/files/dAuAvydtorbKdK8zg8qQ" alt="Run once option in Make"><figcaption><p>Run once option in Make</p></figcaption></figure>

You see a confirmation that the scenario loaded successfully and is waiting for data.
{% endstep %}

{% step %}

#### Resend the event and check the result

Confirm there are no errors in your request, then resend the event using Postman or Celonis Action Flow (as in step 2 of **Creating a skeleton scenario process step**). Check that the scenario works as expected. You see operation details in the **Set Variable from Process Context** module. After you send the request, the scenario initializes and completes.

<figure><img src="/files/C4dFABzv6QLFWvxGRnLB" alt="Successful scenario completion in Make"><figcaption><p>Successful scenario completion in Make</p></figcaption></figure>
{% endstep %}

{% step %}

#### Verify the debugger logs

Optionally, open the debugger and confirm the new instance includes logs for the process step you added. If there are errors in your Make scenario, navigate to the scenario logs in Make from the process step in the debugger.

<figure><img src="/files/xNVtk9uR1shnVZJpnOQz" alt="Debugger showing the new process step"><figcaption><p>Debugger showing the new process step</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Update the scenario process step to email the feedback survey

Use the **Feedback** form you created earlier and email it to the **replyTo** address. Pre-populate one of the fields. The recipient opens the form using a Magic Link. The value stream waits until the Feedback form is submitted (saved as draft) before completing.

{% stepper %}
{% step %}

#### Create the Hello World Feedback Provided event

In **VSM**, go to **Events** -> **Event Registry** and create a new event with:

* **Display name** – Hello World Feedback Provided
* **Event name** – `hello_feedback_provided`

The event captures feedback submitted by the recipient. All submitted form data is enclosed in this event.

<figure><img src="/files/HyJdxqrq1EjBG6NltxxT" alt="Hello World Feedback Provided event in Event Registry"><figcaption><p>Hello World Feedback Provided event in Event Registry</p></figcaption></figure>
{% endstep %}

{% step %}

#### Open the scenario in Make

Go to your **Send a Survey on Hello World** scenario in Make.
{% endstep %}

{% step %}

#### Add the Create Form Magic Link module

Add the **Create Form Magic Link** module after the **Set Variable from Process Context** module.
{% endstep %}

{% step %}

#### Configure the Create Form Magic Link module

* Select the **Feedback** form
* Set **Assign Contact** to **no** – you use the email address from the event
* Select **Hello\_feedback\_provided** as the submission event type – this raises the expected event when the form is submitted
* Set **Submitted Only Once** to **Yes**
* In **Value Stream Instance ID**, select **Value Stream Instance ID** from the **Trigger Event** module items – this ensures the correct process resumes when the form is submitted
* Leave **Name** and **Language** empty
* Select **Save**

<figure><img src="/files/hPqOS60icAhC6gkZQUj3" alt="Create Form Magic Link module configuration"><figcaption><p>Create Form Magic Link module configuration</p></figcaption></figure>
{% endstep %}

{% step %}

#### Add the Submit Form Draft module

Add the **Submit Form Draft** module after the **Create Form Magic Link** module.
{% endstep %}

{% step %}

#### Configure the Submit Form Draft module

* Map the **Magic Link ID** from the previous step
* Select the **Feedback** form to reveal fields available for pre-population – the fields can be left empty

<figure><img src="/files/XzAIfQMNGhLCp6tpbMAW" alt="Submit Form Draft module configuration"><figcaption><p>Submit Form Draft module configuration</p></figcaption></figure>
{% endstep %}

{% step %}

#### Email the form to the recipient

Send a message to the recipient containing the magic link. You can use any supported mail provider. The example below uses the Gmail module with a linked account.

<figure><img src="/files/r6ZILUwNGDZ9JZQMR3aq" alt="Gmail module sending the form magic link" width="500"><figcaption><p>Gmail module sending the form magic link</p></figcaption></figure>

{% hint style="warning" %}
Use the VSM form UI to review and submit the form. The link format is `http://cop.emporix.io/forms/TENANT_ID/MAGIC_LINK_ID`. Match the `MAGIC_LINK_ID` and `TENANT_ID`. The `TENANT_ID` is specific to the tenant for which you are creating the scenario. You can fetch it from the Trigger Event.
{% endhint %}

The complete Make scenario should look like this:

<figure><img src="/files/oKYoNJzwjoql9lyOJG3R" alt="Complete Send a Survey on Hello World scenario in Make"><figcaption><p>Complete Send a Survey on Hello World scenario in Make</p></figcaption></figure>
{% endstep %}

{% step %}

#### Add the Hello World Feedback Provided trigger

In VSM, go to your **Hello World** value stream and add the **Hello World Feedback Provided** event as a trigger after the **Send a Survey on Hello World** process step. This trigger completes the value stream when a form is submitted.

<figure><img src="/files/6jwUif5MsARjY903ZM4F" alt="Hello World Feedback Provided trigger added to the value stream"><figcaption><p>Hello World Feedback Provided trigger added to the value stream</p></figcaption></figure>
{% endstep %}

{% step %}

#### Publish, activate, and trigger the process

Publish the value stream and ensure it is activated. Send the event again from Postman or Celonis Action Flow to trigger the process. The email with the survey link is sent to the specified address.

<figure><img src="/files/QE4BdHvHckdJV0yQZZgx" alt="Email with the feedback survey link" width="650"><figcaption><p>Email with the feedback survey link</p></figcaption></figure>
{% endstep %}

{% step %}

#### Submit the form and verify completion

Submit the form response, then confirm the last step of your **Hello World** value stream (**Hello World Feedback Provided**) completed.
{% endstep %}
{% endstepper %}

## Troubleshooting

If the **Hello World** value stream trail did not work, try the following:

* **I got the email, submitted the form, but the process did not complete.**
  * Check that you mapped the value stream ID in the **Create Form Magic Link** module
  * Confirm you selected the **Hello\_feedback\_provided** event as the submission event type in the Create Form Magic Link module
* **I created the process step with Send a Survey on Hello World and ran the test, but I did not get any email.**
  * Check for errors in the Make scenario that sends the email
  * Check your junk folder
  * Check your mail provider logs


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.emporix.io/value-stream-modeller/learning-trails/trail/setting-up-a-first-value-stream.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
