NetSuite Data Targets

Overview

DataBlend Supports the following data targets for creating and modifying records in NetSuite.

  • External Payments

  • Manage Financials

  • Manage inventory

  • Resource Planning

Configuration


Setting

Required/ Optional

Description 

Query

Required

Select the query that will generate the data for this target.
See the relevant target type documentation for additional details on what query columns are required for your target.

Query Mode

Required

Select New unless you have a reason to select Latest or Specific.

Credential

Required

Select a NetSuite Credential from the list.

NetSuite Type

Required

Select the NetSuite collector type from the drop-down menu.

Script URL

Required

The same steps can be followed as in the Create NetSuite RESTlet Script Record guide

Record Type

Required

Select the desired record type from the drop-down menu.

Continue On Error

Optional

Enable or disable the Continue On Error button.

 

The way NetSuite works is that they have records and subrecords. Both files datablendBulkImport.js and subrecord.js are part of a Bulk Import.

Script upload-files.js should be uploaded to NetSuite in order to import any data to NetSuite.

The file subrecord.js is specific to subrecord addresses.

The Script URL is going to be a NetSuite url. It’s the same setup as for export, in the same section where export script was set up. It’s done in the same way as for export, but will be different files.

Create NetSuite RESTlet Script Record

New URL will be generated once the script is deployed in NetSuite. Each script upload-files.js and subrecord.js will have their own urls and so with be added to their own Data Targets.

For record types like “customer” or “vendors”, where “address” is a subrecord, two queries and two data targets required.

Data Target with upload-file.js script url and Record Type “customer” will update everything on the customer record except for addresses. We create a separate query and Data Target for addresses only.

Required fields for Address Book query:

The only other thing we also need is CUSTOMER ID to identify the customer.

“attention” and “addressee” are usually the same value fields. To avoid duplicates in NetSuite UI set “attention” to Null Literal.

With address sent to “customer” we can do billing (from client’s source), we can do shipping. We can not do both. Below is a screenshot from subrecord module.

Advanced

History Retention

History Retention (Days) allows users to decide how long they want the information from their data targets to be stored. This field is optional.

Timeout (seconds)

The Timeout section allows users to determine if they would like to timeout collections taking longer than a set number of seconds to collect data.

Skip If No Records Found

The “Skip if No Records Found” button is used to eliminate sending information to Data Targets unnecessarily. Simply enable the “Skip if No Records Found” toggle. The use of this toggle is optional.

Agent

The Agent drop-down for users to select any agent they have established. This is optional.

Run As

Run As allows users to select from a drop-down list of users to run the Workflow. This is optional. Please note that Run As is only available to Admin users. If a user is set as the Run As and then demoted to a Member, the user which demoted the Run As user will instead be set as the Run As.

Journal Entries Data Target

Minimum required fields to create a Journal Entry in NetSuite:

Field Name

Format

Notes 

trandate

MM/DD/YYYY

Should match to settings in NetSuite

subsidiary

Integer

Subsidiary ID that is in NetSuite

memo

String Literal

Header level memo

line

JSON string

Sample:

[{"account":244, "debit":500.00, "credit":0.00, "memo":"Test Line 03/14/2023", "department":125, "class":8}]

 To create JSON string from multiple records use array_agg function