Re: Discount value different between Orders API and Total Sales report

Solved

Discount value different between Orders API and Total Sales report

marvinbaltazar
Shopify Partner
8 0 0

Hello,

 

We are trying to figure out why there was a difference in the Discount value when you get the order details via the Orders API and when downloading the Total Sales report (in the shop admin reports).

 

For the Total Sales report, it shows the Discount value as:

7.26

 

However, when you check the Order JSON below, the `discount_allocations` amount is:

8.86

 

Here are the line item details (fields that refer to the particular store have been removed):

 

  "line_items": [
    {
      "fulfillable_quantity": 0,
      "fulfillment_service": "manual",
      "fulfillment_status": "fulfilled",
      "gift_card": false,
      "grams": 1100,
      "price": "88.56",
      "price_set": {
        "shop_money": { "amount": "88.56", "currency_code": "USD" },
        "presentment_money": { "amount": "79.00", "currency_code": "EUR" }
      },
      "product_exists": true,
      "properties": [],
      "quantity": 1,
      "requires_shipping": true,
      "taxable": true,
      "total_discount": "0.00",
      "total_discount_set": {
        "shop_money": { "amount": "0.00", "currency_code": "USD" },
        "presentment_money": { "amount": "0.00", "currency_code": "EUR" }
      },
      "variant_inventory_management": "shopify",
      "variant_title": null,
      "tax_lines": [
        {
          "channel_liable": false,
          "price": "14.37",
          "price_set": {
            "shop_money": { "amount": "14.37", "currency_code": "USD" },
            "presentment_money": { "amount": "12.82", "currency_code": "EUR" }
          },
          "rate": 0.22,
          "title": "IT IVA"
        }
      ],
      "duties": [],
      "discount_allocations": [
        {
          "amount": "8.86",
          "amount_set": {
            "shop_money": { "amount": "8.86", "currency_code": "USD" },
            "presentment_money": { "amount": "7.90", "currency_code": "EUR" }
          },
          "discount_application_index": 0
        }
      ]
    }
  ],

We think this is related to VAT since this order was shipped in the EU. How would we calculate the correct Discount value in this scenario? Thanks!

Accepted Solution (1)

CloudlabSam
Shopify Partner
590 47 103

This is an accepted solution.

Hi There,

 

I would guess that you include tax on your prices? If so, here is an article about the discrepancy. I have been in touch with Shopify support and they have confirmed the difference.

 

https://support.cloudlab.com/portal/en/kb/articles/why-arent-my-reports-matching-shopify-part-2

 

Thanks,

Sam

View solution in original post

Replies 3 (3)

CloudlabSam
Shopify Partner
590 47 103

This is an accepted solution.

Hi There,

 

I would guess that you include tax on your prices? If so, here is an article about the discrepancy. I have been in touch with Shopify support and they have confirmed the difference.

 

https://support.cloudlab.com/portal/en/kb/articles/why-arent-my-reports-matching-shopify-part-2

 

Thanks,

Sam

marvinbaltazar
Shopify Partner
8 0 0

Hi Sam,

 

You are a lifesaver! Reading the article you posted it seems to be exactly what is happening in our case. I'll implement the solution in there and will send an update, thanks again!

marvinbaltazar
Shopify Partner
8 0 0

Confirmed that this was the issue, thanks again!