---
schema_version: "1"
id: 2079a6ddc07a2397424636ecb13c52bf63020d327c59834777297a944be86f34
title: NetSuite Connector Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/composer-salesforce/ms_composer_netsuite_reference.md
canonical_url: https://docs.mulesoft.com/composer-salesforce/ms_composer_netsuite_reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8ff77ca32bc1c049aedd70971a196bd73ffa9168b959f505a8db3114fd19832d
description: MuleSoft Documentation Site
latest: true
---
---
product: Composer for Salesforce
---

# NetSuite Connector Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Whether you are using NetSuite as a data source (take a new NetSuite contact and copy it to
Salesforce, for example) or a data target (when a Salesforce opportunity closes, create a NetSuite
sales order), the details of how to work with data in a flow are specific to the data source or data
target.

## Connection Details

When connecting to NetSuite via MuleSoft Composer, in NetSuite:

- Ensure that token-based authentication is enabled by navigating to **Setup** > **Integration
  Management** > **Manage Integration** > **Authentication**.

- Ensure that the role used in the integration is not using two-factor authentication by navigating
  to **Setup** > **User/Roles** > **Two-Factor Authentication Roles**.

Composer supports NetSuite instances of 2020.2 and later.

To connect to a system, whether it is a source of data or the target where you are sending data, you
must create a connection with that system’s required credentials. You typically connect to different
systems within a flow and can reuse each connection every time you need to connect.

This system requires the following credential information for its connections:

Connection Name

Enter a connection name that will help you remember the details of this connection. You can reuse
connections multiple times in a single flow, and in more than one flow, and the credentials are
hidden after you create the connection. Therefore, it’s helpful to provide a name that easily
identifies this connection from others.

Only you can see the connection. Other users in your Composer app must create their own connections.

You must connect to NetSuite as a regular user (WSU), not a concurrent user (cWSU).

Connection Display Name

The connection display name is a unique name that you choose to identify the connection.

Account

The account ID as listed in your NetSuite instance by accessing **Setup > Integration > SOAP Web
Services Preferences**. The value is a string of letters and numbers, for example: `TESTME1234567`.

Consumer Key

The consumer key generated in NetSuite by accessing **Setup > Integration > Manage Integrations**

Consumer Secret

The consumer secret generated in NetSuite along with the consumer key

Token ID

The token ID generated in NetSuite

Token Secret

The token secret generated with the token ID in NetSuite

SOAP Port

The value can’t be edited at this time.

### Establish a NetSuite Connection

To use MuleSoft Composer to establish a NetSuite connection, you must have an account in Salesforce
to store the internal ID of the associated customer in NetSuite. You must ensure that a custom
field, **NetSuite ID**, has been created for the Account object in the organization.

### Set NetSuite Permissions

Access to NetSuite data and to the NetSuite user interface is based on users, roles, and
permissions.

For more information about users, roles, and permissions, see the
[NetSuite documentation](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_N284861.html).

MuleSoft provides a bundle that contains a role with the permissions required for integrating
Composer with NetSuite. To install the bundle, follow these steps:

1.  Go to **Customization > SuiteBundler > Search & Install Bundles**.

2.  Type `462515` in the keyword search.

3.  Click on **MuleSoft Composer** and review the **Components** tab.

4.  Click **Install** and then **Install Bundle**. The installation takes a few minutes.

After installing the bundle, generate credentials to configure the connection to Composer. Store the
credentials securely since the credentials are visible only once for security purposes. If you need
additional information, contact your NetSuite administrator.

To generate credentials in the form of tokens, follow these steps:

1.  Assign the newly created **MuleSoft Composer** role to the desired user:

    1.  Go to **Setup > Users/Roles > Manage Users**.

    2.  Click on the user who will host the integration. You can use a generic account such as
        `it@company.com` that doesn’t need its own license.

2.  Create an integration:

    1.  Go to **Setup > Integration > Manage Integration > New**.

    2.  Enter a name and appropriate concurrency for the integration. You can start low and use 1-2
        units lower than the maximum concurrency allowed.

    3.  Select the **Token-Based Authentication** box.

3.  Generate access tokens:

    1.  Go to **Setup > Users/Roles > User Management > Access Tokens**.

    2.  Set the application to the integration created in the previous step.

    3.  Assign the user and click **Save**.

4.  Identify the NetSuite account ID by going to **Setup > Company > Company Information**.

### Run Server SuiteScript to Trigger Workflows

If your NetSuite configuration preferences are set to run server SuiteScript and trigger workflows,
the following criteria are required:

- The **Audience** field must have all roles selected.

- The **Execute As Role** field must be set to `Administrator`.

- The **Log Level** field must be set to `Debug`.

### Null Values

By default, Composer ignores fields with empty (_null_) values. To change this behavior to clear the
existing value of the field when the field value is null, on the card, click the gear, and then
select `Clear on Null Values`.

## Triggers

Each flow starts with either a _scheduler_ or a _trigger_. Schedulers are set to a default frequency
of 15 minutes. Triggers, such as "each time a new record is created", are defined by you and provide
multiple options related to the data in your system.

Triggers use a polling process to actively check for new updates from an external system. The
polling frequency is 15 seconds.

This system provides the following trigger options:

On Updated Records

A record is created or an existing record is updated.

On New Records

A new record is created in NetSuite.

### Polling Frequency

For triggers in this connector, the **Polling Frequency** field is required. This field enables you
to select how often Composer makes a request to the underling system API to look for changes to
records in active flows. You can select a different polling frequency for each flow in your
organization. With a shorter frequency, the flow executes more often; however, a shorter frequency
consumes more [API calls](https://docs.mulesoft.com/general/automation-credits-usage-and-rates). For example, if you have
an order management flow, you might require nearly real-time updates, which can be achieved with a
15-second polling interval (which equates to 5760 API calls per day). In contrast, if your flow
updates a pricing catalog, you could poll the flow every hour (which equates to 24 API calls per
day).

## Actions

After you connect to a system and define the trigger or configure a scheduler, you define the
actions that the flow performs. For example, you can copy a record between different systems, such
as Workday and Salesforce. The actions you can perform depend on which system you are connected to.

Note that Composer does not store the user’s local timezone; therefore, when a value is entered in a
`DateTime` field, Composer assumes that the `DateTime` value entered is in UTC format. A time zone
must include either the symbol `+` in the time value or the symbol `-` in the date value. For
example, 12:30 p.m. on June 1, 2019, in the Macau time zone is represented as
`2019-06-01T12:30:00+08:00`. Additionally, if the date is _not_ entered in UTC, Composer will
automatically convert the date to UTC format which may or may not be accurate for the user’s local
time zone which could affect the resulting logic. For more information, see the
[Netsuite Documentation](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1521451348.html#bridgehead_4725944921).

This system provides the following actions:

Update Record

A record is changed.

Create Record

A record is created.

Upsert Record

A record is created or updated.

Delete Record

A record is deleted

Get Records

Returns a list of up to 500 records based on specified search criteria:

![Get Records example action configuration for NetSuite Connector](/mulesoft/current/en-us/composer-salesforce/_images/images/get-records-netsuite.png)

- You can choose which fields the action fetches in the **Result fields** section.

- You can add one or more conditions to specify which types of records should be returned in the
  **Criteria** section. For example, you could specify that the last name begin with "B."

- You can select **All records** in the **How Many Records to Retrieve** section to retrieve a list
  of records that match your criteria. The **All records** option is selected by default. If you
  want to access a single record from the list, you must add a
  [For Each loop](https://docs.mulesoft.com/composer-salesforce/ms_composer_flows#create-and-test-a-for-each-loop) to your flow.

- If you have filtered your search with a unique identifier, you can select **Only the first
  record** in the **How Many Records to Retrieve** section to return a single record. Returning a
  single record will change the output of the search from a _list_ to a _single_ record. The **Get
  records** action searches for all records and returns only the first record in the list.  
  If you previously selected **All records** and then changed your selection to **Only the first
  record**, data pills in your existing flow could be invalidated.

## Record Types

The following record types are supported:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Record Type</th><th>Trigger</th><th>Action</th></tr></thead><tbody><tr><td><p>BILLING_SCHEDULE</p></td><td></td><td><p>X</p></td></tr><tr><td><p>CASH_SALE</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CASH_REFUND</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CLASSIFICATION</p></td><td></td><td><p>X</p></td></tr><tr><td><p>CONTACT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CREDIT_MEMO</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CURRENCY</p></td><td></td><td><p>X</p></td></tr><tr><td><p>CURRENCY_RATE</p></td><td></td><td><p>X</p></td></tr><tr><td><p>CUSTOMER</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CUSTOMER_DEPOSIT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CUSTOMER_PAYMENT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CUSTOMER_REFUND</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>CUSTOM_RECORD_TYPES</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>DEPARTMENT</p></td><td></td><td><p>X</p></td></tr><tr><td><p>ESTIMATE</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>EMPLOYEE</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>GIFT_CERTIFICATE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>INVENTORY_ADJUSTMENT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>INVENTORY_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>INVOICE</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>ITEM_FULFILLMENT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>ITEM_GROUP</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>ITEM_RECEIPT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>JOURNAL_ENTRY</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>KIT_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>LEAD</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>LOCATION</p></td><td></td><td><p>X</p></td></tr><tr><td><p>LOT_NUMBERED_ASSEMBLY_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>LOT_NUMBERED_INVENTORY_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>NON_INVENTORY_PURCHASE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>NON_INVENTORY_RESALE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>NON_INVENTORY_SALE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>OPPORTUNITY</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>OTHER_CHARGE_PURCHASE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>OTHER_CHARGE_RESALE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>OTHER_CHARGE_SALE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>PARTNER</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>PAYMENT_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>PRICE_LEVEL</p></td><td></td><td><p>X</p></td></tr><tr><td><p>PROSPECT</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>PURCHASE_ORDER</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>RETURN_AUTHORIZATION</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SALES_ORDER</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SERIALIZED_ASSEMBLY_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SERIALIZED_INVENTORY_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SERVICE_PURCHASE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SERVICE_RESALE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SERVICE_SALE_ITEM</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>SUBSIDIARY</p></td><td></td><td><p>X</p></td></tr><tr><td><p>SUPPORT_CASE</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>TIME_BILL</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>TIME_SHEET</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>TRANSFER_ORDER</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>VENDOR</p></td><td><p>X</p></td><td><p>X</p></td></tr><tr><td><p>VENDOR_BILL</p></td><td><p>X</p></td><td><p>X</p></td></tr></tbody></table>

> [!NOTE] The CURRENCY and PAYMENT\_ITEM objects are not supported by the GET RECORDS action.
>
> The LEAD and PROSPECT objects are supported only by the GET RECORDS action. The LEAD and PROSPECT
> objects are subtypes of the CUSTOMER object, so to use the LEAD and PROSPECT objects for other
> actions, you can set the object type to CUSTOMER and set the `internalId` of `entityStatus` to the
> corresponding value according to the NetSuite documentation.
>
> The DEPARTMENT, LOCATION, PRICE\_LEVEL, and SUBSIDIARY objects are supported only by the GET
> RECORDS action.

## Custom Fields

Using MuleSoft Composer, you can access custom field values for actions and triggers that you set in
the NetSuite record.

## List Objects

List objects are supported.

The following list objects are supported for the **Get Records** action:

- Department

- Locations

- Price Level

- Subsidiary

## Custom Picklists

You can map values to custom picklists using the value name. Internal IDs are not required to map
values to custom picklists.

## See Also

- [Mulesoft Composer for Salesforce: Overview](https://docs.mulesoft.com/composer-salesforce/ms_composer_overview)

- [MuleSoft Composer for Salesforce: Getting Started](https://docs.mulesoft.com/composer-salesforce/ms_composer_prerequisites)

- [Composer Connector Reference](https://docs.mulesoft.com/composer-salesforce/ms_composer_reference)

- [Knowledge Articles](https://help.salesforce.com/s/)
