
You can update variables at different points in your automation. Here are the available options:
- Before step starts – Update the variable before an activity begins.
- After step completes – Update the variable after an activity finishes.
- When path followed – Update the variable when a specific path is chosen in a conditional branch.
- On step – Update the variable when a branch, merge, or end step is reached.
To update a variable, you write a formula. The result of this formula replaces the variable's old value with the new one.
Now, let's see how to set up these updates.
Updating variables
Each step type allows different points for Variable updates:
Step type | Before step starts | After step completes | On step | When path followed |
---|---|---|---|---|
Start | - | - | - | - |
Activity | Yes | Yes | - | - |
Branch | - | - | Yes | Yes |
Merge | - | - | Yes | - |
Loopback | - | - | - | - |
End | - | - | Yes | - |
The step-by-step guide below shows how to select a Step, find the Variable updates section and add a variable update based on the allowed update points in the table above.
-
Open Automation Builder: Go to Manage > Automations >
<Automation Name>
> View > Edit -
Select the step and then click the Variable updates section to expand it.
-
Click the Add button to open the Update variable dialog.
Select the variable to update from the Variable drop-down selection.
Select the update type from the Update type drop-down. The options will depended on the Step type selected. -
Click the Update tab to show the Formula Builder.
Click inside the Formula Builder to start writing your formula.
Make sure your formula outputs the correct type of data for the variable. For example, if the variable is a Date, your formula should result in a date. The Formula Builder is smart and will guide you based on the variable's data type. If the data type doesn't match, it will show an error.
If you need to enter a specific value, follow the instructions here
To learn more about the Formula Builder, click here.