Neither discountedTotalSet nor totalDiscountSet include the line item's discount

When querying the line items for an order, I noticed that the discountedTotalSet (which should be the original price - discount) shows the original value and does not apply the discount. https://shopify.dev/docs/api/admin-graphql/2023-10/objects/lineitem#field-lineitem-discountedtotalset

The discount can be seen in the discountAllocations but not in the totalDiscountSet nor the discountedTotalSet .

I have attached a redacted query and the results: (ignore the .csv as they are really .txt).

Are you open for conversation??

Yes. To clarify, on this issue, I have applied a product discount, not an order discount.

Hey @minsko and @wilson_02 !

This is a great question. I tested to replicate here, and it is working as expected.

The discountedTotalSet field must be explicitly set using draft orders, Shopify scripts, or the API. It’s recommended instead to use discountAllocations.

Our GraphQL documentation is not as clear on this field as we are on REST, so I’ll get that feedback over to our team.

Hope that helps!

  • Kyle G.

Thank you for that explanation.

Regards,

Matt Insko