NetSuite Connector Reference
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.
MuleSoft provides a bundle that contains a role with the permissions required for integrating Composer with NetSuite. To install the bundle, follow these steps:
-
Go to Customization > SuiteBundler > Search & Install Bundles.
-
Type
462515
in the keyword search. -
Click on MuleSoft Composer and review the Components tab.
-
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:
-
Assign the newly created MuleSoft Composer role to the desired user:
-
Go to Setup > Users/Roles > Manage Users.
-
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.
-
-
Create an integration:
-
Go to Setup > Integration > Manage Integration > New.
-
Enter a name and appropriate concurrency for the integration. You can start low and use 1-2 units lower than the maximum concurrency allowed.
-
Select the Token-Based Authentication box.
-
-
Generate access tokens:
-
Go to Setup > Users/Roles > User Management > Access Tokens.
-
Set the application to the integration created in the previous step.
-
Assign the user and click Save.
-
-
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
.
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. 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.
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:
-
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 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:
Record Type | Trigger | Action |
---|---|---|
BILLING_SCHEDULE |
X |
|
CASH_SALE |
X |
X |
CASH_REFUND |
X |
X |
CLASSIFICATION |
X |
|
CONTACT |
X |
X |
CREDIT_MEMO |
X |
X |
CURRENCY |
X |
|
CURRENCY_RATE |
X |
|
CUSTOMER |
X |
X |
CUSTOMER_DEPOSIT |
X |
X |
CUSTOMER_PAYMENT |
X |
X |
CUSTOMER_REFUND |
X |
X |
CUSTOM_RECORD_TYPES |
X |
X |
DEPARTMENT |
X |
|
ESTIMATE |
X |
X |
EMPLOYEE |
X |
X |
GIFT_CERTIFICATE_ITEM |
X |
X |
INVENTORY_ADJUSTMENT |
X |
X |
INVENTORY_ITEM |
X |
X |
INVOICE |
X |
X |
ITEM_FULFILLMENT |
X |
X |
ITEM_GROUP |
X |
X |
ITEM_RECEIPT |
X |
X |
JOURNAL_ENTRY |
X |
X |
KIT_ITEM |
X |
X |
LEAD |
X |
X |
LOCATION |
X |
|
LOT_NUMBERED_ASSEMBLY_ITEM |
X |
X |
LOT_NUMBERED_INVENTORY_ITEM |
X |
X |
NON_INVENTORY_PURCHASE_ITEM |
X |
X |
NON_INVENTORY_RESALE_ITEM |
X |
X |
NON_INVENTORY_SALE_ITEM |
X |
X |
OPPORTUNITY |
X |
X |
OTHER_CHARGE_PURCHASE_ITEM |
X |
X |
OTHER_CHARGE_RESALE_ITEM |
X |
X |
OTHER_CHARGE_SALE_ITEM |
X |
X |
PARTNER |
X |
X |
PAYMENT_ITEM |
X |
X |
PRICE_LEVEL |
X |
|
PROSPECT |
X |
X |
PURCHASE_ORDER |
X |
X |
RETURN_AUTHORIZATION |
X |
X |
SALES_ORDER |
X |
X |
SERIALIZED_ASSEMBLY_ITEM |
X |
X |
SERIALIZED_INVENTORY_ITEM |
X |
X |
SERVICE_PURCHASE_ITEM |
X |
X |
SERVICE_RESALE_ITEM |
X |
X |
SERVICE_SALE_ITEM |
X |
X |
SUBSIDIARY |
X |
|
SUPPORT_CASE |
X |
X |
TIME_BILL |
X |
X |
TIME_SHEET |
X |
X |
TRANSFER_ORDER |
X |
X |
VENDOR |
X |
X |
VENDOR_BILL |
X |
X |
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 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