> ## Documentation Index
> Fetch the complete documentation index at: https://zuperinc-section23.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a workflow

Workflows allow you to automate processes by defining steps triggered by specific events. Follow these steps to build a workflow:

## Create a workflow

1. Access the Workflow Builder
   * Navigate to the Workflow section in the Zuper dashboard.
   * Click "**Create Workflow**" to start.

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WW1.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=2488389b5a68f1502d195c7feb673ccd" alt="WW1 Pn" width="1900" height="872" data-path="images/WW1.png" />

2. Define the Trigger
   * Select an event-based trigger and choose the "**On Create Job**" trigger.

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT7.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=751952fe716c42c278d6c8f67dc6858b" alt="WT7 Pn" width="1904" height="872" data-path="images/WT7.png" />

3. Add Flow Steps
   * Get Record: To get the complete information about the jobs.

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT15.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=71e94f0f310481d438d8d08755b14d2a" alt="WT15 Pn" width="1910" height="862" data-path="images/WT15.png" />

4. Copy Custom Fields

   You can copy and add the customer's custom fields to the jobs module by mapping the appropriate options in the form's fields. 

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT22.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=fc5ffd9f16eb17edd20450e3ffc75973" alt="WT22 Pn" width="1909" height="865" data-path="images/WT22.png" />

5. Choose the “**Customer Uid**” and map the fields to get copied from the Jobs module to the customers module.

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT25.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=33596db8508b055afdec174921f112d9" alt="WT25 Pn" width="1915" height="874" data-path="images/WT25.png" />

6. Click “**Save as draft**.”

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT26.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=ae5de123e88c4dea45579ce9b0e15f22" alt="WT26 Pn" width="1907" height="869" data-path="images/WT26.png" />

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT27.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=920485546ccd42e81b6799106ed63642" alt="WT27 Pn" width="1897" height="864" data-path="images/WT27.png" />

## **Testing a Workflow**

Testing ensures your workflow executes as intended. Follow these steps:

1. If test data is already pinned, it reuses the pinned data. Pinning lets you reuse input data for future test executions.

   If the data is not pinned, it links to the live data, and once it is executed, we can pin the data to reuse it for testing.

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT12.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=b48c1a408e2ee5ccfc1894bcb1ca5728" alt="WT12 Pn" width="1919" height="868" data-path="images/WT12.png" />

2. Initiate Test Mode

   * Open the saved workflow and click "**Test Workflow**".

   <img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT18.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=bdec881b62e934e5436e0d5007638eb7" alt="WT18 Pn" width="1914" height="862" data-path="images/WT18.png" />

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT9.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=9ec67287f027163cbdcefd2f5b9a166f" alt="WT9 Pn" width="1903" height="869" data-path="images/WT9.png" />

## **Activating a Workflow**

Click the “**More Icons**” icon to choose “**Save and Publish**.”

<img src="https://mintcdn.com/zuperinc-section23/dPOYyfraKkKVT81b/images/WT28.png?fit=max&auto=format&n=dPOYyfraKkKVT81b&q=85&s=ee0c101ea56a7072376c57e436f67d6f" alt="WT28 Pn" width="1905" height="865" data-path="images/WT28.png" />
