Import Format and Mapping Considerations

In a single-file import format, where you import both body and sublist data in one file, and the sublist data consists of multiple lines for each sublist item, you must provide a mapping to identify the record the sublist belongs to. This is necessary because the record ranges over more than one line of the import file.

Even though the external ID is not a required field on the Field Mapping page of the import assistant for transaction imports, you must include it to uniquely identify the record when you use the single-file import format and you are importing new data. The unique ID must be included in every line of the CSV file. If you attempt to import a file without specifying a unique identifier, you will receive the following error:

"You must map one of the following NetSuite fields to a column in your CSV file, to be a unique identifier: External ID, Internal ID, or a transaction number field, such as Order # or Invoice #"

If you import new data, the transaction ID is not yet available, and the Internal ID is created during import. The only unique identifier in this case is the External ID, and you must include it in each row of the file. When you update existing data, you can use internal IDs for the same purpose.

When you import new data, each record must be created with all the required data during an import, and the import file must contain values for the required body and sublist fields. When you update existing records, you can update the values of body fields and sublists separately.

Handling Gaps in Sublist Data

If you import file contains multiple lines of data for sublists, some lines of the sublist data may be empty. If you have empty lines in your sublist data, you must structure your import file in a way that the sublist data is at the beginning of your sublist data lines for each record. Additionally, the sublist data for each record must be consecutive.

In the following example, the data for one or more sublists is missing from the first line of sublist data. This leads to problems during the import.

CSV file where data for sublists is missing from the first line.

In the following example, the sublist data contains empty lines in the last position in the record, and the import works.

CSV file with empty sublist lines.
Handling Multiple Values for Body Fields

If your file contains multiple lines of data for sublists, the body field values are only considered for the first line.

In the following example, the Date body field has three different values for the record CP-001, and two values for the record CP-002. In this case, only the first date value is imported, and the other two values will be skipped. The example in the Import File with Sublist Data for a Multiline Sublist section shows how to structure this import file correctly.

External ID

Customer

Date

Invoice ID

Payment Amount

CP-001

John Woodhouse

4/25/2017

INV-004

10000

CP-001

 

5/3/2017

INV-115

5800

CP-001

 

4/28/2017

INV-229

6200

CP-002

Tim Johnson

4/29/2017

INV-532

5600

CP-002

 

5/2/2017

INV-938

9800

Related Topics

General Notices