You are here:
Use Records to Trigger Actions in External Systems Example
This example creates a flow that uses a third-party connector to take action in an external system, such as creating a sales order in NetSuite after an order is created or updated in Salesforce.
Required Editions
| View supported editions. |
| This feature requires the MuleSoft for Flow: Integration add-on. Professional Edition requires the API access add-on. To purchase, 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 a Flow
- In the Automation app, go to the Flows tab and then click New.
- Select Record-Triggered Flow.
Configure the Start Element
- In Object, select Order.
- In Configure Trigger, select A record is created or updated.
- In Set Entry Conditions, in Condition Requirements, select Custom Condition Logic is Met.
- In Condition Logic, make sure that the value is 1 AND 2.
-
In the fields, enter:
Field Operator Value Status Equals Draft Order Type Is Changed True - In When to Run the Flow for Updated Records, select Only when a record is updated to meet the condition requirements.
- In Optimize the Flow for, select Actions and Records. Then, enable the Add Asynchronous Path option. The user updating the record must have the Manage Integration Connections permission.
Add a Get Records Element
Add a Get Records element to return a list of products.
-
Under Run Asynchronously, click
and then select Get Records.
- In the Label field, enter Get Order Products. The API Name field populates automatically.
-
Configure the input values for the Get Records element:
Field Value Object Order Product Condition Requirements All Conditions Are Met (AND) Field Order ID Operator Equals Value Triggering Order > Order ID Sort Order Not Sorted How Many Records to Store All records How to Store Record Data Automatically store all fields
Configure the Action
-
Under Get Records, click
and then select Action.
- In the Search Actions panel, select Connectors. Select NetSuite, and then select Create Record.
- Fill out the required fields for that action.
-
Create a new connection or use an existing connection.
A connection test runs.
Set Input Values for the Selected Action
- In Set Input Values for the Selected Action, in Record Type, select Sales Order.
- In Set Input Values for the Selected Action, in Body, click Select Fields and select these fields:
- Click Done.
-
Set the values.
Field Value startDate Triggering Order > Order Start Date addr1 Triggering Order > Billing Address city Triggering Order > Billing City state Triggering Order > Billing State/Province externalID Triggering Order > Account ID
Map NetSuite Fields to Salesforce Fields
- Switch to Transform View.
-
In Source Data, click
. In the Resource box, select Order Products from
the Get_Order_Products Order Item.
-
Map the fields from Get Order Products.
Source Data Target Data UnitPrice amount Description description Quantity quantity
TipTo make sure that the flow continues after a brief pause, add a Wait for Amount of Time element to your flow after a Create, Update, or Delete action. By selecting 1 Minute in the Amount of Time field, you make sure that the system processes changes before the third-party action proceeds.
-
Test, debug, save, and activate your
flow.
Now, when you create or update an Order in Salesforce, your flow creates a Sales Order in NetSuite.
Did this article solve your issue?
Let us know so we can improve!

