A line item in NetSuite can be thought of as a record having 1:N relationships with other records. It is like a sublist, or a list of lines within a record. For example, a Sales Order has a one-to-many relationship with Items.
You can access line items using the sublist name. In import mapping , each sublist is populated in the format Sublist Name : Field Name
, such as Items : Department
.
Select the line item to map the source data to this field:
Pro Tip: You can use line-level lookups as well to find data related to that specific line.
To find an existing line in NetSuite, it helps to understand the logic that integrator.io uses to decide whether the line needs to be created or updated:
-
Search for key fields to find an existing line. For example, if you have a Sales Order, integrator.io tries to use the Item as a key field and find a line with the matching item value.
-
If that Item cannot be found in the existing record, integrator.io will create a line.
-
If a matching line item exists, integrator.io will update this line with the information that you provide.
In some cases, you might already have the line identifier (Line ID in NetSuite), which is unique for each line. Then, when mapping the Line ID for a sublist, integrator.io will use the Line ID to try to find and update that line; if no matching Line ID is found, one is created.
You can also instruct integrator.io to use a custom or standard field to find an existing line.
Let’s say that you have a custom field called eTail order Line ID, which is unique for all the lines in that record. You can use this field to find a matching line with the field value:
-
For the mapping to eTail order Line ID , click the Settings (
) button.
-
In the resulting Settings pane, check Use as a key field to find existing lines.
-
Click Save.
When the key field option is enabled, integrator.io tries to match the field value from the source data against the field value in NetSuite lines. If it finds a match, that line will be updated; otherwise, a new line will be inserted.
In some cases, the source data may contain the complete order instead of just the delta changes. In others, some lines might be removed from the source system that are still in your NetSuite line items. Nonetheless, you might want to remove all the existing lines and add all the lines from your source data into NetSuite.
To enable this setting, add a new import field mapping for Items : Replace All Lines , and hard-code the value to True. Each sublist on the parent record should have a similarly named mapping option available.
Note
If an item already exists on the record in NetSuite, integrator.io only updates the record. If the item doesn't exist, integrator.io replaces all lines and adds new items. To replace all lines every time, use an alternate identifier that is certain not to already have existing lines. Check the Use as key to find existing lines checkbox on the import field that you want to use as the identifier..