Flow criteria is defined in both event and scheduled flows in order to trigger and send to the correct recipients.
Quick links:
Rules and groups
Rules are used to set your contact filters or flow criteria, and reference objects, fields and values from your data source.
The objects and fields available to you are determined by your related object, and the one-to-one relationship this object shares with objects in your data source.
For example, if your related object is the contact object in Salesforce, you will be able to set criteria based on the account as well.
This is because a contact can only ever be associated with one Account, so Pendula knows which values on the account to reference within the flow.
Understanding your data architecture will help inform the best way to setup flows within in Pendula.
Rules can be added for both scheduled and event flows under the Who are you sending it to? section of the flow setup screen.
Rules can also be set as part of the trigger conditions of an event flow when and this criteria is true is selected, with the exception that these are limited to fields on the related object of the flow.
See Event flows and Scheduled flows for more information on how to add rules and groups specific to both.
Grouping your rules is a handy way to manage more complex flow criteria, such as evaluating a record based on a series of 'and' statements and any of the rules within a group. Click on the Add group button and then add two or more rules to enable this logic.
Standard operators
The following standard operators can be used within your flow criteria.
Operator name | Function |
is equal to |
Determines if two values are equivalent Note: this is case sensitive for text values |
is not equal to |
Determines if two values aren't equivalent Note: this is case sensitive for text values |
is greater than |
Determines if a value is greater than the value that follows this symbol |
is greater than or equal to |
Determines if a value is greater than or equal to the value that follows this symbol |
is less than |
Determines if a value is less than the value that follows this symbol |
is less than or equal to |
Determines if a value is less than or equal to the value that follows this symbol |
is null |
Determines if a field has a value, and returns TRUE if it does not |
is not null |
Determines if a field has a value, and returns TRUE if it does |
If referencing a Salesforce lookup field or record type field within a rule, the expected value should be the record id rather than the record name (as this is how it is stored within your data source).
Special operators
Is like and is not like
The is like
and is not like
special operators can be used within your flow criteria for specific field types or use cases.
is like
determines if a value has a match or partial match to all or part of a string value. Whereas is not like
will determine the inverse of this.
The wildcards %
and _
can be used in conjunction with these operators, where:
%
represents zero, one or multiple characters_
represents one character
Using is like
and the %
wildcard allows you to query records in the same way that CONTAINS
does within Salesforce formulas, however it is customisable to be much more specific in the values it returns.
Without the%
or_
wildcard,is like
will essentially return the same records asis equal to
.
Please see examples below
Rules using is like |
Function |
FirstName is like a% |
Finds any values that start with a |
FirstName is not like a% |
Finds any values that don't start with a |
FirstName is like %a |
Finds any values that end with a |
FirstName is like %or% |
Finds any values that have or in any position |
FirstName is like _r% |
Finds any values that have r in the second position |
FirstName is like a_% |
Finds any values that start with a and are at least 2 characters in length |
FirstName is like a__% |
Finds any values that start with a and are at least 3 characters in length |
FirstName is like a%o |
Finds any values that start with a and ends witho |
Includes and excludes
The includes
and excludes
special operators can be used in conjunction with multi-picklist fields to determine if any value selected equals (or does not equal) a text literal you specify.
When referencing multi-picklist fields, consider whether you should use the equals or includes operator to segment the correct recipients as both will behave differently for records with more than one value selected.
For example, you might have afavourite colour
multi-picklist field on the Contact object. Sean hasGreen
andBlue
selected, whereas Simon has onlyGreen
.
Iffavourite colour equals Green
is set as a rule, only Simon will be included in the flow.
Iffavourite colour includes Green
is set as a rule, both Sean and Simon will be included in the flow.
Date formulas
Referencing date and date/time fields in flow criteria provides the additional option of using formulas rather than literal values.
These can be used in the Who are you sending it to section of the flow setup screen, but not as part of event flow trigger conditions.
Accepted syntax for date fields:
TODAY()
DAYS()
Please see examples below:
TODAY()
TODAY()+DAYS(1)
(Tomorrow)TODAY()-DAYS(1)
(Yesterday)TODAY()+DAYS(n)
Wheren
is any integer representing the amount of days you would likeTODAY()-DAYS(n)
Wheren
is any integer representing the amount of days you would like
Accepted syntax for date/time fields:
NOW()
TODAY() and DAYS() can't be used in conjunction with date/time fields.
For this reason, we recommend converting the date/time value to a date value within your data source first, so that it can then be used with the date formulas above.
The availability of standard and special operators will depend on the type of field you have selected (and whether it makes sense to use them).Is greater than
for example, can't be used in conjunction with multi-picklist fields, whereasexcludes
is specific to multi-picklist fields only.