last_order_id is null for customers that have orders

kylebragger
Shopify Partner
5 0 0

I've noticed sometimes a customer fetched via the REST API will have a null last_order_id even if they have 1+ orders. Shouldn't that always be set to their last order's ID?

 

(FWIW using the 2019-07 version of https://help.shopify.com/en/api/reference/customers/customer) 

Replies 6 (6)
Ryan
Shopify Staff
Shopify Staff
497 42 117

Hi @kylebragger,

 

Can you share some examples of these customers so I can look into this? Either an X-Request-ID response header from one of the API calls, or the ID of the customer can work.

 

Cheers,

Ryan

 

Ryan | 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 the Shopify Help Center or the Shopify Blog

kylebragger
Shopify Partner
5 0 0

Hi Ryan, customer id 2302765236306 for example. Should have 1 order, 1690196803666.

Ryan
Shopify Staff
Shopify Staff
497 42 117

Thanks @kylebragger I've got the team looking into it now.  I don't think this is a normal scenario and likely shouldn't occur, will update when I know further but I would say this is probably a bug somewhere.

Ryan | 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 the Shopify Help Center or the Shopify Blog

Arayik
New Member
1 0 0

Still got this issue. I created a order which are visible on admin panel but last_order_id and order_count fields for customer are null

tyzion
Tourist
4 0 1

Did you solve it? Beacause I'm experiencing the same issue

dmajorblend
New Member
1 0 0

Also experiencing this issue.