Hi everyone,
Not sure if this is the right forum for that but I hope that you can help me out.
I’m exporting order data from our shop system and I’m struggling to understand the logic behind three discount-related fields:
-
Discount amount
-
Refunded Amount
-
Lineitem discount
I can’t figure out what each field is supposed to represent, or under which conditions the system fills one vs the other. The main problem is: From my understanding these values must not be double-counted, but in some of our orders, sometimes one sometimes all three fields, are populated even though (from the business case) there was only a single discount/refund event.
Example 1 has only 1 refund of 65.00, but:
Order: EU4429
Subtotal: 93.82
Shipping: 27.38
Discount code: (empty)
Discount amount: 65.00
Refunded Amount: 65.00
Lineitem discount: 65.00
This looks like “Discount amount” sometimes behaves like the full refund field. Also, if there are multiple items in the order,like:
Example 2, has two items ordered and just one lineitem discount, but somehow the discountet amount is working for the whole order,
| Name:EU4403 Discounted amount: 30.00 |
| Name:EU4403 Discounted amount: 0 Lineitem Discount: 30.00 |
I’m not seeing a consistent rule.
-
What does each of these fields typically include (voucher discount, automatic discount, item-level discount, cart-level discount, refunds, partial refunds, etc.)? Because some of these fields seems to include information from the other fields. Or have we simply broken something in our backend?
-
Are any of them just different “views” of the same value (e.g., order-level vs line-level), meaning only one should be used for reporting?
-
What’s the correct approach to avoid double counting when building revenue/refund reporting from these exports?
Thanks a lot for your help in advance.
Edit:
Can also updload a CSV example of the data if needed. Cause it seems to look kinda rnd.
(also does this forum not have an edit function?)
Hey @Mindfork! This behavior is confusing but expected, and it comes from how Shopify stores and exports data at different levels.
1) What does each field include?
- Line item discount represents reductions applied at the product level. This includes true item discounts at checkout and revenue offsets created when an item is fully refunded.
- Discount amount is an order-level summary of all revenue reductions on the order. It aggregates item-level discounts and does not distinguish whether the reduction came from a discount or a refund adjustment.
- Refunded amount represents actual money returned to the customer after payment.
2) Are these different views of the same value?
Yes, partially. Line item discount and discount amount are often two views of the same reduction (line-level vs order-level). When an item is refunded, Shopify mirrors that value across these fields to keep net revenue consistent. Refunded amount represents the cash event, but its value may match the others when a full item refund occurs.
3) How should this be reported without double counting?
Use line item discount for discounts, refunded amount for refunds, and treat discount amount as informational only. These fields should never be summed together.
If you need reports that clearly separate true discounts vs refund adjustments and keep order data consistent across levels, tools like GoProfit can help normalize Shopify exports and present cleaner, more reliable reports. 
Orders CSV output may not be as detailed as you’d want.
First of all, I’d check the Shopify documentation on orders CSV: https://help.shopify.com/en/manual/fulfillment/managing-orders/exporting-orders#order-export-csv-structure
Then, if you need more information, this can probably be obtained via API, as there is much more information in the Order object: Order - GraphQL Admin
It may be worth it to check other export Apps, like Matrixify to see what data it can export: https://matrixify.app/tutorials/shopify-orders-export/ and more detailed fields explanation https://matrixify.app/documentation/orders/
The honest limitation: a partial refund does not split cleanly down to the line-item level in this CSV. If you need per-SKU refund accuracy for accounting, the export can’t give it to you — that needs the Admin API or an export app that returns refund line items.One thing worth verifying before you build a report on it: check on a single order whether Shopify’s Subtotal is already net of discounts in your export. It usually is, which means subtracting Line item discount from Subtotal double-counts the discount. Test one order by hand — price times quantity minus discount should reconcile to that row’s line total — and you’ll know which way your export behaves.In Excel, the safe pattern is a pivot: rows = Name (order number), values = SUM of Line item discount, and MAX of Discount amount and MAX of Refunded amount. MAX works as a de-duplicating pick here precisely because the value repeats — you get one copy per order instead of N. Then net product revenue per order is line item totals minus line item discounts, with refunds subtracted once at order level.So the rule is not just “don’t add all three” — it’s that only the line-item column can be summed directly. Every order-level column has to be de-duplicated to one value per order first, or your revenue will be wrong in a way that looks plausible enough to ship.Refunded amount is also per order, and repeats the same way.Discount amount is per order. It appears on every row of that order, exactly like Total and Subtotal do. Summing that column multiplies it by the number of items in the order.Line item discount is per row. It applies to that one product line, so summing the column gives you a correct product-discount total.What each one actually is:The reason those three fields look identical is that two of them are order-level and repeat on every line item of the same order. That repetition is what creates the double counting, not the field definitions.