Retrieving Shopify Discount Data on the Line Item Level with EZ Exporter

Shopify recently updated their Order API and it now provides more information about the discounts applied to the order on the line item level.

There's actually a field called total_discount under the line items data for a long time, but it's a bit misleading as it only applied to line item discounts when using the Shopify POS and not for web orders. With this API update, we can now pull the discount amount and discount codes that were applied to individual line items on web orders.

For example, you can create discount codes in Shopify and specify which products or variants this discount should be applied to. With this update, when a customer enters that discount code in the checkout, you can now generate an order report where you can see which line items in the order that discount was applied to.

In EZ Exporter, you can now select and reference the following fields:

  • Lineitem Discount Allocations Total Amount (line_items.discount_allocations.total_amount)
  • Lineitem Discount Allocations Discount Codes (line_items.discount_allocations.discount_codes)

Here's what a sample report looks like:

Shopify Report - Line Item Discounts

You can also use the Grouping and Aggregation feature to generate a report grouped by discount codes:

These fields are also available in the Custom Filters so you can run a report based on specific discount codes or discount amount:

As you can see, there's quite a bit you can experiment with here to see how discounts affect your sales. This should hopefully provide you insights on how you can effectively use them.

Tags: new features, shopify, csv export, ez exporter, reporting, discounts