Store cart options and the WebCart record
Key Takeaway
Cart options are fields on the WebStore record. Turning on OptionsDuplicateCartItemsEnabled makes repeated adds of one product separate cart items. GuestCartTimeToLive sets the guest cart lifetime in hours, with a default of 168 and a maximum of 720.
A WebCart record is the online shopping cart for a store built with B2B Commerce or D2C Commerce. Each cart links a buyer's account to a store and holds the cart's status and its totals for products, shipping and handling, and taxes. Store-level cart options control how carts behave, such as guest carts, duplicate items, cart size and how add-to-cart requests are processed. The store options set the rules for carts. The WebCart fields record the state of each buyer's cart.
What a WebCart record is
WebCart is available only when the B2B Commerce or D2C Commerce license is enabled. The WebStoreId field links a cart to its store. The AccountId field links the cart to the account that owns it.
The Type field defaults to Cart. The other Type values are ConsumerSales, PayNowReadOnly, ReadOnly and Template. A separate field, IsSecondary, marks whether a cart is a primary cart or a secondary cart.
The OwnerId field can point to a User or a Group. WebCart supports sharing rules, sharing, field history tracking and change events.