ccrz__E_Cart__c

Represents a buyer's shopping cart, and specifies information about the cart's status.

Compatibility

This reference applies to:

Release Managed Package Version API Version
B2B Commerce for Visualforce Winter ’21 4.13 12
B2B Commerce for Visualforce Spring ’20 4.12 11
B2B Commerce for Visualforce Summer ’19 4.11 10
B2B Commerce for Visualforce Spring ’19 4.10 9
B2B Commerce for Visualforce Summer ’18 4.9 8

API Usage

Class used with: ccrz.ccApiCart

Fetch sizing: To specify which fields the ccrz.ccApiCart.fetch method returns for each cart record, request a specific data size for the ccrz.ccApiCart.ENTITYNAME key in your input data:

ccrz.ccApi.SIZING => new Map<String, Object> {
    ccrz.ccApiCart.ENTITYNAME => new Map<String, Object> {
        ccrz.ccApi.SZ_DATA => ccrz.ccApi.SZ_L
    }
}

The reference for each field indicates which data size the field is returned with.

Fields

Account
The account associated with the user assigned in the User field.
Usage Field Name Data Type
Input on object ccrz__Account__c Lookup Relationship (Account)
Input or output with API (with SZ_XL) account ID
Active Cart
Whether the cart is active for the buyer's storefront session. Only one cart can be active per account at one time.
Usage Field Name Data Type
Input on object ccrz__ActiveCart__c Checkbox
Input or output with API (with SZ_S or larger) activeCart Boolean
Adjustment Amount
Amount to adjust the order price by after the order is placed. This amount is specified on the cart, and passed to the corresponding ccrz__E_Order__c record. You can use your own back-end processing to apply this adjustment without changing the values of other fields.
Usage Field Name Data Type
Input on object ccrz__AdjustmentAmount__c Currency (16, 2)
Input or output with API (with SZ_L or larger) adjustmentAmount Decimal
Adjustment Reason
Text that explains or justifies an adjustment amount. This text is specified on the cart, and passed to the corresponding ccrz__E_Order__c record.
Usage Field Name Data Type
Input on object ccrz__AdjustmentReason__c Text (255)
Input or output with API (with SZ_L or larger) adjustmentReason String
Anonymous ID
Whether the user associated with the cart is a guest or registered buyer. If a buyer creates a cart as a guest and then logs in, this field is evaluated when transferring the guest cart to the authenticated buyer.
Usage Field Name Data Type
Input on object ccrz__AnonymousId__c Checkbox
Input or output with API (with SZ_XL) anonymousID Boolean
Asynchronous Job ID
The ID of the asynchronous Apex job that's executing for the cart.

This field is available only in B2B Commerce for Visualforce Winter '21 (version 4.13) or later.

Note

Usage Field Name Data Type
Input on object ccrz__AsynchronousJobID__c Text (255)
Input or output with API (with SZ_M) or larger asynchronousJobID String
Bill To
The billing address associated with the cart. This record is a unique copy of the billing address specified during checkout.
Usage Field Name Data Type
Input on object ccrz__BillTo__c Lookup Relationship (ccrz__E_ContactAddr__c)
Input or output with API (with SZ_XL) billTo ID
Cart Auto Number
A unique, automatically assigned ID for the record.
Usage Field Name Data Type
Input on object Name Auto Number
Input or output with API (with SZ_S or larger) sfdcName ID
Cart ID
A unique ID that associates the record with an external system.
Usage Field Name Data Type
Input on object ccrz__CartId__c Text (128)
Input or output with API (with SZ_XL) cartId String
Cart Status
Whether the cart is open:
  • Open
  • Closed after a corresponding order is placed
  • Abandoned
  • Processing, which indicates that the ccrz.ccApiCart.placeAsync method is placing the order using asynchronous Apex jobs.
  • Repricing, which indicates that pricing logic is reevaluating the cart's items and prices.

    The Processing and Repricing statuses available only in B2B Commerce for Visualforce Winter '21 (version 4.13) or later.

    Note

Usage Field Name Data Type
Input on object ccrz__CartStatus__c Picklist
Input or output with API
  • With SZ_S in B2B Commerce for Visualforce Winter ’21 (Winter 4.13) or later
  • With SZ_M in B2B Commerce for Visualforce Spring ’20 (version 4.12) or earlier
cartStatus String
Cart Type
Whether the cart is a standard cart or a wish list.
Usage Field Name Data Type
Input on object ccrz__CartType__c Picklist
Input or output with API (with SZ_M or larger) cartStatus String
CCEmailAddress
Whitespace-separated list of email addresses for the CC line of the order confirmation email. For usage, see https://help.salesforce.com/articleView?id=b2b_commerce_page_checkout_cc_email.htm.

We recommend that you populate this field only for orders that contain a low volume of cart items.

Tip

Usage Field Name Data Type
Input on object ccrz__CCEmailAddress__c Text Area (Long) (32768)
Input or output with API (with SZ_XL) CCEmailAddress String
Contact
The contact associated with the user assigned in the User field.
Usage Field Name Data Type
Input on object ccrz__Contact__c Lookup Relationship (Contact)
Input or output with API (with SZ_XL) contact ID
Contract ID
The contract ID when the cart's payment method is Contract. For more information about contract pricing, see https://help.salesforce.com/articleView?id=sf.b2b_commerce_contract.htm.
Usage Field Name Data Type
Input on object ccrz__ContractId__c Text (50)
Input or output with API (with SZ_XL) contractId String
Currency ISO Code
The ISO 4217 currency code for the cart, such as USD or JPY.
Usage Field Name Data Type
Input on object ccrz__CurrencyISOCode__c Text (10)
Input or output with API (with SZ_L or larger) currencyISOCode String
Effective Account ID
The effective account associated with the cart. For usage, see https://help.salesforce.com/articleView?id=b2b_commerce_effective_account_cart.htm.
Usage Field Name Data Type
Input on object ccrz__EffectiveAccountID__c Text (20)
Input or output with API
  • With SZ_M in B2B Commerce for Visualforce Spring ’20 (version 4.12) or later
  • With SZ_XL in B2B Commerce for Visualforce Summer ’19 (version 4.11) or earlier
effectiveAccountID String
Email
Buyer's email address.
Usage Field Name Data Type
Input on object ccrz__BuyerEmail__c Email
Input or output with API (with SZ_XL) buyerEmail String
Encrypted ID
Semi-random UUID to refer to the cart in page URLs.
Usage Field Name Data Type
Input on object ccrz__EncryptedId__c Text (250)
Input or output with API (with SZ_S or larger) encryptedId String
First Name
Buyer's first name.
Usage Field Name Data Type
Input on object ccrz__BuyerFirstName__c Text (40)
Input or output with API (with SZ_XL) buyerFirstName String
Last Name
Buyer's last name.
Usage Field Name Data Type
Input on object ccrz__BuyerLastName__c Text (80)
Input or output with API (with SZ_XL) buyerLastName String
Mobile Phone
Buyer's mobile phone number.
Usage Field Name Data Type
Input on object ccrz__BuyerMobilePhone__c Phone
Input or output with API (with SZ_XL) buyerMobilePhone String
Name
A name for the cart in the My Carts section of the My Account page.
Usage Field Name Data Type
Input on object ccrz__Name__c Text (255)
Input or output with API (with SZ_XL) name String
Note
A shipping note entered during checkout.
Usage Field Name Data Type
Input on object ccrz__Note__c Text Area (Long) (1000)
Input or output with API (with SZ_XL) note String
Number of All Cart Items
The total number of items in the cart, including both major and minor line items.

This field is available only in B2B Commerce for Visualforce Winter '21 (version 4.13) or later.

Note

Usage Field Name Data Type
Input on object ccrz__NumberofAllCartItems__c Roll-Up Summary (COUNT ccrz__E_CartItem__c)
Input or output with API (with SZ_M or larger) numberofAllCartItems Integer
Number of Major Cart Items
The total number of major line items in the cart.

This field is available only in B2B Commerce for Visualforce Winter '21 (version 4.13) or later.

Note

Usage Field Name Data Type
Input on object ccrz__NumberofMajorCartItems__c Roll-Up Summary (COUNT ccrz__E_CartItem__c)
Input or output with API (with SZ_M or larger) numberofMajorCartItems Integer
Payment Method
The payment method for the cart. This value corresponds to the value of the ccrz__Payment_Method__c field on the ccrz__E_PaymentDetail__c record.
Usage Field Name Data Type
Input on object ccrz__PaymentMethod__c Text (50)
Input or output with API (with SZ_L or larger) paymentMethod String
Phone
Buyer's phone number.
Usage Field Name Data Type
Input on object ccrz__BuyerPhone__c Phone
Input or output with API (with SZ_XL) buyerPhone String
PO Number
The purchase order (PO) number entered during checkout.
Usage Field Name Data Type
Input on object ccrz__PONumber__c Text (50)
Input or output with API (with SZ_L or larger) PONumber String
Repriced Date
The date and time when B2B Commerce most recently priced cart items. By default, this value is the date and time the cart was created. For usage, see https://help.salesforce.com/articleView?id=b2b_commerce_page_shopping_cart_price.htm.

This field is available only in B2B Commerce for Visualforce Spring '19 (version 4.10) or later.

Note

Usage Field Name Data Type
Input on object ccrz__RepricedDate__c Date/Time
Input or output with API
  • With SZ_M in B2B Commerce for Visualforce Winter ’21 (Winter 4.13) or later
  • With SZ_XL in B2B Commerce for Visualforce Spring ’20 (version 4.12) or earlier
repricedDate String
Request Date
The delivery date that the buyer requested during checkout.
Usage Field Name Data Type
Input on object ccrz__RequestDate__c Date
Input or output with API (with SZ_XL) requestDate String
Ship Amount
Amount calculated for shipping the order during checkout. This value is calculated based on shipping rates and product quantities in the cart, and passed to the corresponding ccrz__E_Order__c record. For more information, see https://help.salesforce.com/articleView?id=b2b_commerce_product_shipping.htm.
Usage Field Name Data Type
Input on object ccrz__ShipAmount__c Currency (16, 2)
Input or output with API (with SZ_L or larger) shipAmount Decimal
Ship Complete
Whether the buyer selected the Ship Complete option during checkout.
Usage Field Name Data Type
Input on object ccrz__ShipComplete__c Checkbox
Input or output with API (with SZ_XL) shipComplete Boolean
Ship Discount Amount
Amount to adjust the shipping cost by after the order is placed. This amount is specified on the cart, and passed to the corresponding ccrz__E_Order__c record. You can use your own back-end processing to apply this adjustment without changing the values of other fields.
Usage Field Name Data Type
Input on object ccrz__ShipDiscountAmount__c Currency (16, 2)
Input or output with API (with SZ_L or larger) shipDiscountAmount Decimal
Ship Method
The shipping method selected during checkout.
Usage Field Name Data Type
Input on object ccrz__ShipMethod__c Text (50)
Input or output with API (with SZ_XL) shipMethod String
Ship Structure
The checkout experience used for grouping the cart's items for shipment. If your storefront uses line-level independence (LLI), this value is LLI. Otherwise, this value is empty.
Usage Field Name Data Type
Input on object ccrz__ShipStructure__c Text (128)
Input or output with API (with SZ_XL) shipStructure String
Ship To
The shipping address associated with the cart. This record is a unique copy of the shipping address specified during checkout.
Usage Field Name Data Type
Input on object ccrz__ShipTo__c Lookup Relationship (ccrz__E_ContactAddr__c)
Input or output with API (with SZ_XL) shipTo ID
Storefront
The storefront where the cart was created.
Usage Field Name Data Type
Input on object ccrz__Storefront__c Text (255)
Input or output with API (with SZ_XL) storefront String
Subtotal Amount
The total entitled price of all items in the cart.
Usage Field Name Data Type
Input on object ccrz__SubtotalAmount__c Roll-Up Summary (SUM ccrz__E_CartItem__c)
Input or output with API (with SZ_L or larger) subtotalAmount Decimal
Tax Amount
Tax amount calculated during checkout.
Usage Field Name Data Type
Input on object ccrz__TaxAmount__c Currency (16, 2)
Input or output with API (with SZ_L or larger) taxAmount Decimal
Tax Subtotal Amount
The total taxable price of all items in the cart.
Usage Field Name Data Type
Input on object ccrz__TaxSubTotalAmount__c Roll-Up Summary (SUM ccrz__E_CartItem__c)
Input or output with API (with SZ_L or larger) taxSubTotalAmount Decimal
TaxExemptFlag
Whether the cart is exempt from tax. This value is specified on the cart, and passed to the corresponding ccrz__E_Order__c record.
Usage Field Name Data Type
Input on object ccrz__TaxExemptFlag__c Checkbox
Input or output with API (with SZ_L or larger) taxExemptFlag Boolean
Total Amount
Total cost calculated for the cart, including:
  • Ship amount
  • Ship discount amount
  • Subtotal amount
  • Tax amount
  • Adjustment amount
  • Total surcharge
Usage Field Name Data Type
Input on object ccrz__TotalAmount__c Formula (Currency)
Input or output with API (with SZ_L or larger) totalAmount Decimal
Total Discount
Total amount discounted from the cart.
Usage Field Name Data Type
Input on object ccrz__TotalDiscount__c Currency (16, 2)
Input or output with API (with SZ_L or larger) totalDiscount Decimal
Total Quantity
Total number of items in the cart.
Usage Field Name Data Type
Input on object ccrz__TotalQuantity__c Roll-Up Summary (SUM ccrz__E_CartItem__c)
Input or output with API (with SZ_L or larger) totalQuantity Integers
Total Surcharge
Charges other than taxes or shipping applied to the cart.
Usage Field Name Data Type
Input on object ccrz__TotalSurcharge__c Currency (16, 2)
Input or output with API (with SZ_L or larger) totalSurcharge Decimal
User
The user that created the cart.
Usage Field Name Data Type
Input on object ccrz__User__c Lookup Relationship (User)
Input or output with API (with SZ_XL) user ID
Validation Status
The cart's validation status, used with Apex remote actions.
Usage Field Name Data Type
Input on object ccrz__ValidationStatus__c Text (75)
Input or output with API (with SZ_S) validationStatus String

Deprecated Fields

The following fields exist on the object but aren't used by the managed package. Don't use these fields in any development or customization.

Field Label Field Name Data Type
Company Name ccrz__BuyerCompanyName__c Text (80)
Session ID ccrz__SessionId__c Text (255)

Related Lists

A record of the ccrz__E_Cart__c object can have multiple related lists that relate the cart to other types of records, such as cart items. The ccrz.ccApiCart.fetch method can return data from these related records, depending on the requested data size in the input map.

The reference for each related list indicates which data size the list is returned with by default. You can also use the ccrz.ccApi.SZ_REL flag in your input map to request a particular list, regardless of requested data size:

ccrz.ccApi.SIZING => new Map<String, Object> {
    ccrz.ccApiCart.ENTITYNAME => new Map<String, Object> {
        ccrz.ccApi.SZ_DATA => ccrz.ccApi.SZ_XS,
        ccrz.ccApi.SZ_REL => New List<String>{'E_CartItems__r'}
    }
}
ECartItems
List<Map<String, Object>> of ccrz__E_CartItem__c.
Consideration Value
Default data size returned with SZ_S or larger
ccrz.ccApi.SZ_REL request value E_CartItems__r