Skip to content
Log in

Order and checkout objects

On this page

This is the largest domain in the schema, because it holds both sides of a purchase: the cart while a shopper is still deciding, and the order once they have paid. Use this article to find the object you need before you query or report on sales data.

A cart becomes an order

The single most useful thing to know is that cart and order are parallel structures, not one record changing state.

A Cart holds Cart Items. At checkout StoreConnect creates an Order with Order Items, and the cart is kept rather than deleted. So a completed purchase exists twice, and which one you query depends on the question:

  • What is in progress, or was abandoned? Query the cart.
  • What was sold? Query the order. Prices on an order item are what was actually charged, not what the price book says now.

Fulfillment is decided on the cart, before the order exists. A Cart Fulfillment is one delivery method for part of the basket, and Cart Fulfillment Item assigns items to it. That is how one order ships some items and holds others for pickup.

Money is separate from the order

A Payment is one attempt to move money, so an order can have several: a failed attempt, a retry, a partial refund. The order’s paid state is the sum of its payments rather than a field someone sets.

Payment Item is the record that allocates part of a payment to a particular order or fulfillment, which matters when one payment covers a split shipment, or one order is paid by card and voucher together.

:::note A Payment Provider is the configured gateway. A Payment Method is what the shopper sees at checkout. One provider usually offers several methods, and surcharges are set on the method. :::

Two generations of promotions

The schema carries both promotions models, which is the most common source of confusion here.

Promotion (s_c__Promotion2__c) is the current model. Its conditions say what a cart must satisfy, its product scope limits what it applies to, and usage records enforce limits.

The objects labeled Legacy Promotion in the table below are the superseded model, kept so existing data still reads. Write against the current model.

Discount is a different thing again: it reduces a price automatically, with no code entered.

Objects in this domain

Object API name Purpose
Cart s_c__Cart__c An in-progress basket. Becomes an order at checkout, and is kept afterwards
Cart Item s_c__Cart_Item__c One product and quantity in a cart
Cart Fulfillment s_c__Cart_Fulfillment__c How one part of a cart will be delivered: shipped, picked up, or collected
Cart Fulfillment Item s_c__Cart_Fulfillment_Item__c Assigns a cart item to one of the cart’s fulfillments
Cart Promotion s_c__Cart_Promotion2__c Records a promotion code applied to a cart
Cart Campaign s_c__Cart_Campaign__c Links a cart to the marketing campaign it came from
Order Order The standard Salesforce order object, created from a cart at checkout
Order Item OrderItem One line on an order: product, quantity, and the price charged
Order Item Tax s_c__Order_Items_Taxes__c The tax applied to one order line, one record per tax
Order Item Reward s_c__Order_Item_Reward__c A reward granted against an order line
Order Campaign s_c__Order_Campaign__c Links an order to the marketing campaign it came from
Payment s_c__Payment__c One attempt to take or refund money, with its gateway result
Payment Item s_c__Payment_Item__c Allocates part of a payment to a specific order or fulfillment
Payment Method s_c__Payment_Method__c A method offered at checkout, such as a card or account payment, and its surcharge
Payment Provider s_c__Payment_Provider__c A configured gateway, holding its credentials and which methods it supports
Payment Installment s_c__Payment_Installment__c One scheduled payment where the total is taken over time
Subscription s_c__Subscription__c A recurring purchase, its schedule, and its billing state
Subscription Change s_c__Subscription_Change__c A pending or applied change to a subscription, such as a new price or quantity
Voucher s_c__Voucher__c A gift card or credit note, with its balance, code, and PIN
Voucher Payment s_c__Voucher_Payment__c Records a voucher being spent against a payment
Voucher Log s_c__Voucher_Log__c An entry for every change to a voucher’s balance
Asset Asset Serialized stock. Currently used as the template for the code and PIN issued on voucher creation
Promotion s_c__Promotion2__c A promotion: what triggers it, what it gives, and when it runs
Promotion Condition s_c__Promotion2_Condition__c One test a cart must pass for a promotion to apply
Condition s_c__Condition__c What must be true for a promotion reward to apply
Promotion Product Scope s_c__Promotion2_Product_Scope__c Limits a promotion to particular products or categories
Promotion Usage s_c__Promotion2Usage__c Records each use of a promotion, enforcing usage limits
Legacy Promotion s_c__Promotion__c The superseded promotions model, kept for existing data
Legacy Promotion Action s_c__Promotion_Action__c What a legacy promotion does when it applies
Legacy Promotion Scope s_c__Promotion_Scope__c What a legacy promotion applies to
Promotion Credit s_c__Promotion_Credit__c Account credit issued by a promotion
Discount s_c__Discount__c An automatic price reduction, applied without a code
Discount Credit s_c__Discount_Credit__c Account credit issued by a discount
Reward s_c__Reward__c A benefit earned by a shopper, such as points or a free item
Reward Usage s_c__Reward_Usage__c Records a reward being redeemed
Tax s_c__Tax__c One tax rate and how it is applied
Tax Group s_c__Tax_Group__c A set of taxes applied together, typically per region
Tax Tax Group s_c__Tax_Tax_Group__c Places a tax in a tax group
Product Tax s_c__Product_Tax__c Applies a specific tax to a product
Product Tax Group s_c__Product_Tax_Group__c Applies a tax group to a product
Tax Provider s_c__Tax_Provider__c An external tax calculation service and its credentials
Tax Provider Log s_c__Tax_Provider_Log__c The request and response for one external tax calculation

Where it meets other domains

  • Catalog. Cart items, order items, and promotion scopes all point at products and categories. Prices come from the price book, not the product. See catalog objects.
  • Customers and accounts. An order belongs to an account and a contact, and account credit is spent through payments. See customer and account objects.
  • Fulfillment and inventory. Cart fulfillments become shipments and fulfillment items after checkout, and stock moves when they do. See fulfillment and inventory objects.
  • Point of sale. A POS sale creates the same cart, order, and payment records as the web, linked to the register and shift that took it. See POS objects.

Tax and promotion scoping both run through join records. If you are querying or importing one, junction objects explains what that means.

Was this article helpful?

Was this article helpful?