Why is the variant title blank in my Shopify orders webhook?

yackov
Excursionist
16 0 3

The "variant_title" is blank in the line_items object in my orders webhook?

I have a few variants of a product, of different sizes, and I need to know what size the customer purchased is there a way to get this information from a orders/create webhook?

The variant ID does not help me because I need it to be Humanly readable.

 

Replies 5 (5)

RajatWeb
Shopify Partner
197 46 62

Hi @yackov,

I think you need to hit another API to get Variant info from variant_id.

After you get variant_id use this API - https://shopify.dev/docs/admin-api/rest/reference/products/product-variant#show-2021-01

Please check the screenshot.

Thanks

Screenshot 2021-01-11 at 11.08.57 AM.png

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: rajatsharma.web@gmail.com
Skype: rajatsharma.web
yackov
Excursionist
16 0 3

I'm only processing a simple webhook and writing the JSON to sheet. There's no way to get the variant title in the webhook itself?

making an API request seems a bit clumsy here, but if there's no other way I might need to

RajatWeb
Shopify Partner
197 46 62

Yes, @yackov If you're not getting info through webhook then you must need to call another API to get a specific variant info select by the user.

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: rajatsharma.web@gmail.com
Skype: rajatsharma.web
RajatWeb
Shopify Partner
197 46 62

Hey, @yackov Please like and accept the solution if this helps you.

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: rajatsharma.web@gmail.com
Skype: rajatsharma.web
yackov
Excursionist
16 0 3

I appreciate your help. But unfortunately it does not solve my issue. I created a webhook in notifications in settings. I want to be able to know what size item the customervordered (That should be a basic piece of information). If I have to to initiate a API request that's a whole new thing for me (getting keys and five more steps...) and not so ideal.