# Import purchase orders

After your sourcing process in Fairmarkit, you'll create purchase orders for the items and services that you've sourced. Then, you can import the purchase order information into Fairmarkit. By providing your purchase orders, you will continue to improve your supplier recommendations.

### Purchase order data <a href="#purchaseorderdata" id="purchaseorderdata"></a>

The following table outlines the column headers you will need to create when you import your purchase orders into Fairmarkit. The \***required** fields are marked.

Template: Make sure you have the latest version of the flat file template ([view](https://docs.google.com/spreadsheets/d/1INb94RFKXMIBECHJ0DEpPo4EiY7iUvetkmloNSABD8o/edit#gid=0) | [download CSV file](https://docs.google.com/spreadsheets/d/e/2PACX-1vSsskPZC9mulbFftbuowuzDwLg43wu2SiFVbOWLulELeU0Pvr61n9e0LgwQ-jyt7KJEdnaRNtBt8wBq/pub?gid=0\&single=true\&output=csv)).

| Fairmarkit field | Header                     | Description                                                                 |                                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                             |
| ---------------- | -------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \*               | Purchase Order ID          | po\_id                                                                      | <p>Purchase requisition ID in your purchasing application.</p><p>Data type: Text</p><p><em>Example: S1000</em></p>                                                                                                                                                                                                                                        |                                                                                                                                                                             |
| \*               | Line Item ID               | line\_item\_id                                                              | <p>Unique identifier of the line item in your purchasing application.</p><p>Data type: Text</p><p><em>Example: G123</em></p>                                                                                                                                                                                                                              |                                                                                                                                                                             |
|                  | Purchased At               | purchased\_at                                                               | <p>Purchase order purchasing date.</p><p>Data type: Text</p><p><em>Example: 2022-07-28</em></p>                                                                                                                                                                                                                                                           |                                                                                                                                                                             |
|                  | Internal Part Number       | internal\_part\_number                                                      | <p>Your organization's part number for the item. This value is entered at your discretion.</p><p>Data type: Text</p><p><em>Example: IPN100</em></p>                                                                                                                                                                                                       |                                                                                                                                                                             |
| \*               | Item Description           | item\_description                                                           | <p>Item description.</p><p>Data type: Text</p><p><em>Example: coffee beans</em></p>                                                                                                                                                                                                                                                                       |                                                                                                                                                                             |
| \*               | Unit of Measure            | uom                                                                         | <p>Unit of measure of the item.</p><p>Data type: Text</p><p>Example: Each</p><p>Accepted values: Fairmarkit defined values; <a href="/spaces/XSi8dxrnMaQPYuaoiJWp/pages/x3DS062q2idh1uBCdtN7">For more information, see Available UOMs.</a></p><p><em>Note: Custom mapping is available. For more information, contact your technical architect.</em></p> |                                                                                                                                                                             |
| \*               | Quantity                   | quantity                                                                    | <p>Item quantity.</p><p>Data type: Text</p><p><em>Example: 1</em></p>                                                                                                                                                                                                                                                                                     |                                                                                                                                                                             |
| \*               | Unit Price                 | unit\_price                                                                 | <p>Unit price of line item</p><p>Data type: Text</p><p><em>Example: 8.00</em></p>                                                                                                                                                                                                                                                                         |                                                                                                                                                                             |
|                  | Extended Price             | extended\_price                                                             | <p>Total cost of the line item.</p><p>Data type: Text</p><p><em>Example: 8.00</em></p>                                                                                                                                                                                                                                                                    |                                                                                                                                                                             |
| \*               | Currency                   | currency                                                                    | <p>Unit price currency. This should be the three letter currency code.</p><p>Data type: Text</p><p><em>Example: USD</em></p>                                                                                                                                                                                                                              |                                                                                                                                                                             |
| \*               | Supplier Title             | supplier\_name                                                              | <p>Supplier name.</p><p>Data type: Text</p><p><em>Example: Catherine's Coffee Shop</em></p>                                                                                                                                                                                                                                                               |                                                                                                                                                                             |
|                  | Supplier ID                | supplier\_id                                                                | <p>Supplier ID in your purchasing application.</p><p>Data type: Text</p><p><em>Example: S1000</em></p>                                                                                                                                                                                                                                                    |                                                                                                                                                                             |
|                  | Supplier URI               | supplier\_uri                                                               | <p>Supplier's email or domain. This is useful for reporting and when multiple emails have the same supplier\_id.</p><p>Data type: Text</p><p><em>Example: cdw\.com</em></p>                                                                                                                                                                               |                                                                                                                                                                             |
|                  | Fairmarkit Line Item ID    | fm\_line\_item\_id                                                          | <p>Fairmarkit Line Item ID.</p><p># pandas code PO\_HASH\_COLUMNS - list of columns for the cache (usually PO\_ID and PO\_LINE\_ID po\['FM\_PO\_ID'] = po.apply(lambda row: hashlib.md5('                                                                                                                                                                 | '.join(\[str(row\[x]) for x in PO\_HASH\_COLUMNS]).encode('utf-8')).hexdigest(),axis=1 )</p><p>Data type: Text</p><p><em>Example: 0065f967671d5d960e02253ada162502</em></p> |
|                  | UNSPSC                     | unspsc                                                                      | <p>Standard 8 digit UNSPSC code for the item or requested service.</p><p>Data type: Text</p><p>Example: <em>50201706</em></p>                                                                                                                                                                                                                             |                                                                                                                                                                             |
|                  | Manufacturer               | manufacturer                                                                | <p>Manufacturer of the line item.</p><p>Data type: Text</p><p><em>Example: Local Co</em></p>                                                                                                                                                                                                                                                              |                                                                                                                                                                             |
|                  | SKU                        | sku                                                                         | <p>Supplier or manufacturer part number.</p><p>Data type: Text</p><p><em>Example: S12094</em></p>                                                                                                                                                                                                                                                         |                                                                                                                                                                             |
|                  | Category                   | category                                                                    | <p>Category as defined in your purchasing application.</p><p>Data type: Text</p><p><em>Example: Supplies</em></p>                                                                                                                                                                                                                                         |                                                                                                                                                                             |
|                  | Category ID                | category\_id                                                                | <p>Category ID.</p><p>Data type: Text</p><p><em>Example: 1001</em></p>                                                                                                                                                                                                                                                                                    |                                                                                                                                                                             |
|                  | Subcategory                | <p>subcategory\_1</p><p>subcategory\_2</p><p>subcategory\_3</p>             | <p>Subcategory.</p><p>Data type: Text</p><p><em>Example: Coffee</em></p>                                                                                                                                                                                                                                                                                  |                                                                                                                                                                             |
|                  | Subcategory ID             | <p>subcategory\_1\_id</p><p>subcategory\_2\_id</p><p>subcategory\_3\_id</p> | <p>Subcategory ID.</p><p>Data type: Text</p><p><em>Example: 23</em></p>                                                                                                                                                                                                                                                                                   |                                                                                                                                                                             |
|                  | Notes                      | notes                                                                       | <p>Notes about the requisition, request for quote event, purchase order, etc.</p><p>Data type: Text</p><p><em>Example: Buying some coffee</em></p>                                                                                                                                                                                                        |                                                                                                                                                                             |
|                  | Requisition ID             | requisition\_id                                                             | <p>Purchase requisition ID from your purchasing application</p><p>Data type: Text</p><p><em>Example: R1000</em></p>                                                                                                                                                                                                                                       |                                                                                                                                                                             |
|                  | Status                     | status                                                                      | <p>Purchase order status.</p><p>Default: PURCHASED</p><p>Data type: Text</p><p>Example: PURCHASED</p><p>Accepted values: PURCHASED/CANCELLED/REFUNDED/IN\_PROGRESS</p>                                                                                                                                                                                    |                                                                                                                                                                             |
|                  | Ordered At                 | ordered\_at                                                                 | <p>Purchase order date.</p><p>Data type: Text</p><p><em>Example: 2022-07-28</em></p>                                                                                                                                                                                                                                                                      |                                                                                                                                                                             |
|                  | Global Ledger ID           | global\_ledger\_id                                                          | <p>Global ledger ID.</p><p>Data type: Text</p><p><em>Example: 650666</em></p>                                                                                                                                                                                                                                                                             |                                                                                                                                                                             |
|                  | Global Ledger              | global\_ledger                                                              | <p>Global ledger. Similar to category, this value can be used for supplier recommendations. E.g., Tools & Fixtures, Calibrations, and Chemicals.</p><p>Data type: Text</p><p><em>Example: Repairs & Maintenance</em></p>                                                                                                                                  |                                                                                                                                                                             |
|                  | Plant ID                   | plant\_id                                                                   | <p>Plant ID.</p><p>Data type: Text</p><p><em>Example: 1002</em></p>                                                                                                                                                                                                                                                                                       |                                                                                                                                                                             |
|                  | Plant                      | plant                                                                       | <p>Plant or branch. This value is related to the shipping information.</p><p>Data type: Text</p><p><em>Example: US Plant</em></p>                                                                                                                                                                                                                         |                                                                                                                                                                             |
|                  | Cost Center ID             | cost\_center\_id                                                            | <p>Cost Center ID.</p><p>Data type: Text</p><p><em>Example: 11MDO501</em></p>                                                                                                                                                                                                                                                                             |                                                                                                                                                                             |
|                  | Cost Center                | cost\_center                                                                | <p>Cost center. Similar to category, this value can be used for supplier recommendations. E.g., Braid & Cable, R\&D, HR.</p><p>Data type: Text</p><p><em>Example: Braid & Cable</em></p>                                                                                                                                                                  |                                                                                                                                                                             |
|                  | Funds Center ID            | funds\_center\_id                                                           | <p>Funds Center ID.</p><p>Data type: Text</p><p><em>Example: 55665</em></p>                                                                                                                                                                                                                                                                               |                                                                                                                                                                             |
|                  | Funds Center               | funds\_center                                                               | <p>Funds Center.</p><p>Data type: Text</p><p><em>Example: Marketing</em></p>                                                                                                                                                                                                                                                                              |                                                                                                                                                                             |
|                  | Department ID              | department\_id                                                              | <p>Department ID.</p><p>Data type: Text</p><p><em>Example: 11010</em></p>                                                                                                                                                                                                                                                                                 |                                                                                                                                                                             |
|                  | Department                 | department                                                                  | <p>The department within your organization that purchased the items or services.</p><p>Data type: Text</p><p><em>Example: HR</em></p>                                                                                                                                                                                                                     |                                                                                                                                                                             |
|                  | Buyer ID                   | buyer\_id                                                                   | <p>Buyer ID</p><p>Data type: Text</p><p><em>Example: buyer.example</em></p>                                                                                                                                                                                                                                                                               |                                                                                                                                                                             |
|                  | Buyer                      | buyer                                                                       | <p>Buyer</p><p>Data type: Text</p><p><em>Example: Buyer Example</em></p>                                                                                                                                                                                                                                                                                  |                                                                                                                                                                             |
|                  | ERP System                 | erp                                                                         | <p>Your purchasing application. When entered, it will override the system level settings.</p><p>Data type: Text</p><p><em>Example: SAP Ariba</em></p>                                                                                                                                                                                                     |                                                                                                                                                                             |
|                  | ERP System Id              | erp\_system\_id                                                             | ERP System Id                                                                                                                                                                                                                                                                                                                                             |                                                                                                                                                                             |
|                  | Purchase Order Description | po\_description                                                             | <p>Purchase Order Description.</p><p>Data type: Text</p><p><em>Example: Coffee Beans Order</em></p>                                                                                                                                                                                                                                                       |                                                                                                                                                                             |
|                  | Manufacturer Part Number   | manufacturer\_pn                                                            | <p>Manufacturer part number of the line item.</p><p>Data type: Text</p><p><em>Example: 900</em></p>                                                                                                                                                                                                                                                       |                                                                                                                                                                             |
|                  | Language                   | language                                                                    | <p>Purchase order language.</p><p>Default: en</p><p>Data type: Text</p><p>Example: en</p><p>Accepted values: See <a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">list of ISO 639-1 codes</a>.</p>                                                                                                                                         |                                                                                                                                                                             |
|                  | Shipping City              | shipping\_city                                                              | <p>Shipping address city.</p><p>Data type: Text</p><p><em>Example: Boston</em></p>                                                                                                                                                                                                                                                                        |                                                                                                                                                                             |
|                  | Shipping State             | shipping\_state                                                             | <p>Shipping address state.</p><p>Data type: Text</p><p><em>Example: MA</em></p>                                                                                                                                                                                                                                                                           |                                                                                                                                                                             |
|                  | Shipping Zip               | shipping\_zip                                                               | <p>Shipping address zip code.</p><p>Data type: Text</p><p><em>Example: 02108</em></p>                                                                                                                                                                                                                                                                     |                                                                                                                                                                             |
|                  | Shipping Country           | shipping\_country                                                           | <p>Shipping address country.</p><p>Data type: Text</p><p><em>Example: US</em></p>                                                                                                                                                                                                                                                                         |                                                                                                                                                                             |
|                  | Shipping Address           | shipping\_address                                                           | <p>Shipping address - first line.</p><p>Data type: Text</p><p><em>Example: 27 School St</em></p>                                                                                                                                                                                                                                                          |                                                                                                                                                                             |
|                  | Shipping Notes             | shipping\_notes                                                             | <p>Shipping notes.</p><p>Data type: Text</p><p><em>Example: Leave at doorstep</em></p>                                                                                                                                                                                                                                                                    |                                                                                                                                                                             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fairmarkit.com/buyers/integrations/flat-file-integration/import-data/import-purchase-orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
