The concept of using conditions to follow a certain program flow is common in software engineering.
There may be a need to test the condition or state of a variable or field value within any flow that you create. Based on the condition value, the execution of the flow will perform a specific action.
The Condition step can be likened to Decision Statements or If Else Statements in traditional programming.
In Synatic, the Condition step provides this function and generally controls the program flow as follows:
If the condition is true – the flow performs one action.
If the condition is false – the flow performs another action.
Using a Condition Step
The Condition step is located in the Control drawer in the Steps palette. To use a Condition step:
Select then drag the step object to the desired location in the flow.
Add sub-flows for each condition and configure the criteria for each.
Configuring the Condition Step
The Condition Step lets you add a name and a description. Choose a name and description that describes its purpose in your flow.
After saving the step, conditional subflows can be added by clicking on the ⊕ icon on the step:
true value to execute the steps in the subflow, or a
false value to skip the subflow branch.
A typical example you may use for the Condition step is to send a one-time password either via email or via SMS, dependant on the record value.
A sendEmail or sendSms field is set as true or false for each record in the data file.
To send via Email
You could add the following example code in the condition code block of the first sub-flow:
If the record's sendEmail field is true, then the email sending sub-flow will be run.
To send via SMS
You could add the following example code in the condition code block of the second sub-flow:
If the sendSms field in the record is true, then the HTTP SMS service sub-flow will be run.
There are no extra options for this step.
Advanced Mode Options
There are no advanced options for this step.
Limitations and known issues
Read about other Flow steps.
Revisit the Getting Started page for a refresher.
Read more about Flow Steps here.