Event flows only support Salesforce related objects. For the Zuora equivalent, see Callout flows for more information.
Event flows wait for expected changes in your data source, and then act immediately upon these changes being met.
This allows you to trigger automated or 'set and forget' type communications, such as sending out a welcome notification to a new customer, confirming an appointment has been booked or providing an update on an application as it progresses to the next stage.
Event triggers for Pendula flows are currently enabled by Salesforce PushTopics.
There are some limitations on certain object and field types using Salesforce PushTopics. These are covered in the Considerations when using Salesforce Pushtopics section below.
Quick links:
Considerations when using Salesforce Pushtopics
How to create an event flow
-
Navigate to the Flows tab and click on the New Flow button
-
Name your flow and if helpful, provide an optional description
-
Set the Data source to
Salesforce
and Related object to the relevant object the flow is regarding -
Under When will it trigger? select On an event
You'll then be able to configure your event trigger conditions.
Trigger conditions
An event flow can be set to trigger when:
- a new record is created
- an existing record is edited
Either one, or both of these checkboxes can be ticked, depending on your use case.
You'll need at least one of these options selected, otherwise your flow will never trigger!
Examples:
-
A welcome notification flow triggers on the creation of a new contact record
-
An application update flow triggers when an existing opportunity record is edited
-
A service update flow triggers when a new service record is created or an existing record edited with the same status
Triggering a flow when a record is created
If a flow is set to trigger when a record is created, you can define the criteria which must be met by a newly created record in the and the following criteria is true section.
This will filter records based on specific field values, such as Source is equal to Facebook
or SMS Opt-out does not equal True
.
If no criteria is entered, the flow will trigger whenever any new record (based on your related object) is created, so ensure you have considered when a record should or shouldn't trigger an event flow!
-
To set a rule, first either search for (or browse) and select the relevant field name from the Field dropdown. These fields reside on the related object you have selected for your flow.
-
Select the desired Operator and Value to complete your rule.
-
Click on the Add rule button to further segment recipients. Adding more than one rule also allows you to specify whether the flow should trigger based on
all
orany
of the rules outlined.
See Flow criteria for more information on creating rules and groups.
When defining event trigger conditions, you can only refer to fields residing on the related object of the flow. Once the flow has been triggered however, you can add additional criteria within the Who are you sending it to? This allows you to add rules based on objects your related object shares a one-to-one relationship with, along with rules which aren't supported by Salesforce Pushtopic such as formula fields or date formulas.
Triggering a flow when a record is edited
To trigger the flow when a record is edited, add at least one field to the and any of the following fields have been edited section.
Fields entered here will be 'watched' by Pendula, and if any of them are edited within Salesforce then the flow will trigger.
Trigger if the fields are edited to any value
For example, say you want to notify a customer whenever their appointment has had a time change (regardless of when the new time is). Enter the Start
Time
field in the and any of the following fields have been edited section. Whenever this field is edited, the flow will trigger.
If multiple fields are added as watched fields in the and any of the following fields have been edited section, then the flow will trigger based on any of these being edited, not if they are all edited simultaneously. If this is not desired, think about the exact rules which must also be met in order for the flow to trigger at the correct time.
Trigger if the fields are edited to a specific value
To trigger the flow based on a field being edited to a specific value, then you need to also add the value as a rule under and the following criteria is true section.
For example, if you want to notify a student once their enrolment application has been accepted, you would first add the Enrolment Status
field to the and any of the following fields have been edited section.
Next, in the and the following criteria is true section, you would add the rule Enrolment Status is equal to Accepted
.
Trigger a flow with both watched fields and specific field values
An event flow can have different fields in both sections, so that Pendula is watching for certain fields to be edited, but also checking the record matches rules on other fields.
Using the appointment time changed notification example from earlier, you might only want to send a notification regarding a time change if the appointment has also been rostered or confirmed.
In this case, you would enter the Start
Time
field in the and any of the following fields have been edited section as above, along with additional rules such as Status does not equal Draft
or Status
is equal to Rostered
in the and the following criteria is true section as well.
Triggering a flow when a record is created and edited
If a flow is set to trigger when a record is created and edited, it will evaluate a newly created record based on any rules in the and the following criteria is true section only, and evaluate an edited record based on fields and rules specified in both sections.
In this example, any new Contact records will trigger the flow, along with any existing Contact records when the Send Welcome Pack
field is edited.
In this example, any new Appointment records with Status is equal to Rostered
will trigger the flow, along with any existing Appointment records when the Status
field is edited to Rostered.
Who are you sending it to?
This section allows you to further filter out recipients of your event flow.
You can add criteria that will evaluate the record once it has met your trigger conditions, such as formula fields on the related objects or fields on other objects that are related to the triggered record.
This section is optional for event flows, so you don't need to add any criteria here to segment your recipients further if it is not required.
-
To set a rule, firstly either search for (or browse) and select the relevant field name from the Field dropdown. These fields coincide with any objects which share a one-to-one relationship with the related object you have selected for your flow, along with the related object itself
-
Select the desired Operator and Value to complete your rule
-
Click on the Add rule button to further segment recipients. Adding more than one rule also allows you to specify whether the flow should trigger based on
all
orany
of the rules outlined -
You can also create a group of rules by clicking on the Add group button. Once more than one rule is added to a group, you can apply an
all
orany
to your group of rules. This allows you to nest a series ofany
statements within yourall
statements, for example all contacts with a status equal toCurrent
, with Region equal to eitherNSW
ORQLD
.
See Flow criteria for more information on creating rules and groups.
Recipient preview
Once additional criteria has been added, you can query your data source to see how many records match by clicking on the check button.
Each time you add, edit or remove contact filters, you can recheck the recipient preview to see how this will affect the number of matching records.
This preview is specific to the criteria under the Who are you sending it to? section and not a representation of how many records might trigger the flow.
The recipient preview is only relevant to when the check button is clicked, so won't reflect any changes which occur within your data source after you have saved and activated your flow. Bear in mind that by the time the flow triggers, the number of matching records may be different depending on the criteria you have set.
Next steps
When you are ready to save your event flow and proceed to the next step, you have two options:
-
Finish later: This will save your flow with a status of
Draft
. You'll be able to edit this and continue to the flow builder at a later stage -
Next: This will take you to the flow builder screen, where you can configure what actions the flow will take once it has triggered
See Flow builder overview for more information.
Considerations when using Salesforce Pushtopics
Salesforce object support
All custom objects are supported in Pushtopic queries, meaning they can be used as related objects for event flows in Pendula.
Additionally, the following standard objects are supported in Pushtopic queries:
-
Account
-
Campaign
-
Case
-
Contact
-
Lead
-
Opportunity
-
Task
Trigger condition limitations
The following are not supported within the trigger conditions of an event flow:
-
Any formula field types in Salesforce
-
Date formulas
- Long text fields
-
NOT
(does not equal) -
Object Relationships (
Contact.Account.Name
)
Specifying only a recordID
within your trigger conditions will make any change to the record trigger the flow. If you have specified other fields as well, it'll work only when those fields change. As always, we recommend testing thoroughly to ensure your event flows only trigger as expected based upon changes within your data source.
Advanced options
De-dupe window
Salesforce Pushtopics can on occasion generate duplicate events for a record, causing the corresponding Pendula flow to in turn trigger multiple times.
This is known to occur when there are other workflow rules or process within Salesforce triggering off the same conditions as the Pushtopic a Pendula flow is subscribed to.
By default, Pendula is configured to ignore consecutive events for the same record received from Salesforce within a 1 second time period.
If duplicate events are occurring despite this, you can increase this time period by updating the de-dupe window settings.