Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Saved orders and abandoned carts

Describes an overview of saved orders and abandoned carts in Optimizely Configured Commerce.

Saved orders

A user who is logged into the storefront can select the Save Order button on the Cart page to save an order for later review. The saved order is retrieved through the use of a cookie which records the Cart ID. The details of the order, along with the Cart ID, are saved in the e-commerce database. When the user returns and logs in, the site retrieves the order details from the database and displays the order for the user. Guest shoppers cannot save orders and upon leaving the shopping session will lose their cart.

Use and setup

Saved orders are stored and managed within the My Account menu. Select a saved order to open the Saved Order Details page, where a user can delete or submit the saved order using the provided buttons. The option to disable saved orders is controlled via the SavedOrders_Enabled Website Setting. The option to enable or disable saving a cart is controlled with the Saved Orders setting.

Abandoned carts

Two Settings control how abandoned carts behave:

Number of Days to Retain Items in Cart sets the number of days before carts expire. After this number of days the cart will no longer be accessible after the next nightly maintenance job is run. Default value: 7. Impacts to the End User:

  • Cookies must be enabled in the shopper's browser.
  • If the user has not logged in, the cookie will contain the Cart ID, but the Cart ID will not be tied to a User ID.
  • If the user has logged in to the site, the cookie will contain a Cart ID, and the Cart ID will be tied to the User ID.
  • The cookie will not contain all the items in the shopping cart. The items will be stored in the eCommerce database and tied to the Cart ID in the cookie.

Number of Days to Retain Expired sets the number of days before expired carts are deleted. If this is set to '0' they will be deleted the next time nightly maintenance is run. Default value: 90.

Abandoned cart workflow

  1. The user logs into the site.
  2. The user adds items to the shopping cart.
  3. The Number of Days to Retain Items in Cart equals 0.
  4. The user leaves the site without saving the order or checking out.
  5. After the Nightly Maintenance job runs, the order's Status, within the Cart History, is set to "Abandoned Cart."

Send abandoned cart email reminders

You can send an email reminder to the customer who abandoned a cart based on a setting to enable this functionality and set a time limit on when to send the email. The email uses a designated email template. See Send Abandoned Cart Email Reminders for more details.

Track abandoned carts using cart history

You can use InsiteAnalytics and/or Google Analytics to track activities like Abandoned Carts. In the Admin Console, you can use the Sales > Cart History table to filter by the Status of AbandonedCart and a Created On or Order Date date range to view how many abandoned carts occurred during a particular time period.

Server farms and lost carts

Occasionally there are reports of a user losing a cart. Typically this is due to the shopper hitting a server farm, possibly causing the session to be lost. As long as a user remains active on the site, the cart will not be lost. However, if a user leaves their shopping session for a period of time, the following scenario is possible:

In a multi-server farm environment, a shopper starts his shopping engagement on one server within a farm and, after being inactive for a period of time or leaving the session, gets redirected to a different server within the same farm. This would result in a lost cart because the shopping session is server specific. The lost cart will be handled based on the situations explained above.

📘

Note

Server farms can be configured so that they share a common session, lessening the possibility of losing a cart in this manner.

Saved carts and deactivated products

Deactivated products are not automatically deleted from saved carts. As a result, a situation could arise where a user places an item in a cart that is saved, but not submitted. The user returns to the saved cart at a later time to submit the order. However, in between the time the cart was left and revisited, the item in the cart was deactivated. The solution to this scenario would be to create an integration job with a custom post-processor. The post-processor would query the database for orders that contain deactivated products, remove the products and then re-save the order.