Issue: interpreting three discount-related fields in an orders CSV—Discount amount, Refunded Amount, and Lineitem discount—and preventing double counting in revenue/refund reporting.
Observed behavior:
Example 1 (Order EU4429): one refund of 65.00, yet Discount amount, Refunded Amount, and Lineitem discount are all 65.00 with no discount code. This suggests Discount amount may sometimes mirror a full refund.
Example 2: two items; one shows Discounted amount 30.00, the other shows Discounted amount 0 and Lineitem discount 30.00. Discounted amount appears to apply at the order level despite a single item-level discount.
Key questions:
What does each field typically include (voucher/automatic discounts, item-level vs cart-level, refunds/partial refunds)?
Are any fields simply different views of the same value (order-level vs line-level) for reporting?
What is the correct approach to avoid double counting when aggregating revenue and refunds?
Status: no definitive answers yet; author can upload a CSV sample for clarity. Discussion remains open; guidance on field definitions and reporting best practices is requested.
Summarized with AI on December 23.
AI used: gpt-5.
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.
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?
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.
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