Please add a variant webhook

Please add a variant webhook

ClementBR
Shopify Partner
160 2 47

We need to sync all products and variants data in our database.

I see that moving forward, the product webhook will only contain data for the first 200 variants, and we will have to issue one or more queries to get the data for the remaining variants.

That sounds very inefficient, especially considering that only a single variant might have changed.

 

To make things more efficient, please introduce a new set of webhook topics for variants specifically, so that we can know when a specific variant was changed. variants/

Replies 6 (6)

Liam
Shopify Staff
2807 310 805

Hi Clement,

 

Fully understand how this new webhook would be useful, especially in the context of how the payloads for the product webhook will be handled differently when a product has over 200 variants. I've gotten in touch with the product team with this request - will update asap. 

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

SKULabs
Shopify Partner
18 0 8

Dropping this note in here since it seems you're in communication with actual developers on the matter.

Please note that historically for any platform webhooks are nice for making certain updates faster but nothing replaces the need to be able to fetch the entire catalog in real times of less than 20 minutes regardless of size. Take this into consideration. If you have to take a step back into the stone ages and get us a CSV export API so-be-it.

All it takes is one missed webhook and you need the ability to fully refetch.

Shopify has historically permitted massive amounts of data to be extracted via the REST API so that certain difficulties can be corrected promptly and recurringly in a short amount of time that doesn't eat up an entire day of waiting for 2+ hour product syncs to finish to see if the issue is resolved.

Your Shopify sellers will be the ones complaining not us.

Elgert
Shopify Partner
2 0 0

You can use bulk jobs, you can get the entire catalog in a JSONL file in a matter of minutes and consume it your own way

Sascha5
Shopify Partner
10 2 7

That would be good, especially with the 2000 variants update coming

ClementBR
Shopify Partner
160 2 47

Any updates @Liam on a variant webhook?

How can we maintain a sync'ed copy of variants if the variants are not included in webhooks?

Sascha5
Shopify Partner
10 2 7

The ids of all variants are included in the webhooks, so we are supposed to fetch the data for the other (up to) 1900 variants via GraphQL (can be done in 4 requests, 250 per request) and then send the data for all 2000 variants to our db / system / whatever, since we don't know which variant was updated. It's not very effective, and that's why a variant-webhook would make a lot of sense.