Order webhook with null product_id

Reverb_DotCom
Shopify Partner
5 0 0

My app used to subscribe only to "product/update" webhooks for inventory changes. However, one of my larger customers is experiencing issues where we don't always get a product/update from shopify even though an order was placed. Not sure if this is a known issue, but to combat this we implemented webhooks for "order/create"

However, I am seeing webhooks like this, where line items have null product_ids. Is this expected? In what cases? It looks like "product_exists"=false. How did someone make an order for a product that doesn't exist? Very confused.

thanks

Yan

 

Replies 3 (3)

Reverb_DotCom
Shopify Partner
5 0 0

Great thanks for the info. In the case of draft order we should subscribe to order/update then?

Reverb_DotCom
Shopify Partner
5 0 0

Any idea about the first problem I was having where some orders did not issue product/update hooks?

jkinson
Shopify Partner
3 0 0
When creating Draft Orders there is an option to create a custom product/item. This custom item will be included in the line_items in Order API and webhook events. But, custom items do not have product_id, vendors, and variant_id because they are not 'real' products. They are just temporary products.