# Step 2: Create the Flow

To create the Flow, proceed with the following steps:

* To go to the Flows section, click “Flow” under the “Background processes” menu on the left side panel.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13flowmenu.png" alt=""><figcaption></figcaption></figure>

* To create a new Flow, click the \[+ Flow] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13addflow.png" alt=""><figcaption></figcaption></figure>

* A new Flow is displayed with the following icons:&#x20;
  1. “Target Entity”&#x20;
  2. “Qualified” \
     This indicates that the creation of Flow is qualified or enabled only when the Target Entity is present.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex1flowlabel.png" alt=""><figcaption></figcaption></figure>

* To label the Flow:
  1. Enter the Flow name as “UserName\_createlistofcustomers”.
  2. Optionally enter the description for the Flow.
  3. To define the target entity, select the entity “UserName\_Acc\_customers” from the drop-down menu. This defines that the customer activity record will be created in the entity “UserName\_Acc\_customers”.
  4. Select Flow Progression Entity as "UserNameIflowApp\_progression".

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex2flonamecreatelistofcust.png" alt=""><figcaption></figcaption></figure>

* The Flow is disabled by default. When the Flow is defined or updated, it must be disabled by clicking the toggle button. It can be enabled before executing the Flow.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13flowdisabled.png" alt=""><figcaption></figcaption></figure>

* To add Flow components to define this Flow, click “Components” on the left side panel as the Flow component “UserName\_createlistofcustomers” is user defined.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13flowcomp.png" alt=""><figcaption></figcaption></figure>

* The Flow component “UserName\_createlistofcustomers” is displayed.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex2fccclockinccomp.png" alt=""><figcaption></figcaption></figure>

* To place the Flow component “UserName\_createlistofcustomers” as the first activity in the Flow, select it and drag it onto the “Qualified” icon.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex2dragfccloc.png" alt=""><figcaption></figcaption></figure>

* The Flow component automatically gets placed on the right side of the “Qualified” icon connected with a line.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex2clocplacedaftqual.png" alt=""><figcaption></figcaption></figure>

* To configure the Flow component in the flow, click on the Flow component. The Settings dialog box displays with the General tab selected as default.\
  To define the Mapped Field for this Flow component, go to the Field Mapping tab.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex2fmsettings.png" alt=""><figcaption></figcaption></figure>

* &#x20;Click the \[Add Field] button to add a Mapped Field.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13flowaesaddfield.png" alt=""><figcaption></figcaption></figure>

* When the \[Add field] button is clicked, the created defined mapped field in the Flow component displays. In this case, it is “customer\_id”.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13flowaesfmcustid.png" alt=""><figcaption></figcaption></figure>

* To define the Sources, select Variables>sourceEntity>Customer\_ID. This defines that the customer\_id is mapped to the Customer\_ID field in the source entity. \
  To save the Settings for this Flow component, click the \[Save] button in the Settings.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13ex2fmcustomerid.png" alt=""><figcaption></figcaption></figure>

* To save the Flow, click the \[Save] button in the Flow UI.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13saveflow.png" alt=""><figcaption></figcaption></figure>

* To enable the Flow, click the \[Enabled] toggle button in the Flow UI. Status change message is displayed.
*

```
<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_13/ch13enabledflow.png" alt=""><figcaption></figcaption></figure>
```


---

# Agent Instructions: 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:

```
GET https://docs.langstack.com/welcome/get-started/learn-langstack/introduction-to-flows-and-flow-components/exercise-2-store-list-of-customers/step-2-create-the-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
