Run Criteria (7 min)
Completion requirements
01 Getting Started
This tutorial covers setting run criteria, including:
- Conditionally triggering Salesforce actions.
- When to use run criteria.
- Drawbacks of run criteria.
02 The Setup
A simple form was configured with text input fields. These fields will be used to create a contact. A text area field question was added, this will be used to create a case if the user provides information in this field.
Finally, a button was configured to create a new contact using the data provided. A child action was configured under the create contact push, to create a case if the user provides information to the text area field.
Finally, a button was configured to create a new contact using the data provided. A child action was configured under the create contact push, to create a case if the user provides information to the text area field.
03 Run Criteria
On your Push action configuration select the Run Criteria tab. The Run Criteria will conditionally trigger the action if the criteria is met. For this example, we only want the child push to create a case if the user has answered the question, which means the Anything you want to mention about your experience field is not empty.
If the user does not provide an answer to the last question and submits the form, a case will not be created.
Navigate to your integration logs, here you can see that a contact was created only.
If the entire form is completed, both the parent and child push will run.
Navigate to your integration logs, here you can see that both the parent and child push successfully ran.
If the user does not provide an answer to the last question and submits the form, a case will not be created.
Navigate to your integration logs, here you can see that a contact was created only.
If the entire form is completed, both the parent and child push will run.
Navigate to your integration logs, here you can see that both the parent and child push successfully ran.
04 Use Cases
If you are choosing to include payment integrations in your project, you might only want to push data from the payment if it is successful.
05 Drawbacks
Run criteria can be harder to debug when troubleshooting why an action did not run. In Addition, every run criteria action costs an API call.
Using our current setup, this would mean that even if the entire form is not completed, which would not trigger the child push, the run criteria will still cost you an API call. In many cases, a condition action flow can better replace the run criteria.
Using our current setup, this would mean that even if the entire form is not completed, which would not trigger the child push, the run criteria will still cost you an API call. In many cases, a condition action flow can better replace the run criteria.
In many cases a condition action flow can better replace the run criteria.
In many cases a condition action flow can better replace the run criteria.
In many cases a condition action flow can better replace the run criteria.