---
schema_version: "1"
id: 2138f8eb6d8d7845b9797f9e2e7f27447676f8778cba3b29adaeb1c3d59d5049
title: Create Salesforce Records After an External System Change 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_trigger.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_flow_build_esct_example_create_as_trigger.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1703da5e2401dd880d2960ee0af690ededf57970ee3e187b24e6de3ba1f13189
description: This example creates a flow that listens for new records in an external system (like NetSuite) and automatically creates corresponding records in Salesforce.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# 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

<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="d101633e77">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d101633e77 ">To create, view, edit, and delete MuleSoft for Flow: Integration
              connections:</td>

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

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d101633e77 ">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="d101633e77 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d101633e77 ">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="d101633e77 ">
              <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_trigger__d3278e299"><!-- --></a>
              <ul id="automate_flow_build_esct_example_create_as_trigger__d3278e299">
                <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="d101633e77 ">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="d101633e77 ">
              <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="d101633e77 ">To use MuleSoft for Flow: Integration templates:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d101633e77 ">
              <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="d101633e77 ">To use MuleSoft for Flow: Integration templates as a non-System Admin:</td>

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

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

## Create an External System Change-Triggered Flow

1. In the Automation app, select the **Flows** tab, and then click **New.**
2. 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

1. In the **Event Library**, select [**NetSuite**](https://help.salesforce.com/s/articleView?id=platform.automate_flow_ref_third_party_netsuite.htm&release=264.0.0&type=5 "Connect to an external NetSuite account. Perform tasks like syncing contacts or creating invoices. Use NetSuite as a data source (trigger) or a data target (action).").
2. Select **On New Record Trigger**.
3. [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 Trigger and Configure Create Records Element

1. In Set Input Values for the Selected Event:
    
    1. In **Polling Frequency**, select a frequency, for example, 10 minutes.
    
    1. In **Record Type**, select Contact.
2. Configure the **Create Records** element.
    1. 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 **Create Records**.
    2. 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.
    3. In **Create Records of This Object**, in **Object**, select **Lead**.
3. In **Filter Lead Records**, set condition values,
    1. In **Condition Requirements**, select **All Conditions Are Met (AND)**.
    2. 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` |
4. Review how polling failures affect this flow.
    
    ![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_important.png)
    
    Important
    
    External 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.
5. Test, debug, save, and activate the flow.
    
    Now, when you create a contact in NetSuite, your flow creates a Lead record in Salesforce.

#### 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.")