Webhooks

yackov
Excursionist
15 0 2

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.

 

0 Likes
RajatWeb
Shopify Partner
187 42 56

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
0 Likes
yackov
Excursionist
15 0 2

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

0 Likes
RajatWeb
Shopify Partner
187 42 56

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
0 Likes
RajatWeb
Shopify Partner
187 42 56

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
0 Likes
yackov
Excursionist
15 0 2

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.

0 Likes