You are here:
Create Salesforce Records After an External System Change Example
This example creates a flow that listens for new records in an external system (like NetSuite) and automatically creates corresponding records in Salesforce.
Required Editions
| View supported editions. |
| This feature requires the MuleSoft for Flow: Integration add-on. Exceptions are segment-triggered flows, activation-triggered flows, and broadcast flows, which don't require the MuleSoft for Flow: Integration add-on. Professional Edition requires the API access add-on. To purchase an add-on, contact your Salesforce account executive. |
| MuleSoft for Flow: Integration features used with Agentforce require the Foundations or Agentforce 1 edition. To purchase these editions, contact your Salesforce account executive. |
Note You can edit or delete connections only in the Automation
app.
Create an External System Change-Triggered Flow
- In the Automation app, select the Flows tab, and then click New.
-
Click Triggered Automations and then click External
System Change-Triggered Flow.
The External System Change-Triggered flow appears in Flow Builder.
Configure the Start Element
- In the Event Library, select NetSuite.
- Select On New Record Trigger.
-
Create a new connection or use an existing connection.
A connection test runs.
Set Input Values for the Trigger and Configure Create Records Element
-
In Set Input Values for the Selected Event:
- In Polling Frequency, select a frequency, for example, 10 minutes.
- In Record Type, select Contact.
-
Configure the Create Records element.
-
Click
and then select Create Records.
-
Edit the generated Label if needed. Flow Builder generates it
based on the element's configuration, and the API Name populates
based on the label.
For example, you might rename the label to Create Lead from NetSuite Contact, which populates the API Name as Create_Lead_from_NetSuite_Contact.
- In Create Records of This Object, in Object, select Lead.
-
Click
-
In Filter Lead Records, set condition values,
- In Condition Requirements, select All Conditions Are Met (AND).
-
Configure the conditions using the following table:
Field Operator Value Company Equals {!$Event.ObjectType.company.id}Last Name Equals {!$Event.ObjectType.lastname}Status Equals New
-
Review how polling failures affect this flow.
ImportantExternal System Change-Triggered flows use a poller to fetch records on the selected schedule.
Polling Behavior and Deactivation
- Retries: When polling fails, the flow tries again up to 3 consecutive times.
- Automatic Deactivation: Happens after the third consecutive poller failure. This behavior applies to poller-level failures (for example, authentication or connectivity), but doesn't apply to individual record-level failures.
- Reactivation: If poller failure deactivates the flow, resolve the underlying issue and reactivate the flow manually.
Poller Limits and Exceptions
- Pre-execution Failures: If the poller fails before execution starts, no fault path is available at the Start element.
- Payload Limits: A poll response that exceeds 128,000 characters (including data and metadata) exceeds the payload limit.
-
Test, debug, save, and activate the flow.
Now, when you create a contact in NetSuite, your flow creates a Lead record in Salesforce.
Did this article solve your issue?
Let us know so we can improve!
