---
schema_version: "1"
id: ee887976ddfcf5b548fdb8dd98d85e1130f79a62cdc22179edb003036284139b
title: Migration Considerations
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-migration-considerations.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-migration-considerations.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a26c2b26a06c1d687ba02ba392305f6fc9339b1d9e48afef5baa6e5aeed26db4
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Migration Considerations

Before you migrate to Standard Digital Commerce, learn how Standard Digital Commerce differs from Digital Commerce.

## Cart Documents

In Digital Commerce, when you ran Basket operations, the API calls sometimes created the following:

- Pseudo-accounts and pseudo-orders

- Order line items

- Order price adjustments

- Order applied promotions

- Order applied promotion items

In Standard Digital Commerce, these objects aren't created during Basket operations. Therefore, you can't use any custom triggers for Configure or Basket operations on these objects that you created. This includes any custom code written in interface implementations such as custom hooks or steps. Refactor any such customizations to use cart documents instead. Cart documents provide additional scalability and performance during Configure and Basket operations.

Cart documents are trimmed and flexible JSON structures that can be used with the CPQ on Core services. You can then translate the output JSON to send a response to the top layer APIs such as DC APIs.

To learn how to use cart documents, see [Use Cart Documents](https://developer.salesforce.com/docs/industries/cme/guide/comms-use-cart-documents.html?q=Use%20Cart%20Documents).

**note:** Cart field retrieval from the CPQ Cart Document is not yet supported in the Standard DC API.

## Custom Fields

You an add custom fields to cart documents using field mapping. After you create the custom field for Order or OrderItem sObjects, map them to a key in the cart document. The key is the internal representation of the custom fields in the cart document. Therefore, they don't include prefixes such as the namespace or "\_\_c".

When you specify the key, please follow these requirements:

- Use the field name.

- Don't add prefixes such as the namespace or "\_\_c".

- Lowercase.

- Unique for the org.

When the cart document wrapper updates the value for a custom field, this mapping is used to get the key in the cart document. The corresponding node is also updated with the value. This mapping is also used to create a response such as the external representation that contains the namespace prefix and "\_\_c" using the internal cart document.

![Sample Cart Document Mapping Record](https://developer.salesforce.com/docs/media/cart_document_sample_map.png "Sample Cart Document Mapping Record")

In this example, if a new custom field is created on OrderItem, then you must also create a mapping record for the field. To create a new mapping, from Setup, in the Quick Find box, enter `Custom Settings`, and then select **Custom Settings**. Next to Custom Field Maps, click **Manage** and click **New**.

**note:** Custom fields are not supported for following objects in Standard CPQ.

- OrderAppliedPromotionItem
- QuoteAppliedPromotionItem
- OpportunityAppliedPromotionItem

## Attribute-Based Pricing

You can use attribute-based pricing in the following ways:

- Using the Java Core Service: Use custom designed services on Salesforce Core to implement Attribute-Based Pricing. With this approach, attribute-based pricing uses the Salesforce platform. Using the default attribute-based pricing behavior allows for faster, efficient, and optimized execution versus Apex code. If your implementation of attribute-based pricing doesn't use significant customizations, we recommend using this approach.

- Using VPL Code running on the Apex Tier: Use existing VPL classes to work with the cart document JSON. If you want to customize your implementation, use this approach.

See [Set up Attribute-Based Pricing](https://help.salesforce.com/s/articleView?id=ind.comms_Set_up_Attribute-Based_Pricing.htm&type=5).

## Promotions

Begininning from Standard DC APIs, catalog product relationships for all promotion items are necessary for each promotions.

## Basket Eligibility Check

The `BasketValidationResult` node in the response will contain these details when eligibility check fails for one product.

```
"BasketValidationResult": {
            "IneligibleOffers": {
                "IneligibleOffers": {
                    "<<ProductName>> ( <<itemId>> )": "items in the cart are no longer eligible, Please delete the offers before proceeding further"
                }
            }
        }
```

The `BasketValidationResult` node in the response will contain these details when eligibility check fails for more than one product.

```
"BasketValidationResult": {
            "IneligibleOffers": {
                "IneligibleOffers": {
                    "<<Product1Name>> (<<Product1ItemId>> ),<<Product2Name>> (<<Product2ItemId>> )": "items in the cart are no longer eligible, Please delete the offers before proceeding further"
                }
            }
        }
```

The `BasketValidationResult` node in the response will contain these details when eligibility check fails for one promotion.

```
"BasketValidationResult": {
            "IneligibleOffers": {
                "IneligibleOffers": {
                    "<<PromotionName>>": "promotions are not eligible to be added to the cart. Please check the context info"
                }
            }
        }
```

The `BasketValidationResult` node in the response will contain these details when eligibility check fails for one product and one promotion.

```
"BasketValidationResult": {
            "IneligibleOffers": {
                "IneligibleOffers": {
                    "<<PromotionName>> ( <<PromotionSFId>> ),<<ProductName>> ( ProductItemId )": "items in the cart are no longer eligible, Please delete the offers before proceeding further"
                }
            }
        }
```

**note:** When a bundle is added to basket, the eligibility check is performed only for root product.
