Skip to content
 Subscribe to our Smart Commerce Newsletter for expert advice on growing your ecommerce business. Sign Up
  • English
  • Deutsch
  • 简体中文

Help Center

How can I upload a spreadsheet of purchase orders?

How Can I Upload a Spreadsheet of Purchase Orders?


Ready to Get Started?

Flexport makes shipping your cargo transparent, reliable, and affordable

If you’re using our Purchase Order Management tool, you may want to upload several POs at once via a CSV. You can do so following these instructions.

1. Download the spreadsheet.

Navigate to the Orders tab. Click the blue Upload CSV button, then download the Flexport order template:

2. Add your POs to the spreadsheet.

There are two versions of CSV template: Detailed and Simple.

The main difference between these two versions is whether or not the header is required. Attributes can be specified at the header or line item level using the optional row_type column. For each row, specify header or line in the row_type column using the below guide.

The Detailed CSV template requires using the row_type column and at least two rows per order are required, one with row_type = header and one with row_type = line.

For the Simple CSV template, you do not need to use the row_type column. The first line for each purchase order will be used to populate all the header attributes and will also be used to specify the data for the first line.

There is a table before step 3 in this document that lists all required and optional attributes.

Detailed CSV Template (With row_type Column):

| po_name | seller_ref | seller_entity_ref | row_type | item_key | line_item_number | status | priority | must_arrive_date | cargo_ready_date | |---|---|---|---|---|---|---|---|---| |PO 5112|Forward_supply|forward_supply_shanghai|header|||open|standard|5/24/21|4/24/21| |PO 5112|Forward_supply|forward_supply_shanghai|line|1|1|||5/24/21|4/24/21| |PO 5112|Forward_supply|forward_supply_shanghai|line|2|2|||5/24/21|4/24/21| |PO 5112|Forward_supply|forward_supply_shanghai|line|3|3|||5/24/21|4/24/21|

Simple CSV Template (Without row_type Column):

Please note you will have to remove the priority column as well if you choose to upload without row_type column. System will take the first PO line and use that as a header.

| po_name | seller_ref |seller_entity_ref | item_key | line_item_number | status | priority | must_arrive_date | cargo_ready_date | |---|---|---|---|---|---|---|---| |PO 5112|Forward_supply|forward_supply_shanghai|1|1|open|high|5/24/21|4/24/21| |PO 5112|Forward_supply|forward_supply_shanghai|2|2|||5/24/21|4/24/21| |PO 5112|Forward_supply|forward_supply_shanghai|3|3|||5/24/21|4/24/21|

Double quotes used in any of your fields need to be escaped. To escape double quotes, wrap the whole field in double quotes, then use another double quote to escape the double quote itself. Finally, if the double quote is the last character of the field, add a space to the end. For example: Apples 5.25" should be escaped as “Apples 5.25”” “.

Field Fill Instruction:

The below table contains the full list of attributes that you can specify for your purchase orders.

Attribute Description header line
po_name As per your naming convention (e.g., VND-1234). Required Required
seller_ref The reference number for the seller in your Flexport Network. Find this by locating the company in your Network, and copying the Reference ID in the upper right. You may customize the reference if desired. If you want to have orders assigned to specific legal entities under the same seller, use the reference_if of each legal entity Required and Optional if Seller_entity_ref is provided Required and Optional if Seller_entity_ref is provided
seller_entity_ref The reference number for the Legal Entity of the seller in your Flexport Network. Find this by locating the seller in your Network, and choose the Legal Entities tab, copying the Reference ID of the legal entity. You may customize the reference if desired Required and Optional if Seller_ref is provided Required and Optional if Seller_ref is provided
item_key Line number uniquely identifying a line item. N/A Optional
line_item_number Integer used to sequence the order of line items. Line items will appear in the UX in this order. N/A Optional and required if there are multiple identical lines within the same order
status Enter open, closed, or cancelled. Open POs denote POs that are ready to be booked. Closed POs are ones that you'd like to mark as done (typically because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used. Optional N/A
priority Enter high or standard. High priority POs will be embellished throughout the application. Proiority needs to be consistant between header and lines Optional Optional
must_arrive_date Expected arrival date for the line item. Format as YYYY-MM-DD (e.g. 2017-05-01). Optional Optional
cargo_ready_date Expected date when the line item will be picked up by Flexport. Format as YYYY-MM-DD (e.g. 2017-05-01). Optional Optional
transportation_mode Enter air, ocean, or truck. Optional Optional
incoterm The terms of sale. Enter EXW, FOB, FAS, FCA, CPT, CFR, CIF, CIP, DAT, DAP, or DDP. Optional Optional
product_name For example, Large flat iron. This is used to create a new product in the app if the SKU has not yet been added. N/A Required (if creating new product), otherwise Optional
product_sku The SKU for this line item. N/A Required
units Number of units for this line item. Note N/A Required
unit_cost Price per unit. [Decimal, "5", "4.25" or "1.125"]. N/A Optional
currency The currency that corresponds to the cost. This must be entered as the three-digit ISO 4217 Currency Code, e.g. USD or EUR. Required Required for at least one line per po for the simple version
memo Any notes you may want to include, if applicable. Optional N/A
origin_port_ref, destination_port_ref The origin port and destination port. Optional Optional
origin_location_ref, destination_location_ref The pickup location and delivery location. Enter the reference number for these locations in your Flexport Network. Find the location in your Network and copy the Reference ID in the upper right. You may customize the reference if desired. Optional Optional
unit_of_measure Units of measure, see full list here. N/A Optional
hs_codes HS codes associated with the product. Specify the HS code and country, and you may provide multiple codes separated by commas, e.g. "0000.00.00 US, 1111.11.11 CA." N/A Optional
custom_fields/<custom_field_label> Custom fields allows you to set and manage your own order fields (e.g. contact, color, size, etc.). Custom fields are organized as pairings of labels (e.g. “size”) and values (e.g. “M”). If you’re interested in using custom fields, please reach out to your Flexport Operations team and they will enable them for you. Note Optional Optional

3. Save your changes.

After completing the additions to your spreadsheet, be sure to save.

4. Upload the spreadsheet.

Click the blue Upload CSV button, and then choose the file on your computer or drag it into the gray box.


Please check your email inbox for the upload result.

4. Few tips

  1. If using the Detail CSV template please make sure to add a header row for each new PO.
  2. If updating a PO that is already uploaded please make sure to upload all lines under that PO. Example if your PO has 5 lines and 3 has changes after initial upload please make sure to upload all 5 lines or else the system will remove the 2 lines that did not have changes.
  3. We can overwrite the existing order via CSV upload as long as the order has the same po_name, Seller_ref and Seller_entity_ref. One tip for this update is: If the order in our system already has lines booked, the order in the file should contain that booked line and the quantity in the file for that specific line should not be fewer than what had been booked on our platform. For example, PO123 current has line 1, 2, and 3 on our platform. Line 1 has requested units of 1000 and 500 has been booked. To make a successful update, the PO123 in your upload file must have line 1 and have line 1 with the unit quantity no fewer than 500. When the file only has lines 1 and 2 in the file, after the upload, line 3 will be deleted from our platform.
  4. Origin_location_ref and Destination_port_ref need to match what's in your Network on Flexport platform. You can download your current Network Locations and Companies from Flexport platform and use that to make sure you are assigning POs to the correct locations.
  5. You can also update Network Ref ID on Flexport platform to match your system so you don't have to cross reference this section all the time. To do so: go to your Network on Flexport platform and update Ref ID for respective location, this can be renamed what you have them in your system.

Share the Article

More From Flexport

help center basic image

Help Center

How can I use Order Acknowledgement feature

Read More

help center basic image

Help Center

How can I fix errors after the CSV upload of purchase orders?

Read More

help center basic image

Help Center

How can I use Order Collaboration feature

Read More


Ready to Get Started?

Sign up for a Flexport account or ask to see our platform in action.