In Order Management, each order is represented by an OrderSummary record and a set of supporting records, such as OrderItemSummaries and OrderDeliveryGroupSummaries. When you import order data, you create the Order record and supporting records, including OrderItems and OrderDeliveryGroups. Then process the order with the Create Order Summary flow core action or API to create the OrderSummary and its supporting records.
Don’t directly create OrderSummary records. Always run the flow core action or call the API.
If you’re importing small amounts of order data, you can make composite REST API requests. A composite API call can include up to 200 records. That limit applies to all objects, not only the orders. For example, an order with 5 items and an order-level adjustment that applies to each of them includes at least 11 records: 1 order, 5 order items, and 5 order item adjustments. For more information, see Composite Resources in the REST API Developer Guide.
When making API calls to import data, keep in mind that they count toward your API limits. You can request a temporary increase for importing historical orders by opening a case with Salesforce Customer Support. Allow at least 2 weeks for Support to arrange the increase.
Managed Orders and Unmanaged Orders
The OrderSummary field OrderLifecycleType specifies whether the order is managed with Order Management features. The default value is Managed. You can configure the Create Order Summary action or API request to set the OrderLifecycleType field to Managed or Unmanaged when it creates a record, but you can’t change it later.
Examples of orders that use the unmanaged lifecycle type include historical orders and orders managed by an external system.
For information about the differences between managed and unmanaged order lifecycles, see Order Lifecycle Management.
Data Requirements for Object Management Import
When importing storefront data, the order in which you create records is important because of the relationships between objects. For example, an OrderItem record requires a Product2, a PriceBookEntry, and an Order. So you can’t create an OrderItem record until those three related records exist.
For each imported order, create records in this order.
Shopper data
Account
Contact (not required if the account record type is Person Account)
SalesChannel
Product2
PriceBookEntry (unless using Optional Price Books)
Payment data (depending on the type of payment)
AlternativePaymentMethod
CardPaymentMethod
DigitalWallet
GtwyProvPaymentMethodType
PaymentGatewayProvider
PaymentGateway
OrderDeliveryMethod (optional)
Order
The records created before the Order record aren’t specific to one order. When creating them, check for duplicates. For information on configuring automatic identification and handling duplicate records, see Manage Duplicate Records.
OrderItem (at least one)
OrderItemAdjustmentLineItem (optional)
OrderItemTaxLineItem (optional)
OrderDeliveryGroup (at least one)
PaymentGroup (optional)
PaymentAuthorization (optional)
Payment (optional)
In addition to the normally required fields, Order Management requires values for other fields for some objects. When creating a record for the objects in this table, define values for all the listed fields.
Object
Required Fields
Account
AccountNumber
BillingCity
BillingCountry
BillingCountryCode
BillingState
BillingStreet
FirstName (if a Person Account)
IsPersonAccount
LastName (if a Person Account)
Name (if not a Person Account)
SalesChannel
SalesChannelName
Product2
Description
IsActive
Name
ProductCode
StockKeepingUnit
CardPaymentMethod
AccountId
CardCategory
CardHolderName
CardType
ExpiryMonth
ExpiryYear
InputCardNumber
ProcessingMode
Status
Order
AccountId
BillingCity
BillingCountry
BillingCountryCode
BillingEmailAddress
BillingState
BillingStreet
EffectiveDate
Name
OrderedDate
OrderReferenceNumber
SalesChannelId
Status (Set this field to Draft for a new record, and change it to Active before creating the OrderSummary.)