What happens if I set up a Workflow with multiple if / then conditions?
The Workflow will process each IF / THEN condition sequentially. For example, if you want to create a Workflow that will first decline all inquiries that match the List: Blocked IP Addresses, then approve all inquires that match the List: Allowed IP Addresses, then approve all other inquiries that don't match the lists, you'd want to build each route separately, in the following order:
- Decline all inquiries that match the List: Blocked IP Addresses; and
- Approve all inquiries that match the List: Allowed IP Addresses; and
- Approve all other inquiries
Let's say you'd like the second rule to override the first in the event the IP address appears on both lists. In this example, you will want to set up the Workflow to first approve all inquiries on the Allowed list before declining inquiries on the Blocked list. If one route is hit, the consequent routes will not continue to run, so you need to make sure your workflow routes are set up in order of priority based on your rules.
Are Workflows retroactive?
Workflows are not retroactive for inquiries created before the Workflow was started. Workflows will only impact inquiries created after the Workflow starts running.
Can I have multiple Workflows that are triggered on the same event?
Yes, you can have multiple workflows that are triggered on the same event. However, your use case is important to how you should most effectively set up your workflows.
Let's say you have two different templates that your organization uses for two different reasons. You may want to build one Workflow that is only associated with one template.
In this case, after you create the trigger object, you can specify that a Workflow triggers only on certain templates.
![Workflows_trigger_criteria.png](http://images.ctfassets.net/7fn0srsqjxkr/7ySSBoM97fct04bSuYJJ6h/9b147bde93b14edc82fa77407e0e281f/1UNQQ1f6RKFlV0pfSplEKp-Workflows_trigger_criteria.png)
After selecting the Trigger Criteria in the trigger node, you can insert the template ID in the following panel.
![Workflows_trigger_criteria_-_template_ID.png](http://images.ctfassets.net/7fn0srsqjxkr/Kmcfrc9vmlF9lOh14shKoX/bfbf09f2119cd0dd285fbb87715cd017/1UNQQ1f6RKFlV0pfSplEKp-Workflows_trigger_criteria_-_template_ID.png)
What this will do is ensure that the Workflow you've just built is associated with only the trigger event for inquiries that are associated with the designated template. You can then build a separate Workflow triggered off of the same event, but associate it with your other template. This set up will ensure that your Workflows are running on the same trigger event, but different templates. You may have different reasons for decline, mark for review, or approval based on the use case of the template and the above set up will allow for this.
In the event that you want the Workflows you're building to run on all templates that your organization is using, we recommend creating only one Workflow per event to ensure that the Workflows run efficiently and that your rules are prioritized properly within a single Workflow's routing structure.
Let's say you have three templates. For all three templates, you know that you have a set of rules that apply, regardless of the use case of the template. You know you want to first decline individuals who are under 18, then you want to mark individuals for review who have an ID that is inside of the US, and then you want to approve individuals who do not meet any of the above criteria. You'd set up your Workflow in the following way:
- Name your Workflow
- Select the inquiry.completed trigger event
- Leave the trigger criteria section blank, since you're not associating it to a specific template and these rules apply to all of the templates
- Build the first route for if under 18 (a criteria) then decline (an action)
- Build a second route for if country is US (a criteria) then mark for review (an action)
- Ensure the else clause is if none of these apply, then approve (an action)
- Activate the Workflow by toggling the activate button on
- Finally, be sure to save the workflow in the upper right hand corner of your page