NetSuite Data Targets - Bulk Import
Contents
Create RESTlet Script Records in NetSuite
Create DataBlend Bulk Import Data Target
Create RESTlet Script Records in NetSuite
1. Log into NetSuite to create a new script from the Customization menu > Scripting > Scripts > New.

2. If you have not added the following scripts before, hover your mouse over the SCRIPT FILE box to click the ‘+ Add’ button. Note: map-reduce.js has slightly different instructions.
Subrecord.js
Map-reduce-wrapper.js
Status-results.js
Bulk-import.js

If you have uploaded the scripts before, compare the potentially outdated scripts in NetSuite versus the latest script version in NetSuite Data Targets by clicking on the double down arrows > click List and in the “Type & tab…” textbox, search for a key word, such as “map” or “status”. Click on a script and hover your mouse over the SCRIPT FILE box to click Open. Under “MEDIA ITEM” on the newly opened tab, click the preview link and optionally use a text file comparison tool. If the script is outdated, click add a new script file.

3. Download the DataBlend RESTlet scripts from the table in NetSuite Data Targets.
4. Enter a file name with the date for versioning control, select the script file downloaded, and Save the record. Important! File name should have .js at the end of the name.

5. Select the created script and click Create Script Record.

6. Enter a name for the script and note the API version. Click on the down arrow next to Save to click the Save and Deploy button. Important! File name should have .js at the end of the name.

7. Set the deployment STATUS to Released, LOG LEVEL to Error, ensure DEPLOYED is checked, set the security access as appropriate, and Save to deploy the script.


8. Navigate back to Customization > Scripting > Scripts > New to repeat the steps for creating the other scripts: subrecord.js, map-reduce-wrapper.js, status-results.js, and bulk-import.js until all are in NetSuite.
Reminder: deactivate outdated scripts.
Create DataBlend Bulk Import Data Target
1. In DataBlend, create a Data Target with the Bulk Import object type and a selected Record Type. Refer to netsuite.com/help/helpcenter/en_US/srbrowser/Browser2022_2/script/record/account.html for required Query fields (click on the alphabetical buttons, such as C for the Customer fields).
2. In NetSuite, copy the EXTERNAL URL from the bulk-import script and paste into DataBlend’s Script URL. If “Use Map/Reduce Script” is toggled on, the Status URL field becomes required. In NetSuite, search to open the “SuiteScripts” page and click edit on the map-reduce script to copy the URL and paste into DataBlend.
3. Choose a Batch Size, Save and Run Data Target.
