How to import serial numbers onto a purchase order from a CSV in NetSuite

Fill the Inventory Detail of a purchase order's serialized lines from a supplier's CSV file with the Import Assistant: map the order, item and serial fields, group each line with Surrogate Subrecord ID, then check the popup.

The quick answer

Build a CSV with one row per serial number: the purchase order's internal ID, the item's internal ID, the location, the line quantity, an Inventory Detail quantity of 1, the serial number, and a group identifier that is the same for every serial number on one line. Go to Setup > Import/Export > Import CSV Records, choose Transactions and Purchase Order, set Data Handling to Update, and map the columns. Map the item by Internal ID, the serial number to Receipt Inventory Number and the group identifier to Surrogate Subrecord ID under Purchase Order - Items - Inventory Detail. Run it, open Job Status, then open the Inventory Detail on each line to see the serial numbers.

The screenshots show sample data. Person and operating-company names are fictional. Use your own purchase order, item IDs and serial numbers when you follow the steps.

Before you start

You need a role that can import CSV records and edit purchase orders, with serialized inventory set up and the items configured as serialized items. The purchase order has to exist before the import and be editable: not closed, fully received or locked by an approval. The form you use needs to show the fields you map, and workflows, scripts or custom forms can change what the import allows. The import fills in the Inventory Detail of the order's lines. It doesn't receive anything, create an item receipt or change quantity on hand. The serial numbers become inventory when you receive the order.

Suppliers often send a long list of serial numbers with a shipment. Loading it onto the order means the warehouse can receive the shipment against known serial numbers and scan them one by one later.

In this example, PO3041 for Harbor Line Components is Pending Receipt. It has two lines, SENSOR-A and CTRL-B, 50 of each. The supplier's list holds 50 serial numbers per item, one for each unit on the line. The purchase order's internal ID is 48217, SENSOR-A's is 6104 and CTRL-B's is 6105. You find an internal ID in the id value in the record's address bar.

01. Check the purchase order

Open the purchase order and click the Items subtab. Both lines have a quantity of 50, and the Inventory Detail column is empty.

PO3041 has two serialized lines and no serial numbers yet.

02. Build the file

Make a CSV with a header row and one row per serial number. The columns here are:

  • Internal ID, the purchase order's id, on every row.
  • Item Internal ID, the item's id.
  • Location, the location name.
  • Quantity, the line quantity, 50.
  • Inventory Detail Line Quantity, 1 for a serialized item, because each serial number is one unit.
  • Serial/Lot Number, the serial number.
  • Inventory Detail Group Identifier, one value per line. Here it's 1 for SENSOR-A's rows and 2 for CTRL-B's.
One row per serial number. Every row of the first line repeats group identifier 1.

The group identifier is the column to get right. It tells NetSuite which serial numbers belong together on one line. It can be any value, as long as it's the same for every serial number on a line and different for the next line. If you import several orders in one file, make the values different across the whole file, for example by including the order and line. A missing or repeated value can leave serial numbers ungrouped or attached to the wrong line, so try the first file on one order. A line of 50 units needs 50 rows, one per unit.

03. Choose the record type and the file

Go to Setup > Import/Export > Import CSV Records. Set Import Type to Transactions and Record Type to Purchase Order, then choose the file and click Next.

Transactions, Purchase Order, and the file.

04. Choose Update

On Import Options, set Data Handling to Update. The purchase order already exists, and Add would try to create new orders. Leave Advanced Options as they are and click Next.

Data Handling is Update.

05. Check the order and location mapping

On Field Mapping, NetSuite has already paired Internal ID with Purchase Order : Internal ID and Location with Purchase Order : Location. The other five columns are still unmapped.

NetSuite matches Internal ID and Location by name.

06. Map the item by Internal ID

Open Purchase Order - Items in NetSuite Fields and map Item Internal ID to Item. The column holds ids, not names, so click the pencil on that row and set Choose Reference Type to Internal ID. Click OK.

Item Internal ID holds ids, so the reference type is Internal ID.

07. Map the quantity, serial number and group

Map Quantity to Purchase Order - Items : Quantity. Then open Purchase Order - Items - Inventory Detail and map three columns:

  • Inventory Detail Line Quantity to Quantity.
  • Serial/Lot Number to Receipt Inventory Number.
  • Inventory Detail Group Identifier to Surrogate Subrecord ID.

Click Next.

All seven columns are mapped.

08. Save and run the import

Enter an Import Map Name so you can reuse the mapping, then click Save & Run. The next time you have a purchase order to load, keep the map, put its internal IDs and serial numbers in a new file, and import it.

Name the map so the next order can reuse it.

Click Import Job Status. The job for the purchase order shows Complete at 100.0% with the message "1 of 1 records imported successfully". That counts purchase orders, not serial numbers. Check the job's CSV Response if a count is lower than you expect.

One purchase order was updated.

09. Check the purchase order

Job Status says the import ran. The purchase order shows what it did. Open PO3041 again. It's still Pending Receipt, and each line now has an Inventory Detail icon.

Both lines now have an Inventory Detail icon.

Click the icon on SENSOR-A. The popup lists the 50 serial numbers, SN-A-0001 onward, each with a quantity of 1.

SENSOR-A's serial numbers start at SN-A-0001.

Open the CTRL-B icon. It lists SN-B-0001 to SN-B-0050.

CTRL-B's list ends at SN-B-0050.

Common questions

Why Update and not Add?

Because the purchase order already exists. Update finds the order by its internal ID and fills in its lines. Add creates new records, so it would try to create purchase orders instead.

What is the Inventory Detail Group Identifier for?

It ties serial numbers to a line. NetSuite maps it to Surrogate Subrecord ID under Purchase Order - Items - Inventory Detail. Use one value per line, such as 1 for the first line and 2 for the second. The values only have to be the same within a line and different between lines.

Why is Inventory Detail Line Quantity 1?

A serialized item represents individual units, so each serial number is one unit with a quantity of 1. The serial numbers on a line should add up to the line quantity. If the order uses a unit of measure other than the item's base unit, work out the serial count in base units.

Does this receive the items?

No. The import updates the purchase order's Inventory Detail. It doesn't create an item receipt, post a receipt or raise quantity on hand. You receive the order as usual. Check the item receipt to confirm the serial numbers came through, because that depends on how you receive.

Can I do the same on a sales order?

The mapping is similar, with one change: you map the serial number to Issue Inventory Number, which refers to serial numbers that already exist, instead of Receipt Inventory Number. Many accounts assign serial numbers when they fulfill the order rather than on the sales order, so try it on one order first.

What if the same item is on two lines of the order?

Map the line's id, Line Id in Purchase Order - Items, so NetSuite can tell the lines apart. Give each line its own group identifier too. The line id says which line a row belongs to. The group identifier says which serial numbers go together on it.

Can I load fewer serial numbers than the line quantity?

Don't use the purchase order for a partial delivery. Put every serial number for the line on the order, and record a partial shipment by receiving only the delivered quantity on the item receipt.