Unable to fetch metafields for some product IDs

jnaps
New Member
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.

0 Likes
Jason
Shopify Expert
10275 144 1943

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 to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
rpalake
New Member
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.

0 Likes
Jason
Shopify Expert
10275 144 1943

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 to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
rpalake
New Member
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 !! 

0 Likes