I'm trying to get the discounts just like shopify reports. But for some orders, I always get the discount amount a little higher than what shopify consider when reporting.
And for instance, I found these two attributes which have the same type but different values. Which one is being used to calculate the proper discount? And is there any formula to suggest when dealing with shopify discounts?
Here's the screenshot showing the discount_applications and the discount_codes: