---
schema_version: "1"
id: 3de1644dd2acd7b6804aed0c540387d0c3b8643112adca0b21712253fe4083de
title: Get Cart Items
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/standard_cart/std_comms-get-cart-items.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/std_comms-get-cart-items.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: fde9cada8a7905d6a6abf7882528747b5aa34e8e266939fedda4d7c4b7d39357
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Get Cart Items

Return cart items and their configurable attributes based on specified criteria.

- Item name, description, and price

- Configurable attributes for the item

- Links to further actions

- Messages per item

- [Whether to expand all the child items in the bundle](https://help.salesforce.com/s/articleView?id=ind.comms_configuring_cart_item_refresh_levels.htm)

```nolang
GET /v2/cpq/carts/{cart_ID}/items?query={query}&lastRecordId=(n)&pagesize={n}&filters={filter}&fields={field1,field2}&validate={true/false}&price={true/false}
```

Fieldset as a parameter for this API is not supported. If the fieldset parameter is passed, a runtime error occurs.

This API can be called either through REST or through Apex remote calls. The default value for the `price` parameter is `true`. If `price=false` is not specified, pricing is executed by default. Specify `price=false` if you do not want to execute pricing.

In ​Salesforce Industries Communications, Media, and Energy Fall '20 and later releases, the getCarts validate parameter has a default value of \_True\*, so the API will return validation messages. If `validate=false` is not specified, validation messages are returned by default. Specify `validate=false` in the UI if you do not want to receive validation messages.

This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the `UserSecurity` class with this API. See Guest User Technical Details.

For additional information, ​see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.


## Get Cart Items Trim Mode

Trim Mode is an optimization feature that reduces the payload size of the GetCartItems API response. Instead of returning the full set of cart item fields, Trim Mode restricts the response to only what is explicitly required.

When enabled, the API response includes these:

- A fixed set of 22 default fields (identity, hierarchy, and status)
- Fields specified via the fields query parameter
- Fields defined in the `GCITrimFieldsToInclude` field set in Salesforce

All other fields are removed from the response. Structural nodes such as `PricebookEntry`, `Product2`, and `productChildItemDefinition` are always preserved.

**important:** Trim Mode applies only to:

- getCartItemList
- getCartItemListById

See, [Enabling Trim Mode](#enabling-trim-mode).

## Remote Method

```nolang
getCartsItems
```

## REST Handler

```nolang
APIItemsCartsCpqV2
```

## Apex Remote Service

```nolang
CpqAppHandler
```


## Apex Remote Input Map

```nolang
{
 methodName: getCartsItems,
 cartId: 801360000008 eNU,
 query: "iphone",
 lastItemId: "01t36000000pfcKAAQ",
 pagesize: 20,
 includeAttachment: false,
 fields: fields = Quantity,
 vlocity_cmt__RecurringCharge__c,
 vlocity_cmt__OneTimeTotal__c,
 vlocity_cmt__BillingAccountId__r.Name,
 vlocity_cmt__ServiceAccountId__r.Name,
 vlocity_cmt__PremisesId__r.Name
 filter: vlocity_cmt__ServiceAccountId__c: 991360000008 eNU_991360000008eNY,
 vlocity_cmt__BillingAccount__c: 01 t36000000pfcKAAQ_01t36000000pfcKAAQ
}
cartId = order.Id, opportunity.Id, quote.Id
```

## Package

Communication (vlocity_cmt)

## API Parameters and Response Format

For API parameter names and descriptions, see [Cart-Based API Swagger Reference](https://developer.salesforce.com/docs/industries/cme/references/cpq?meta=Summary).


## Resource Information

| Response Format | JSON                                                                                                                                                                                       |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Resource URL    | `/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/items?query={query}&lastRecordId=(n)&pagesize={n}&filters={filter}&fields={field1,field2}&validate={true/false}&price={true/false}` |

## Example Request

```nolang
GET
/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8H/items?pagesize=5
```

## Example Response

```nolang
{
   "totalSize": 1,
   "messages": [],
   "actions": {
      "itempricesupdated": {
      "rest": {
         "params": {},
         "method": "GET",
         "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/price?price=false&cartId=801xx000003H0UlAAK"
      },
      "remote": {
         "params": {}
      },
      "client": {
         "params": {}
      }
      }
   },
   "records": [
      {
      "messages": [],
      "actions": {
         "addtocart": {
            "rest": {
            "params": {
               "validate": true,
               "items": [
                  {
                  "quantity": 1,
                  "itemId": "01uxx0000009Ua7AAE"
                  }
               ],
               "pagesize": 20,
               "cartId": "801xx000003H0UlAAK",
               "hierarchy": -1,
               "query": null,
               "price": true,
               "includeAttachment": true,
               "lastRecordId": null
            },
            "method": "POST",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items"
            },
            "remote": {
            "params": {}
            },
            "client": {
            "params": {}
            }
         },
         "cloneitem": {
            "rest": {
            "params": {
               "items": [
                  {
                  "itemId": "802xx000001o0B1AAI"
                  }
               ],
               "id": "802xx000001o0B1AAI",
               "cartId": "801xx000003H0UlAAK"
            },
            "method": "POST",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/clone"
            },
            "remote": {
            "params": {}
            },
            "client": {
            "params": {}
            }
         },
         "updateitems": {
            "rest": {
            "params": {
               "validate": true,
               "items": [
                  {
                  "itemId": "802xx000001o0B1AAI"
                  }
               ],
               "fields": null,
               "filters": null,
               "pagesize": 20,
               "cartId": "801xx000003H0UlAAK",
               "hierarchy": -1,
               "query": null,
               "price": true,
               "includeAttachment": true,
               "lastRecordId": null
            },
            "method": "PUT",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items"
            },
            "remote": {
            "params": {}
            },
            "client": {
            "params": {}
            }
         },
         "modifyattributes": {
            "rest": {
            "params": {
               "items": [
                  {
                  "itemId": "802xx000001o0B1AAI"
                  }
               ],
               "filters": null,
               "id": "802xx000001o0B1AAI",
               "cartId": "801xx000003H0UlAAK",
               "itemId": "802xx000001o0B1AAI"
            },
            "method": "PUT",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/itemAttributes"
            },
            "remote": {
            "params": {}
            },
            "client": {
            "params": {}
            }
         },
         "deleteitem": {
            "rest": {
            "params": {},
            "method": "DELETE",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI?includeAttachment=true&price=true&hierarchy=-1&cartId=801xx000003H0UlAAK&pagesize=20&id=802xx000001o0B1AAI&validate=true"
            },
            "remote": {
            "params": {}
            },
            "client": {
            "params": {}
            }
         },
         "configdelete": {
            "rest": {
            "params": {
               "id": "802xx000001o0B1AAI",
               "cartId": "801xx000003H0UlAAK"
            },
            "method": null,
            "link": null
            },
            "remote": {
            "params": {}
            },
            "client": {
            "params": {}
            }
         }
      },
      "displaySequence": -1,
      "productChildItemDefinition": {
         "vlocity_cmt__ParentProductId__c": "01txx0000007CBoAAM",
         "Name": "Root PCI",
         "vlocity_cmt__ParentProductId__r": {
            "vlocity_cmt__ProductSpecId__c": null,
            "Id": "01txx0000007CBoAAM",
            "Name": "Iphone16",
            "vlocity_cmt__GlobalGroupKey__c": "f3b86b92-81ce-2541-07e5-83b46d640d71"
         },
         "vlocity_cmt__MinQuantity__c": 0,
         "vlocity_cmt__MaxQuantity__c": 99999,
         "vlocity_cmt__MinimumChildItemQuantity__c": 0,
         "vlocity_cmt__MaximumChildItemQuantity__c": 99999,
         "vlocity_cmt__Quantity__c": 1,
         "vlocity_cmt__SeqNumber__c": 1,
         "vlocity_cmt__ChildLineNumber__c": "1.0",
         "vlocity_cmt__IsRootProductChildItem__c": true,
         "vlocity_cmt__IsOverride__c": false,
         "Id": "a3Pxx0000004ni4EAA",
         "vlocity_cmt__CollapseHierarchy__c": false,
         "vlocity_cmt__IsVirtualItem__c": false
      },
      "isVirtualItem": false,
      "sequenceNumber": 1,
      "groupMinQuantity": 0,
      "productId": "01txx0000007CBoAAM",
      "Product2": {
         "ProductCode": "Iphone16",
         "vlocity_cmt__ProductSpecId__r": null,
         "Id": "01txx0000007CBoAAM",
         "vlocity_cmt__IsOrderable__c": true,
         "Description": "Iphone16",
         "IsActive": true,
         "vlocity_cmt__Type__c": "None",
         "vlocity_cmt__LifecycleStatus__c": "Draft",
         "vlocity_cmt__SubType__c": "None",
         "Name": "Iphone16",
         "vlocity_cmt__IsConfigurable__c": false,
         "vlocity_cmt__GlobalGroupKey__c": "f3b86b92-81ce-2541-07e5-83b46d640d71",
         "vlocity_cmt__AttributeDefaultValues__c": null,
         "vlocity_cmt__SpecificationType__c": "Product"
      },
      "maxQuantity": 99999,
      "ProductCode": "Iphone16",
      "IsActive": true,
      "hasChildren": false,
      "defaultQuantity": 1,
      "groupMaxQuantity": 99999,
      "PricebookEntry": {
         "Product2": {
            "vlocity_cmt__SpecificationType__c": "Product",
            "vlocity_cmt__AttributeDefaultValues__c": null,
            "vlocity_cmt__GlobalGroupKey__c": "f3b86b92-81ce-2541-07e5-83b46d640d71",
            "vlocity_cmt__IsConfigurable__c": false,
            "Name": "Iphone16",
            "vlocity_cmt__SubType__c": "None",
            "vlocity_cmt__LifecycleStatus__c": "Draft",
            "vlocity_cmt__Type__c": "None",
            "IsActive": true,
            "vlocity_cmt__IsOrderable__c": true,
            "Id": "01txx0000007CBoAAM",
            "vlocity_cmt__ProductSpecId__r": null,
            "ProductCode": "Iphone16"
         },
         "Pricebook2Id": "01sxx0000005qRhAAI",
         "Product2Id": "01txx0000007CBoAAM",
         "Id": "01uxx0000009Ua7AAE"
      },
      "Name": "Iphone16",
      "UnitPrice": {
         "value": 0,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Unit Price",
         "hidden": true,
         "fieldName": "UnitPrice",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {}
      },
      "Product2Id": "01txx0000007CBoAAM",
      "productChildItemId": "a3Pxx0000004ni4EAA",
      "minQuantity": 0,
      "name": "Iphone16",
      "Pricebook2Id": "01sxx0000005qRhAAI",
      "action": "Add",
      "productHierarchyPath": "01txx0000007CBoAAM",
      "vlocity_cmt__RecurringPrice__c": 50,
      "orderActive": false,
      "itemType": "lineItem",
      "SellingPeriod": "Present",
      "vlocity_cmt__ProductGroupKey__c": {
         "value": "f3b86b92-81ce-2541-07e5-83b46d640d71",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Product Group Key",
         "hidden": false,
         "fieldName": "vlocity_cmt__ProductGroupKey__c",
         "editable": false,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {

         }
      },
      "vlocity_cmt__RecurringDiscountPrice__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Recurring Discount Price",
         "hidden": true,
         "fieldName": "vlocity_cmt__RecurringDiscountPrice__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__ParentItemId__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Parent Item ID",
         "hidden": true,
         "fieldName": "vlocity_cmt__ParentItemId__c",
         "editable": false,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__ItemName__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Item Name",
         "hidden": false,
         "fieldName": "vlocity_cmt__ItemName__c",
         "editable": true,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__EffectiveOneTimeTotal__c": {
         "value": 100,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Effective One Time Total",
         "hidden": false,
         "fieldName": "vlocity_cmt__EffectiveOneTimeTotal__c",
         "editable": true,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__EffectiveOneTimeTotal__c&PricingVariableCode=EFF_OT_STD_PRC_TOTAL"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__EffectiveOneTimeTotal__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__EffectiveRecurringTotal__c": {
         "value": 50,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Effective Recurring Total",
         "hidden": false,
         "fieldName": "vlocity_cmt__EffectiveRecurringTotal__c",
         "editable": true,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__EffectiveRecurringTotal__c&PricingVariableCode=EFF_REC_MNTH_STD_PRC_TOTAL"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {

               },
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__EffectiveRecurringTotal__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__CatalogItemReferenceDateTime__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Reference Time",
         "hidden": false,
         "fieldName": "vlocity_cmt__CatalogItemReferenceDateTime__c",
         "editable": true,
         "dataType": "DATETIME",
         "alternateValues": null,
         "actions": {}
      },
      "ListPrice": {
         "value": 0,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "List Price",
         "hidden": true,
         "fieldName": "ListPrice",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__CpqCardinalityMessage__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Cpq Cardinality Message",
         "hidden": false,
         "fieldName": "vlocity_cmt__CpqCardinalityMessage__c",
         "editable": true,
         "dataType": "TEXTAREA",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__RecurringManualDiscount__c": {
         "value": 0,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Recurring Manual Discount",
         "hidden": false,
         "fieldName": "vlocity_cmt__RecurringManualDiscount__c",
         "editable": true,
         "dataType": "PERCENT",
         "alternateValues": null,
         "actions": {
            "applyadjustment": {
            "rest": {
               "params": {
                  "adjustments": [
                  {
                     "AdjustmentValue": 0,
                     "PricingVariableCode": "REC_MNTH_STD_PRC_DISC_PCT_MAN",
                     "AdjustmentMethod": "Percent",
                     "AdjustmentCode": "",
                     "DetailType": "ADJUSTMENT",
                     "Field": "vlocity_cmt__RecurringManualDiscount__c"
                  }
                  ],
                  "id": "802xx000001o0B1AAI",
                  "cartId": "801xx000003H0UlAAK"
               },
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringManualDiscount__c&PricingVariableCode=REC_MNTH_STD_PRC_DISC_PCT_MAN"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringManualDiscount__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__IsChangesAllowed__c": {
         "value": true,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Changes Allowed",
         "hidden": false,
         "fieldName": "vlocity_cmt__IsChangesAllowed__c",
         "editable": true,
         "dataType": "BOOLEAN",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__CpqPricingMessage__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Cpq Pricing Message",
         "hidden": false,
         "fieldName": "vlocity_cmt__CpqPricingMessage__c",
         "editable": true,
         "dataType": "TEXTAREA",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__OneTimeTotal__c": {
         "value": 100,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "One Time Total",
         "hidden": false,
         "fieldName": "vlocity_cmt__OneTimeTotal__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeTotal__c&PricingVariableCode=OT_STD_PRC_TOTAL"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeTotal__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__FulfilmentStatus__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Fulfillment Status",
         "hidden": false,
         "fieldName": "vlocity_cmt__FulfilmentStatus__c",
         "editable": true,
         "dataType": "PICKLIST",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__LineNumber__c": {
         "value": "0001",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Line Number",
         "hidden": true,
         "fieldName": "vlocity_cmt__LineNumber__c",
         "editable": false,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__ServiceAccountId__c": {
         "value": "001xx000003H0T9AAK",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Service Account",
         "hidden": false,
         "fieldName": "vlocity_cmt__ServiceAccountId__c",
         "editable": true,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__RecurringCharge__c": {
         "value": 50,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Recurring Charge",
         "hidden": true,
         "fieldName": "vlocity_cmt__RecurringCharge__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "timelists": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?listkeys=TimePlans,TimePolicies"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "applyadjustment": {
            "rest": {
               "params": {
                  "adjustments": [
                  {
                     "AdjustmentValue": 0,
                     "PricingVariableCode": "REC_MNTH_STD_PRC",
                     "AdjustmentMethod": "Percent",
                     "AdjustmentCode": "",
                     "DetailType": "ADJUSTMENT",
                     "Field": "vlocity_cmt__RecurringCharge__c"
                  }
                  ],
                  "id": "802xx000001o0B1AAI",
                  "cartId": "801xx000003H0UlAAK"
               },
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringCharge__c&PricingVariableCode=REC_MNTH_STD_PRC"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringCharge__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__OneTimeCharge__c": {
         "value": 100,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "One Time Charge",
         "hidden": true,
         "fieldName": "vlocity_cmt__OneTimeCharge__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "applyadjustment": {
            "rest": {
               "params": {
                  "adjustments": [
                  {
                     "AdjustmentValue": 0,
                     "PricingVariableCode": "OT_STD_PRC",
                     "AdjustmentMethod": "Percent",
                     "AdjustmentCode": "",
                     "DetailType": "ADJUSTMENT",
                     "Field": "vlocity_cmt__OneTimeCharge__c"
                  }
                  ],
                  "id": "802xx000001o0B1AAI",
                  "cartId": "801xx000003H0UlAAK"
               },
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeCharge__c&PricingVariableCode=OT_STD_PRC"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeCharge__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__SubAction__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Sub Action",
         "hidden": false,
         "fieldName": "vlocity_cmt__SubAction__c",
         "editable": true,
         "dataType": "PICKLIST",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__CurrencyPaymentMode__c": {
         "value": "Currency",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Currency Payment Mode",
         "hidden": true,
         "fieldName": "vlocity_cmt__CurrencyPaymentMode__c",
         "editable": true,
         "dataType": "PICKLIST",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__ProductHierarchyGroupKeyPath__c": {
         "value": "f3b86b92-81ce-2541-07e5-83b46d640d71",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Product Hierarchy Group Key Path",
         "hidden": false,
         "fieldName": "vlocity_cmt__ProductHierarchyGroupKeyPath__c",
         "editable": true,
         "dataType": "TEXTAREA",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__SupersededOrderItemId__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Superseded Order Product",
         "hidden": true,
         "fieldName": "vlocity_cmt__SupersededOrderItemId__c",
         "editable": false,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__RecurringTotal__c": {
         "value": 50,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Recurring Total",
         "hidden": false,
         "fieldName": "vlocity_cmt__RecurringTotal__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringTotal__c&PricingVariableCode=REC_MNTH_STD_PRC_TOTAL"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringTotal__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__SupplementalAction__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Supplemental Action",
         "hidden": false,
         "fieldName": "vlocity_cmt__SupplementalAction__c",
         "editable": true,
         "dataType": "PICKLIST",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__Product2Id__c": {
         "value": "01txx0000007CBoAAM",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Product",
         "hidden": false,
         "fieldName": "vlocity_cmt__Product2Id__c",
         "editable": true,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__OrderGroupId__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Order Group",
         "hidden": true,
         "fieldName": "vlocity_cmt__OrderGroupId__c",
         "editable": false,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__Action__c": {
         "value": "Add",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Action",
         "hidden": false,
         "fieldName": "vlocity_cmt__Action__c",
         "editable": true,
         "dataType": "PICKLIST",
         "alternateValues": null,
         "actions": {}
      },
      "Quantity": {
         "value": 1,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Quantity",
         "hidden": false,
         "fieldName": "Quantity",
         "editable": true,
         "dataType": "DOUBLE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__OneTimeManualDiscount__c": {
         "value": 0,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "One Time Manual Discount",
         "hidden": false,
         "fieldName": "vlocity_cmt__OneTimeManualDiscount__c",
         "editable": true,
         "dataType": "PERCENT",
         "alternateValues": null,
         "actions": {
            "applyadjustment": {
            "rest": {
               "params": {
                  "adjustments": [
                  {
                     "AdjustmentValue": 0,
                     "PricingVariableCode": "OT_STD_PRC_DISC_PCT_MAN",
                     "AdjustmentMethod": "Percent",
                     "AdjustmentCode": "",
                     "DetailType": "ADJUSTMENT",
                     "Field": "vlocity_cmt__OneTimeManualDiscount__c"
                  }
                  ],
                  "id": "802xx000001o0B1AAI",
                  "cartId": "801xx000003H0UlAAK"
               },
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeManualDiscount__c&PricingVariableCode=OT_STD_PRC_DISC_PCT_MAN"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeManualDiscount__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "OrderId": {
         "value": "801xx000003H0UlAAK",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Order ID",
         "hidden": false,
         "fieldName": "OrderId",
         "editable": false,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__EffectiveQuantity__c": {
         "value": 1,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Effective Quantity",
         "hidden": false,
         "fieldName": "vlocity_cmt__EffectiveQuantity__c",
         "editable": true,
         "dataType": "DOUBLE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__BillingAccountId__c": {
         "value": "001xx000003H0T9AAK",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Billing Account",
         "hidden": false,
         "fieldName": "vlocity_cmt__BillingAccountId__c",
         "editable": true,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__ProvisioningStatus__c": {
         "value": "New",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Provisioning Status",
         "hidden": true,
         "fieldName": "vlocity_cmt__ProvisioningStatus__c",
         "editable": false,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__AssetReferenceId__c": {
         "value": "87a0aafe-d379-4339-8b54-ceacf04e279e",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Asset Reference Id",
         "hidden": true,
         "fieldName": "vlocity_cmt__AssetReferenceId__c",
         "editable": true,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__InCartQuantityMap__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "In Cart Quantity Map",
         "hidden": true,
         "fieldName": "vlocity_cmt__InCartQuantityMap__c",
         "editable": false,
         "dataType": "TEXTAREA",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__FirstVersionOrderItemId__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "First Order Product Version",
         "hidden": true,
         "fieldName": "vlocity_cmt__FirstVersionOrderItemId__c",
         "editable": false,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "PricebookEntryId": {
         "value": "01uxx0000009Ua7AAE",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Price Book Entry ID",
         "hidden": false,
         "fieldName": "PricebookEntryId",
         "editable": false,
         "dataType": "REFERENCE",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__ProductHierarchyPath__c": {
         "value": "01txx0000007CBoAAM",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Product Hierarchy Path",
         "hidden": true,
         "fieldName": "vlocity_cmt__ProductHierarchyPath__c",
         "editable": false,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__RootItemId__c": {
         "value": "802xx000001o0B1AAI",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Root Item ID",
         "hidden": true,
         "fieldName": "vlocity_cmt__RootItemId__c",
         "editable": false,
         "dataType": "STRING",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__CpqMessageData__c": {
         "value": null,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Cpq Message Data",
         "hidden": true,
         "fieldName": "vlocity_cmt__CpqMessageData__c",
         "editable": true,
         "dataType": "TEXTAREA",
         "alternateValues": null,
         "actions": {}
      },
      "Id": {
         "value": "802xx000001o0B1AAI",
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Order Product ID",
         "hidden": false,
         "fieldName": "Id",
         "editable": false,
         "dataType": "ID",
         "alternateValues": null,
         "actions": {}
      },
      "vlocity_cmt__RecurringCalculatedPrice__c": {
         "value": 50,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "Recurring Calculated Price",
         "hidden": true,
         "fieldName": "vlocity_cmt__RecurringCalculatedPrice__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "applyadjustment": {
            "rest": {
               "params": {
                  "adjustments": [
                  {
                     "AdjustmentValue": 0,
                     "PricingVariableCode": "REC_MNTH_STD_PRC_CALC",
                     "AdjustmentMethod": "Percent",
                     "AdjustmentCode": "",
                     "DetailType": "ADJUSTMENT",
                     "Field": "vlocity_cmt__RecurringCalculatedPrice__c"
                  }
                  ],
                  "id": "802xx000001o0B1AAI",
                  "cartId": "801xx000003H0UlAAK"
               },
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringCalculatedPrice__c&PricingVariableCode=REC_MNTH_STD_PRC_CALC"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__RecurringCalculatedPrice__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "vlocity_cmt__OneTimeCalculatedPrice__c": {
         "value": 100,
         "previousValue": null,
         "originalValue": null,
         "messages": [],
         "label": "One Time Calculated Price",
         "hidden": true,
         "fieldName": "vlocity_cmt__OneTimeCalculatedPrice__c",
         "editable": false,
         "dataType": "CURRENCY",
         "alternateValues": null,
         "actions": {
            "applyadjustment": {
            "rest": {
               "params": {
                  "adjustments": [
                  {
                     "AdjustmentValue": 0,
                     "PricingVariableCode": "OT_STD_PRC_CALC",
                     "AdjustmentMethod": "Percent",
                     "AdjustmentCode": "",
                     "DetailType": "ADJUSTMENT",
                     "Field": "vlocity_cmt__OneTimeCalculatedPrice__c"
                  }
                  ],
                  "id": "802xx000001o0B1AAI",
                  "cartId": "801xx000003H0UlAAK"
               },
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "adjustmentcodes": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/listsofvalues?cartId=801xx000003H0UlAAK&listkeys=AdjustmentCodes&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeCalculatedPrice__c&PricingVariableCode=OT_STD_PRC_CALC"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            },
            "pricedetail": {
            "rest": {
               "params": {},
               "method": "GET",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/items/802xx000001o0B1AAI/pricing?cartId=801xx000003H0UlAAK&id=802xx000001o0B1AAI&fields=vlocity_cmt__OneTimeCalculatedPrice__c"
            },
            "remote": {
               "params": {}
            },
            "client": {
               "records": [],
               "params": {}
            }
            }
         }
      },
      "productCategories": {
         "messages": [],
         "totalSize": 0
      },
      "vlocity_cmt__ServiceAccountId__r": {
         "Id": "001xx000003H0T9AAK",
         "Name": ""
      },
      "vlocity_cmt__BillingAccountId__r": {
         "Id": "001xx000003H0T9AAK",
         "Name": ""
      }
      }
   ]
}
```

**See Also**

- [Configure OmniScript for Guided Selling](https://help.salesforce.com/s/articleView?id=ind.comms_configure_omniscript_for_guided_selling.htm)

## Enabling Trim Mode

**Option 1: Per-Request (Recommended for Controlled Adoption)**

Enable Trim Mode for specific API calls using a query parameter:
`/services/apexrest/vlocity_cmt/v2/cpq/carts/{cartId}/items?gciTrimMode=true`
`/services/apexrest/vlocity_cmt/v2/cpq/carts/{cartId}/items?gciTrimMode=true&fields=UnitPrice,vlocity_cmt\_\_OneTimeCost\_\_c`

Use this approach for:

- Targeted integrations
- Specific UI components
- Testing and gradual rollout

**Option 2: Org-Wide Configuration**

Enable Trim Mode globally via CPQ configuration:

- Set `gciTrimMode = true` in CPQ Configuration Setup. This applies to all GetCartItems API calls across the organization.
- Configure field set:
  - Product2.Name
  - UnitPrice
  - TotalPrice
  - Description
    All responses include default fields, field set fields, and additional fields via fields parameter (if provided).

**important:** Trim Mode removes fields from the API response. Any code, UI, or integration that depends on those fields will break unless the fields are explicitly requested.

### Precedence Rules

| API Parameter | Config Setting | Result   |
| ------------- | -------------- | -------- |
| TRUE          | any            | Trim ON  |
| FALSE         | any            | Trim OFF |
| not provided  | TRUE           | Trim ON  |
| not provided  | false / unset  | Trim OFF |

The API parameter always takes precedence. Use `gciTrimMode = false` to override org-wide settings per request.

### Default Fields (Always Included)

These 22 fields are always present when trim mode is on, without needing to request them:

Id, RootItemId, ParentItemId, AssetReferenceId, LineNumber, Product2Id, PricebookEntryId, OrderId, QuoteId, OpportunityId, Quantity, Status, Action, IsRootItem,
ProductHierarchyPath, ProductHierarchyGroupKeyPath, BillingAccountId, ServiceAccountId, InCartQuantityMap, CpqMessageData, CpqCardinalityMessage, CpqPricingMessage

## Usage Examples

### Minimal Cart (Mobile Optimization)

`/services/apexrest/vlocity_cmt/v2/cpq/carts/{cartId}/items?gciTrimMode=true&fields=Product2.Name,TotalPrice`

Returns a lightweight payload (~24 fields vs 150+).

### Cost Analysis Dashboard

`/services/apexrest/vlocity_cmt/v2/cpq/carts/{cartId}/items?gciTrimMode=true&fields=UnitPrice,vlocity_cmt__OneTimeCost__c,vlocity_cmt__RecurringCost__c,vlocity_cmt__OneTimeMargin__c`

### Override Org-Wide Trim Mode

`/services/apexrest/vlocity_cmt/v2/cpq/carts/{cartId}/items?gciTrimMode=false`

Returns full response regardless of org settings.
