How can I accurately report discount allocations in returns and refunds?

Scenario :

Product A normal sales price - £10.50

discount setup for £2.10

discounted sales price £8.40

customer places an order for 4 units,

total payable by customer 33.60

total discount in sales in 8.40

If the customer returns 1 unit, though the product price is coming correctly at 8.40 in the

“restock_type”: “return”,
“subtotal”: 8.40,

The discount values always come for all the units - 8.40 (discount value instead of 2.10 per unit)

“discount_allocations”: [
{
“amount”: “8.40”,
“discount_application_index”: 0,
“amount_set”: {
“shop_money”: {
“amount”: “8.40”,
“currency_code”: “GBP”
},
“presentment_money”: {
“amount”: “8.40”,
“currency_code”: “GBP”

Is there an api i can use to pull this discount value for returns for correct reporting ?

Hi Nvithalani,

Can you please share the API URL?

A compare_price field should be present at the return fields. I will check the API and let you know.

Thanks

thanks Sajat

i tried using order api and order transaction api both but dont see compare_price

Also the team is using compare_price to show a strikethru on the site

Hi Nvithalani,

So, does that mean you have not stored “compare_at_price” on your system?

It will be hard to get the discount value if you are not recording/storing the compare_at_price of products/variants on your own system. Since “Compare at price” field can get changed a lot of times, to have the history of discount, it is better to record them on your own system.

Please refer to this to get this field.

Hope this info helped.

the transaction was triggered via a coupon.

Product priced at 10.50

With coupon you get 2.10 discount

customer pays 8.40

Customer bought 4, the data in the order file is prefect - total price 10.50x4, 2.10x4 and net paid 8.4x4

Line_Item.Price = 10.50

Line_Item.quantity = 4

Discount_Allocations = 8.40

Customer returns 1 unit,

quantity = 1

subtotal field for the return is correct at 8.40

price is correct at 10.50

but the discount_allocation section under returns repeats the entire discount 2.10x4=8.40 instead of 2.10x1=2.10 and this creates an issue when posting the sales into the ERP as no where in the files is per unit discount mentioned and discount appears as 8.40

does that help ?