Hi Community,
What is the logic of calculating Shipping Charge that is being shown in Shopify Invoice in Online store. Please find the screenshot from online store for reference. After we receive the orders/create or orders/updated webhook from Shopify, we I see that shipping_lines.price field from order resource has the value of shipping charge which in this case is simple.
If I have free shipping discount applied then shipping_lines.price and shipping_lines.discounted_price still show up the same value (in my case its 4.9). But ideally since its free I want to fetch it as 0. So I have modified my logic by calculating all of the discounts from shipping_lines.discount_allocations.price and subtract it from shipping_lines.price
I think I may not have considered all of such cases yet, is there any logic or field that I can use to find out the exact amount of Shipping Charge that is shown on Shopify Invoice in all these cases irrespective of whatever discounts applied and other relevant things. Thanks!