---
title: Serializable carts
slug: commerce-connect-14/docs/serializable-carts
docTags: 
createdAt: 2026-07-23T10:25:34.690Z
---

In the `SerializedCarts` data model, all cart data is stored in one table, `SerializableCart`. This table contains these defined and searchable columns:

- `CartId`
- `Created`
- `Modified`
- `Name`
- `CustomerId`
- `MarketId` (Commerce Connect 11.0 and higher)
- `Data`

The `Data` column is where all the cart data is serialized to JSON format and stored as a `string`.

## Serializable components

All cart data is serialized to a JSON-formatted string before persisting it to the database. To achieve this, several cart components participate in the serialization/deserialization, which takes `IMarket` as a parameter.

## Add custom data

Serializable components implement the IExtendedProperties interface, and custom values can be added to the Properties collection on these components as long as the value can be JSON-serialized.

Converting a serialized cart with custom properties to a purchase order requires the *Meta Fields* corresponding to the custom properties to be present on the purchase order type. See [Extend order classes](https://world.optimizely.com/documentation/developer-guides/commerce/orders/Extending-order-classes/).

The mapping between the serialized cart's custom properties and the purchase order's corresponding meta fields is strictly based on *property name*. The serialized cart is created with an empty Properties on, meaning it is not prepopulated with the keys or default values of the meta fields added to the purchase order or the legacy cart metaclass.

## Enable SerializedCarts

By default, the `SerializedCarts` mode is *enabled* for a new installation site.

You can use `ApplicationOptions` to enable/disable `SerializedCarts` feature:

```csharp
{
       "ApplicationOptions":{
          "Features":{
             "SerializedCarts":{
                "Feature":"SerializedCarts",
                "State":1, // 0 is enabled, 1 for disabled
                "Type":"Mediachase.Commerce.Core.Features.SerializedCarts, Mediachase.Commerce"
             }
          }
       }
    }
```

Alternatively, enable the `SerializedCarts` mode programmatically by adding the following to your `InitializeModule` class:

```javascript
ServiceLocator.Current.GetInstance<IFeatureSwitch>().EnableFeature(SerializedCarts.FeatureSerializedCarts);
```

## Migrate existing legacy carts

If switching from a legacy version to Serializable carts, you may need to migrate existing carts. If so, run the scheduled job `LegacyCartsMigrationJob` available in the CMS admin view immediately after switching to the new cart system to complete the migration and remove legacy carts.

**Commerce 14+ only**:

- Delete any rows relating to `LegacyCartsMigrationJob` in `tblscheduleditem` and `tblPlugin` tables.
- Install package [https://nuget.optimizely.com/package/?id=EPiServer.Commerce.Migration.Legacy](https://nuget.optimizely.com/package/?id=EPiServer.Commerce.Migration.Legacy)
- Run the job.

:::hint{type="info"}
**Note**
You should run the scheduled job immediately after switching to serializable carts. After migrating legacy carts, the job is no longer visible in CMS admin view.
:::
