Order metafield in query through shopifyql not found anymore

Hi everyone,

I’m reaching out to see if anyone else is experiencing issues with ShopifyQL via the Admin API since last week.

We have a Power Query implementation that retrieves sales data grouped by custom order metafields. This setup has been working reliably for a couple of months, but as of last week, it started throwing an error. Api version is 2026-04

The Issue: When executing a ShopifyQL query via the API, the system returns: Metafield Column Not Found: Metafield 'order.metafields.custom.origen_venta' not found

Key Observations:

  • Front-end works: If I run the exact same query within the Shopify Admin “Reports” builder, it executes perfectly and returns the data.

  • Regression: This query worked fine until roughly a week ago.

  • Scopes: We have verified that the Custom App has read_custom_data and read_all_orders scopes correctly enabled.

Steps to Reproduce: We use a generic Power Query function to interface with the shopifyqlQuery endpoint:

Code snippet

(ShopifyQL_Query as text) =>
let
    ApiUrl = "https://" & ParamShopName & ".myshopify.com/admin/api/" & ParamApiVersion & "/graphql.json",
    Payload = Json.FromValue([query = "{ shopifyqlQuery(query: """ & ShopifyQL_Query & """) { tableData { rows } } }"]),

    Source = Function.InvokeAfter(
        () => Json.Document(Web.Contents(ApiUrl, [
            Headers = [#"X-Shopify-Access-Token" = ParamAccessToken, #"Content-Type" = "application/json"],
            Content = Payload,
            ManualStatusHandling = {429}
        ])), 
        #duration(0,0,0,1)
    ),

    Rows = if Record.HasFields(Source, "data") and Source[data][shopifyqlQuery] <> null 
           then Source[data][shopifyqlQuery][tableData][rows] 
           else {}
in
    Rows

Query executed: FROM sales SHOW net_sales, orders GROUP BY day, order.metafields.custom.origen_venta SINCE 2026-01-01 UNTIL 2026-01-31 ORDER BY day ASC

I have checked that the metafield is queryable:

{
“node”: {
“key”: “origen_venta”,
“type”: {
“name”: “list.single_line_text_field”
},
“capabilities”: {
“analyticsQueryable”: {
“eligible”: true,
“enabled”: true
}
}
}
},

Question: Has there been a recent change in how the ShopifyQL API handles metafield resolution compared to the internal Report builder? Is there any additional configuration required to “expose” these metafields to the API endpoint specifically, or is this a known regression?

Any guidance or troubleshooting steps would be greatly appreciated.

Hi @Ricardo_Diaz :wave: thanks for flagging this.

I see what you mean and was able to reproduce the error with metafields created in the Admin UI and queried by a testing app. I’m digging into this deeper and I’ll follow up with you here as soon as I have more information to share.

Let me know if you have any questions in the meantime!

I appreciate it.I spent hours trying to figure this out.

Thanks!

I also reported a similar issue here shopifyqlQuery API returns “Metafield Column Not Found” for product metafield that works in Admin Analytics (same query)

Hey folks - following up with some additional context.

I dug into this on our end, and it looks like an unintentional side effect of a recent change to how third party apps are scoped when they query metafields. Right now apps can’t query or see metafields created in the admin or by Shopify’s first party apps, which is why you’re seeing this through shopifyqlQuery and not in the admin reporting.

We’re working to address this and I’ll continue to follow up on the thread as soon as we have an update to share.

Hi @Ricardo_Diaz, @Miruna_Andriesei and any other folks following along - circling back on this. We recently shipped a fix for this behaviour thanks to the feedback you shared.

If for any reason you’re still seeing the Metafield Column Not Found error when querying metafields created in the admin (or Shopify’s first party apps) from your app, please share an x-request-id and we can definitely take a look.

Thanks!

Thanks for the update @Wes-Dev-Shopify. This change has fixed the issues that I was seeing.

Thank you! Solved. Everything is working as before.

I am having this same issue, here is the x-request-id 545cf2e9-77c7-46f6-9f39-971c198a6be0-1785778142

Hey @gugaiz - thanks for flagging and sharing the request ID.

I traced this to an issue where an internal analytics data migration left some metafield definitions temporarily unavailable to ShopifyQL, which caused the Metafield Column Not Found response. This was separate from the original issue in this thread, although the same error message was returned.

The missing definitions have been restored, and I’ve re-run the query using the same app context that previously returned the error. It’s now returning results as expected. Please give it another try and let me know if you still see the error.

Hope this helps!