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?
Hello, did you ever find the answer to this? I am struggling with a very similar problem. I am unable to match total and net sales calculated from GQL API to that shown in the Shopify dashboard and I think this could be why.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025