Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am building a software which brings data from shopify (and other channels, but they are not relevant here) and visualises it.
I am using shopify API to fetch orders data. I need to calculate "Total Sales" to display in my dashboard, and it should match the "Total Sales" value in the shopify analytics dashboard.
Here a few things I am trying:
1. "total_price" in orders api gives an idea of the value of the order when the order was created, but it doesn't have the edits which might have been made to the order (for ex, if other items were added, removed, etc.)
2. "current_total_price" in orders api is the net amount after the edits and returns, but shopify seems to subtract returns on the day they are created, not on the day the order was created. Using "current_total_price" will give a different "Total Sales" value than shopify.
Only option I see here is to use the transactions table, and somehow try to make sense of order edits and then calculate the final amounts. But I am also confused if the order edits are reflected on the day they are created, or on the day the order is created. For ex: If I edit an order and change the total price from ₹500 to ₹1,000, will shopify add ₹500 of sales on the day the order was created, or on the day the edit was made?
I am confused here. Can someone help me out?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024