Run Criteria
Business Background
Use Run Criteria to conditionally trigger Salesforce actions based on input from your end users in your web project.
How to Video
- 0:00 – An introduction to run criteria.
- 0:34 – Run criteria used in a form for Salesforce.
- 1:00 – Create a Puch integration.
- 1:15 – Configure the Run Criteria for a child integration.
- 2:30 – Drawbacks of run criteria.
How to Guide
The run criteria can be added to a button element that will trigger a Salesforce push action when the user fills in a specific field in a form. In this article, a case will only be created if the user fills in the text area element called “Anything you want to mention about your experience?”
- Click the button element and click the On Click Action icon. The On Click Action screen opens.
- Click the + icon next to Start. The Add Node screen opens.
- Select the Salesforce Action option and click the Next button.
- Click the Salesforce Integration button.
- Select the Push option and click the Create New button. The Map Salesforce fields screen opens.
- Use the drop-down list to select an object in Salesforce.
- In this example, Contact is used.
- Use the Action drop-down list to specify what you want to do.
- The create option is selected.
- Add a description if necessary.
- This is not a mandatory field.
- The description is for internal use. It describes the goal of the data from and to Salesforce internally.
- Click the Mapping option and map the relevant fields.
- Click the Apply button. The Push will show on the Salesforce Integrations screen.
- Click the Kebab icon and select the Add Child option.
- Use the drop-down list to select an object in Salesforce.
- In this example, Case is used.
- Use the Action drop-down list to specify what you want to do.
- The create option is selected.
- Add a description if necessary.
- This is not a mandatory field.
- Click the Mapping option and map the relevant fields.
- Click the Run Criteria option and use the drop-down lists to select the necessary options. For example:
- If the text area called “Anything you want to mention …” is not empty, a case will be created.
- In other words, the push to create a case in Salesforce will only run when the text area is not empty.
- Click the Apply button. The child push integration is added to the Push on the Salesforce Integrations screen.
- Click the Close button.
- Use the drop-down list to select the push integration action and click the Next button.
- Type a tag if necessary and click the Insert button. The Salesforce Action node is added.
- Click the Apply button.
- Click the Apply button.
- Save and Preview the project.
If the user completes the First Name, Last Name, Email and Phone Number fields but adds no information in the text area field, only a Contact is created in Salesforce when the Push button is clicked.
When the user completes all the fields, a Contact and a Case are created in Salesforce when the Push button is clicked.