Creating custom reports for purchase orders

You can create custom data explorations using Shopify Analytics to display information about your purchase orders. Use these reports to track ordered inventory, review supplier costs, compare purchasing activity across suppliers and destination locations, and identify products with high purchasing volume or changing supplier unit costs.

Purchase orders are used to order inventory from suppliers and send it to a destination location. Custom purchase order reports and the Purchase order costs and Purchases on order default reports are based on purchase order line items, which represent individual products or variants on a purchase order. The Purchase order transfers default report is based on shipment line items linked to purchase orders. When you group a report by product or variant details, a purchase order with multiple products can span multiple rows.

Custom purchase order reports focus on ordered quantities and supplier cost information. Default purchase order reports cover purchase order costs, shipment and receiving details for linked transfers, and ordered open purchase orders without linked transfers. For broader inventory movement, shipment, and receiving analysis, use inventory transfer and shipment reports.

If purchase order analytics is available to your store, then you can use the following default reports:

Default reports for purchase order costs, linked transfer shipments, and open purchase orders without linked transfers
ReportDescription
Purchase order costsDisplays ordered quantities, supplier costs, estimated taxes, and total costs by purchase order, ordered date, supplier, destination, and item.
Purchase order transfersDisplays shipment and receiving details for transfers linked to purchase orders, including shipment status, expected delivery dates, destination, and shipped, received, accepted, and rejected quantities.
Purchases on orderDisplays ordered quantities and costs for ordered, open purchase orders that don't have linked transfers.

When creating a data exploration, you can use various dimensions and filters to tailor your purchase order reports. Learn more about dimensions and filters in Shopify Analytics' configuration panel.

Available metrics for purchase order reports

You can use the following metrics when creating custom purchase order reports.

Purchase order metrics for building custom reports
MetricDescription
Purchase ordersThe number of unique purchase orders represented by purchase order line items in the selected date range.
Ordered quantityThe quantity ordered on purchase order line items.
Purchase order line itemsThe number of purchase order line items.
Unique items orderedThe number of unique inventory items ordered on purchase order lines.
Purchase order supplier costThe value of ordered units before tax, converted to your store currency. This is calculated as supplier unit cost multiplied by ordered units.
Purchase order tax amountThe estimated tax on ordered units, converted to your store currency.
Purchase order costThe value of ordered units including estimated tax, converted to your store currency.
Average purchase order supplier unit costThe average supplier cost per ordered unit, weighted by ordered quantity.

Available dimensions for purchase order reports

You can group and filter your reports using various dimensions. The following dimensions are available when creating custom purchase order reports.

Purchase order dimensions

Purchase order dimensions
DimensionDescription
Purchase order IDShopify identifier for the purchase order.
Purchase order nameDisplay name for the purchase order.
Purchase order reference numberReference number for the purchase order.
Supplier currencyThe supplier currency set on the purchase order. Cost metrics are converted from this currency to your store currency.
Purchase order line item created dateDate and time when the purchase order line item was created.
Purchase order created dateDate and time when the purchase order was created.
Purchase order placed dateDate and time when the purchase order was placed.
Purchase order ordered dateDate and time when the purchase order was marked as ordered.
Purchase order closed dateDate and time when the purchase order was closed.
Purchase order supplier noteSupplier note entered on the purchase order.
Purchase order payment termsPayment terms entered on the purchase order.
Purchase order tagsTags entered on the purchase order.

Supplier and destination dimensions

Supplier and destination dimensions
DimensionDescription
Supplier IDShopify identifier for the supplier on the purchase order.
Supplier nameSupplier name snapshot stored on the purchase order.
Destination location IDShopify identifier for the destination location on the purchase order.
Destination location nameDestination location name snapshot stored on the purchase order.

Product and line item dimensions

Product and line item dimensions
DimensionDescription
Purchase order line item IDShopify identifier for the purchase order line item.
Purchase order line item titleTitle snapshot for the purchase order line item.
Purchase order line item descriptionDescription snapshot for the purchase order line item.
Inventory item IDShopify identifier for the inventory item.
Product IDShopify identifier for the product.
Product variant IDShopify identifier for the product variant.
Product variant SKUSKU of the product variant.
Product variant titleProduct name and variant details.
Supplier SKUSupplier SKU entered on the purchase order line item.

Staff and app dimensions

Staff and app dimensions
DimensionDescription
Purchase order staff IDShopify identifier for the staff member associated with the purchase order.
Purchase order app IDShopify identifier for the app that created or managed the purchase order.
Purchase order app nameName of the app that created or managed the purchase order.

Examples of purchase order reports

Use these examples as starting points for analyzing purchase order costs, volume, ordered quantities, and supplier unit costs.

Purchase order costs

Use the Purchase order costs default report to review purchase order costs across purchase orders, suppliers, destination locations, and product variants. The report groups purchase order data hierarchically, so you can review totals at the purchase order level and then expand into supplier, destination, SKU, and variant details.

Cost metrics are converted to your store currency, so you can compare totals across purchase orders that use different supplier currencies. To identify purchase orders that use a different currency, include Supplier currency in your report.

FROM inventory_purchase_orders
  SHOW purchase_order_ordered_quantity, purchase_order_supplier_cost,
    purchase_order_tax_amount, average_purchase_order_supplier_unit_cost,
    purchase_order_cost
  GROUP BY purchase_order_name, purchase_order_currency,
    purchase_order_created_at, purchase_order_ordered_at,
    purchase_order_reference_number, supplier_name,
    destination_location_name, product_variant_sku, product_variant_title,
    purchase_order_line_item_title, supplier_sku WITH TOTALS, GROUP_TOTALS
  SINCE startOfDay(-180d) UNTIL today
  ORDER BY purchase_order_name DESC,
    purchase_order_cost__purchase_order_name_purchase_order_currency_totals DESC,
    purchase_order_created_at ASC,
    purchase_order_ordered_at ASC,
    purchase_order_cost__purchase_order_name_purchase_order_currency_purchase_order_created_at_purchase_order_ordered_at_purchase_order_reference_number_totals
    DESC,
    purchase_order_cost__purchase_order_name_purchase_order_currency_purchase_order_created_at_purchase_order_ordered_at_purchase_order_reference_number_supplier_name_totals
    DESC,
    purchase_order_cost__purchase_order_name_purchase_order_currency_purchase_order_created_at_purchase_order_ordered_at_purchase_order_reference_number_supplier_name_destination_location_name_totals
    DESC,
    purchase_order_cost__purchase_order_name_purchase_order_currency_purchase_order_created_at_purchase_order_ordered_at_purchase_order_reference_number_supplier_name_destination_location_name_product_variant_sku_totals
    DESC, purchase_order_cost DESC, purchase_order_currency ASC,
    purchase_order_reference_number ASC, supplier_name ASC,
    destination_location_name ASC, product_variant_sku ASC, product_variant_title
    ASC, purchase_order_line_item_title ASC, supplier_sku ASC
LIMIT 1000
VISUALIZE purchase_order_cost TYPE table

Purchase order volume by supplier

Use this report to compare purchasing volume across suppliers. This can help you identify which suppliers represent the largest share of ordered inventory and purchase order cost.

FROM inventory_purchase_orders
  SHOW purchase_order_count, purchase_order_ordered_quantity,
    purchase_order_cost
  GROUP BY supplier_name, purchase_order_currency WITH TOTALS
  SINCE startOfDay(-180d) UNTIL today
  ORDER BY purchase_order_cost DESC, supplier_name ASC,
    purchase_order_currency ASC
VISUALIZE purchase_order_cost TYPE bar

Ordered quantity by product variant

Use this report to identify products and variants with the highest ordered quantities across purchase orders.

FROM inventory_purchase_orders
  SHOW purchase_order_ordered_quantity, unique_items_ordered
  GROUP BY product_variant_sku, product_variant_title WITH TOTALS
  SINCE startOfDay(-180d) UNTIL today
  ORDER BY purchase_order_ordered_quantity DESC, product_variant_sku ASC,
    product_variant_title ASC
VISUALIZE purchase_order_ordered_quantity TYPE table

Supplier unit cost by product variant

Use this report to compare average supplier unit costs by product variant. This can help you identify products with changing supplier costs or compare frequently ordered items across suppliers.

FROM inventory_purchase_orders
  SHOW average_purchase_order_supplier_unit_cost,
    purchase_order_ordered_quantity
  GROUP BY supplier_name, product_variant_sku, product_variant_title,
    purchase_order_currency WITH TOTALS
  SINCE startOfDay(-180d) UNTIL today
  ORDER BY average_purchase_order_supplier_unit_cost DESC,
    supplier_name ASC, product_variant_sku ASC, product_variant_title ASC,
    purchase_order_currency ASC
VISUALIZE average_purchase_order_supplier_unit_cost TYPE table

Best practices for purchase order reports

Use these tips to create effective purchase order reports.

Understanding currencies in cost metrics

Purchase order cost metrics are converted from the supplier currency on the purchase order to your store currency. The conversion uses a daily exchange rate based on when the line item was added, so converted amounts can differ from the amounts on the purchase order. To identify purchase orders that use a different currency, group or filter your report by Supplier currency.

Choosing date fields

Custom purchase order reports and the Purchase order costs and Purchases on order default reports use Purchase order line item created date for the report date range. The Purchase order transfers default report uses Shipment created date. You can also group or filter custom purchase order reports by other purchase order dates to match your reporting needs:

  • Purchase order created date: Date and time when the purchase order was created.
  • Purchase order placed date: Date and time when the purchase order was placed.
  • Purchase order ordered date: Date and time when the purchase order was marked as ordered.
  • Purchase order closed date: Date and time when the purchase order was closed.

Filtering by supplier

Filter by Supplier name to review purchasing activity for a specific supplier. For example:

WHERE supplier_name = 'Supplier name'

Filtering by destination location

Filter by Destination location name to review purchase orders for a specific receiving location. For example:

WHERE destination_location_name = 'Main Warehouse'

Filtering by product

Focus on specific SKUs or products to track particular inventory items. For example, you can filter for products with a specific SKU pattern:

WHERE product_variant_sku LIKE 'WIDGET-%'

Improving query performance

Use specific date ranges to improve query performance. Narrow date ranges return results faster.

Limit grouping dimensions by starting with fewer dimensions, and then add more as needed.

Apply filters early by using WHERE clauses to reduce data volume before grouping and aggregation.

To filter calculated metrics such as purchase order cost, ordered quantity, or average supplier unit cost, add an aggregate filter.

Troubleshooting purchase order reports

If you encounter issues with your purchase order reports, then review the following common issues and solutions.

No data appears in report

If no data appears in your report, then confirm that relevant records exist in the selected date range. Custom purchase order reports and the Purchase order costs and Purchases on order default reports use Purchase order line item created date. The Purchase order transfers default report uses Shipment created date. Adjust your date range or filters to include the records that you want to analyze.

Purchase order counts are different from line item counts

Purchase order reports are based on purchase order line items. A single purchase order can contain multiple line items. The Purchase orders metric counts unique purchase orders. The Purchase order line items metric counts each line item.

Cost amounts don't match the purchase order

Cost metrics are converted to your store currency. If a purchase order uses a different supplier currency, then the amounts in your report can differ from the amounts on the purchase order. To identify these purchase orders, add Supplier currency to your report.

Cost metrics display as zero

If cost metrics display as 0, then supplier unit cost, tax rate, or ordered quantity might not be set on the purchase order line items. Review the purchase order details and confirm that cost information is entered.

Average supplier unit cost isn't calculating

If average supplier unit cost is blank, then the selected records might have no ordered quantity or no supplier unit cost. Filter for records with ordered quantities:

HAVING purchase_order_ordered_quantity > 0

Missing product information

Some purchase order line items might not have product variant information. To filter for records with product information, add the following filter to your query:

WHERE product_variant_sku IS NOT NULL