Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Getting wrong customer orders count on orders/create webhook

Getting wrong customer orders count on orders/create webhook

kamalpal
Shopify Partner
1 0 0

I need to apply tags in each order whether it's old or a new customer.

 

if the order count > 1 is an old otherwise new customer.

 

When I receive an Order/create webhook, I do an additional API call to fetch the associated customer resource which has orders_count.

 

Most of the time it works well, but sometimes I receive the orders_count 1 when it's 2; if I request again after a few minutes I receive the correct orders_count.

 

Can anyone suggest how can I get this information accurately every time? Thanks

 

Replies 0 (0)