FROM CACHE - en_header

Refunds not matching up against Shpify Reports

CTC
Tourist
6 0 3
x-request-id 664f6258-7447-4f8b-ab9a-8f74252571de
(beginning of pagination)
 
When I pull the latest report updates (I can also filter on financial_status and get the same results), I can't get the the results to match up against what Shopify is showing for refunds under Sales Over Time reports.
 
I'm requesting the refund amount and date  with these fields
```
refunds(first: 4) {
createdAt
totalRefundedSet { $$$ }
}
```
 
And adding up all the refunds to try to match up against Shopify's reporting and can't match up refunds although everything else is matching up. This data used to match up so am I missing more refund data from somewhere else?
Replies 8 (8)
HunkyBill
Shopify Expert
4769 54 555

You have the simple complication of Temporal Reporting Inadequacies. TRI.

So Shopify shows you a number. Do you trust it? Of course you do! Can you replicate with API calls? Of course, you should be able to! Are there reasons you might not be able to? Yes!

Shopify has orders. Orders have transactions. Transactions have types of transactions that are refunds. Does it always add up! Heck no! You can mess with dates for one thing, and also, at any given moment, the API may not report certain transactions as orders are put together in pieces, some not always there when you expect them. For example, I have had orders without customers! Or how about orders without Shipping Addresses! Imagine that fun. Yet, when you wait a little, and retry, boom. All is there.

Refunds can happen at any moment AFTER an order right. So if you are downloading transactions, based on orders, you'd expect all your transactions for those orders. But what if, just a but, Shopify is a little slow in adding the transaction to your order. Your API will report something different from Shopify! Why? Because sometimes they accept showing data internally but have not yet set it to API visibility. That is my best guess. It is why Shopify reports are often not accurate to the penny, at all times, in that they might actually change once all the transactions in a period of time settle.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
CTC
Tourist
6 0 3

Thanks for your response HunkyBill.

Doesn't Shopify use their own API (at least the same data source) for reporting? Shouldn't we arrive at the same numbers?

We were able to match refunds before (probably up to about a month or 2 ago) but now we can't tie the numbers back.  Of course, there might be a time lag because refunds can happen at any time. So what if we pulled all the orders and summed up all the refunds that were created on say 2021-08-13. We would expect that to match because that was like 10 days ago. That number hasn't changed for a week (I've been checking more often than I'd like to admit). 

We don't need real-time data to be accurate, but our historical data is no longer matching up. Everything but refunds is fine. Did something change to cause this?

HunkyBill
Shopify Expert
4769 54 555

Do what I do. I tell merchants to narrow it down and be specific. If you find a single order exhibiting the problem, then you discovered a bug (either in my App or Shopify). If you cannot narrow it down by looking at a small subset of orders, leave me alone! I cannot be expected to audit thousands of things for you.

So my advice is, 100% Shopify could have a new bug! That codebase changes weekly I am sure. Find an order or two that are screwed up, and report it! You are probably not the only person noticing the problem.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
CTC
Tourist
6 0 3

What if all the orders are matching up but the total isn't adding up to what Shopify shows in their front-end user reporting. It's this he-said she-said problem. We're going to need a judge to come in and make a ruling.

HunkyBill
Shopify Expert
4769 54 555

Again. You are vague. You say Shopify shows orders and some totals. Great.

So your job is to audit that, and expose why YOUR result is different. You will quickly discover the problem, and be able to either report a bug in Shopify, or fix a bug in your code. Nothing to it.

 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
CTC
Tourist
6 0 3

I guess this is the wrong channel then. Ill file a bug report.

HunkyBill
Shopify Expert
4769 54 555

You have to have proof there is a bug! Can you at least share with us in the community what the bug is? Would be nice to know. Please!

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
vbhoj1
New Member
5 0 0

Did you have any luck in matching the total sales and refunds for ORder API vs Sales report from shopify ?