---
schema_version: "1"
id: dbf5a882b0dfc97e4cec306218fa83d9504654b038ad65de506817280a92cb11
title: Use Records to Trigger Actions in External Systems Example
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/automate_flow_build_esct_example_create_as_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_flow_build_esct_example_create_as_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a42c73613fcd68ead0cd5ff3aeddfbfbf9a846e3360f3fb6a3c39e23b6845bde
description: 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.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">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. <strong>Professional</strong> Edition requires the API access add-on. To purchase an add-on, contact your Salesforce account executive.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">MuleSoft for Flow: Integration features used with Agentforce require the Foundations or Agentforce 1 edition. To purchase these editions, contact your Salesforce account executive.</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note You can edit or delete connections only in the Automation app.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d115350e79">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">To create, view, edit, and delete MuleSoft for Flow: Integration
              connections:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">Manage Integration Connections</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">To open, edit, create, activate or deactivate a flow using all flow types,
              elements, and features available in Flow Builder, including Einstein and Agentforce
              for Flow:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">To create and edit External System Change-Triggered flows in the Automation
              app, regardless of sharing settings:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">
              <p>Manage Flow</p>
              <p>OR</p>
              <p>Create or Edit Flows</p>
              <p>AND</p><a name="automate_flow_build_esct_example_create_as_action__d3451e299"><!-- --></a>
              <ul id="automate_flow_build_esct_example_create_as_action__d3451e299">
                <li>View Flows </li>

                <li>View All Non-Admin Flows </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">To create and edit External System Change-Triggered flows owned by or shared
              with you with Read/Write access in the Automation app:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">
              <p>Create or Edit Flows</p>
              <p>AND</p>
              <p style="margin-bottom:0;">View Flows</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">To use MuleSoft for Flow: Integration templates:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">
              <p>Create or Edit Flows</p>
              <p>OR</p>
              <p style="margin-bottom:0;">View Flows</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">To use MuleSoft for Flow: Integration templates as a non-System Admin:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d115350e79 ">App Framework Manage Template</td>

          </tr>
        </tbody>
      </table>

## Create a Flow

1. In the Automation app, go to the **Flows** tab and then click **New**.
2. Select **Record-Triggered Flow**.

## Configure the Start Element

1. In Object, select **Order**.
2. In Configure Trigger, select **A record is created or updated**.
3. In Set Entry Conditions, in Condition Requirements, select **Custom Condition Logic is Met**.
4. In Condition Logic, make sure that the value is **1 AND 2**.
5. In the fields, enter:
    
      
    | Field | Operator | Value |
    | --- | --- | --- |
    | Status | Equals | Draft |
    | Order Type | Is Changed | True |
6. In When to Run the Flow for Updated Records, select **Only when a record is updated to meet the condition requirements**.
7. In Optimize the Flow for, select **Actions and Records**. Then, enable the [**Add Asynchronous Path**](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_trigger_scheduled_path.htm&release=264.0.0&type=5 "Use scheduled paths in record-triggered flows to run some elements on a different path at a scheduled time. You can base the scheduled time on the record-triggering event or on a date or date/time field in the record.") option. Updating the record requires the user to have the Manage Integration Connections permission.

## Add a Get Records Element

Add a **Get Records** element to return a list of products.

1. Under Run Asynchronously, click ![Add element](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/resources-global/_corporate/images/flow_plus_icon.png) and then select **Get Records**.
2. In the Label field, enter Get Order Products. The API Name field populates automatically.
3. 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

1. Under Get Records, click ![Add element](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/resources-global/_corporate/images/flow_plus_icon.png) and then select **Action.**
2. In the Search Actions panel, select **Connectors**. Select **NetSuite**, and then select **Create Record**.
3. Fill out the required fields for that action.
4. [Create a new connection](https://help.salesforce.com/s/articleView?id=platform.automate_ala_connections_create_connection.htm&release=264.0.0&type=5 "Create a connection to an external system in the Automation app.") or use an existing connection.
    
    A connection test runs.

## Set Input Values for the Selected Action

1. In Set Input Values for the Selected Action, in Record Type, select **Sales Order**.
2. In Set Input Values for the Selected Action, in Body, click **Select Fields** and select these fields:
    
    - **startDate**
    - **billingAddress** > **addr1**
    - **billingAddress** > **city**
    - **billingAddress** > **state**
    - **entity** > **externalId**
3. Click **Done**.
4. 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

1. [Switch to **Transform View**](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_transform.htm&release=264.0.0&type=5 "Automate how you transform data between Salesforce and an external system using the Transform element. You can create mappings between the source and target data, or set fixed values for the target data.").
2. In Source Data, click ![Add element](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/resources-global/_corporate/images/flow_plus_icon.png). In the **Resource** box, select **Order Products from the Get\_Order\_Products Order Item**.
3. Map the fields from Get Order Products.
    
    | Source Data | Target Data |
    | --- | --- |
    | UnitPrice | amount |
    | Description | description |
    | Quantity | quantity |
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_tip.png)
    
    Tip
    
    To make sure that the flow continues after a brief pause, add a [Wait for Amount of Time](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_wait_for_amount_of_time.htm&type=5&language=en_US) 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.
4. [Test](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_testing.htm&release=264.0.0&type=5 "Test your flow before activation to catch errors, verify every path, and prevent data issues. Depending on the flow type, use Test Mode or the Flow Builder debugger to test different scenarios with sample data."), [debug](https://help.salesforce.com/s/articleView?id=platform.flow_test_debug.htm&release=264.0.0&type=5 "For flows that don't use Test Mode, use the Debug option to test or troubleshoot the flow. Review step-by-step details of how the flow runs and the path it takes."), save, and [activate](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_activate.htm&release=264.0.0&type=5 "You can activate or deactivate a flow from the Automation app Flows tab or the Flow Builder canvas.") your flow.
    
    Now, when you create or update an Order in Salesforce, your flow creates a Sales Order in NetSuite.

#### See Also

- [Automated Flow Testing](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_record_data_cloud_triggered.htm&release=264.0.0&type=5 "Understand assertions, flow versions, and test data before you set up an automated test scenario through Test Mode (beta) or for a Data Cloud-triggered flow.")
- [Test or Troubleshoot Flows with the Flow Builder Debugger](https://help.salesforce.com/s/articleView?id=platform.flow_test_debug.htm&release=264.0.0&type=5 "For flows that don't use Test Mode, use the Debug option to test or troubleshoot the flow. Review step-by-step details of how the flow runs and the path it takes.")
- [Activate or Deactivate a Flow](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_activate.htm&release=264.0.0&type=5 "You can activate or deactivate a flow from the Automation app Flows tab or the Flow Builder canvas.")