> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting to Know the Workflow Builder

The m3sh Workflow Builder lets you quickly add and configure the functions you'll use to create Workflows. This topic introduces the Workflow Builder environment and explains how work with the usability features and options it incorporates, which are designed to facilitate and streamline Workflow creation and management:

* [Accessing and Exploring Workflow Builder](#accessing-and-exploring-workflow-builder)
* [Adding and Configuring Workflow Functions](#adding-and-configuring-workflow-functions)
* [Arranging Workflow Steps](#arranging-workflow-steps)
* [Publishing Workflows](#publishing-workflows)
* [Managing and Testing Workflows - Builder Options](#managing-and-testing-workflows-builder-options)

## Accessing and Exploring Workflow Builder

You can open the Workflow Builder to begin creating a new m3sh Workflow from the *m3sh* section of the m3ter Console:

1. Select **m3sh**:

<img src="https://mintcdn.com/m3ter/gg3zPcB5MVj--Cnq/images/m3shMainNav1.png?fit=max&auto=format&n=gg3zPcB5MVj--Cnq&q=85&s=c26ad71debe6cffcd46844fa558e0e6f" alt="M3sh Main Nav1" title="M3sh Main Nav1" style={{ width:"8%" }} width="61" height="64" data-path="images/m3shMainNav1.png" />

The **Workflows** page opens.

2. Select **Create workflow** - the **Workflow Builder** opens:

<Frame>
  <img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation166.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=0418317c926d9af7ec152f5d285d4c90" alt="M3sh Automation166" width="1435" height="786" data-path="images/M3shAutomation166.png" />
</Frame>

* You can add required details for the new Workflow: **Name**, **Code**, and **Description**.
* The main canvas area:
  * Contains a starter Workflow, ready for you to add a function to create the first step.
  * Has controls at top-right allowing you to **Zoom In/Out**, **Fit View**, or **Undo/Redo** changes:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation160.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=3f4677bba5c7ea74ba6e187184f51f49" alt="M3sh Automation160" title="M3sh Automation160" style={{ width:"46%" }} width="405" height="36" data-path="images/M3shAutomation160.png" />

* An **Add function** panel is open at the left side. You can:
  * Search available functions:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation161.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=21c7c0ddd24e0f9b65c33f0b0cfa897c" alt="M3sh Automation161" title="M3sh Automation161" style={{ width:"43%" }} width="431" height="535" data-path="images/M3shAutomation161.png" />

* Drill into the **Add function** panel to open a sub-menu for one of the function types: **Data management**, **Logic**, or **APIs** (by external system or m3ter). For example **m3ter from Salesforce** **API** functions:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation162.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=2eb5d03d9888f5e234da317e9d56e665" alt="M3sh Automation162" title="M3sh Automation162" style={{ width:"43%" }} width="432" height="535" data-path="images/M3shAutomation162.png" />

* If you open an **Add function** sub-menu, the scope of **Search available functions** is limited to the subset of functions. For example a search of the **m3ter from Salesforce API WRITE** functions:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation163.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=7f7ed043a915b8262669cbfdb430195a" alt="M3sh Automation163" title="M3sh Automation163" style={{ width:"44%" }} width="432" height="509" data-path="images/M3shAutomation163.png" />

* Use **Back** to return to the main **Add function** menu.
* You can hide the **Add function** menu to create more space in the Builder main canvas area:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation164.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=7b57c622f8ab1b39a2a4dace86d47940" alt="M3sh Automation164" title="M3sh Automation164" style={{ width:"49%" }} width="426" height="66" data-path="images/M3shAutomation164.png" />

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation167.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=29412271698d28e365548801963a5a99" alt="M3sh Automation167" width="1433" height="787" data-path="images/M3shAutomation167.png" />

* If you want to set up *Global parameters* to use when adding and configuring functions for your Workflows, you can open a **Global parameters** panel:

<img src="https://mintcdn.com/m3ter/JDLEbvkzfCbdo08X/images/M3shAutomation261.png?fit=max&auto=format&n=JDLEbvkzfCbdo08X&q=85&s=8b804aa96959d8216b18c523a910a8fd" alt="M3sh Automation261" title="M3sh Automation261" style={{ width:"52%" }} width="424" height="67" data-path="images/M3shAutomation261.png" />

<img src="https://mintcdn.com/m3ter/JDLEbvkzfCbdo08X/images/M3shAutomation262.png?fit=max&auto=format&n=JDLEbvkzfCbdo08X&q=85&s=37efa0931a2c28d2e1ee64511abf5784" alt="M3sh Automation262" width="1303" height="603" data-path="images/M3shAutomation262.png" />

* For more details, see [Working with Global Parameters](/guides/m3sh-workflows/working-with-global-parameters).

## Adding and Configuring Workflow Functions

Before you can create a new Workflow you must add a **Name**, **Code**, and **Description**, and add *at least one* function.

1. To add a function, search for the function or open the appropriate function sub-menu. You can then drag-and-drop the function onto the Workflow to create the first step:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation168.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=94ff4af6ed3679b3de924af21719bc7d" alt="M3sh Automation168" width="1434" height="786" data-path="images/M3shAutomation168.png" />

The newly added function shows an alert and red border to indicate that it needs configuring to be viable as a Workflow step. Functions have three icons you can use:

* To show **Function details**:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation169.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=617b9d5f2a204708a19a846e74519b65" alt="M3sh Automation169" title="M3sh Automation169" style={{ width:"73%" }} width="600" height="356" data-path="images/M3shAutomation169.png" />

* To **Edit**:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1727276886-editbutton2.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=3f40a58bc776bc60d57dd8985886a798" style={{ width:"5%" }} width="31" height="29" data-path="images/1727276886-editbutton2.png" />

* To **Delete**:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1727272786-deleteicon2.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=164e2bf3ef1032ad21cfed6fcd09a18a" style={{ width:"5%" }} width="31" height="29" data-path="images/1727272786-deleteicon2.png" />

2. To configure a function, select the **Edit** icon. An **Edit** panel appears:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation170.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=8924427112d2163ec821884aefd8dab3" alt="M3sh Automation170" title="M3sh Automation170" style={{ width:"78%" }} width="888" height="864" data-path="images/M3shAutomation170.png" />

* When you open the **Edit** panel for a function, any required configuration is flagged up at the top of the panel.
* The configuration options for functions vary.
* When you've edited a function for the required configuration, select **Update**. The function then shows as valid in the Workflow canvas and the alert and red border no longer show:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation171.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=72c3584bb20e2f4392e9ab2c40310459" alt="M3sh Automation171" width="1438" height="787" data-path="images/M3shAutomation171.png" />

3. As you configure steps, you can quickly check the **Function details** without having to re-open the **Edit** Panel:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation172.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=c3c50e9ad6ea9d993d31dd7ee6f602b9" alt="M3sh Automation172" title="M3sh Automation172" style={{ width:"76%" }} width="601" height="375" data-path="images/M3shAutomation172.png" />

4. Some functions allow you to include flows, such as the **Loop** Logic function:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation173.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=d9c9e23d50bf6e23d87afcffb54bd578" alt="M3sh Automation173" width="1438" height="797" data-path="images/M3shAutomation173.png" />

* You can then start to add functions to the **Loop** to create the required flow:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation174.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=1e3a28fc714fa3a291888dc8977a4232" alt="M3sh Automation174" width="1436" height="795" data-path="images/M3shAutomation174.png" />

5. Some functions allow you to create an alternative path if the function returns an error. For other functions this is not appropriate:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation175.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=99bc68e57e201f246eb26d0fa73096c7" alt="M3sh Automation175" width="1437" height="799" data-path="images/M3shAutomation175.png" />

* In this example, the **Get m3ter Entity API** function allows an alternative path to be built for the Workflow if the function returns an error. In contrast, the **Set Field Data management** does not.

<Warning>
  **Create Workflow Promptly!** When you've added some functions to a new Draft Workflow, it's good practice to create the Workflow promptly and avoid the risk of losing your work. The Workflow is saved as a **Published** version but the Builder reopens in **Draft** mode allowing you to continue building. See below: [Publishing Workflows](#publishing-workflows).
</Warning>

## Arranging Workflow Steps

As you build a Workflow and add functions, you might need to re-arrange the sequence of steps. Builder features are available for quickly adding to or rearranging the Workflow sequence, avoiding the need to delete and re-add functions to achieve the required Workflow sequence.

1. **Adding intervening steps**. If you've added several steps to a Workflow and then realize you've missed a step, you can drag-and-drop the required missing function directly onto a **THEN**, **NEXT**, **TRUE**, **FALSE**, or **ERROR** node:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation178.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=620dac7e848e618b45ea915ba28b8da8" alt="M3sh Automation178" width="1418" height="643" data-path="images/M3shAutomation178.png" />

* In this example, a **List m3ter Entities API** function was omitted as the first step required in the Workflow.
* Note that as you drag a function over a node, it will show light blue to indicate the function can be inserted in the Workflow at that point.

2. **Detaching and re-attaching steps**. If you've reached a point when building your Workflow with several functions added but then realize you need to re-order the sequence, you can select the **X** on the **NEXT**, **TRUE**, **FALSE**, or **ERROR** node that precedes the function to detach it.

* In this example, we want to switch the order of the **Add to List** and **Sort List** functions. First, we'll detach the 2-step branch that starts with the **Add to List** function:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation179.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=6bdc7fdf79560ff3cc369b6e5adc5a69" alt="M3sh Automation179" width="1416" height="640" data-path="images/M3shAutomation179.png" />

* Second, we'll detach the **Sort List** function:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation186.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=0fac2c7341f4dda60917f042b4a0e80f" alt="M3sh Automation186" width="1373" height="571" data-path="images/M3shAutomation186.png" />

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation187.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=aaaa2c59ea7b5e8bf0c00c7c2d2d5472" alt="M3sh Automation187" width="1373" height="571" data-path="images/M3shAutomation187.png" />

* Now, we can re-attach the **Sort List** function: if we hover our cursor over the blue box on the **NEXT** node, it changes to a cross:

<img src="https://mintcdn.com/m3ter/lIpiuWraFGDSwDkM/images/1769181258-m3shautomation69.png?fit=max&auto=format&n=lIpiuWraFGDSwDkM&q=85&s=d802aea26e8f0aa435027894f0c19911" style={{ maxWidth: 'min(400px, 100%)' }} width="413" height="263" data-path="images/1769181258-m3shautomation69.png" />

* We can then click on the blue box and bring up a catch line which we can drag across the canvas to the **Sort List** function and release the catch line on it to re-attach it as that step in the main flow:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation188.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=3a4244db9fba962bd85837dc9f059a02" alt="M3sh Automation188" width="1372" height="571" data-path="images/M3shAutomation188.png" />

* Lastly, we use the same method to re-attach the **Add to List** function to the Workflow as the next step:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation189.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=0f4d8dfb2e36f7984d2eb140a64bca76" alt="M3sh Automation189" width="1374" height="575" data-path="images/M3shAutomation189.png" />

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation190.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=550c3e1200c1d8f7db078ad2ce2a4d0b" alt="M3sh Automation190" width="1374" height="571" data-path="images/M3shAutomation190.png" />

* Note that you cannot detach a function if it is used as the *first step* in a Workflow.

## Publishing Workflows

When you've added some functions to a new draft Workflow, it's good practice to create the Workflow promptly without attempting to build the Workflow out to completion in a single work session and risk losing your work. A *Published* version of the Workflow is then created:

* A saved Draft version cannot be deployed into your production environment - the Published version must be used.
* If you export a Workflow, the Published version is exported. See below [Managing and Testing Workflows - Builder Options](#managing-and-testing-workflows-builder-options).

**To create and publish a Workflow:**

1. With a new Workflow open in **Draft** mode and with at least one function added, select **Create**. The Workflow is saved as a **Published** version and the Workflow Builder reopens in **Draft** mode:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation176.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=44b563325a37df943e43269b1ca70c94" alt="M3sh Automation176" width="1425" height="817" data-path="images/M3shAutomation176.png" />

* Note that you can read off the Workflow's details:
  * Workflow **ID** which you can **Copy** to your clipboard.
  * Audit data for when and who **Created** and **Last modified** the Workflow.

2. You can then continue to add and configure functions to the **Draft** Workflow and **Save draft** updates as you proceed.
3. When you've saved Draft updates and you want replace the **Published** version, select **Publish draft**. A confirmation modal appears:

<img src="https://mintcdn.com/m3ter/JDLEbvkzfCbdo08X/images/M3shAutomation303.png?fit=max&auto=format&n=JDLEbvkzfCbdo08X&q=85&s=38a1807a4ec46e9927512c5798591ee3" alt="M3sh Automation303" title="M3sh Automation303" style={{ width:"47%" }} width="448" height="222" data-path="images/M3shAutomation303.png" />

<Warning>
  **Note:** When you publish a Workflow Draft version, the Draft is permanently deleted. If you've been using the traffic-forwarding feature to perform test runs of a Workflow using the Draft version before publishing, this means any Draft runs will no longer be available. See [Testing and Troubleshooting Workflows](/guides/m3sh-workflows/testing-and-troubleshooting-workflows) for more details.
</Warning>

4. Select **Publish draft**.
5. At any time, you can select to view the **Published** Workflow:

<img src="https://mintcdn.com/m3ter/giI4Unhw7J8GXJWM/images/M3shAutomation177-2.png?fit=max&auto=format&n=giI4Unhw7J8GXJWM&q=85&s=eac92666abccd4d39adcd6ccdffef1e6" alt="M3sh Automation177 2" width="1421" height="829" data-path="images/M3shAutomation177-2.png" />

## Managing and Testing Workflows - Builder Options

When, you've created a Workflow, options for managing and testing your Workflows are available in the Builder environment. Open the drop-down menu at top-right:

<img src="https://mintcdn.com/m3ter/JDLEbvkzfCbdo08X/images/M3shAutomation252.png?fit=max&auto=format&n=JDLEbvkzfCbdo08X&q=85&s=d07dcda5a70281cc673a588f7a48b48a" alt="M3sh Automation252" title="M3sh Automation252" style={{ width:"60%" }} width="426" height="267" data-path="images/M3shAutomation252.png" />

* **Enable/Disable traffic-forwarding**. If you've completed a Workflow and published it to your production environment, you might want to update and improve the Workflow. To facilitate testing your changes on a Draft version and before publishing, you can **Enable traffic-forwarding** to temporarily switch traffic to the Draft version. This means the Draft version will be triggered instead of the Published version. When you are finished testing, you can **Disable traffic-forwarding** to switch traffic back and ensure the Published version is triggered. See [Testing and Troubleshooting Workflows](/guides/m3sh-workflows/testing-and-troubleshooting-workflows) for more details.
* **Export Workflow**. If you've built and published a Workflow and want to use it as the basis for another Workflow - by adapting the current Workflow to serve a similar but different operational use case - you can export the *published Workflow* and import it as a new one. See [Exporting and Importing Workflows](/guides/m3sh-workflows/exporting-and-importing-workflows).
* **Discard draft version**. Only available if you've made changes to a Draft version and saved those changes to draft after you last published a Workflow. Any changes made are discarded and the Draft is reverted to match the Published version.
* **Delete Workflow**. Deletes the current Workflow - the Workflow builder closes and you are taken back to the **Workflows** page.
