# Inputs, Outputs, Parameters

Many cases that include workflows, especially the more complex ones, require you to be able to pass values **from the app into the builder** as well as pass values **from the builder into the app**.

A **simple example** would be a workflow that deletes a record and sends an email notification via Mailchimp:&#x20;

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2F53PRd1SPwfrOsHigl8fs%2FSzxdx.png?alt=media\&token=bb61eff4-2c0b-4edc-a933-26878c20932a)

**To achieve that**, we'll need to fetch the `ID` (to identify what record to delete) and pass it into the "Orders - Delete" action in the workflow. We'll also need to pass the customer's email into the Mailchimp action (so that the notification is sent to the right person)

{% hint style="info" %}
The **ID** (primary key), is a unique identifier of a record, which could be set in the data source, auto-generated by Jet, or set manually in Jet (depending on the data source). It is typically hidden in the table but available for fetching and referencing in other components
{% endhint %}

There are two ways we can **fetch** the `ID` from the selected row (and other values and tokens):

1. **Directly from the Step**
2. **Via Workflow Parameters and Inputs**

### **Directly from the Step**

1. Select the step&#x20;
2. Click on the **ID** and click on `Formula`

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FSqZsSFlxdmDB4wknnSci%2Fsrzgxdc.png?alt=media\&token=f3a4ba9c-d665-4971-a5e5-7b0cca271f68)

{% hint style="info" %}
All the inputs available will be listed in the configuration menu on the right for a given Step
{% endhint %}

### Via Parameters/Inputs

**Parameters** allow you to receive and hold different values from the app so that they can be referenced and used in the workflow steps.

{% hint style="info" %}

#### Test Parameters

Using Test Parameters can make it easier to configure and test your workflow. Add test parameters by clicking on the first step of your workflow (i.e. the trigger step), then configure parameter types and enter test values.
{% endhint %}

**To add** a parameter, either go to the **trigger action menu**:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FhUUmKeFsFynVJOw6D7aO%2Ffzbfd.png?alt=media\&token=b3b47dab-3c48-4e65-b979-04188fbe2041)

Or open the workflow builder and click on the trigger action step there:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FBBp5cnhULwC3wsiZkYGp%2Fdzrxtctr.png?alt=media\&token=2f9ce0d8-8a81-429b-998c-0f1bafac72a9)

After that,&#x20;

1. **Go back to the trigger action menu** (close the workflow builder) and select the created parameter&#x20;
2. Reference any dynamic value from the app&#x20;

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FJNEJACvlzgD3N1e8e1lE%2Fzrbdx.png?alt=media\&token=30a0b735-089a-49c0-821a-29c8b82cf8d4)

This will put the referenced value into the parameter. Then, you can fetch the stored dynamic from the parameter within an action step:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FAucc6GbTJfIC30gM0pWr%2Fzsrdxctf.png?alt=media\&token=a43cba4e-aac6-4092-a389-65fc2f84c4d6)

After that, you can reference (fetch) workflow parameters from any step, be it an action or a rule.&#x20;

**For example**, we can create a rule that will branch our sequence into two based on a condition: `IF` a transaction amount from a selected row is `>= $100`, the "Yes" branch will run, `ELSE`, the "No" branch will run:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FbNepeHI8FgbY2K3odsFY%2Fzfdxrc.png?alt=media\&token=90284c15-dc58-4d8e-b749-87cc6f327b67)

<details>

<summary>Recap of the value's "journey" in our example</summary>

So the amount value has been fetched from the selected row of the "Transactions" table, then been put into the "Input" in the Trigger action, then retrieved in the workflow "Parameter\_1" and then been referenced in the "Yes/No" condition in the formula

</details>

### **Outputs**&#x20;

**Outputs** allow you to fetch and store the results from specific steps in the automation. You can later reference those outputs from within the app.&#x20;

You can use the **last step** outputs (default) **(1)** or specify the outputs manually **(2)** so that you can get the results from the specific steps **(3)**.

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FAZ2qMQLZBce2cvZF0MkT%2Fzdfcbfty.png?alt=media\&token=ae14351b-a081-4793-9a26-a484ec9d1e96)

You can go futher and **combine and transform** results using the functions modal:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2F5ZGnt2NeQ9KUVKwD6qzJ%2Fzdxbtdr.png?alt=media\&token=0de21291-cb79-4fc8-84c7-bbc5e5955831)
