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
Each Condition Step lets you add a name and a description for the object.
When you add condition sub-flows, you can configure the criteria of each condition.
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 flow will process the email object in the flow.
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 flow will process the HTTP SMS service object in the flow.
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.