---
schema_version: "1"
id: b097ed3228dbda537306d05b9fccd355871b3bc6555cf8f773ae369307cf26b9
title: Prevent Concurrency Conflicts
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/guides/d2c-commerce/b2b-comm-checkout-prevent-concurrency.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-comm-checkout-prevent-concurrency.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 20be31a15e2e4e6a5e7cacd225da5891a4f9f99a76c46dc9af5c5d25da93552f
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Prevent Concurrency Conflicts

Checkout orchestrates multiple background operations (called calculators) on your cart. These operations modify the Cart data model—a set of related objects including WebCart, CartCheckoutSession, CartItem, and CartDeliveryGroup.

Understand concurrency to avoid errors. When multiple processes modify the Cart data model simultaneously, the result can be data inconsistencies or failed transactions.

The Cart data model uses optimistic concurrency control. Each cart has a version number that increments with every update. When an operation saves changes, the system compares the current version with the version at retrieval time. If they don't match, the operation fails—preventing stale data from overwriting recent updates.

See [B2B Commerce Checkout Calculators](https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-comm-checkout-calculators.md) for how calculators work and [Cart Data Model](https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-data-model-cart.html) for complete entity details.
