> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Purchase orders

> Stock ordered from suppliers: units, cost and tax, by supplier, status, destination and product.

Stock ordered from suppliers: units, cost and tax, by supplier, status, destination and product.

## Example

```sql theme={null}
FROM inventory_purchase_orders
  SHOW purchase_order_ordered_quantity, purchase_order_cost
  GROUP BY product_title
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY purchase_order_ordered_quantity DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `purchase_order_ordered_quantity` | Number | Units ordered on purchase orders. |
| `purchase_order_cost` | Currency | The cost of the purchase order lines, in your store's currency. |
| `purchase_order_supplier_cost` | Currency | The lines' cost before tax, as the supplier charges it. |
| `purchase_order_tax_amount` | Currency | Tax on the purchase order lines. |
| `purchase_order_count` | Number | Number of purchase orders. |
| `purchase_order_line_item_count` | Number | Number of purchase order lines. |
| `unique_items_ordered` | Number | Number of different inventory items on purchase orders. |
| `average_purchase_order_supplier_unit_cost` | Currency | Supplier cost per unit ordered. |

## Dimensions

| Dimension | Description |
| - | - |
| `product_title` | Product title (variants roll up). |
| `product_variant_title` | Product variant: splits a product into its variants. |
| `product_variant_sku` | Variant SKU. |
| `product_vendor` | Product vendor. |
| `product_type` | Shopify product type. |
| `purchase_order_name` | The purchase order's number, such as #PO1. |
| `purchase_order_status` | Draft, ordered, partially received, received or closed. |
| `supplier_name` | The supplier on the purchase order. |
| `destination_name` | The location the stock is ordered to. |
| `purchase_order_tags` | The purchase order's tags. |
| `destination_location_name` | The location the stock is ordered to. |
| `purchase_order_currency` | The currency the supplier is paid in, such as GBP. |
| `purchase_order_reference_number` | The purchase order's reference number with the supplier. |
| `purchase_order_line_item_title` | The purchase order line's title. |
| `supplier_sku` | The supplier's SKU for the item. |
| `purchase_order_created_at` | When the purchase order was created, in the shop's timezone. |
| `purchase_order_ordered_at` | When the purchase order was sent to the supplier, in the shop's timezone. |
| `purchase_order_closed_at` | When the purchase order was closed. Open ones have none. |
| `has_linked_transfers` | Whether transfers have been made to receive the purchase order: true or false. |
| `line_item_created_at` | The day the purchase order line was added. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `purchase_order_name` | Text | The purchase order's number, such as #PO1. |
| `destination_location_name` | Text | The location the stock is ordered to. |
| `purchase_order_currency` | Text | The currency the supplier is paid in, such as GBP. |
| `purchase_order_reference_number` | Text | The purchase order's reference number with the supplier. |
| `purchase_order_line_item_title` | Text | The purchase order line's title. |
| `supplier_sku` | Text | The supplier's SKU for the item. |
| `purchase_order_created_at` | Date | When the purchase order was created, in the shop's timezone. |
| `purchase_order_ordered_at` | Date | When the purchase order was sent to the supplier, in the shop's timezone. |
| `purchase_order_closed_at` | Date | When the purchase order was closed. Open ones have none. |
| `has_linked_transfers` | Yes or no | Whether transfers have been made to receive the purchase order: true or false. |
| `line_item_created_at` | Date | The day the purchase order line was added. |
| `product_title` | Text | Product title. |
| `product_variant_sku` | Text | Variant SKU. |
| `product_vendor` | Text | Product vendor. |
| `product_type` | Text | Shopify product type. |
| `purchase_order_status` | Text | draft, ordered, partially\_received, received or closed. |
| `supplier_name` | Text | The supplier on the purchase order. |
| `destination_name` | Text | The location the stock is ordered to. |
| `purchase_order_tags` | Text | The purchase order's tags. Use contains to match one. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `product.title`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `product.<field>` | [Product](https://docs.queryful.app/queryfulql/records/product.md) | Product |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Inventory](https://docs.queryful.app/queryfulql/datasets/inventory.md)
* [Inventory adjustments](https://docs.queryful.app/queryfulql/datasets/inventory_adjustment_history.md)
* [Received items](https://docs.queryful.app/queryfulql/datasets/inventory_shipment_received_items.md)
* [Inventory transfers](https://docs.queryful.app/queryfulql/datasets/inventory_transfers.md)
* [Inventory shipments](https://docs.queryful.app/queryfulql/datasets/inventory_shipments.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.