Unable to fetch metafields for some product IDs

jnaps
Visitor
1 0 0

We are unable to fetch metafields for some of our product IDs. For example, we are looking for these values:

"namespace":"docebo","key":"course_ids","value":"86"

Our registration workflow that references these values has been working successfully for many years, but it appears like something changed around April 8th. 

Here are examples of product IDs queries that are not working:

Here is an example of a product ID query that is working:

Please advise on what we should do - this impacts our user experience and delays them from receiving the products they've registered/paid for.

Replies 4 (4)

Jason
Shopify Expert
11190 225 2282

Can you please define what "not working" is.

  • Are you getting wrong results, nothing, an error, etc?
  • What is the call you are making?

Two things that perk my interest is that you're talking about registration tracking, and time. With the other product working I'll make a giant leap and assume that you've hit the limit of items returned and you're not paginating the results. Wouldn't have been something you'd have needed to do when starting out so may never have added that into your code.

See the call you're making will help.

In your urls above replace ".json" with "/count.json" and paste that into the browser. That too could help support my assumptions.

 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
rpalake
Visitor
2 0 0

Hi Jason,
    We are getting results, however, from the metafields JSON object docebo namespace is missing, earlier we were getting docebo namespace record in the returned json.  From this docebo namespace we were reading the course_id key which is docebo course_id. In this way we were identifying the mapping between shopify product_id and its equivalent docebo course_id.
From 30th March onwards we are not seeing this records in metafield json, earlier we were able to get the records. We get the full metafield now however record with docebo namespace is missing it. Following is the endpoint that we hit for shopify product id 10540291853.

Jason
Shopify Expert
11190 225 2282

Great that you're getting content back. It is making me lean more towards what I was talking about above.

Confirm for me that it's not a pagination issue.

  • How many results do you get back.
  • How many results show when looking at the count url?

To make it easier, click on the link below. I'm assuming that you're not paginating at all so you'll be getting 50 by default. This will up that to 250.
https://investopedia-academy.myshopify.com/admin/products/10540291853/metafields.json?limit=250

If the namespace is in that everything is working as expected and it's just the app that needs to some tweaks to properly pull down the rest of the data.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
rpalake
Visitor
2 0 0

Yes it seems to be pagination issue.  If I don't pass the limit  for pagination I get 50 records only. On passing limit=250 I get metafields records between 100 to 150.
 After your suggestion, I was wondering if it is possible to query metafield API for specific namespace like this:

https://investopedia-academy.myshopify.com/admin/products/10540291853/metafields.json?namespace=doce...

At the moment our application needs to fetch only course_id from a certain namespace, querying for that specific namespace will be good option rather than fetching for all records and extracting the required fields.

Its great to know that we can query the API by namespace and it supports limit functionality as well. 
Thank you so much Jason for your help !!