Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Is cart expiry duration reduced recently?

Is cart expiry duration reduced recently?

kartik-po
Shopify Partner
5 0 0

Hi,

Since July 20th 2023, we noticed that saved carts on merchant storefronts are getting expired within 3-4 days. And because of that Abandoned Cart Recovery feature of our app has been affected. Before this we were able to fetch carts using cart_token from as long as 10-15 days, which isn't the case anymore.

So, are there any recent changes made because of which carts are getting expired more frequently than before?

PS: We use /carts/{cart_token}.json admin api to retrieve cart.

Replies 6 (6)

Liam
Community Manager
3108 344 891

Hi Kartik-Po,

 

Just to get more info on this experience, is this happening with all stores or limited to a few? Are you using an up to date API version? 

 

I'll look into this issue internally but having this info will help.

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

kartik-po
Shopify Partner
5 0 0

Hello Liam,

Thank you for looking into this issue.
- So far we have seen this issue happening with only one of our merchant.
- We are using 2023-01 API version right now while calling /carts/{cart_token}.json admin API.

 

I'm also pasting the basic structure of cart_json response we receive (initially when cart gets abandoned) for the merchant whose store is facing this issue (in case this might be helpful for you):

 

{
    "id": "xxxxxxxxxx",
    "token": "xxxxxxxxxx",
    "created_at": "2023-08-20T12:36:19.583Z",
    "line_items": [
        {
            "id": 9999999,
            "key": "xxxxxxxx9496:xxxxxxxx0028af391bad58001ace3a3",
            "sku": "xxxxxxxx8020069",
            "grams": 0,
            "price": "5.00",
            "title": "",
            "vendor": "xxxx",
            "taxable": true,
            "quantity": 1,
            "discounts": [],
            "gift_card": false,
            "line_price": "5.00",
            "product_id": 9999999,
            "properties": {},
            "variant_id": 99999999,
            "original_price": "5.00",
            "total_discount": "0.00",
            "discounted_price": "5.00",
            "original_line_price": "5.00",
            "product_has_only_default_variant": false
        }
    ],
    "updated_at": "2023-08-20T12:36:32.995Z"
}

 

 

kartik-po
Shopify Partner
5 0 0

Hi Liam,
Bumping this thread up. Please let me know if there are any updates from your side.

Liam
Community Manager
3108 344 891

Hi again Kartik-Po,

 

I've just checked with our team and there's nothing we can find that might be causing this effect with carts. Are you seeing this behaviour still only on one merchant? Do you know if there are any other apps installed on this store that might be interfering with carts?

 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

kartik-po
Shopify Partner
5 0 0

Hi Liam,
Yes this behaviour is still there with the same merchant. Even carts are expiring between 3-4 days. I've sent a message to check with the merchant if they have installed any other apps which might interfere with Shopify carts. Will follow up once they reply back to us.

kartik-po
Shopify Partner
5 0 0

Hi Liam,

Since last week, we noticed that carts/{cart_token}.json admin API is returning 404 "Not Found" errors even more frequently. Now it is happening even immediately when we call the admin API after a user adds a product to the cart. Because of this our core app functionality is getting affected.

I'm able to replicate it in our development app-store setup. I've noticed that for all carts whose cart_token starts with "Z2Nw", we get 404 errors.


Pasting below the cart_json snippet of a test store. (Not sure if its helpful but upon base64 decoding the given cart_token it gives this value: "gcp-europe-west1:01HDK7R14K7XJ4CKJCGD4F7Q0Z")

 

"cart_json": {
    "token": "Z2NwLWV1cm9wZS13ZXN0MTowMUhESzdSMTRLN1hKNENLSkNHRDRGN1EwWg",
    "item_count": 1,
    "items": [
    {
        "id": 45060627202361,
        "properties": {},
        "quantity": 1,
        "variant_id": 45060627202361,
        "key": "45060627202361:dd7736a2c75c64ab0efae32d853934e0",
        "title": "Mouse",
        "price": 40000,
        ...
    }
    ]
}