What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

No fresh data from shopifyqlQuery ... "FROM orders ..."

No fresh data from shopifyqlQuery ... "FROM orders ..."

denisgarcia
Shopify Partner
4 0 0

Hello,

 

I have noticed that the data queries using the following query return data which is more than 48h. There is no recent data (like yesterday).

query {
    shopifyqlQuery(query: "FROM orders
        SHOW [...]
        GROUP BY day
        SINCE -3m
        ORDER BY day DESC") {
            __typename [...]
        }
}

For example, today is 31/07/2023 and the latest data I retrieved is from "
2023-07-29T00:00:00Z"
I'd like to also see yesterday's data (at least).
 
Is there something to do to retrieve yesterday's data as well in this report?
 
Replies 2 (2)

Liam
Community Manager
3108 344 895

Hi Denisgarcia,


There's a couple of potential reasons why you might not be seeing the most recent day's data being returned:

 

  1. Data Processing Delay: Depending on the volume of data, it could take some time to process and make it available for querying. It's not too unusual to see analytics data being delayed up to 48 hours, especially if it is a large store with a lot of orders.
  2. Time Zone Differences: If the time zone of your store is different from the timezone of Shopify's servers, there could be a discrepancy in the dates. Shopify servers operate in UTC, so if your store's timezone is behind UTC, it could still be processing the data for the most recent day.
  3. Query Time: The data might not have been available at the time the query was run. If you run the query early in the morning, the data for the previous day might still be processing.

 

Unfortunately, ShopifyQL doesn't provide an option for specifying the time zone or processing status in the queries. You can try running the query later in the day to see if the data for the previous day is available.

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

denisgarcia
Shopify Partner
4 0 0

Hello,

I have been trying and waiting and trying again.

Today 29/08/2023, I am still calling the same API. The latest data retrieved today is from 23/08/2023.
This API is flaky and does not provide fresh data. Is there something to do to get the latest data from this API? If it were at least consistent to retrieve data max two days old, it would be acceptable, but it's not even doing that. Please advise.