Cart Item
A Cart Item is the child record of a Salesforce Commerce Cart that represents one product line: a specific Product, the quantity, the unit price, the configured options (if the product supports configuration), and any item-level promotions or notes.
Definition
A Cart Item is the child record of a Salesforce Commerce Cart that represents one product line: a specific Product, the quantity, the unit price, the configured options (if the product supports configuration), and any item-level promotions or notes. Each Cart Item belongs to exactly one Cart; together the Cart Items form the line-level detail under the Cart's totals. When the Cart converts to an Order at checkout, each Cart Item becomes an Order Product (or Order Item depending on the product family).
Cart Items matter because Cart-level totals are the rollup of Cart Item math. Price changes, promotion application, inventory checks, and configuration validation all operate on individual Cart Items first, with the Cart's totals recalculated after. The Cart Calculator framework reads and writes Cart Items during each calculation step. Reports that need line-item analysis (which products sell, which configurations get added then removed, which promotions move which SKUs) query Cart Items directly rather than the parent Cart. Most operational analytics in Salesforce Commerce live at the Cart Item level.
How Cart Items support line-level commerce
Standard Cart Item fields
Cart Item carries CartId (parent), Product, Quantity, UnitPrice, ListPrice, TotalLineAmount (Quantity x UnitPrice), TaxAmount, Adjustment Amount (for promotions), Subscription Term (if subscription product), and any custom fields the org adds. The standard fields cover most retail and B2B use cases without customisation.
Adding a product to the Cart
The shopper's Add to Cart action creates a Cart Item with Quantity = 1 (or the configured default) and the Product's catalogue price. The Cart Calculator runs, applying eligible promotions, recalculating tax, and updating Cart totals. Subsequent quantity changes update the Cart Item; removing a Cart Item deletes the row.
Product configuration
Configurable products (a laptop with chosen CPU, RAM, storage; a service bundle with selected modules) store configuration as child Cart Item Attribute records or as serialised JSON on the Cart Item. Configuration affects pricing; the Cart Calculator computes the configured price during calculation.
Pricing per Cart Item
Each Cart Item has both ListPrice (the catalogue price) and UnitPrice (the price after pricing-rule application). Pricing rules can vary by Buyer Account, contract, volume, or promotion. The Cart Calculator's Price step writes the effective UnitPrice; subsequent steps build on it.
Promotions at the Cart Item level
Line-level promotions discount specific Cart Items (Buy One Get One on a SKU, 20% off any item in Category X). Cart-level promotions discount the whole Cart proportionally. Both write to Adjustment Amount on the relevant Cart Items, which subtracts from the line total.
Inventory checks per Cart Item
The Inventory calculator typically checks stock per Cart Item. Out-of-stock items can either block checkout (the safer pattern) or mark the line for backorder. Production teams tune Inventory behaviour per product type; perishable goods need stricter checks than back-ordered industrial parts.
Conversion to Order Product
When the Cart converts to an Order at checkout completion, each Cart Item becomes an Order Product (or Order Item in some product families). The Order Product inherits Quantity, UnitPrice, Total, applied promotions, and configuration. Fulfilment, returns, and customer service operate on Order Products thereafter.
Reporting on Cart Item data
Reports on Cart Item answer line-level questions: which products are added to carts, which get removed before checkout, which promotions move which SKUs, and which configurations are most popular. Cart-level reports answer aggregate questions; Cart Item reports answer product-level questions.
How to design Cart Items effectively
Cart Items mostly work out of the box. The work is configuring pricing, promotions, inventory, and configuration-attribute schemas to match the org's products.
- Confirm the Cart Item schema
Setup, Object Manager, Cart Item. Confirm the standard fields are populated. Add custom fields only when the standard schema does not cover a real use case.
- Configure pricing rules
Set up the pricing engine (PriceBook plus Pricing Procedures, or custom Cart Calculator extensions). Test that ListPrice, UnitPrice, and Total flow correctly on each Cart Item.
- Build promotions that target Cart Items
Configure line-level promotions (Buy One Get One, percent-off-SKU). Verify Adjustment Amount writes to the right Cart Items during calculation.
- Configure Inventory checks
Decide when Inventory runs (add to Cart, periodic recalculation, checkout). Configure behaviour for out-of-stock items (block, backorder, substitute).
- Model configurable products
For products with options, decide whether configuration lives in child Cart Item Attribute records or serialised JSON. Either pattern works; consistency matters.
- Inventory checks at Cart Item add time produce mid-session Out of Stock messages that frustrate shoppers. Consider deferring to checkout for most product types.
- Line-level promotion math can be opaque. Test promotion stacking on representative carts before launch.
- Custom fields on Cart Item proliferate fast. Add only when the standard schema cannot model the requirement.
- Cart Item to Order Product mapping is the conversion contract. Validate the mapping in sandbox before any production checkout flow ships.
Trust & references
Cross-checked against the following references.
- Cart in CommerceSalesforce Help
- Commerce Developer GuideSalesforce Developer Docs
Straight from the source - Salesforce's reference material on Cart Item.
- Salesforce Commerce OverviewSalesforce Help
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Discussion
Loading discussion…