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.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

cart_token is null in majority of orders in webhook

cart_token is null in majority of orders in webhook

Shashank_Kumar
Shopify Partner
5 0 6

We used cart_token in order/webhook to do connect identify carts created on customers' client side which completed in order. However, we noticed a majority of orders are not having cart_token data.

 

I understand in certain scenarios cart_token can be null, but for this store, more than 90 percent orders don't have cart_token. 

Example:

store: mrpl2.myshopify.com
order_ids: 1054936956994, 1054934007874, 1054702075970, 1054702043202, 1054689656898

banned
Replies 6 (6)

Josh
Shopify Staff
1134 84 235

Hey there, 

 

When orders are placed using an offsite gateway, they won't have a cart_token. I would imagine that the shop you mentioned is accepting card payments via an offsite gateway and causing their orders to lose their cart_tokens - this is normal though in that case.

Josh | 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

Gordon_Chan
Shopify Partner
29 2 24

Gosh.... but why does offsite checkout would have empty cart token?

I need a way to save some data for the order when the customer is still in shopping cart, and the only thing I can see is the cart_token.

If the webhook does not have cart token for offsite checkout, what else I can reference?

http://gordon-chan.net
I am a Freelance Web Engineer. Dedicated my life to e-commerce development.
seep-agency
Visitor
2 0 2

Any solution to link an order to a cart when this value is missing ? 

Did not find anything and this is really important. 

For example if a user buys with paypal, we still should know the cart. Paypal is just the payment but the order is still linked to actions on this cart ...

kiran-sympiece
Visitor
2 0 2

Did anyone ever find a solution to this, I am also desperately looking for a solution for this

jwilson114
Shopify Partner
8 0 1

also need this information. Classic shopfiy

anant28
Shopify Partner
1 0 0

I need this information as well not sure how can we link the user journey's if we can't have cart_token only as the accessible thing only