0% found this document useful (0 votes)
762 views

Order Management Developer Guide

Uploaded by

Prakash Kolhe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
762 views

Order Management Developer Guide

Uploaded by

Prakash Kolhe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 356

Salesforce Order Management

Developer Guide
Version 52.0, Summer ’21

@salesforcedocs
Last updated: July 29, 2021
© Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,

as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS

Chapter 1: Salesforce Order Management Developer Guide . . . . . . . . . . . . . . . . . . . . . 1

Chapter 2: Order Management Standard Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2


FulfillmentOrder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
FulfillmentOrderItemAdjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
FulfillmentOrderItemTax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
FulfillmentOrderLineItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
LocationGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
LocationGroupAssignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
OrderAdjustmentGroupSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
OrderDeliveryGroupSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
OrderItemAdjustmentLineSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
OrderItemSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
OrderItemSummaryChange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
OrderItemTaxLineItemSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
OrderPaymentSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
OrderSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
OrderSummaryRoutingSchedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
ProcessException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
ReturnOrder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
ReturnOrderItemAdjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
ReturnOrderItemTax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
ReturnOrderLineItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
SalesChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Shipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
ShipmentItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Order Summary Entity Relationship Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Salesforce B2C Commerce Storefront Order Data Map . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Import Existing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Chapter 3: Salesforce Order Management in Apex . . . . . . . . . . . . . . . . . . . . . . . . . 165


Salesforce Order Management Apex Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
FulfillmentOrder Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
OmnichannelInventoryService Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
OrderPaymentSummary Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
OrderSummary Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
OrderSummaryCreation Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
ReturnOrder Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Contents

Routing Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190


Salesforce Order Management Apex Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
ConnectApi.AdjustItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
ConnectApi.AdjustOrderItemSummaryInputRepresentation . . . . . . . . . . . . . . . . . . . . 195
ConnectApi.ChangeInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
ConnectApi.ChangeItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
ConnectApi.CreateCreditMemoInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 196
ConnectApi.CreateOrderPaymentSummaryInputRepresentation . . . . . . . . . . . . . . . . . 197
ConnectApi.EnsureFundsAsyncInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 197
ConnectApi.EnsureRefundsAsyncInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 197
ConnectApi.FindRoutesWithFewestSplitsInputRepresentation . . . . . . . . . . . . . . . . . . . 198
ConnectApi.FulfillmentGroupInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
ConnectApi.FulfillmentOrderInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
ConnectApi.FulfillmentOrderInvoiceInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 199
ConnectApi.FulfillmentOrderLineItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . 200
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation . . . . . . . . . . . . . . 200
ConnectApi.LocationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
ConnectApi.LocationAvailabilityInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 201
ConnectApi.MultipleFulfillmentOrderInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 201
ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation . . . . . . . . . . . . . . . . 201
ConnectApi.OCICreateReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 201
ConnectApi.OCICreateReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . . 202
ConnectApi.OCIFulfillReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 202
ConnectApi.OCIFulfillReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . . . 203
ConnectApi.OCIGetInventoryAvailabilityInputRepresentation . . . . . . . . . . . . . . . . . . . 203
ConnectApi.OCIReleaseReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 204
ConnectApi.OCIReleaseReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . 204
ConnectApi.OCITransferReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 205
ConnectApi.OCITransferReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . 205
ConnectApi.OrderItemSummaryInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 206
ConnectApi.OrderSummaryInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
ConnectApi.QuantityWithSkuInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
ConnectApi.RankAverageDistanceInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 207
ConnectApi.ReturnItemsInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
ConnectApi.ReturnOrderInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
ConnectApi.ReturnOrderItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 209
ConnectApi.ReturnOrderLineItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 210
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation . . . . . . . . . . . . . . . . 210
ConnectApi.TargetLocationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Salesforce Order Management Apex Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
ConnectApi.AdjustOrderSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . 214
ConnectApi.AvailableLocationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 214
ConnectApi.AverageDistanceResultOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 214
ConnectApi.BaseOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Contents

ConnectApi.ChangeItemOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
ConnectApi.CreateCreditMemoOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 217
ConnectApi.CreateOrderPaymentSummaryOutputRepresentation . . . . . . . . . . . . . . . . 217
ConnectApi.DistanceCalculationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 217
ConnectApi.EnsureFundsAsyncOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 218
ConnectApi.EnsureRefundsAsyncOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 218
ConnectApi.ErrorResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation . . . . . . . . . . . . . . . . . . 218
ConnectApi.FulfillmentGroupOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 219
ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation . . . . . . . . . . . . . . . 219
ConnectApi.FulfillmentOrderInvoiceOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 219
ConnectApi.FulfillmentOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 219
ConnectApi.LocationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation . . . . . . . . . . . . . . . 220
ConnectApi.MultipleFulfillmentOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . 220
ConnectApi.OCIBaseOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
ConnectApi.OCICreateReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . . 221
ConnectApi.OCICreateReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . 221
ConnectApi.OCICreateReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . . 221
ConnectApi.OCIFulfillReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . . . 222
ConnectApi.OCIFulfillReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 222
ConnectApi.OCIFulfillReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . . . 222
ConnectApi.OCIFutureInventoryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 223
ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . . 223
ConnectApi.OCIInventoryRecordOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 223
ConnectApi.OCILocationAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 224
ConnectApi.OCILocationGroupAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . 224
ConnectApi.OCIPublishLocationStructureOutputRepresentation . . . . . . . . . . . . . . . . . 224
ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation . . . . . . . . . . . . . 224
ConnectApi.OCIReleaseReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . 225
ConnectApi.OCIReleaseReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 225
ConnectApi.OCIReleaseReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . 225
ConnectApi.OCITransferReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . 226
ConnectApi.OCITransferReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 226
ConnectApi.OCITransferReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . 226
ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . 227
ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation . . . . . . . . . . . 227
ConnectApi.OrderItemSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.OrderSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.PreviewCancelOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.PreviewReturnOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.RankAverageDistanceOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 229
ConnectApi.ReturnItemsOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
ConnectApi.ReturnOrderItemSplitLineOutputRepresentation . . . . . . . . . . . . . . . . . . . . 229
Contents

ConnectApi.ReturnOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
ConnectApi.SubmitCancelOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
ConnectApi.SubmitReturnOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

Chapter 4: Salesforce Order Management in the Chatter Connect API . . . . . . . . . . . 231


Salesforce Omnichannel Inventory Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Availability Records, Get Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Availability Records, Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Location Graph, Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Reservations, Create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Reservations, Fulfill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Reservations, Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Reservations, Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Salesforce Order Management Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Fulfillment Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Fulfillment Orders, Cancel Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Fulfillment Orders, Create Invoice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Fulfillment Orders, Create Multiple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Order Payment Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Order Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Order Summaries, Create Credit Memo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Order Summaries, Ensure Funds Async . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Order Summaries, Ensure Refunds Async . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Order Summaries, Preview Adjust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Order Summaries, Preview Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Order Summaries, Preview Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Order Summaries, Submit Adjust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Order Summaries, Submit Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Order Summaries, Submit Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Return Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Return Orders, Return Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Routing, Find Routes with Fewest Splits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Routing, Rank By Average Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Salesforce Order Management Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Adjust Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Adjust Order Item Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Change Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Change Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Create Credit Memo Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Create Order Payment Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Ensure Funds Async Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Ensure Refunds Async Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Find Routes With Fewest Splits Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Fulfillment Group Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Contents

Fulfillment Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273


Fulfillment Order Invoice Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Fulfillment Order Line Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Fulfillment Order Line Items To Cancel Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Location Availability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Location Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Multiple Fulfillment Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
OCI Create Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
OCI Create Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
OCI Fulfill Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
OCI Fulfill Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
OCI Get Inventory Availability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
OCI Release Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
OCI Release Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
OCI Transfer Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
OCI Transfer Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Order Item Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Order Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Quantity With Sku Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Rank Average Distance Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Return Items Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Return Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Return Order Item Delivery Charge Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Return Order Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Return Order Line Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Target Location Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Salesforce Order Management Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Adjust Order Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Available Location Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Average Distance Result Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Change Item Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Create Credit Memo Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Create Order Payment Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Distance Calculation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Ensure Funds Async Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Ensure Refunds Async Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Error Response Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Error with Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Find Routes With Fewest Splits Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Fulfillment Group Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Fulfillment Order Cancel Line Items Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Fulfillment Order Invoice Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Fulfillment Order Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Location Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Contents

Multiple Fulfillment Order Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300


OCI Create Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
OCI Create Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
OCI Create Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
OCI Fulfill Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
OCI Fulfill Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
OCI Fulfill Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
OCI Future Inventory Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
OCI Get Inventory Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
OCI Inventory Record Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
OCI Location Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
OCI Location Group Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
OCI Publish Location Structure Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
OCI Publish Location Structure Status Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
OCI Release Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
OCI Release Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
OCI Release Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
OCI Transfer Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
OCI Transfer Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
OCI Transfer Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
OCI Upload Inventory Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
OCI Upload Inventory Availability Status Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Order Item Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Order Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Preview Cancel Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Preview Return Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Rank Average Distance Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Return Items Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Return Order Item Split Line Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Return Order Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Submit Cancel Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Submit Return Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

Chapter 5: Order Management Invocable Actions . . . . . . . . . . . . . . . . . . . . . . . . . . 312


Salesforce Order Management Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Flow Core Action for Order Management: Adjust Order Item Summaries Preview . . . . . . . . . 314
Flow Core Action for Order Management: Adjust Order Item Summaries Submit . . . . . . . . . . 316
Flow Core Action for Order Management: Cancel Fulfillment Order Item . . . . . . . . . . . . . . . 319
Flow Core Action for Order Management: Cancel Order Item Summaries Preview . . . . . . . . 320
Flow Core Action for Order Management: Cancel Order Item Summaries Submit . . . . . . . . . 322
Flow Core Action for Order Management: Create Credit Memo . . . . . . . . . . . . . . . . . . . . . 324
Flow Core Action for Order Management: Create Fulfillment Order . . . . . . . . . . . . . . . . . . . 325
Flow Core Action for Order Management: Create an Invoice from Fulfillment Order . . . . . . . . 326
Flow Core Action for Order Management: Create Order Payment Summary . . . . . . . . . . . . . 327
Contents

Flow Core Action for Order Management: Create Order Summary . . . . . . . . . . . . . . . . . . . 328
Flow Core Action for Order Management: Create Return Order . . . . . . . . . . . . . . . . . . . . . 329
Flow Core Action for Order Management: Ensure Funds Async . . . . . . . . . . . . . . . . . . . . . 330
Flow Core Action for Order Management: Ensure Refunds Async . . . . . . . . . . . . . . . . . . . . 331
Flow Core Action for Order Management: Return Order Item Summaries Preview . . . . . . . . . 332
Flow Core Action for Order Management: Return Order Item Summaries Submit . . . . . . . . . 334
Flow Core Action for Order Management: Return Return Order Items . . . . . . . . . . . . . . . . . 336

Chapter 6: Salesforce Order Management Platform Events . . . . . . . . . . . . . . . . . . . 338


FOStatusChangedEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
OrderSummaryCreatedEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
OrderSumStatusChangedEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

Chapter 7: Salesforce Order Management Lightning Components . . . . . . . . . . . . . . 346


CHAPTER 1 Salesforce Order Management Developer Guide
Customize Salesforce Order Management and Omnichannel Inventory.

1
CHAPTER 2 Order Management Standard Objects
In this chapter ... Salesforce Order Management and Omnichannel Inventory include these standard objects.

• FulfillmentOrder
• FulfilmentOrderItemAdjustment
• FulfillmentOrderItemTax
• FulfillmentOrderLineItem
• Location
• LocationGroup
• LocationGroupAssignment
• OrderAdjustmentGroupSummary
• OrderDeliveryGroupSummary
• OrderItemAdjustmentLineSummary
• OrderItemSummary
• OrderItemSummaryChange
• OrderItemTaxLineItemSummary
• OrderPaymentSummary
• OrderSummary
• OrderSummaryRoutingSchedule
• ProcessException
• ReturnOrder
• ReturnOrderItemAdjustment
• ReturnOrderItemTax
• ReturnOrderLineItem
• SalesChannel
• Shipment
• ShipmentItem
• Order Summary
Entity Relationship
Diagram
• Salesforce B2C
Commerce Storefront
Order Data Map
• Import Existing Data

2
Order Management Standard Objects FulfillmentOrder

FulfillmentOrder
Represents a group of products and delivery charges on a single order that share the same fulfillment location, delivery method, and
recipient. The FulfillmentOrderLineItems belonging to a FulfillmentOrder are associated with OrderItemSummary objects belonging to
a single OrderSummary. This object is available in API version 48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs.

Fields
Field Details
AccountId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the Account or Person Account associated with the FulfillmentOrder. It represents the
shopper in the storefront.

BillToContactId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the Contact associated with the FulfillmentOrder. It represents the shopper in the
storefront when not using person accounts.
This field is available in API version 49.0 and later.

CurrencyIsoCode Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
ISO code for the currency of the OrderSummary associated with the FulfillmentOrder. The
default value is USD.
Possible values are:

3
Order Management Standard Objects FulfillmentOrder

Field Details
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

DeliveryMethodId Type
reference
Properties
Create, Filter, Group, Sort, Update
Description
ID of the DeliveryMethod used for this FulfillmentOrder.

FulfilledFromLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the Location handling this FulfillmentOrder.

FulfilledToAddress Type
address
Properties
Filter, Nillable
Description
Address of the recipient.

FulfilledToCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address city.

FulfilledToCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address country.

4
Order Management Standard Objects FulfillmentOrder

Field Details
FulfilledToEmailAddress Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address of the recipient.

FulfilledTo Type
GeocodeAccuracy picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy of the geocode for the recipient address.
Possible values are:
• Address
• Block
• City
• County
• ExtendedZip
• NearAddress
• Neighborhood
• State
• Street
• Unknown
• Zip

FulfilledToLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with FulfilledToLongitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.

FulfilledToLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update

5
Order Management Standard Objects FulfillmentOrder

Field Details

Description
Used with FulfilledToLatitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.

FulfilledToName Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Name on the recipient address.

FulfilledToPhone Type
phone
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Phone number of the recipient.

FulfilledToPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address postal code.

FulfilledToState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address state.

FulfilledToStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address street.

FulfillmentOrderNumber Type
string

6
Order Management Standard Objects FulfillmentOrder

Field Details

Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrder.

GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the products and delivery charges on the
FulfillmentOrder. This amount includes all FulfillmentOrderLineItems associated with the
FulfillmentOrder. This amount is equal to TotalAmount + TotalTaxAmount.

InvoiceId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the Invoice associated with the FulfillmentOrder.

IsSuspended Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the FulfillmentOrder is suspended. The default value is false.

ItemCount Type
double
Properties
Filter, Nillable, Sort
Description
Sum of the quantities of the FulfillmentOrderLineItems included in the FulfillmentOrder.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed a record related to this record.

7
Order Management Standard Objects FulfillmentOrder

Field Details
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed this record. A null value can mean that this
record has only been referenced (LastReferencedDate) and not viewed.

OrderId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the original Order that generated the FulfillmentOrder.

OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderSummary associated with the FulfillmentOrder.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the User who currently owns this FulfillmentOrder. Default value is the User logged in
to the API to perform the create.

Status Type
picklist
Properties
Create, Filter, Group, Sort, Update
Description
Status of the FulfillmentOrder. Each status corresponds to one status category, shown here
in parentheses. You can customize the status picklist to represent your business processes,
but the status category picklist is fixed because processing is based on those values. If you
customize the status picklist, include at least one status value for each status category.
Default values are:
• Allocated (Activated)

8
Order Management Standard Objects FulfillmentOrder

Field Details
• Assigned (Fulfilling)
• Cancelled (Cancelled)
• Draft (Draft)
• Fulfilled (Closed)
• Pickpack (Fulfilling)

StatusCategory Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Status category of the FulfillmentOrder. Processing of the FulfillmentOrder depends on this
value. Each status category corresponds to one or more statuses.
Possible values are:
• ACTIVATED—Activated
• CANCELLED—Cancelled
• CLOSED—Closed
• DRAFT—Draft
• FULFILLING—Fulfilling

TaxLocaleType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The system used to handle tax on the original Order associated with the FulfillmentOrder.
Gross usually applies to taxes like value-added tax (VAT), and Net usually applies to taxes like
sales tax.
Possible values are:
• Gross (displays most prices and taxes as combined values)
• Net (displays most prices and taxes as separate values)
This field is available in API version 49.0 and later.

TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the FulfillmentOrder. This
value only includes adjustments to FulfillmentOrderLineItems of type code Product.

9
Order Management Standard Objects FulfillmentOrder

Field Details
TotalAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the FulfillmentOrder,
inclusive of tax. This value only includes adjustments to FulfillmentOrderLineItems of type
code Product. This amount is equal to TotalAdjustmentAmount +
TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjustmentTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.

TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Adjusted total, not including tax, of the FulfillmentOrderLineItems, including products and
delivery charges, on the FulfillmentOrder.

TotalDelivery Type
AdjustAmount currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the FulfillmentOrder.
This value only includes adjustments to FulfillmentOrderLineItems of type code Charge.

TotalDeliveryAdjust Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the FulfillmentOrder,
inclusive of tax. This value only includes adjustments to FulfillmentOrderLineItems of type

10
Order Management Standard Objects FulfillmentOrder

Field Details
code Charge. This amount is equal to TotalDeliveryAdjustAmount +
TotalDeliveryAdjustTaxAmount.
This field is available in API version 49.0 and later.

TotalDelivery Type
AdjustTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAdjustAmount.

TotalDeliveryAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the delivery charges on the FulfillmentOrder. This value only includes
FulfillmentOrderLineItems of type code Charge.

TotalDeliveryAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the delivery charges on the FulfillmentOrder, inclusive of tax. This value only
includes FulfillmentOrderLineItems of type code Charge. This amount is equal to
TotalDeliveryAmount + TotalDeliveryTaxAmount.
This field is available in API version 49.0 and later.

TotalDeliveryTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAmount.

TotalProductAmount Type
currency
Properties
Filter, Nillable, Sort

11
Order Management Standard Objects FulfillmentOrder

Field Details

Description
Total price of the products on the FulfillmentOrder. This value only includes
FulfillmentOrderLineItems of type code Product.

TotalProductAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the products on the FulfillmentOrder, inclusive of tax. This value only includes
FulfillmentOrderLineItems of type code Product. This amount is equal to TotalProductAmount
+ TotalProductTaxAmount.
This field is available in API version 49.0 and later.

TotalProductTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAmount.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.

Type Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Type of the FulfillmentOrder. Each type corresponds to one type category, shown here in
parentheses. You can customize the type picklist to represent your business processes, but
the type category picklist is fixed because processing is based on those values. If you customize
the type picklist, include at least one type value for each type category.
Default values are:
• Download (Digital)
• Email (Digital)
• In Store Pickup (Physical)

12
Order Management Standard Objects FulfillmentOrderItemAdjustment

Field Details
• Retail Store (Physical)
• Supplier (Drop Ship)
• Warehouse (Physical)

TypeCategory Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type category of the FulfillmentOrder. Processing of the FulfillmentOrder depends on this
value. Each type category corresponds to one or more types.
Possible values are:
• DIGITAL—Digital
• DROPSHIP—Drop Ship
• PHYSICAL—Physical

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
FulfillmentOrderFeed
Feed tracking is available for the object.
FulfillmentOrderOwnerSharingRule
Sharing rules are available for the object.
FulfillmentOrderShare
Sharing is available for the object.

SEE ALSO:
FulfillmentOrderLineItem
OrderSummary

FulfillmentOrderItemAdjustment
Represents a price adjustment on a FulfillmentOrderLineItem. Corresponds to an OrderItemAdjustmentLineSummary associated with
the corresponding OrderItemSummary. This object is available in API version 48.0 and later.
This object is used for calculations and doesn’t have a default record page.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()

13
Order Management Standard Objects FulfillmentOrderItemAdjustment

Special Access Rules


This object is only available in Salesforce Order Management orgs.

Fields
Field Details
Amount Type
currency
Properties
Create, Filter, Sort
Description
Amount, not including tax, of the adjustment.

CampaignName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Campaign associated with the adjustment.

CouponName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Coupon associated with the adjustment.

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the FulfillmentOrderLineItem to which the adjustment applies.
The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

14
Order Management Standard Objects FulfillmentOrderItemAdjustment

Field Details
Description Type
textarea
Properties
Create, Nillable, Update
Description
Text description of the adjustment.

FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the FulfillmentOrder associated with the FulfillmentOrderLineItem to which the
adjustment applies.

FulfillmentOrderItem Type
AdjustmentNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrderLineItemAdjustment.

FulfillmentOrder Type
LineItemId reference
Properties
Create, Filter, Group, Sort
Description
ID of the FulfillmentOrderLineItem to which this adjustment applies.

OrderItemAdjust Type
LineSummaryId reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderItemAdjustmentLineSummary associated with the adjustment.

PromotionName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update

15
Order Management Standard Objects FulfillmentOrderItemTax

Field Details

Description
Promotion associated with the adjustment.

TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +
TotalTaxAmount.
This field is available in API version 49.0 and later.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the Amount.

SEE ALSO:
FulfillmentOrder
FulfillmentOrderItemTax
FulfillmentOrderLineItem
OrderItemAdjustmentLineSummary

FulfillmentOrderItemTax
Represents the tax on a FulfillmentOrderLineItem or FulfillmentOrderItemAdjustment. Corresponds to an OrderItemTaxLineItemSummary.
This object is available in API version 48.0 and later.
This object is used for calculations and doesn’t have a default record page.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs.

16
Order Management Standard Objects FulfillmentOrderItemTax

Fields
Field Details
Amount Type
currency
Properties
Create, Filter, Sort
Description
Amount of tax represented by the FulfillmentOrderItemTax.

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the FulfillmentOrderLineItem to which the tax applies. The
default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the FulfillmentOrderItemTax.

FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the associated FulfillmentOrder.

FulfillmentOrder Type
ItemAdjustId reference
Properties
Create, Filter, Group, Nillable, Sort

17
Order Management Standard Objects FulfillmentOrderItemTax

Field Details

Description
If this object represents tax on an adjustment, this value is the ID of the
FulfillmentOrderItemAdjustment to which the tax applies. If this value is null, the adjustment
applies to a FulfillmentOrderLineItem.

FulfillmentOrderItem Type
TaxNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrderItemTax.

FulfillmentOrder Type
LineItemId reference
Properties
Create, Filter, Group, Sort
Description
If this object represents tax on a FulfillmentOrderLineItem, this value is the ID of that
FulfillmentOrderLineItem. If this object represents tax on an adjustment, this value is the ID
of the FulfillmentOrderLineItem to which the adjustment applies.

OrderItemTaxLineItem Type
SummaryId reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderItemTaxLineItemSummary associated with the OrderItemSummary that
corresponds to the FulfillmentOrderLineItem to which the tax applies.

Rate Type
percent
Properties
Create, Filter, Nillable, Sort, Update
Description
Tax rate used to calculate the Amount.

TaxEffectiveDate Type
date
Properties
Create, Filter, Group, Sort, Update
Description
Date on which the Amount was calculated. Important due to tax rate changes over time.

18
Order Management Standard Objects FulfillmentOrderLineItem

Field Details
Type Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Indicates whether the Amount is actual or estimated.
Possible values are:
• Actual
• Estimated

SEE ALSO:
FulfillmentOrder
FulfillmentOrderItemAdjustment
FulfillmentOrderLineItem
OrderItemTaxLineItemSummary

FulfillmentOrderLineItem
Represents a product or delivery charge belonging to a FulfillmentOrder. Corresponds to an OrderItemSummary. This object is available
in API version 48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs.

Fields
Field Details
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort

19
Order Management Standard Objects FulfillmentOrderLineItem

Field Details

Description
ISO code for the currency of the FulfillmentOrder associated with the FulfillmentOrderLineItem.
The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the FulfillmentOrderLineItem.

EndDate Type
dateTime
Properties
Create, Filter, Nillable, Sort
Description
End date of the FulfillmentOrderLineItem.

FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the FulfillmentOrder associated with the FulfillmentOrderLineItem.

FulfillmentOrder Type
LineItemNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrderLineItem.

GrossUnitPrice Type
currency

20
Order Management Standard Objects FulfillmentOrderLineItem

Field Details

Properties
Create, Filter, Nillable, Sort
Description
Unit price, including tax, of the FulfillmentOrderLineItem. This value is equal to TotalPrice +
TotalTaxAmount.
This field is available in API version 49.0 and later.

OrderItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the original OrderItem for the OrderItemSummary associated with the
FulfillmentOrderLineItem.

OrderItemSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderItemSummary associated with the FulfillmentOrderLineItem.

OriginalQuantity Type
double
Properties
Create, Filter, Sort
Description
Original quantity of the FulfillmentOrderLineItem.

Product2Id Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the product represented by the FulfillmentOrderLineItem.

Quantity Type
double
Properties
Create, Filter, Sort, Update

21
Order Management Standard Objects FulfillmentOrderLineItem

Field Details

Description
Current quantity of the FulfillmentOrderLineItem. Equal to the original quantity minus any
canceled quantity.

QuantityUnitOfMeasure Type
string
Properties
Create, Filter, Group, Nillable, Sort
Description
Unit of measure of the quantity, for example: unit, gallon, ton, or case.

ServiceDate Type
dateTime
Properties
Create, Filter, Nillable, Sort
Description
Service or start date of the FulfillmentOrderLineItem.

TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of any price adjustments applied to the FulfillmentOrderLineItem.

TotalAdjustment Type
AmountWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the FulfillmentOrderLineItem, inclusive of
tax. This amount is equal to TotalAdjustmentAmount + TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjustment Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.

22
Order Management Standard Objects FulfillmentOrderLineItem

Field Details
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the FulfillmentOrderLineItem.

TotalLineAmount Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort
Description
Total, not including adjustments or tax, of the FulfillmentOrderLineItem.

TotalLineAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the FulfillmentOrderLineItem, inclusive of tax. This amount is equal to
TotalLineAmount + TotalLineTaxAmount.
This field is available in API version 49.0 and later.

TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.

TotalPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the FulfillmentOrderLineItem. Equal to UnitPrice
times Quantity.

TotalTaxAmount Type
currency

23
Order Management Standard Objects FulfillmentOrderLineItem

Field Details

Properties
Filter, Nillable, Sort
Description
Tax on the TotalPrice.

Type Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
Type of the FulfillmentOrderLineItem. Matches the type of the associated OrderItemSummary.
Delivery Charge indicates that the FulfillmentOrderLineItem represents a delivery charge.
Order Product indicates that it represents any other type of product, service, or charge. Each
type corresponds to one type code, shown here in parentheses.
Possible values are:
• Delivery Charge
• Order Product

TypeCode Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
Type code of the FulfillmentOrderLineItem. Matches the type code of the associated
OrderItemSummary. Processing depends on this value. Charge indicates that the
FulfillmentOrderLineItem represents a delivery charge. Product indicates that it represents
any other type of product, service, or charge. Each type category corresponds to one or more
types.
Possible values are:
• Charge
• Product

UnitPrice Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort

24
Order Management Standard Objects Location

Field Details

Description
Unit price of the FulfillmentOrderLineItem.

SEE ALSO:
FulfillmentOrder
FulfillmentOrderItemAdjustment
FulfillmentOrderItemTax
OrderItemSummary

Location
Represents a warehouse, service vehicle, work site, or other element of the region where your team performs field service work. In API
version 49.0 and later, you can associate activities with specific locations. Activities, such as the tasks and events related to a location,
appear in the activities timeline when you view the location detail page. Also in API version 49.0 and later, Work.com users can view
Employees as a related list on Location records.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


Field Service must be enabled.

Fields
Field Name Details
CloseDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date the location closed or went out of service.

ConstructionEndDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update

25
Order Management Standard Objects Location

Field Name Details

Description
Date construction ended at the location.

ConstructionStartDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date construction began at the location.

Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A brief description of the location.

DrivingDirections Type
string
Properties
Create, Filter, Nillable, Sort, Update
Description
Directions to the location.

ExternalReference Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Identifier of a location.

IsInventoryLocation Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location stores parts.

Note: This field must be selected if you want to associate the location
with product items.

26
Order Management Standard Objects Location

Field Name Details


IsMobile Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location moves. For example, a truck or tool box.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the location was last modified. Its label in the user interface is
Last Modified Date.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date the location was last viewed.

Latitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The latitude of the location.

Location Type
location
Properties
Nillable
Description
The geographic location.

LocationLevel Type
int
Properties
Filter, Group, Nillable, Sort

27
Order Management Standard Objects Location

Field Name Details

Description
The location’s position in a location hierarchy. If the location has no parent or
child locations, its level is 1. Locations that belong to a hierarchy have a level of
1 for the root location, 2 for the child locations of the root location, 3 for their
children, and so forth.

LocationType Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Picklist of location types. It has no default values, so you must populate it before
creating any location records.

LogoId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A ContentAsset representing a logo for the location.
This field is available in API version 50.0 and later.
This is a relationship field.
Relationship Name
Logo
Relationship Type
Lookup
Refers To
ContentAsset

Longitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The longitude of the location.

Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update

28
Order Management Standard Objects Location

Field Name Details

Description
The name of the location. For example, Service Van #4.

OpenDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date the location opened or came into service.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The location’s owner or driver.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User

ParentLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The location’s parent location. For example, if vans are stored at a warehouse
when not in service, the warehouse is the parent location.
This is a relationship field.
Relationship Name
ParentLocation
Relationship Type
Lookup
Refers To
Location

PossessionDate Type
date

29
Order Management Standard Objects Location

Field Name Details

Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The date the location was purchased.

RemodelEndDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date when remodel construction ended at the location.

RemodelStartDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date when remodel construction started at the location.

RootLocationId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
(Read Only) The top-level location in the location’s hierarchy.
This is a relationship field.
Relationship Name
RootLocation
Relationship Type
Lookup
Refers To
Location

ShouldSyncWithOci Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location should sync its data with Omnichannel Inventory.
The default value is false.
This field is available in API version 51.0 and later.

30
Order Management Standard Objects Location

Field Name Details


TimeZone Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Picklist of available time zones.

VisitorAddressId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Lookup to an account’s or client’s address.
This is a relationship field.
Relationship Name
VisitorAddress
Relationship Type
Lookup
Refers To
Address

Usage
Before creating any location records, add at least one value to the Location Type picklist. LocationType is a required field.
To track your inventory in Salesforce, create product items, which represent the stock of a particular product a particular location. For
example, create a product item that represents the 500 bolts you have in stock at your Warehouse A location. Each product item must
be associated with a location.
To get a more granular picture of your field service operation, associate locations with service territories. For example, if a warehouse is
located in a particular service territory, add it as a service territory location.

Important: “Location” in Salesforce can also refer to the geolocation compound field found on many standard objects. When
referencing the Location object in your Apex code, always use Schema.Location instead of Location to prevent confusion
with the standard Location compound field. If referencing both the Location object and the Location field in the same snippet,
you can differentiate between the two by using System.Location for the field and Schema.Location for the object.

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
LocationChangeEvent (API version 48.0)
Change events are available for the object.

31
Order Management Standard Objects LocationGroup

LocationFeed
Feed tracking is available for the object.
LocationHistory
History is available for tracked fields of the object.
LocationOwnerSharingRule
Sharing rules are available for the object.
LocationShare
Sharing is available for the object.

LocationGroup
Represents a group of Omnichannel Inventory locations, providing an aggregate view of inventory availability across those locations.
Omnichannel Inventory can create an inventory reservation for an order at the location group level, then assign the reservation to one
or more locations in the group as needed. This object is available in API version 51.0 and later.
You can define location groups according to the logic of your business needs. For example, a location group can represent the warehouses
in a geographic region, or it can include the fulfillment centers associated with a particular online storefront.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Omnichannel Inventory orgs.

Fields
Field Details
Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the location group.

ExternalReference Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update

32
Order Management Standard Objects LocationGroup

Field Details

Description
Used when OCI is integrated with B2C Commerce to associate the location group with an
inventory list in B2C Commerce. This value must match the inventory list ID in B2C Commerce.

IsEnabled Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location group is in use. If set to false, then inventory functions
ignore this location group and its data isn’t synchronized with OCI. The default value is true.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.

LocationGroupName Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the location group.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this location group. Default value is the API user that
created the record.

33
Order Management Standard Objects LocationGroupAssignment

Field Details
ShouldSyncWithOci Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Specifies whether to synchronize inventory data for this location group with Omnichannel
Inventory. The default value is true.

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
LocationGroupFeed
Feed tracking is available for the object.
LocationGroupHistory
History is available for tracked fields of the object.
LocationGroupOwnerSharingRule
Sharing rules are available for the object.
LocationGroupShare
Sharing is available for the object.

LocationGroupAssignment
Represents the assignment of a location to a location group. This object is available in API version 51.0 and later.
You can assign a location to multiple location groups, which associates it with one location group assignment for each location group
that it’s assigned to. Each location group assignment represents the relationship between one location and one location group, so a
location or location group can be associated with multiple location group assignments.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Omnichannel Inventory orgs.

34
Order Management Standard Objects LocationGroupAssignment

Fields
Field Details
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.

LocationExternalReference Type
string
Properties
Filter, Group, Nillable, Sort
Description
The external reference of the associated location.

LocationGroupAssignment Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
The name of the location group assignment.

LocationGroupExternalReference Type
string
Properties
Filter, Group, Nillable, Sort
Description
The external reference of the associated location group.

LocationGroupId Type
reference
Properties
Create, Filter, Group, Sort

35
Order Management Standard Objects OrderAdjustmentGroupSummary

Field Details

Description
(Master-Detail) The associated location group.

LocationGroupName Type
string
Properties
Filter, Group, Nillable, Sort
Description
The location group name of the associated location group.

LocationId Type
reference
Properties
Create, Filter, Group, Sort
Description
(Master-Detail) The associated location.

LocationName Type
string
Properties
Filter, Group, Nillable, Sort
Description
The name of the associated location.

OrderAdjustmentGroupSummary
Represents the current properties and state of a group of related price adjustments. Associated with a set of
OrderItemAdjustmentLineSummaries that apply to OrderItemSummaries belonging to one OrderSummary. Corresponds to one or more
order adjustment group objects, consisting of an original object and any change objects applicable to it. This object is available in API
version 48.0 and later.
An OrderAdjustmentGroupSummary can represent an adjustment to an entire order as a group of adjustments to each of its products.
For example, representing “10% off the order” as a set of 10% off adjustments to each product on the order. It can also represent an
adjustment that applies to a subset of the products on an order. For example, representing “buy one, get one 50% off” as a 25% off
adjustment to each of two products.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

36
Order Management Standard Objects OrderAdjustmentGroupSummary

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

Fields
Field Details
AdjustmentCauseId Type
reference
Properties
Filter, Group, Nillable, Sort, Update
Description
References the specific promotions applied.
This is a polymorphic relationship field.
Relationship Name
AdjustmentCause
Relationship Type
Lookup
Refers To
Promotion
This field is available in API version 52.0 and later.

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the adjustments in the
group. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
textarea
Properties
Create, Nillable, Update

37
Order Management Standard Objects OrderAdjustmentGroupSummary

Field Details

Description
Description of the OrderAdjustmentGroupSummary.
This field can be edited.

GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including tax, of the associated OrderItemAdjustmentLineSummaries.

Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderAdjustmentGroupSummary.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderAdjustmentGroupSummary.

OriginalOrderAdjGroupId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original OrderAdjustmentGroup associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.

TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, not including tax, of the associated OrderItemAdjustmentIineSummaries.

38
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.

Type Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Type of the OrderAdjustmentGroupSummary. Header represents an order-level adjustment
with an OrderItemAdjustmentLineSummary for each OrderItemSummary on the
OrderSummary. SplitLine represents any other related set of
OrderItemAdjustmentLineSummaries.
Possible values are:
• Header
• SplitLine
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

SEE ALSO:
OrderItemAdjustmentLineSummary

OrderDeliveryGroupSummary
Represents the current properties and state of a group of OrderItemSummaries, belonging to one OrderSummary, to be fulfilled using
the same delivery method and delivered to the same address. A single shipment can include them all, but that is not guaranteed.
Corresponds to one or more order delivery group objects, consisting of an original object and any change objects applicable to it. This
object is available in API version 48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

39
Order Management Standard Objects OrderDeliveryGroupSummary

Fields
Field Details
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the
OrderDeliveryGroupSummary. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

DeliverToAddress Type
address
Properties
Filter, Nillable
Description
Address of the recipient.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

DeliverToCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address city.

DeliverToCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address country.

40
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details
DeliverTo Type
GeocodeAccuracy picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy of the geocode for the recipient address.
Possible values are:
• Address
• Block
• City
• County
• ExtendedZip
• NearAddress
• Neighborhood
• State
• Street
• Unknown
• Zip

DeliverToLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with FulfilledToLongitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.

DeliverToLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with FulfilledToLatitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.

DeliverToName Type
string
Properties
Create, Filter, Group, Sort, Update

41
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details

Description
Name on the recipient address.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

DeliverToPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address postal code.

DeliverToState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address state.

DeliverToStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address street.

DeliveryInstructions Type
textarea
Properties
Create, Nillable, Update
Description
Special instructions for the delivery.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

Description Type
textarea
Properties
Create, Nillable, Update

42
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details

Description
Description of the OrderDeliveryGroupSummary.
This field can be edited.

DesiredDeliveryDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Desired date for delivery. This field is informational, available for customizations.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

EmailAddress Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address of the recipient.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

GiftMessage Type
textarea
Properties
Create, Nillable, Update
Description
Gift message to include.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the delivery charges associated with the
OrderDeliveryGroupSummary. This value only includes OrderItemSummaries of type code
Charge.

43
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details
IsGift Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the OrderDeliveryGroupSummary represents a gift.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

OrderDeliveryGroup Type
SummaryNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the OrderDeliveryGroupSummary.

OrderDeliveryMethodId Type
reference
Properties
Filter, Group, Sort
Description
ID of the order delivery method specified for the OrderDeliveryGroupSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderDeliveryGroupSummary.

OriginalOrderDelivery Type
GroupId reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original order delivery group associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.

44
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details
PhoneNumber Type
phone
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Phone number of the recipient.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

PromisedDeliveryDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Promised date for delivery. This field is informational, available for customizations.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total price adjustments applied to delivery charges associated with the
OrderDeliveryGroupSummary. This value only includes adjustments to OrderItemSummaries
of type code Charge.

TotalAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges associated with the
OrderDeliveryGroupSummary, inclusive of tax. This amount is equal to
TotalAdjustmentAmount + TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjustment Type
TaxAmount currency

45
Order Management Standard Objects OrderDeliveryGroupSummary

Field Details

Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.

TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the delivery charges associated with the
OrderDeliveryGroupSummary. This value only includes adjustments to OrderItemSummaries
of type code Charge.

TotalLineAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, not including adjustments or tax, of the delivery charges associated with the
OrderDeliveryGroupSummary.

TotalLineAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the delivery charges associated with the OrderDeliveryGroupSummary, inclusive of
tax. This amount is equal to TotalLineAmount + TotalLineTaxAmount.
This field is available in API version 49.0 and later.

TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort

46
Order Management Standard Objects OrderItemAdjustmentLineSummary

Field Details

Description
Tax on the TotalAmount.

SEE ALSO:
OrderItemSummary

OrderItemAdjustmentLineSummary
Represents the current properties and state of price adjustments on an OrderItemSummary. Corresponds to one or more order item
adjustment line item objects, consisting of an original object and any change objects applicable to it. This object is available in API version
48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

Fields
Field Details
AdjustmentCauseId Type
reference
Properties
Filter, Group, Nillable, Sort, Update
Description
References the specific promotions applied.
This is a polymorphic relationship field.
Relationship Name
AdjustmentCause
Relationship Type
Lookup
Refers To
Promotion
This field is available in API version 52.0 and later.

47
Order Management Standard Objects OrderItemAdjustmentLineSummary

Field Details
Amount Type
currency
Properties
Filter, Sort
Description
Amount, not including tax, of the OrderItemAdjustmentLineSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderItemSummary to which the adjustment applies. The
default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the OrderItemAdjustmentLineSummary.
This field can be edited.

Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderItemAdjustmentLineSummary.

OrderAdjustmentGroup Type
SummaryId reference

48
Order Management Standard Objects OrderItemAdjustmentLineSummary

Field Details

Properties
Filter, Group, Nillable, Sort
Description
If this object belongs to an OrderAdjustmentGroupSummary, this value is the ID of that
OrderAdjustmentGroupSummary.

OrderItemSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderItemSummary to which the OrderItemAdjustmentLineSummary applies.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderItemSummary to which this
OrderItemAdjustmentLineSummary applies.

OriginalOrderItem Type
AdjustmentLineItemId reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original OrderItemAdjustmentLine associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.

Priority Type
integer
Properties
Create, Nillable
Description
Numerical rank used to apply promotions in the correct order.
This field is available in API version 52.0 and later.

TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort

49
Order Management Standard Objects OrderItemSummary

Field Details

Description
Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +
TotalTaxAmount.
This field is available in API version 49.0 and later.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the Amount.

SEE ALSO:
OrderItemSummary
OrderItemTaxLineItemSummary

OrderItemSummary
Represents the current properties and state of a product or charge on an OrderSummary. Corresponds to one or more order item objects,
consisting of an original object and any change objects applicable to it. This object is available in API version 48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

Fields
Field Details
AdjustedLineAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the OrderItemSummary.

50
Order Management Standard Objects OrderItemSummary

Field Details
AdjustedLineAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the OrderItemSummary, inclusive of adjustments and tax. This amount is equal
to AdjustedLineAmount + TotalAdjustedLineTaxAmount.
This field is available in API version 49.0 and later.

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the OrderItemSummary.
The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the OrderItemSummary.
This field can be edited.

EndDate Type
date
Properties
Filter, Group, Nillable, Sort
Description
End date of the OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

51
Order Management Standard Objects OrderItemSummary

Field Details
GrossUnitPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Unit price, including tax, of the OrderItemSummary. This value is equal to UnitPrice + the
amount of tax on the UnitPrice.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is available in API version 49.0 and later.

LineNumber Type
int
Properties
Filter, Group, Nillable, Sort
Description
The order line number assigned to this OrderItemSummary. For example, if this object is the
third in the displayed list of OrderItemSummaries belonging to the OrderSummary, this value
is 3.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

ListPrice Type
currency
Properties
Filter, Nillable, Sort
Description
List price of the product represented by this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderItemSummary.

52
Order Management Standard Objects OrderItemSummary

Field Details
OrderDeliveryGroup Type
SummaryId reference
Properties
Filter, Group, Sort
Description
ID of the OrderDeliveryGroupSummary to which this object belongs.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary to which this object belongs.

OriginalOrderItemId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original order item associated with this summary object. Nillable=true only if the
associated order summary is unmanaged. For managed order summaries, nillable=false.

Product2Id Type
reference
Properties
Filter, Group, Sort
Description
ID of the product represented by this OrderItemSummary.

ProductCode Type
string
Properties
Filter, Group, Nillable, Sort
Description
Product code of the product represented by this OrderItemSummary.

Quantity Type
double
Properties
Filter, Sort

53
Order Management Standard Objects OrderItemSummary

Field Details

Description
Current total quantity of products represented by this order item summary. Equal to
QuantityOrdered minus (QuantityCanceled and QuantityReturned).
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityAllocated Type
double
Properties
Filter, Sort
Description
Allocated quantity on this order item summary. This quantity is associated with one or more
FulfillmentOrderLineItems.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityAvailable Type
ToCancel double
Properties
Filter, Nillable, Sort
Description
Quantity that can still be canceled on this OrderItemSummary. Equal to QuantityOrdered
minus (QuantityCanceled and QuantityAllocated). This value duplicates
QuantityAvailableToFulfill.

QuantityAvailable Type
ToFulfill double
Properties
Filter, Nillable, Sort
Description
Quantity available to be fulfilled on this OrderItemSummary. Equal to QuantityOrdered minus
(QuantityCanceled and QuantityAllocated). This value duplicates QuantityAvailableToCancel.

QuantityAvailable Type
ToReturn double
Properties
Filter, Nillable, Sort
Description
Quantity available to be returned on this OrderItemSummary. Equal to QuantityFulfilled
minus QuantityReturnInitiated.

54
Order Management Standard Objects OrderItemSummary

Field Details
QuantityCanceled Type
double
Properties
Filter, Sort
Description
Canceled quantity on this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityFulfilled Type
double
Properties
Filter, Sort
Description
Fulfilled quantity on this OrderItemSummary. This quantity can no longer be canceled.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityNetOrdered Type
double
Properties
Filter, Nillable, Sort
Description
Quantity available to be allocated on this OrderItemSummary. Equal to QuantityOrdered
minus QuantityCanceled.

QuantityOrdered Type
double
Properties
Filter, Sort
Description
Ordered quantity on this OrderItemSummary. It includes the originally ordered quantity plus
any quantity added to the order later.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityReturned Type
double

55
Order Management Standard Objects OrderItemSummary

Field Details

Properties
Filter, Sort
Description
Returned quantity on this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityReturnInitiated Type
double
Properties
Filter, Sort
Description
Quantity returned or pending return on this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

QuantityShipped Type
double
Properties
Filter, Nillable, Sort, Update
Description
Quantity shipped on this OrderItemSummary.
This field is available in API version 52.0 and later.

ReservedAtLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Reserved for future use.

ServiceDate Type
date
Properties
Filter, Group, Nillable, Sort
Description
Service or start date of the OrderItemSummary.

56
Order Management Standard Objects OrderItemSummary

Field Details
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

Status Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
Status of the OrderItemSummary. The default value is ORDERED.
Possible values are:
• ALLOCATED—Allocated
• CANCELED—Canceled
• FULFILLED—Fulfilled
• ORDERED—Ordered
• PAID—Paid
• PARTIALLYALLOCATED—Partially Allocated
• PARTIALLYFULFILLED—Partially Fulfilled
• RESHIPPED—Reshipped
• RETURNED—Returned
• RETURNINITIATED—Return Initiated

StockKeepingUnit Type
string
Properties
Filter, Group, Nillable, Sort
Description
The stock keeping unit (SKU) of the Product2 associated with the OrderItemSummary..
This field is available in API version 49.0 and later.

TotalAdjusted Type
LineTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the AdjustedLineAmount.

TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort

57
Order Management Standard Objects OrderItemSummary

Field Details

Description
Total of all price adjustments applied to this OrderItemSummary.

TotalAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of all price adjustments applied to this OrderItemSummary, inclusive of tax.
This amount is equal to TotalAdjustmentAmount + TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjustmentDistAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to this OrderItemSummary. This value
includes OrderItemAdjustmentLineSummaries that belong to
OrderAdjustmentGroupSummaries of type Header.

TotalAdjustmentDist Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the order-level price adjustments applied to this OrderItemSummary,
inclusive of tax. This amount is equal to TotalAdjustmentDistAmount +
TotalAdjustmentDistTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjustmentDist Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentDistAmount.

TotalAdjustmentTaxAmount Type
currency
Properties
Filter, Nillable, Sort

58
Order Management Standard Objects OrderItemSummary

Field Details

Description
Tax on the TotalAdjustmentAmount.

TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the OrderItemSummary, inclusive of tax. This amount is equal to TotalPrice +
TotalTaxAmount.
This field is available in API version 49.0 and later.

TotalLineAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of all non-order-level price adjustments applied to this OrderItemSummary. This value
includes OrderItemAdjustmentLineSummaries that don’t belong to an
OrderAdjustmentGroupSummary, or that belong to an OrderAdjustmentGroupSummary of
type SplitLine.

TotalLineAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total of all non-order-level price adjustments applied to this OrderItemSummary, inclusive
of tax. This amount is equal to TotalLineAdjustmentAmount +
TotalLineAdjustmentTaxAmount.
This field is available in API version 49.0 and later.

TotalLineAdjustment Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAdjustmentAmount.

TotalLineAmount Type
currency

59
Order Management Standard Objects OrderItemSummary

Field Details

Properties
Filter, Nillable, Sort
Description
Total, not including adjustments or tax, of the OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

TotalLineAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total unadjusted amount of the OrderItemSummary, inclusive of tax. This amount is equal
to TotalLineAmount + TotalLineTaxAmount.
This field is available in API version 49.0 and later.

TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.

TotalPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the OrderItemSummary.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalPrice.

Type Type
picklist

60
Order Management Standard Objects OrderItemSummary

Field Details

Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type of the OrderItemSummary. Delivery Charge indicates that the OrderItemSummary
represents a delivery charge. Order Product indicates that it represents any other type of
product, service, or charge. Each type corresponds to one type code, shown here in
parentheses.
Possible values are:
• Delivery Charge (Charge)
• Order Product (Product)
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

TypeCode Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type code of the OrderItemSummary. Charge indicates that the OrderItemSummary represents
a delivery charge. Product indicates that it represents any other type of product, service, or
charge.
Possible values are:
• Charge
• Product
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

UnitPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Unit price of the product represented by the OrderItemSummary.

61
Order Management Standard Objects OrderItemSummaryChange

Field Details
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

SEE ALSO:
FulfillmentOrderLineItem
OrderItemAdjustmentLineSummary
OrderItemTaxLineItemSummary
OrderSummary

OrderItemSummaryChange
Represents a change to an OrderItemSummary, usually a reduction in quantity due to a cancel or return. Corresponds to a change order
item. This object is available in API version 48.0 and later.
This object is used for calculations and doesn’t have a default record page.

Supported Calls
delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

Special Access Rules


This object is only available in Salesforce Order Management orgs.

Fields
Field Details
ChangeOrderItemId Type
reference
Properties
Filter, Group, Sort
Description
ID of the associated change order item.

ChangeType Type
picklist
Properties
Filter, Group, Restricted picklist, Sort

62
Order Management Standard Objects OrderItemSummaryChange

Field Details

Description
Type of change represented by the OrderItemSummaryChange.
Possible values are:
• Cancel
• DeliveryChargeAdjustment
• ProductAdjustment
• Return

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the
OrderItemSummaryChange. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

IsPreFulfillment Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the change occurs before the OrderItemSummary has been fulfilled.

OrderItemSummary Type
ChangeNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the OrderItemSummaryChange.

OrderItemSummaryId Type
reference
Properties
Filter, Group, Sort

63
Order Management Standard Objects OrderItemTaxLineItemSummary

Field Details

Description
ID of the OrderItemSummary to which the change applies.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary to which the associated OrderItemSummary belongs.

Reason Type
picklist
Properties
Defaulted on create, Filter, Group, Sort
Description
Reason for the change. You can customize this list.
The list has one default value:
• Unknown

SEE ALSO:
OrderItemSummary

OrderItemTaxLineItemSummary
Represents the current tax on an OrderItemSummary or OrderItemAdjustmentLineSummary. Corresponds to one or more order item
tax line items, consisting of an original object and any change objects applicable to it. This object is available in API version 48.0 and
later.

Supported Calls
delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(),
undelete(), update()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

64
Order Management Standard Objects OrderItemTaxLineItemSummary

Fields
Field Details
Amount Type
currency
Properties
Filter, Sort
Description
Amount of tax represented by the OrderItemTaxLineItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the
OrderItemTaxLineItemSummary. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
textarea
Properties
Nillable, Update
Description
Description of the OrderItemTaxLineItemSummary.
This field can be edited.

Name Type
string
Properties
Filter, Group, idLookup, Sort, Update
Description
Name of the OrderItemTaxLineItemSummary.

65
Order Management Standard Objects OrderItemTaxLineItemSummary

Field Details
OrderItemAdjustmentLine Type
SummaryId reference
Properties
Filter, Group, Nillable, Sort
Description
If this object represents tax on an adjustment, this value is the ID of the
OrderItemAdjustmentLineSummary to which the tax applies. If this value is null, the
adjustment applies to an OrderItemSummary.

OrderItemSummaryId Type
reference
Properties
Filter, Group, Sort
Description
If this object represents tax on an OrderItemSummary, this value is the ID of that
OrderItemSummary. If this object represents tax on an adjustment, this value is the ID of the
OrderItemSummary to which the adjustment applies.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary that the associated OrderItemSummary or
OrderItemAdjustmentLineSummary belongs to.

OriginalOrderItemTax Type
LineItemId reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original order item tax line item associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.

Rate Type
percent
Properties
Filter, Nillable, Sort
Description
Tax rate used to calculate the Amount.

66
Order Management Standard Objects OrderPaymentSummary

Field Details
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

TaxEffectiveDate Type
date
Properties
Filter, Group, Sort
Description
Date on which the Amount was calculated. Important due to tax rate changes over time.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

Type Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Indicates whether the Amount is actual or estimated.
Possible values are:
• Actual
• Estimated
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

SEE ALSO:
FulfillmentOrderItemTax
OrderItemAdjustmentLineSummary
OrderItemSummary

OrderPaymentSummary
Represents the current properties and state of payments using a single payment method that are applied to one OrderSummary. This
object is available in API version 48.0 and later.
Unlike most summary objects, an OrderPaymentSummary is not related to a similarly named order payment object. Instead, it combines
values from multiple payment objects that use the same payment method and apply to the same OrderSummary.

67
Order Management Standard Objects OrderPaymentSummary

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

Fields
Field Details
AuthorizationAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that has been authorized.

AuthorizationReversal Type
Amount currency
Properties
Filter, Nillable, Sort
Description
Amount of the AuthorizationAmount that has been reversed.

AvailableToCaptureAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is available to be captured. Equal to
AuthorizationAmount minus (CapturedAmount and PendingCaptureAmount and
PendingReverseAuthAmount).

AvailableToRefundAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is available to be refunded. Equal to
CapturedAmount minus (RefundedAmount and PendingCaptureAmount and
PendingRefundAmount).

68
Order Management Standard Objects OrderPaymentSummary

Field Details
BalanceAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total balance of all payments associated with this summary object.

CapturedAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that has been captured.

CurrencyIsoCode Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Available only for orgs with the multicurrency feature enabled. Contains the ISO code for
the currency of the OrderSummary associated with the OrderPaymentSummary. Order
Management APIs and actions that create an OrderPaymentSummary for an OrderSummary
set this value. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

FullName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The full name of the payment method user.

LastPaymentGatewayLogId Type
reference
Properties
Filter, Group, Nillable, Sort

69
Order Management Standard Objects OrderPaymentSummary

Field Details

Description
ID of the most recent payment gateway log associated with the OrderPaymentSummary.

LastPaymentGateway Type
Message string
Properties
Create, Filter, Nillable, Sort, Update
Description
The most recent message received from the payment gateway associated with the
OrderPaymentSummary.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed a record related to this record.
This field is available in API version 49.0 and later.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed this record. A null value can mean that this
record has only been referenced (LastReferencedDate) and not viewed.
This field is available in API version 49.0 and later.

Method Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderPaymentSummary.

OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderPaymentSummary.

70
Order Management Standard Objects OrderPaymentSummary

Field Details
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this OrderPaymentSummary. Default value is the user
logged in to the API to perform the create.

PaymentMethodId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the payment method associated with this OrderPaymentSummary.

PendingAuthorization Type
Amount currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is pending authorization.

PendingCaptureAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is pending capture.

PendingRefundAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is pending refund.

PendingReverseAuth Type
Amount currency
Properties
Filter, Nillable, Sort

71
Order Management Standard Objects OrderSummary

Field Details

Description
Amount of the AuthorizationAmount that is pending reversal.

RefundedAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that has been refunded.

Type Type
string
Properties
Filter, Group, Sort
Description
The payment method type associated with the OrderPaymentSummary. For example, visa,
mastercard, check, or giftcard.

SEE ALSO:
OrderSummary

OrderSummary
Represents the current properties and state of an order. Corresponds to one or more order objects, consisting of an original object and
any change objects applicable to it. This object is available in API version 48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

Fields
Field Details
AccountId Type
reference

72
Order Management Standard Objects OrderSummary

Field Details

Properties
Filter, Group, Nillable, Sort
Description
ID of the account or person account associated with the OrderSummary. It represents the
shopper in the storefront.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

ActiveProcessExceptionCount Type
int
Properties
Filter, Group, Nillable, Sort
Description
Total number of active process exceptions on the OrderSummary.
This field is available in API version 50.0 and later.

BillingAddress Type
address
Properties
Filter, Nillable
Description
Billing address associated with the OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

BillingCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address city.

BillingCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address country.

73
Order Management Standard Objects OrderSummary

Field Details
BillingEmailAddress Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address on the billing address.

BillingGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The accuracy of the geocode for the billing address.
Possible values are:
• Address
• Block
• City
• County
• ExtendedZip
• NearAddress
• Neighborhood
• State
• Street
• Unknown
• Zip

BillingLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with BillingLongitude to specify the precise geolocation of the billing address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.

BillingLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update

74
Order Management Standard Objects OrderSummary

Field Details

Description
Used with BillingLatitude to specify the precise geolocation of the billing address. Acceptable
values are numbers between –90 and 90 with up to 15 decimal places.

BillingPhoneNumber Type
phone
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Phone number of the billing address.

BillingPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address postal code.

BillingState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address state.

BillingStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address street.

BillToContactId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the Contact associated with the OrderSummary. It represents the shopper in the
storefront when not using person accounts.
If the OrderLifeCycleType field is set to UNMANAGED, then users with the Edit
Unmanaged Order Summaries or B2B Commerce Integrator user permission can modify this
field.

75
Order Management Standard Objects OrderSummary

Field Details
This field is available in API version 49.0 and later.

ChangeOrderId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
Reserved for future use.

CurrencyIsoCode Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Available only for orgs with the multicurrency feature enabled. Contains the ISO code for
the currency of the original Order associated with the OrderSummary. The default value is
USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.

Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the OrderSummary.
This field can be edited.

GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount, including adjustments and tax, of the OrderSummary.

IsSuspended Type
boolean

76
Order Management Standard Objects OrderSummary

Field Details

Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the OrderSummary is suspended. The default value is false.
This field is available in API version 50.0 and later.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.

OrderedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Date of the original order associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

OrderLifeCycleType Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Specifies whether the OrderSummary is managed by Salesforce Order Management
(MANAGED) or by an external system (UNMANAGED). An unmanaged OrderSummary is
stored in Salesforce for reference purposes.
• Some Order Management APIs reject input records that are associated with unmanaged
OrderSummaries.

77
Order Management Standard Objects OrderSummary

Field Details
• Order Management does not update financial bucket fields on some records that are
associated with unmanaged OrderSummaries.
• A user with the EditUnmanagedOrderSummaries or B2BCommerceIntegrator permission
can edit certain fields on objects related to unmanaged OrderSummaries that are normally
only accessible via APIs.
Possible values are:
• MANAGED—Managed
• UNMANAGED—Unmanaged
This field is available in API version 49.0 and later.

OrderNumber Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderSummary.

OrderProductLineCount Type
integer
Properties
Filter, Group, Nillable, Sort
Description
Total number of unique products ordered on this Order Summary.
This field is available in API version 52.0 and later.

OriginalOrderId Type
reference
Properties
Filter, Group, Sort
Description
ID of the original order associated with this OrderSummary.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this OrderSummary. Default value is the user logged
in to the API to perform the create.

78
Order Management Standard Objects OrderSummary

Field Details
PoDate Type
dateTime
Properties
Filter, Nillable, Sort, Update
Description
Purchase order date associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is available in API version 52.0 and later.

PoNumber Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Purchase order number associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

RoutingAttempts Type
int
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The number of attempts that have been made to route the order summary to inventory
locations.
This field is available in API version 51.0 and later.

SalesChannelId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the SalesChannel associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.

79
Order Management Standard Objects OrderSummary

Field Details
SalesStoreId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the RetailStore or WebStore associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is only available in Salesforce B2B Commerce orgs.

Status Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Status of the order summary. Unlike the Status and Status Category fields on the order and
FulfillmentOrder objects, this field is optional.
We recommend that you use the same values in this picklist that you use in the Status picklist
for the order object.

TaxLocaleType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The system used to handle tax on the original Order associated with the OrderSummary.
Gross usually applies to taxes like value-added tax (VAT), and Net usually applies to taxes like
sales tax.
Possible values are:
• Gross (displays most prices and taxes as combined values)
• Net (displays most prices and taxes as separate values)
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is available in API version 49.0 and later.

TotalAdjDelivery Type
AmtWithTax currency
Properties
Filter, Nillable, Sort

80
Order Management Standard Objects OrderSummary

Field Details

Description
Total amount of all OrderItemSummaries of type code Charge belonging to this
OrderSummary, inclusive of adjustments and tax. This amount is equal to
TotalAdjustedDeliveryAmount + TotalAdjustedDeliveryTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjDistAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of distributed adjustments applied to OrderItemSummaries belonging to this
OrderSummary. This amount is equal to TotalProductAdjDistAmount plus
TotalDeliveryAdjDistAmount.

TotalAdjDistAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total of distributed adjustments applied to OrderItemSummaries belonging to this
OrderSummary, inclusive of tax. This amount is equal to TotalAdjDistAmount plus
TotalAdjDistTaxAmount.
This field is available in API version 49.0 and later.

TotalAdjDistTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjDistAmount.

TotalAdjProduct Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of all OrderItemSummaries of type code Product belonging to this
OrderSummary, inclusive of adjustments and tax. This amount is equal to
TotalAdjustedProductAmount plus TotalAdjustedProductTaxAmount.
This field is available in API version 49.0 and later.

81
Order Management Standard Objects OrderSummary

Field Details
TotalAdjusted Type
DeliveryAmount currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of all OrderItemSummaries of type code Charge
belonging to this OrderSummary.

TotalAdjusted Type
DeliveryTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustedDeliveryAmount.

TotalAdjustedProduct Type
Amount currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of all OrderItemSummaries of type code Product
belonging to this OrderSummary.

TotalAdjustedProduct Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustedProductAmount.

TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of all OrderItemSummaries belonging to this
OrderSummary. Equal to TotalAdjustedProductAmount plus TotalAdjustedDeliveryAmount.

TotalDeliveryAdj Type
DistAmount currency
Properties
Filter, Nillable, Sort

82
Order Management Standard Objects OrderSummary

Field Details

Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code Charge
belonging to this OrderSummary. This value includes OrderItemAdjustmentLineSummaries
that belong to OrderAdjustmentGroupSummaries of type Header.

TotalDeliveryAdj Type
DistAmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code Charge
belonging to this OrderSummary, inclusive of tax. This value includes
OrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries of
type Header. It is equal to TotalDeliveryAdjDistAmount + TotalDeliveryAdjDistTaxAmount.
This field is available in API version 49.0 and later.

TotalDeliveryAdj Type
DistTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAdjDistAmount.

TotalProductAdj Type
DistAmount currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code
Product belonging to this OrderSummary. This value includes
OrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries of
type Header.

TotalProductAdj Type
DistAmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code
Product belonging to this OrderSummary, inclusive of tax. This value includes
OrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries of
type Header. It is equal to TotalProductAdjDistAmount + TotalProductAdjDistTaxAmount.

83
Order Management Standard Objects OrderSummaryRoutingSchedule

Field Details
This field is available in API version 49.0 and later.

TotalProductAdj Type
DistTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAdjDistAmount.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total tax on all OrderItemSummaries belonging to this OrderSummary. Equal to
TotalAdjustedDeliveryTaxAmount plus TotalAdjustedProductTaxAmount.

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
OrderSummaryFeed
Feed tracking is available for the object.
OrderSummaryOwnerSharingRule
Sharing rules are available for the object.
OrderSummaryShare
Sharing is available for the object.

SEE ALSO:
FulfillmentOrder
OrderItemSummary
OrderPaymentSummary
SalesChannel

OrderSummaryRoutingSchedule
Represents an attempt to route an order summary to one or more inventory locations for fulfillment. You can use it to schedule future
attempts and to record completed attempts. This object is available in API version 51.0 and later.

84
Order Management Standard Objects OrderSummaryRoutingSchedule

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if the B2B Commerce on Lightning Experience license is enabled.

Fields
Field Details
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. If this value is null, it’s
possible that this record was referenced (LastReferencedDate) and not viewed.

Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the order summary routing schedule.

OrderSummaryId Type
reference
Properties
Create, Filter, Group, Sort
Description
(Master-Detail) The order summary associated with the routing schedule.

OwnerId Type
reference

85
Order Management Standard Objects OrderSummaryRoutingSchedule

Field Details

Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the User who currently owns this order summary routing schedule. Default value is the
User logged in to the API to perform the create.

Reason Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Reason for the routing attempt. You can customize this list.
The list has one default value:
• Unknown

ScheduleStatus Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
Description
Identifies whether this routing attempt has already run or is scheduled to run.
Possible values are:
• ABANDONED
• COMPLETED
• SCHEDULED

ScheduledDatetime Type
dateTime
Properties
Create, Filter, Sort, Update
Description
Identifies when this routing attempt was run or is scheduled to run. If the
ScheduleStatus is ABANDONED or COMPLETED, then you can’t modify this value.

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
OrderSummaryRoutingScheduleOwnerSharingRule
Sharing rules are available for the object.

86
Order Management Standard Objects ProcessException

OrderSummaryRoutingScheduleShare
Sharing is available for the object.

ProcessException
Represents a processing failure on an order summary. A separate process is required to resolve the failure that caused the process
exception before order summary processing can continue. This object is available in API version 50.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Fields
Field Details
AttachedToId Type
reference
Properties
Create, Filter, Group, Sort, Update
Description
ID of the object associated with the ProcessException.
This is a polymorphic relationship field.
Relationship Name
AttachedTo
Relationship Type
Lookup
Refers To
CreditMemo, Invoice, Order, OrderItem, Payment, PaymentAuthorization, Refund, ReturnOrder

CaseId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the case associated with the ProcessException.
This is a relationship field.
Relationship Name
Case
Relationship Type
Lookup

87
Order Management Standard Objects ProcessException

Field Details

Refers To
Case

Category Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
ProcessingException type. You can customize the category picklist to represent your business
processes.
Possible values are:
• Fulfillment
• Invoicing
• Order Activation
• Order Approval
• Payment

Description Type
textarea
Properties
Create, Nillable, Update
Description
Detailed description of the ProcessException.

ExternalReference Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of external entities associated with the ProcessException.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed a record related to this record.

LastViewedDate Type
dateTime

88
Order Management Standard Objects ProcessException

Field Details

Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed this record. A null value can mean that this
record has only been referenced (LastReferencedDate) and not viewed.

Message Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Short description of the ProcessException

OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the OrderSummary associated with the ProcessException. The ProcessException
component is displayed on this OrderSummary.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the User who currently owns this ProcessException. Default value is the User logged in
to the API to perform the create.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User

Priority Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update

89
Order Management Standard Objects ProcessException

Field Details

Description
Resolution priority for the ProcessException. You can customize the priority picklist to
represent your business processes.
Possible values are:
• High
• Low

ProcessExceptionNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
The unique name of the ProcessException, formatted as PE-(00000000).

Severity Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Severity of the ProcessException. Each severity value corresponds to one severity category.
You can customize the severity picklist to represent your business processes. If you customize
the severity picklist, include at least one severity value for each severity category.
Possible values are:
• High
• Low

SeverityCategory Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Severity category of the ProcessException. Each severity category corresponds to one or
more severity values. The severity category is used to show the severity icon in the
ProcessException list view.
Possible values are:
• High
• Low

Status Type
picklist

90
Order Management Standard Objects ReturnOrder

Field Details

Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Status of the ProcessException. Each status corresponds to one status category, shown here
in parentheses. You can customize the status picklist to represent your business processes.
If you customize the status picklist, include at least one status value for each status category.
Possible values are:
• Ignored (Inactive)
• New (Active)
• Paused (Inactive)
• Resolved (Resolved)
• Triaged (Active)
• Voided (Inactive)

StatusCategory Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Status category of the ProcessException. Each status category corresponds to one or more
statuses.
Possible values are:
• ACTIVE
• INACTIVE
• RESOLVED

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
ProcessExceptionOwnerSharingRule
Sharing rules are available for the object.
ProcessExceptionShare
Sharing is available for the object.

ReturnOrder
Represents the return or repair of inventory or products in Field Service, or the return of order products in Order Management. This object
is available in API version 42.0 and later.

91
Order Management Standard Objects ReturnOrder

Return orders are available in Lightning Experience, Salesforce Classic, the Salesforce mobile app, the Field Service mobile app for Android
and iOS, and communities built using Salesforce Tabs + Visualforce.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


Field Service or Order Management must be enabled.

Fields
Field Name Details
AccountId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The account associated with the return order.
This is a relationship field.
Relationship Name
Account
Relationship Type
Lookup
Refers To
Account

CaseId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The case associated with the return order.
This is a relationship field.
Relationship Name
Case
Relationship Type
Lookup
Refers To
Case

92
Order Management Standard Objects ReturnOrder

Field Name Details


ContactId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The contact associated with the return order.
This is a relationship field.
Relationship Name
Contact
Relationship Type
Lookup
Refers To
Contact

Description Type
textarea
Properties
Create, Nillable, Update
Description
Notes or context about the return order.

DestinationLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The location where the items are being returned to. For example, if the return
order tracks the return of products from a technician’s van to a warehouse, the
warehouse is the destination location.
This is a relationship field.
Relationship Name
DestinationLocation
Relationship Type
Lookup
Refers To
Location

ExpectedArrivalDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update

93
Order Management Standard Objects ReturnOrder

Field Name Details

Description
The date when the items are expected to arrive at the destination location.

ExpirationDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
Authorizations can’t be captured after their expiration dates.
This field is available in API version 50.0 and later.

GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the products and delivery charges on
the return order. This includes all return order line items associated with the
return order. This amount is equal to TotalAmount + TotalTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order was last modified. Its label in the user interface
is Last Modified Date.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order was last viewed.

LifeCycleType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort

94
Order Management Standard Objects ReturnOrder

Field Name Details

Description
Specifies whether the order summary is managed by Salesforce Order
Management (MANAGED) or by an external system (UNMANAGED). An
unmanaged order summary is stored in Salesforce for reference purposes.
• Some Order Management APIs reject input records that are associated with
unmanaged order summaries.
• Order Management does not update financial bucket fields on some records
that are associated with unmanaged order summaries.
• A user with the EditUnmanagedOrderSummaries or B2BCommerceIntegrator
permission can edit certain fields on objects related to unmanaged order
summaries that are normally only accessible via APIs.
Possible values are:
• MANAGED—Managed
• UNMANAGED—Unmanaged
This field is available in API version 50.0 and later.

OrderId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The order associated with the return order. When you associated a return order
with an order, you can associate the return order’s line items with order products.
This is a relationship field.
Relationship Name
Order
Relationship Type
Lookup
Refers To
Order

OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order summary associated with the return order.
This field is available in API version 50.0 and later.

OwnerId Type
reference

95
Order Management Standard Objects ReturnOrder

Field Name Details

Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The owner of the return order.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User

ProductRequestId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product request associated with the return order. When you associated a
return order with a product request, you can associate the return order’s line
items with the product request’s line items.
A return order might be related to a product request if the return order tracks
the return of unused products or products to be repaired or replaced. For example,
a technician creates a product request for three motors to prepare for a field visit.
If the technician finds that only two motors are needed, they can create a return
order to return the third to the original location, and list the product request in
this field.
This is a relationship field.
Relationship Name
ProductRequest
Relationship Type
Lookup
Refers To
ProductRequest

ProductServiceCampaignId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product service campaign associated with the return order

96
Order Management Standard Objects ReturnOrder

Field Name Details


ReturnOrderNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
(Read only) Auto-generated number identifying the return order.

ReturnedById Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the user returning the items.
This is a relationship field.
Relationship Name
ReturnedBy
Relationship Type
Lookup
Refers To
User

ShipFromAddress Type
address
Properties
Filter, Nillable
Description
The return shipping address. This address tracks the location of the items at the
start of the return or repair. For example, if a customer is returning an item, the
Ship From address is the customer’s address.

ShipFromCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the return shipping address. This address tracks the location of the
items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.

ShipFromCountry Type
string

97
Order Management Standard Objects ReturnOrder

Field Name Details

Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the return shipping address. This address tracks the location of
the items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.

ShipFromGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy level of the geocode for the return shipping address. See Compound
Field Considerations and Limitations for details on geolocation compound fields.

Note: This field is available in the API only.

ShipFromLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Longitude to specify the precise geolocation of the return shipping
address. Acceptable values are numbers between –90 and 90 with up to 15
decimal places. See Compound Field Considerations and Limitations for details
on geolocation compound fields.

Note: This field is available in the API only.

ShipFromLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the return shipping
address. Acceptable values are numbers between –180 and 180 with up to 15
decimal places. See Compound Field Considerations and Limitations for details
on geolocation compound fields.

Note: This field is available in the API only.

ShipFromPostalCode Type
string

98
Order Management Standard Objects ReturnOrder

Field Name Details

Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the return shipping address. This address tracks the location
of the items at the start of the return or repair. For example, if a customer is
returning an item, the Ship From address is the customer’s address.

ShipFromState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The state of the return shipping address. This address tracks the location of the
items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.

ShipFromStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the return shipping address. This address tracks the location of the
items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.

ShipmentType Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The type of shipment associated with the return order. Available values are:
• Standard (default value)
• Rush
• Overnight
• Next Business Day
• Pickup

SourceLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update

99
Order Management Standard Objects ReturnOrder

Field Name Details

Description
The items’ location at the start of the return or repair. For example, if the return
order tracks the return of products from a technician’s service vehicle to a
warehouse, the service vehicle is the source location.
This is a relationship field.
Relationship Name
SourceLocation
Relationship Type
Lookup
Refers To
Location

Status Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The status of the return order. Available values are:
• Draft
• Submitted
• Approved
• Canceled
• Closed

StatusCategory Type
picklist
Properties
Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
Description
Status category of the return order. Processing of the return order depends on
this value. Each status category corresponds to one or more statuses.
Possible values are:
• Activated
• Canceled
• Closed
• Draft
This field is available in API version 50.0 and later.

TaxLocaleType Type
picklist

100
Order Management Standard Objects ReturnOrder

Field Name Details

Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The system used to handle tax on the original order associated with the return
order. Gross usually applies to taxes like value-added tax (VAT), and Net usually
applies to taxes like sales tax.
Possible values are:
• Gross (displays most prices and taxes as combined values)
• Net (displays most prices and taxes as separate values)
This field is available in API version 50.0 and later.

TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Adjusted total, not including tax, of the return order line items, including products
and delivery charges, on the ReturnOrder.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalDeliveryAdjustAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the
return order. This value only includes adjustments to return order line items of
type code Charge.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalDeliveryAdjustAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the
return order, inclusive of tax. This value only includes adjustments to return order
line items of type code Charge. This amount is equal to
TotalDeliveryAdjustAmount + TotalDeliveryAdjustTaxAmount.

101
Order Management Standard Objects ReturnOrder

Field Name Details


This is a calculated field.
This field is available in API version 50.0 and later.

TotalDeliveryAdjustTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAdjustmentAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalDeliveryAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the delivery charges on the return order. This value only includes return
order line items of type code Charge.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalDeliveryAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the delivery charges on the return order, inclusive of tax. This
value only includes return order line items of type code Charge. This amount is
equal to TotalDeliveryAmount + TotalDeliveryTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalDeliveryTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAmount.
This is a calculated field.

102
Order Management Standard Objects ReturnOrder

Field Name Details


This field is available in API version 50.0 and later.

TotalProductAdjustAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the return
order. This value only includes adjustments to return order line items of type
code Product.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalProductAdjustAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the return
order, inclusive of tax. This value only includes adjustments to return order line
items of type code Product. This amount is equal to TotalProductAdjustAmount
+ TotalProductAdjustTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalProductAdjustTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAdjustmentAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalProductAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the product charges on the return order. This value only includes return
order line items of type code Product.

103
Order Management Standard Objects ReturnOrder

Field Name Details


This is a calculated field.
This field is available in API version 50.0 and later.

TotalProductAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the product charges on the return order, inclusive of tax. This
value only includes return order line items of type code Product. This amount is
equal to TotalProductAmount + TotalProductTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalProductTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

Usage
You can use return orders to track customer returns, customer repairs, or the return of inventory from a technician’s van stock to a
warehouse or supplier. Customers can initiate a return from a community, or agents can create return orders in response to a customer
call or technician request.
Return orders are composed of return order line items, which allow you to add details about the items being returned. To represent the
returned items, each line item must list one or more of the following: product, product item, asset, product request line item, and order
product. Return orders can be associated with a product request, case, account, contact, and order if needed. This versatility lets you use
return orders to track a wide range of return scenarios.

104
Order Management Standard Objects ReturnOrderItemAdjustment

Associated Objects
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object.
Otherwise, they’re available in the specified API version and later.
ReturnOrderChangeEvent (API version 48.0)
Change events are available for the object.
ReturnOrderFeed
Feed tracking is available for the object.
ReturnOrderHistory
History is available for tracked fields of the object.
ReturnOrderOwnerSharingRule
Sharing rules are available for the object.
ReturnOrderShare
Sharing is available for the object.

ReturnOrderItemAdjustment
Represents a price adjustment on a return order line item. This object is available in API version 50.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()

Special Access Rules


Order Management must be enabled.

Fields
Field Details
Amount Type
currency
Properties
Create, Filter, Sort
Description
Amount, not including tax, of the adjustment.

Description Type
textarea
Properties
Create, Nillable, Update

105
Order Management Standard Objects ReturnOrderItemAdjustment

Field Details

Description
Description of the adjustment.

OrderItemAdjustLineSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order item adjustment line summary associated with the adjustment.

ReturnOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the return order associated with the return order line item to which the adjustment
applies.
This is a relationship field.
Relationship Name
ReturnOrder
Relationship Type
Lookup
Refers To
ReturnOrder

ReturnOrderItemAdjustmentNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the return order item adjustment.

ReturnOrderLineItemId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the return order line item to which this adjustment applies.
This is a relationship field.
Relationship Name
ReturnOrderLineItem

106
Order Management Standard Objects ReturnOrderItemTax

Field Details

Relationship Type
Lookup
Refers To
ReturnOrderLineItem

TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +
TotalTaxAmount.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the Amount.

ReturnOrderItemTax
Represents the tax on a return order line item or return order item adjustment. This object is available in API version 50.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()

Special Access Rules


Order Management must be enabled.

Fields
Field Details
Amount Type
currency

107
Order Management Standard Objects ReturnOrderItemTax

Field Details

Properties
Create, Filter, Sort
Description
Amount of tax represented by the return order item tax.

Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the return order item tax.

OrderItemTaxLineItemSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order item tax line item summary associated with the order item summary that
corresponds to the return order line item to which the tax applies.

Rate Type
percent
Properties
Filter, Nillable, Sort
Description
Tax rate used to calculate the Amount.

ReturnOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the associated return order.
This is a relationship field.
Relationship Name
ReturnOrder
Relationship Type
Lookup
Refers To
ReturnOrder

108
Order Management Standard Objects ReturnOrderItemTax

Field Details
ReturnOrderItemAdjustmentId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
If this object represents a tax on an adjustment, this value is the ID of the return order item
adjustment to which the tax applies. If this value is null, the adjustment applies to a return
order line item.
This is a relationship field.
Relationship Name
ReturnOrderItemAdjustment
Relationship Type
Lookup
Refers To
ReturnOrderItemAdjustment

ReturnOrderItemTaxNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the return order item tax.

ReturnOrderLineItemId Type
reference
Properties
Create, Filter, Group, Sort
Description
If this object represents a tax on a return order line item, this value is the ID of that return
order line item. If this object represents a tax on an adjustment, this value is the ID of the
return order line item to which the adjustment applies.
This is a relationship field.
Relationship Name
ReturnOrderLineItem
Relationship Type
Lookup
Refers To
ReturnOrderLineItem

TaxEffectiveDate Type
date

109
Order Management Standard Objects ReturnOrderLineItem

Field Details

Properties
Filter, Group, Nillable, Sort
Description
Date on which the Amount was calculated. Important due to tax rate changes over time.

Type Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Shows whether the amount on the tax line is an estimate or the final calculated amount.
Doesn’t set a value by default. Users can define automation to set and change the value as
needed.
Possible values are:
• Actual
• Estimated

ReturnOrderLineItem
Represents a specific product that is returned or repaired as part of a return order in Field service, or a specific order item that is returned
as part of a return order in Order Management. This object is available in API version 42.0 and later.
Return orders are available in Lightning Experience, Salesforce Classic, the Salesforce mobile app, the Field Service mobile app for Android
and iOS, and communities built using Salesforce Tabs + Visualforce.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


Field Service or Order Management must be enabled.

Fields
Field Name Details
AssetId Type
reference

110
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The asset associated with the return order line item. One or more of the following
fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId, and
ProductRequestLineItemId.
This is a relationship field.
Relationship Name
Asset
Relationship Type
Lookup
Refers To
Asset

ChangeOrderItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the change order item associated with the return order line item.
This field is available in API version 50.0 and later.
This is a relationship field.
Relationship Name
ChangeOrderItem
Relationship Type
Lookup
Refers To
OrderItem

Description Type
textarea
Properties
Create, Nillable, Update
Description
Notes or context about the return order line item.

DestinationLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update

111
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Description
The location where the items are being returned to. For example, if the return
order tracks the return of products from a technician’s van to a warehouse, the
warehouse is the destination location.
This is a relationship field.
Relationship Name
DestinationLocation
Relationship Type
Lookup
Refers To
Location

GrossUnitPrice Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
Unit price, including tax, of the product represented by the associated order item
summary.
This field is available in API version 50.0 and later.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order line item was last modified. Its label in the user
interface is Last Modified Date.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order line item was last viewed.

OrderItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update

112
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Description
The order product associated with the return order line item. One or more of the
following fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId,
and ProductRequestLineItemId.
This is a relationship field.
Relationship Name
OrderItem
Relationship Type
Lookup
Refers To
OrderItem

OrderItemSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order item summary associated with the return order line item.
This field is available in API version 50.0 and later.

ProcessingPlan Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Indicates the preferred fate of the items following their return. Available values
are:
• Repair—Repair the items and return them to the owner
• Discard—Discard the items
• Salvage—Salvage the items’ working parts
• Restock—Return the items to your inventory

Product2Id Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product associated with the return order line item. One or more of the
following fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId,
and ProductRequestLineItemId.
This is a relationship field.

113
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Relationship Name
Product2
Relationship Type
Lookup
Refers To
Product2

ProductItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product item representing the location of the product at the start of the
return. One or more of the following fields must be filled out: AssetId, OrderItemId,
Product2Id, ProductItemId, and ProductRequestLineItemId.
This is a relationship field.
Relationship Name
ProductItem
Relationship Type
Lookup
Refers To
ProductItem

ProductRequestLineItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product request line item associated with the return order line item. One or
more of the following fields must be filled out: AssetId, OrderItemId, Product2Id,
ProductItemId, and ProductRequestLineItemId.
This is a relationship field.
Relationship Name
ProductRequestLineItem
Relationship Type
Lookup
Refers To
ProductRequestLineItem

ProductServiceCampaignId Type
reference

114
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Properties
Filter, Group, Nillable, Sort
Description
The product service campaign associated with the return order line item.

ProductServiceCampaignItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product service campaign item associated with the return order line item.

QuantityExpected Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The quantity of items expected to be returned.
This field is available in API version 50.0 and later.

QuantityReceived Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The actual quantity of items received for return.
This field is available in API version 50.0 and later.

QuantityRejected Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The quantity of items rejected for return.
This field is available in API version 50.0 and later.

QuantityReturned Type
double
Properties
Create, Filter, Sort, Update

115
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Description
The quantity of items being returned. If multiple types of products are being
returned, track each product in a different return order line item.

QuantityUnitOfMeasure Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Units of the returned items; for example, kilograms or liters. Quantity Unit of
Measure picklist values are inherited from the Quantity Unit of Measure field on
products.

ReasonForRejection Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Reason for rejecting returned items on this return order line item.
Possible values are:
• Damaged Item
• Expired Warranty
• Missing Item or Part
• Wrong Item
This field is available in API version 50.0 and later.

ReasonForReturn Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The reason the items are being returned. Available values are:
• Damaged
• Defective
• Duplicate Order
• Wrong Item
• Wrong Quantity
• Not Satisfied
• Outdated
• Other

116
Order Management Standard Objects ReturnOrderLineItem

Field Name Details


RepaymentMethod Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The method by which the customer or owner will be reimbursed for the items
being returned. Available values are:
• Replace—The items will be replaced
• Refund—The items will be returned and the owner will be refunded
• Credit—The items will be returned and the owner will receive credit for
them
• Return—The items will be returned to the owner (for example, following
their repair)

ReturnOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
The return order that the return order line item belongs to.
This is a relationship field.
Relationship Name
ReturnOrder
Relationship Type
Lookup
Refers To
ReturnOrder

ReturnOrderLineItemNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
(Read only) Auto-generated number that identifies the return order line item.

SourceLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update

117
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Description
The items’ location at the start of the return or repair. For example, if the return
order tracks the return of products from a technician’s service vehicle to a
warehouse, the service vehicle is the source location.
This is a relationship field.
Relationship Name
SourceLocation
Relationship Type
Lookup
Refers To
Location

TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of all price adjustments applied to the return order line item.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalAdjustmentAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the return order line item,
inclusive of tax. This amount is equal to TotalAdjustmentAmount +
TotalAdjustmentTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalAdjustmentTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

118
Order Management Standard Objects ReturnOrderLineItem

Field Name Details


TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the return order line item.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalLineAmount Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort, Update
Description
Total, not including adjustments or tax, of the return order line item.
This field is available in API version 50.0 and later.

TotalLineAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the return order line item, inclusive of tax. This amount is equal to
TotalLineAmount + TotalLineTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

TotalPrice Type
currency
Properties
Filter, Nillable, Sort

119
Order Management Standard Objects ReturnOrderLineItem

Field Name Details

Description
Total, including adjustments but not tax, of the return order line item. Equal to
UnitPrice times Quantity.
This is a calculated field.

TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.
This is a calculated field.
This field is available in API version 50.0 and later.

Type Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Type of the return order line item. Matches the type of the associated order item
summary. Delivery Charge indicates that the return order line item represents a
delivery charge. Order Product indicates that it represents any other type of
product, service, or charge. Each type corresponds to one type code.
Possible values are:
• Delivery Charge
• Order Product
This field is available in API version 50.0 and later.

TypeCode Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Type code of the return order line item. Matches the type code of the associated
order item summary. Processing depends on this value. Charge indicates that
the return order line item represents a delivery charge. Product indicates that it
represents an other type of product, service, or charge. Each type category
corresponds to one or more types.
Possible values are:
• Charge
• Product

120
Order Management Standard Objects SalesChannel

Field Name Details


This field is available in API version 50.0 and later.

UnitPrice Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort, Update
Description
Unit price of the return order line item.
This field is available in API version 50.0 and later.

Associated Objects
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object.
Otherwise, they’re available in the specified API version and later.
ReturnOrderLineItemChangeEvent (API version 48.0)
Change events are available for the object.
ReturnOrderLineItemFeed
Feed tracking is available for the object.
ReturnOrderLineItemHistory
History is available for tracked fields of the object.

SalesChannel
Represents the origin of an order. For example, a web storefront, physical store, marketplace, or mobile app. Usually you will set up a
SalesChannel for each Site in your B2C Commerce implementation. This object is available in API version 48.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs.

Fields
Field Details
Description Type
textarea

121
Order Management Standard Objects SalesChannel

Field Details

Properties
Create, Nillable, Update
Description
Description of the SalesChannel.

ExternalChannelNumber Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
External system identifier for the SalesChannel.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this SalesChannel. Default value is the user logged in
to the API to perform the create.

SalesChannelName Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update

122
Order Management Standard Objects Shipment

Field Details

Description
Name of the SalesChannel.

SEE ALSO:
OrderSummary

Shipment
Represents the transport of inventory in field service or a shipment of order items in Order Management.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if Field Service is enabled.

Fields
Field Name Details
ActualDeliveryDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
Date the product was delivered.

DeliveredToId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The person or entity the product was delivered to.
This is a polymorphic relationship field.
Relationship Name
DeliveredTo

123
Order Management Standard Objects Shipment

Field Name Details

Relationship Type
Lookup
Refers To
Group, User

DeliveryMethodId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The delivery method used for the shipment.
This field is available in API version 51.0 and later.

Description Type
textarea
Properties
Create, Nillable, Update
Description
Details not recorded in the provided fields

DestinationLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The place the product is to be delivered.
This is a relationship field.
Relationship Name
DestinationLocation
Relationship Type
Lookup
Refers To
Location

ExpectedDeliveryDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
Date the product is expected to be delivered.

124
Order Management Standard Objects Shipment

Field Name Details


FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The fulfillment order that the shipment belongs to.
This field is available in API version 51.0 and later.

LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp when the current user last accessed this record, a record related
to this record, or a list view.

LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp when the current user last viewed this record or list view. If this
value is null, the user might have only accessed this record or list view
(LastReferencedDate) but not viewed it.

OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
The order summary associated with the shipment.
This field is available in API version 51.0 and later.

OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The owner of the shipment.
This is a polymorphic relationship field.

125
Order Management Standard Objects Shipment

Field Name Details

Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User

Provider Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The company or person making the transfer.

ShipFromAddress Type
address
Properties
Filter, Nillable
Description
The place the product is coming from.

ShipFromCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the address where the shipment originates.

ShipFromCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the address where the shipment originates.

ShipFromGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

126
Order Management Standard Objects Shipment

Field Name Details

Description
Accuracy level of the geocode for the address where the shipment originates.
See Compound Field Considerations and Limitations for details on geolocation
compound fields.

Note: This field is available in the API only.

ShipFromLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Longitude to specify the precise geolocation of the address where the
shipment originates. Acceptable values are numbers between –90 and 90 with
up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.

Note: This field is available in the API only.

ShipFromLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the address where the
shipment originates. Acceptable values are numbers between –180 and 180 with
up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.

Note: This field is available in the API only.

ShipFromPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the address where the shipment originates.

ShipFromState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update

127
Order Management Standard Objects Shipment

Field Name Details

Description
The state of the address where the shipment originates.

ShipFromStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the address where the shipment originates.

ShipToAddress Type
address
Properties
Filter, Nillable
Description
The physical address where the shipment is delivered.

ShipToCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the address where the shipment is delivered.

ShipToCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the address where the shipment is delivered.

ShipToGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy level of the geocode for the address where the shipment is delivered.
See Compound Field Considerations and Limitations for details on geolocation
compound fields.

Note: This field is available in the API only.

128
Order Management Standard Objects Shipment

Field Name Details


ShipToLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Longitude to specify the precise geolocation of the address where the
shipment is delivered. Acceptable values are numbers between –90 and 90 with
up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.

Note: This field is available in the API only.

ShipToLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the address where the
shipment is delivered. Acceptable values are numbers between –180 and 180
with up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.

Note: This field is available in the API only.

ShipToName Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The shipment recipient.

ShipToPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the address where the shipment is delivered.

ShipToState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update

129
Order Management Standard Objects Shipment

Field Name Details

Description
The state of the address where the shipment is delivered.

ShipToStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the address where the shipment is delivered.

ShipmentNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
An auto-generated number identifying the shipment.

SourceLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The field service location where the shipment originates.
This is a relationship field.
Relationship Name
SourceLocation
Relationship Type
Lookup
Refers To
Location

Status Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The status of the shipment. The picklist includes the following values, which can
be customized:
• Shipped—The product is in transit.
• Delivered—The product is at the source location.

130
Order Management Standard Objects Shipment

Field Name Details


TotalItemsQuantity Type
double
Properties
Filter, Nillable, Sort
Description
The total quantity of items included in the shipment. This value is calculated as
the sum of the quantities of the shipment items in the shipment.
This field is available in API version 51.0 and later.

TrackingNumber Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Tracking number for the shipment.

TrackingUrl Type
url
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
URL of website used for tracking the shipment.

Associated Objects
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object.
Otherwise, they’re available in the specified API version and later.
ShipmentChangeEvent (API version 48.0)
Change events are available for the object.
ShipmentFeed
Feed tracking is available for the object.
ShipmentHistory
History is available for tracked fields of the object.
ShipmentOwnerSharingRule
Sharing rules are available for the object.
ShipmentShare
Sharing is available for the object.

131
Order Management Standard Objects ShipmentItem

ShipmentItem
Represents an order item included in a shipment. This object is available in API version 51.0 and later.

Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()

Special Access Rules


This object is only available in Salesforce Order Management orgs or if Field Service is enabled.

Fields
Field Details
Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the shipment item.

ExpectedDeliveryDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Expected delivery date of the shipment that contains the shipment item.

FulfillmentOrderLineItemId Type
reference
Properties
Filter, Nillable, Sort
Description
The FulfillmentOrderLineItem (fulfillment order product) corresponding to the shipment
item.

OrderItemSummaryId Type
reference
Properties
Filter, Nillable, Sort

132
Order Management Standard Objects ShipmentItem

Field Details

Description
The OrderItemSummary (order product summary) corresponding to the shipment item.

Product2Id Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product represented by the shipment item.
This is a relationship field.
Relationship Name
Product2
Relationship Type
Lookup
Refers To
Product2

Quantity Type
double
Properties
Create, Filter, Sort, Update
Description
The quantity of products represented by the shipment item.

ShipmentId Type
reference
Properties
Create, Filter, Group, Sort
Description
(Master-Detail) The shipment that contains the shipment item.
This is a relationship field.
Relationship Name
Shipment
Relationship Type
Lookup
Refers To
Shipment

ShipmentItemNumber Type
string

133
Order Management Standard Objects Order Summary Entity Relationship Diagram

Field Details

Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
An auto-generated number identifying the shipment item.

TrackingNumber Type
string
Properties
Filter, Group, Nillable, Sort
Description
The tracking number of the shipment that contains the shipment item.

TrackingUrl Type
url
Properties
Filter, Group, Nillable, Sort
Description
The tracking URL of the shipment that contains the shipment item.

Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
ShipmentItemFeed
Feed tracking is available for the object.
ShipmentItemHistory
History is available for tracked fields of the object.

Order Summary Entity Relationship Diagram


This diagram illustrates some of the relationships between the OrderSummary object and other objects used in Salesforce Order
Management.
To view a detailed diagram of all object relationships, from Setup, in the Quick Find box, enter Schema Builder, and then select
Schema Builder. For information on using Schema Builder, see Design Your Own Data Model in Extend Salesforce with Clicks, not Code.

134
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

Salesforce B2C Commerce Storefront Order Data Map


These tables illustrate how data in a Salesforce B2C Commerce order packet maps to records in Salesforce Order Management. If you’re
implementing your own storefront integration, this map can help you understand the order data requirements.

Integration Notes
General:
• B2C Commerce sends orders in New or Open status to Salesforce Order Management. To delay sending an order, for example, to
perform a fraud check, keep it in Created status.
• B2C Commerce sends order data to Salesforce Order Management according to a set frequency and when the packet of pending
orders reaches a certain size. The process is similar to the one used for Commerce Cloud Order Management. In addition, the
integration contacts B2C Commerce every 5 minutes to request any pending order data.
• The integration associates catalogs in B2C Commerce with SalesChannels in Order Management. It identifies the SalesChannel for
an order by searching for a SalesChannelName value that matches the catalog/catalog-id value in the order data.

135
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

• If the Salesforce org ID or login URL changes, or if you run DBInit on your B2C Commerce storefront, the integration requires updating.
Open a case with Salesforce Customer Support to reprovision the integration as described in the Order Management Implementation
Guide.
• If you refresh a sandbox org, or change the Tenant ID of a B2C Commerce instance, repeat the implementation process as described
in the Order Management Implementation Guide. For information on sandbox orgs, see the sandbox topics in Salesforce Help.
Shopper Accounts:
• When the order/billing-address/company-name value in the order data is not null, Order Management always uses
a standard account and contact to represent the shopper.
• If you enable Person Accounts, don’t change the names or API names of the two default Account record types. The B2C Integration
uses those types to represent shopper accounts.
• For detailed information on the storage and identification of shopper accounts, see Order Management Shopper Records in Salesforce
Order Management in Salesforce Help.
International Considerations
• If the order/taxation value for an order is net, then the integration creates an OrderItemTaxLineItem record for each
OrderItem and OrderItemAdjustmentLineItem record.
• If Salesforce state and country/territory picklists aren’t enabled:
– The state-code values in order data must match a standard 2-character ISO state or province code. The integration copies
them to State fields on Salesforce records.
– The country-code values in order data must match a standard 2-character ISO country/territory code. The integration
copies them to Country fields on Salesforce records.

• If Salesforce state and country/territory picklists are enabled:


– The state-code values in order data must match the state code of an entry in the Salesforce state picklist. The integration
copies them to StateCode fields on Salesforce records. The corresponding State fields are set to the matching integration values
from the picklist.
– The country-code values in order data must match the country/territory code of an entry in the Salesforce country/territory
picklist. The integration copies them to CountryCode fields on Salesforce records. The corresponding Country fields are set to
the matching integration values from the picklist.

Payments
• Order data includes a paired payment instrument and payment transaction for each payment associated with the order.
• If an order/payments/payment/transaction-type value in the order data starts with auth, then the integration
creates a PaymentAuthorization record for that transaction. If the value is sale or capture, then it creates a Payment record.
These checks aren’t case-sensitive.
• For a credit or debit card payment type, the payments/payment/credit-card/card-type value in the order data
must match a value in the CardType picklist on the CardPaymentMethod object.
• To handle a payment method that doesn’t match a CardPaymentMethod CardType or DigitalWallet Type, create a custom payment
method as described later in this section.
• The integration recognizes certain custom attributes on order/payments/payment and copies them to standard fields on
the PaymentGatewayLog record in Salesforce. To take advantage of this feature, create and populate custom attributes with the
following exact names on the Order Payment Transaction object in B2C Commerce:
– authCode (value copied to PaymentGatewayLog.GatewayAuthCode)
– avsResultCode (value copied to PaymentGatewayLog.GatewayAvsCode)
– approvalStatus (value copied to PaymentGatewayLog.GatewayResultCode)

136
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

Promotions
• The integration creates an OrderAdjustmentGroup record for each order-level
price-adjustments/price-adjustment/promotion-id included in the order data. For each OrderAdjustmentGroup,
it creates an OrderItemAdjustmentLineItem record for each OrderItem in the order.
• If the order/taxation value for an order is net, then the integration creates an OrderItemTaxLineItem record for each
OrderItemAdjustmentLineItem record.
For information on the Salesforce state and country/territory picklists, see Let Users Select State and Country from Picklists in Salesforce
Help.

Set Up Payment Gateways


Configure a payment gateway adapter for each merchant account. If you use multiple currencies or payment methods through a single
payment processor, you can optionally set up multiple payment gateways for that processor. By default, the Order Management
integration with Salesforce B2C Commerce only supports credit card and digital wallet payment types, but you can create your own
customizations.
You can use Apex and the Connect REST API to set up payment gateways. See commercepayments namespace and Use Cases for the
commercepayments Namespace in the Apex Developer Guide, and Commerce Payments Resources in the Connect REST API Developer
Guide.

Payment Method Processing


The B2C Commerce integration processes each storefront payment method in the order data as follows:
1. Does the payment method ID in the order data match the following non-case-sensitive regular expression? If so, then create a
DigitalWallet record in Salesforce.
paypal|visa_checkout|pay_by_check|.*(apple|google|android|amazon|ali).*(pay)*

2. Does the payment method ID in the order data match the Gateway Provider Payment Method Type of a GtwyProvPaymentMethodType
record in Salesforce? If so, then create a record in Salesforce according to the GtwyProvPaymentMethodType’s Payment Method
Type.
3. Does the card type in the order data match an entry in the Card Type picklist on the CardPaymentMethod object in Salesforce? If so,
then create a CardPaymentMethod record in Salesforce.

Note: You can’t customize the Card Type picklist.

4. Return an error message that the payment method isn’t supported.


To support a different payment type, set up a custom payment method as described in the next section.

Create Custom Payment Methods


If you use a storefront payment method that meets both of the following criteria, configure a custom payment method for it.
• The default regular expression doesn’t identify it as a DigitalWallet method.
• It doesn’t match any of the standard card types for a CardPaymentMethod.
To configure a custom payment method as an AlternativePaymentMethod, first create a RecordType for the AlternativePaymentMethod
object. Give the record type a name that represents the payment method. For information on creating record types, see Create Record
Types in Salesforce Help.

137
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

Define a custom payment method by creating a GtwyProvPaymentMethodType (Gateway Provider Payment Method Type) record. The
gateway provider payment method type associates the custom payment method with a payment gateway and defines it as an
AlternativePaymentMethod, CardPaymentMethod, or DigitalWallet.

Note: You can’t create or access a GtwyProvPaymentMethodType record in the Salesforce UI. To create one, insert a record
using Workbench. The API name of the object is GtwyProvPaymentMethodType, at the URL
/services/data/v51.0/sobjects/GtwyProvPaymentMethodType.
Set the GtwyProvPaymentMethodType fields as described here.
Comments
Optional description.
Developer Name
The unique API name of the record.
Master Label
A human-readable name for the record.
Gateway Provider Payment Method Type
The name of the payment method in the storefront. This value must exactly match the payment method ID used in B2C Commerce.
Payment Gateway Provider Id
Reference to the Payment Gateway Provider record associated with the payment processor for the payment method.
Payment Method Type
AlternativePaymentMethod CardPaymentMethod, or DigitalWallet. To use AlternativePaymentMethod, first
create a corresponding RecordType record.
Record Type Id
If using an AlternativePaymentMethod, this value is a reference to the RecordType record.
Here’s an example of a gateway provider payment method definition:
{
"DeveloperName" : "BankTransfer"
"MasterLabel" : "Bank Transfer",
"GtwyProviderPaymentMethodType" : "directBanking",
"PaymentGatewayProviderId" : "0cJaa0000000001E67",
"PaymentMethodType" : "AlternativePaymentMethod",
“RecordTypeId” : "012aa000000008A34F"
}

Integrate Custom B2C Commerce Storefront Data


The integration can pass custom data on certain B2C Commerce objects to Order Management. To set up the transfer, add custom
attributes to objects in B2C Commerce, and add matching custom fields to the corresponding objects in Order Management. The
integration compares the B2C Commerce attribute ID and the Order Management field name at the API level. (It doesn’t consider their
UI labels.) If they match and the data types match, the integration includes those values when it creates Order Management records. If
you also create a matching field on the corresponding summary object, Order Management includes the custom data when it creates
a summary record.
If you add a custom field to an object used in a flow, customize the flow to handle it.

Important: A change order is an Order record. If you add a required custom field to the Order object, update the service flows
to set that field when they create a change order. Otherwise, the flow will fail.

138
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

If order data includes a custom attribute value, but the corresponding Salesforce object has no matching custom field, the integration
ignores that attribute. If a custom field exists in Salesforce, and order data doesn’t include a matching custom attribute value, the
integration ignores it.

Important: If a custom field in Salesforce is required, and it corresponds to a custom storefront attribute, then order data must
include a value for that attribute. Without that value, the integration can’t create the corresponding Salesforce record. In that case,
the integration fails with an error.

Note: At the API level, custom field names in Salesforce always end in __c. Don’t include it in the names of the matching attributes
on your storefront objects. However, if you include a custom namespace in a custom field name, also include it in the name of the
matching storefront object attribute. For example, if the API name of your custom field in Salesforce is
mynamespace_FieldName__c, name your matching storefront object attribute mynamespace_FieldName. Limit
your custom field names to 40 characters (37 plus __c).
You can support product bundles by passing that information as custom data. To set up product bundle associations, define a custom
guid attribute for the line item object in your storefront. In Salesforce, define a matching field on OrderItem and OrderItemSummary.
When creating an order, assign the same value to the custom attribute on line items that belong together. You can define another
custom attribute to identify a line item as part of a bundle. Then build logic into your fulfillment process to handle them accordingly.

Note: When using custom attributes to support bundles, customize your return and cancel flows to handle them according to
your business rules. For example, design your cancel process so that when you cancel a bundle product, any associated bundle
products are also canceled. Likewise, you can design your return process to disallow the return of only some of the products in a
bundle.

Note: The integration doesn’t currently support custom attributes on B2C product options.

You can use matching custom attributes and fields on these sets of objects:

B2C Commerce Salesforce Order Management


Product line item, gift certificate line item, and shipping line item OrderItem and OrderItemSummary

Order Order and OrderSummary

Order payment instrument and order payment transaction CardPaymentMethod, DigitalWallet, Payment,
PaymentAuthorization, and PaymentGatewayLog

Shipment OrderDeliveryGroup and OrderDeliveryGroupSummary

The integration supports the following data types for matching custom attributes and fields:
• Boolean
• Currency
• Datetime (Date isn’t supported)
• Double
• Multipicklist
• Phone
• Picklist
• Reference
• String
• TextArea

139
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

• URL
The Order Management B2C Service permission set provides the integration with access to Salesforce records. When you add a custom
field to a Salesforce object, update that permission set by adding read and edit access to the new field. You also must add edit access
to the permission set that provides access for your Order Management users.
1. From Setup, in the Quick Find box, enter Permission Sets, and then select Permission Sets.
2. Select Order Management B2C Service.
3. In the Apps section, click Object Settings.
4. Select the object that has the custom field.
5. Click Edit.
6. In the Field Permissions section, select the Edit Access checkbox for the custom field.
7. Click Save.
8. Return to the list of permission sets by selecting Permission Sets in the Setup navigation menu.
9. Select the permission set that controls access for your Order Management users. Normally, it’s called OM Console.
10. In the Apps section, click Object Settings.
11. Select the object that has the custom field.
12. Click Edit.
13. In the Field Permissions section, select the Edit Access checkbox for the custom field.
14. Click Save.

Account Object (Standard or PersonAccount)


Order Management always uses standard accounts to represent shoppers that have company names. If an order includes an
order/billing-address/company-name value, and no matching account record exists, then the integration creates a
standard account, regardless of the Person Accounts for Shoppers setting.
Changing the Person Accounts for Shoppers org setting doesn’t affect existing shopper data. However, it changes the way that the B2C
Commerce integration stores new shopper data and whether it recognizes existing shopper data.
• While Order Management is configured to use standard accounts: the integration recognizes existing shoppers that are stored as
person accounts. It associates their new orders with their existing person accounts. If an existing shopper has records of both types,
it associates new orders with their standard account and contact.
• While Order Management is configured to use person accounts: the integration doesn’t recognize existing shoppers that are stored
as standard accounts and contacts. If one of those shoppers places an order, the integration creates a person account record for
them and associates the new order with it. Order Management treats the accounts as separate shoppers. If an existing shopper has
records of both types, the integration associates new orders with their person account.

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/company-name or Name If
order/billing-address/first-name and order/billing-address/company-name
order/billing-address/last-name has a value in the order data packet, then
it’s copied to this value. If it has no value in
the order data, this value is set as follows:
• If this record is a person account, this
value isn’t set.

140
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes

• If this record isn’t a person account, this


value is set to
order/billing-address/first-name
+" "+
order/billing-address/last-name.

order/billing-address/first-name and FirstName This value is only set for person accounts.
order/billing-address/second-name It’s set to
order/billing-address/first-name
+" "+
order/billing-address/second-name.

order/billing-address/last-name LastName This value is only set for person accounts.

order/customer/customer-email PersonEmail This value is only set for person accounts.

order/billing-address/title PersonTitle This value is only set for person accounts.

order/billing-address/address1, BillingStreet This value is only set for person accounts.


order/billing-address/address2, and It’s set to
order/billing-address/address3 order/billing-address/address1
+" "+
order/billing-address/address2
+" "+
order/billing-address/address3.

order/billing-address/city BillingCity This value is only set for person accounts.

order/billing-address/postal-code BillingPostalCode This value is only set for person accounts.

order/billing-address/state-code BillingState This value is only set for person accounts.


Usage depends on whether state and
country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/state-code.
It must be a standard 2-character ISO
state or province code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the state code that matches
order/billing-address/state-code.

order/billing-address/state-code BillingStateCode This value is only set for person accounts,


and only when state and country/territory
picklists are enabled on your org.
order/billing-address/state-code
must match the state code of an entry in
the Salesforce state picklist.

141
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/country-code BillingCountry This value is only set for person accounts.
Usage depends on whether state and
country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/country-code.
It must be a standard 2-character ISO
country/territory code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the country/territory code that
matches
order/billing-address/country-code.

order/billing-address/country-code BillingCountryCode This value is only set for person accounts,


and only when state and country/territory
picklists are enabled on your org.
order/billing-address/country-code
must match the country/territory code of
an entry in the Salesforce country/territory
picklist.

order/billing-address/phone Phone This value is set for both person accounts


and regular accounts.

AlternativePaymentMethod Object
The integration checks the payment_method value of each payment instrument in an order. If it matches the Gateway Provider
Payment Method Type of a GtwyProvPaymentMethodType record, then the integration creates a record according to the
GtwyProvPaymentMethodType’s Payment Method Type value. If the Payment Method Type is AlternativePaymentMethod, then the
integration creates an AlternativePaymentMethod record using the associated RecordType.

Note: To use AlternativePaymentMethod, first create a RecordType and GtwyProvPaymentMethodType for your custom payment
type as described in the Create Custom Payment Methods section.

B2C Commerce XSD Value Salesforce Object Field Notes


N/A RecordTypeId This value is set to the ID of the RecordType
record assigned to the
GtwyProvPaymentMethodType.

order/payments/payment/credit-card/card-token GatewayToken

order/customer/customer-email Email

N/A Status This picklist value is always set to Active.

order/billing-address/company-name CompanyName

142
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/address1, PaymentMethodStreet This value is set to
order/billing-address/address2, and order/billing-address/address1
order/billing-address/address3 +" "+
order/billing-address/address2
+" "+
order/billing-address/address3.

order/billing-address/city PaymentMethodCity

order/billing-address/state-code PaymentMethodState Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/state-code.
It must be a standard 2-character ISO
state or province code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the state code that matches
order/billing-address/state-code.

order/billing-address/state-code PaymentMethodStateCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/state-code
must match the state code of an entry in
the Salesforce state picklist.

order/billing-address/postal-code PaymentMethodPostalCode

order/billing-address/country-code PaymentMethodCountry Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/country-code.
It must be a standard 2-character ISO
country/territory code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the country/territory code that
matches
order/billing-address/country-code.

order/billing-address/country-code PaymentMethodCountryCode This value is only set when state and


country/territory picklists are enabled on
your org.

143
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/country-code
must match the country/territory code of
an entry in the Salesforce country/territory
picklist.

order/billing-address/phone Phone

orderremoteHost IpAddress

N/A AccountId This value is set to the ID of the Account or


Person Account record associated with the
shopper.

N/A PaymentGatewayId This value is set to the ID of the


PaymentGateway record associated with
the PaymentGatewayProvider record
assigned to the
GtwyProvPaymentMethodType.

N/A ProcessingMode This value is always set to External. It


specifies that an external payment provider
handles payment transactions.

order/payments/payment/custom_attribute custom_attribute_name If the Salesforce AlternativePaymentMethod


or a custom attribute on the payment type object has a custom field matching a
custom attribute on the storefront payment
type or order payment transaction object,
the value is copied to the
AlternativePaymentMethod record. If a
custom field is non-nillable, then order data
must include a value for the corresponding
custom attribute. If the value is missing, the
integration fails.

CardPaymentMethod Object
The integration checks the payment_method value of each payment instrument in an order against the following regex. If it matches,
then the integration creates a DigitalWallet record for the instrument. If it doesn’t match, then the integration checks the
payment/credit-card/card-type value against the CardType picklist on the CardPaymentMethod object. If the picklist
contains a match, then the integration creates a CardPaymentMethod record for the instrument. Otherwise, to support the payment
method, you must set up a custom payment method for it.
paypal|visa_checkout|pay_by_check|.*(apple|google|android|amazon|ali).*(pay)*

Note: The regex isn’t case-sensitive.

144
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/payments/payment/credit-card/card-type CardType The value must match a card type in the
CardType picklist on the
CardPaymentMethod object. To handle a
different card type, create a custom
payment method as described in the Order
Management Implementation Guide.

order/payments/payment/credit-card/card-number InputCardNumber

order/payments/payment/credit-card/card-holder CardHolderName

order/payments/payment/credit-card/expiration-year ExpiryYear

order/payments/payment/credit-card/expiration-month ExpiryMonth

[order payment method] CardCategory This value can be CreditCard or


DebitCard. The default value is
CreditCard.

N/A Status This picklist value is always set to Active.

order/payments/payment/credit-card/card-token GatewayToken

order/billing-address/address1, PaymentMethodStreet This value is set to


order/billing-address/address2, and order/billing-address/address1
order/billing-address/address3 +" "+
order/billing-address/address2
+" "+
order/billing-address/address3.

order/billing-address/city PaymentMethodCity

order/billing-address/state-code PaymentMethodState Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/state-code.
It must be a standard 2-character ISO
state or province code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the state code that matches
order/billing-address/state-code.

order/billing-address/state-code PaymentMethodStateCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/state-code
must match the state code of an entry in
the Salesforce state picklist.

145
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/postal-code PaymentMethodPostalCode

order/billing-address/country-code PaymentMethodCountry Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/country-code.
It must be a standard 2-character ISO
country/territory code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the country/territory code that
matches
order/billing-address/country-code.

order/billing-address/country-code PaymentMethodCountryCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/country-code
must match the country/territory code of
an entry in the Salesforce country/territory
picklist.

N/A AccountId This value is set to the ID of the Account or


Person Account record associated with the
CardPaymentMethod.

N/A PaymentGatewayId This value is set to the ID of the


PaymentGateway record whose
ExternalReference value matches the
processor ID value of the order payment
instrument.

N/A ProcessingMode This value is always set to External. It


specifies that an external payment provider
handles payment transactions.

order/payments/payment/custom_attribute custom_attribute_name If the Salesforce CardPaymentMethod object


or a custom attribute on the payment type has a custom field matching a custom
attribute on the storefront payment type or
order payment transaction object, the value
is copied to the CardPaymentMethod
record. If a custom field is non-nillable, then
order data must include a value for the
corresponding custom attribute. If the value
is missing, the integration fails.

146
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

Contact Object
When using person accounts, access shopper contact data using person account records, not contact records. When using standard
accounts and contacts, the BillToContactId field on these objects points to the associated contact record:
• Credit Memo
• Fulfillment Order
• Invoice
• Order
• Order Summary

B2C Commerce XSD Value Salesforce Object Field Notes


N/A AccountId This value is set to the ID of the Account
record that represents the shopper.

order/customer/customer-email Email

order/billing-address/first-name FirstName

order/billing-address/last-name LastName

order/billing-address/phone Phone

DigitalWallet Object
The integration checks the payment_method value of each payment instrument in an order. If it matches the following regex, then
the integration creates a DigitalWallet record for the instrument. If it doesn’t match, then the integration tries to create an
AlternativePaymentMethod or a CardPaymentMethod record for the instrument.
paypal|visa_checkout|pay_by_check|.(apple|google|android|amazon|ali).(pay)*

Note: The regex isn’t case-sensitive.

B2C Commerce XSD Value Salesforce Object Field Notes


N/A Status This picklist value is always set to Active.

[order payment method] Type

order/payments/payment/credit-card/card-token GatewayToken

order/billing-address/address1, PaymentMethodStreet This value is set to


order/billing-address/address2, and order/billing-address/address1
order/billing-address/address3 +" "+
order/billing-address/address2
+" "+
order/billing-address/address3.

order/billing-address/city PaymentMethodCity

147
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/state-code PaymentMethodState Usage depends on whether state and
country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/state-code.
It must be a standard 2-character ISO
state or province code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the state code that matches
order/billing-address/state-code.

order/billing-address/state-code PaymentMethodStateCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/state-code
must match the state code of an entry in
the Salesforce state picklist.

order/billing-address/postal-code PaymentMethodPostalCode

order/billing-address/country-code PaymentMethodCountry Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/country-code.
It must be a standard 2-character ISO
country/territory code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the country/territory code that
matches
order/billing-address/country-code.

order/billing-address/country-code PaymentMethodCountryCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/country-code
must match the country/territory code of
an entry in the Salesforce country/territory
picklist.

N/A AccountId This value is set to the ID of the Account or


Person Account record associated with the
DigitalWallet.

148
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


N/A PaymentGatewayId This value is set to the ID of the
PaymentGateway record whose
ExternalReference value matches the
processor ID value of the order payment
instrument.

N/A ProcessingMode This value is always set to External. It


specifies that an external payment provider
handles payment transactions.

order/payments/payment/custom_attribute custom_attribute_name If the Salesforce DigitalWallet object has a


or a custom attribute on the payment type custom field matching a custom attribute
on the storefront payment type or order
payment transaction object, the value is
copied to the DigitalWallet record. If a
custom field is non-nillable, then order data
must include a value for the corresponding
custom attribute. If the value is missing, the
integration fails.

Order Object
The integration uses both the order/order-no and catalog/catalog-id values to check for duplicate orders. It looks for
an existing order record with an OrderReferenceNumber matching the order-no and a SalesChannelId pointing to a SalesChannel
that matches the catalog-id. If it finds one, it doesn’t create a duplicate order.

Note: If the catalog ID for a sales channel changes, and an existing order is received with a different catalog ID, the integration
considers it a new order and creates a duplicate record.

B2C Commerce XSD Value Salesforce Object Field Notes


N/A Pricebook2Id This value is set to the ID of the Pricebook2
record for the standard price book.

order/customer/customer-name Name

N/A Status When the Order record is created, this value


is set to Draft. The last step in the
Composite API call that creates the records
related to the order sets this value to
Active.

N/A EffectiveDate This value is set to the current datetime


when the record is created.

order/order-no OrderReferenceNumber

order/billing-address/address1, BillingStreet This value is set to


order/billing-address/address2, and order/billing-address/address1
order/billing-address/address3 +" "+

149
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/billing-address/address2
+" "+
order/billing-address/address3.

order/billing-address/city BillingCity

order/billing-address/state-code BillingState Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/state-code.
It must be a standard 2-character ISO
state or province code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the state code that matches
order/billing-address/state-code.

order/billing-address/state-code BillingStateCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/state-code
must match the state code of an entry in
the Salesforce state picklist.

order/billing-address/postal-code BillingPostalCode

order/billing-address/country-code BillingCountry Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/billing-address/country-code.
It must be a standard 2-character ISO
country/territory code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the country/territory code that
matches
order/billing-address/country-code.

order/billing-address/country-code BillingCountryCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/billing-address/country-code
must match the country/territory code of

150
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


an entry in the Salesforce country/territory
picklist.

order/billing-address/phone BillingPhoneNumber

order/order-date OrderedDate

order/customer/customer-email BillingEmailAddress

N/A BillToContactId This value is set to the ID of the Contact


record that represents the shopper. When
using person accounts, this value isn’t set.
In that case, access shopper contact
information via the Account instead of the
Contact.

N/A AccountId This value is set to the ID of the Account or


Person Account record that represents the
shopper.

catalog/catalog-id SalesChannelId This value is set to the ID of the


SalesChannel record whose
SalesChannelName field matches the
catalog/catalog-id in the order
data packet.

order/taxation TaxLocaleType This value is set to Net or Gross based


on the value of order/taxation. If using Net
taxation, this value is set to Net and the
integration creates OrderItemTaxLineItem
records for the order. If using Gross taxation,
this value is set to Gross and the
integration doesn’t create
OrderItemTaxLineItem records for the order.
If the value isn’t set, then the default value
is Net.

order/currency CurrencyIsoCode This value is only set if the Salesforce org


has Multicurrency enabled.

order/custom_attribute custom_attribute_name If the Salesforce Order object has a custom


field matching a custom attribute on the
storefront order object, the value is copied
to the Order record. If the Salesforce
OrderSummary object also has a matching
custom field, it’s copied to both records. If
a custom field is non-nillable, then order
data must include a value for the
corresponding custom attribute. If the value
is missing, the integration fails.

151
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

OrderAdjustmentGroup Object
The integration creates one OrderAdjustmentGroup record for each promotion that applies to an entire order or to multiple items in an
order. For an order-level promotion, it assigns the OrderAdjustmentGroup to one OrderItemAdjustmentLineItem record for each OrderItem
record in the order. It creates the OrderAdjustmentGroup even if the order only contains one OrderItem. For an item-level promotion
that applies to multiple OrderItems, it assigns the OrderAdjustmentGroup to one OrderItemAdjustmentLineItem record for each OrderItem
record in the Order that the promotion applies to. If an item-level promotion only applies to one OrderItem, the integration doesn’t
create an OrderAdjustmentGroup for it.

Note: Shipping adjustments that aren’t part of an order-level promotion are treated as item-level promotions. An example of an
order-level promotion is “20% off and free shipping.”

B2C Commerce XSD Value Salesforce Object Field Notes


order/price-adjustments/price-adjustment/promotion-id Name

order/price-adjustments/price-adjustment/promotion-id Description

N/A Type This picklist value depends on the level of


the promotion:
• Order-level- This value is set to
Header.
• Item-level- This value is set to
SplitLine.

N/A OrderId This value is set to the ID of the associated


original Order record.

N/A AdjustmentCauseId This value is set to the ID of the associated


Promotion record.

OrderDeliveryGroup Object
The integration creates an OrderDeliveryGroup record for each shipment (also called a LineItemGroup in B2C Commerce) in the order
data.
For order changes such as returns and cancellations that include prorated delivery amounts, the proration considers the
OrderDeliveryGroups containing OrderItems that are part of the change. For example, consider an order that has three OrderDeliveryGroups,
each with multiple OrderItems. A return of two OrderItems, each from a different OrderDeliveryGroup, uses the total delivery charges
associated with those two OrderDeliveryGroups. It prorates that amount across the OrderItems in those OrderDeliveryGroups by OrderItem
price. The shipping refund equals the prorated delivery amounts for the two returned OrderItems. The return doesn’t consider any
delivery charges associated with the third OrderDeliveryGroup.

B2C Commerce XSD Value Salesforce Object Field Notes


order/customer/customer-email EmailAddress

order/shipments/shipment/shipping-address/city DeliverToCity

152
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/shipments/shipment/shipping-address/country-code DeliverToCountry Usage depends on whether state and
country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/shipments/shipment/shipping-address/country-code.
It must be a standard 2-character ISO
country/territory code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the country/territory code that
matches
order/shipments/shipment/shipping-address/country-code.

order/shipments/shipment/shipping-address/country-code DeliverToCountryCode This value is only set when state and


country/territory picklists are enabled on
your org.
order/shipments/shipment/shipping-address/country-code
must match the country/territory code of
an entry in the Salesforce country/territory
picklist.

order/shipments/shipment/shipping-address/title, DeliveryGroupToName This value is set to


order/shipments/shipment/shipping-address/first-name, order/shipments/shipment/shipping-address/title
order/shipments/shipment/shipping-address/last-name, +" "+
and order/shipments/shipment/shipping-address/first-name
order/shipments/shipment/shipping-address/suffix +" "+
order/shipments/shipment/shipping-address/last-name
+" "+
order/shipments/shipment/shipping-address/suffix.

order/shipments/shipment/shipping-address/postal-code DeliverToPostalCode

order/shipments/shipment/shipping-address/state-code DeliverToState Usage depends on whether state and


country/territory picklists are enabled in
Salesforce.
• Picklists not enabled- This value is set
to
order/shipments/shipment/shipping-address/state-code.
It must be a standard 2-character ISO
state or province code.
• Picklists enabled- This value is set to the
picklist integration value corresponding
to the state code that matches
order/shipments/shipment/shipping-address/state-code.

153
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/shipments/shipment/shipping-address/state-code DeliverToStateCode This value is only set when state and
country/territory picklists are enabled on
your org.
order/shipments/shipment/shipping-address/state-code
must match the state code of an entry in
the Salesforce country/territory picklist.

order/shipments/shipment/shipping-address/address1, DeliverToStreet This value is set to


order/shipments/shipment/shipping-address/address2, order/shipments/shipment/shipping-address/address1
and +" "+
order/shipments/shipment/shipping-address/address3 order/shipments/shipment/shipping-address/address2
+" "+
order/shipments/shipment/shipping-address/address3.

order/shipments/shipment/shipping-address/phone PhoneNumber

order/shipments/shipment/gift IsGift This value is only populated if


order/shipments/shipment/gift=true.

order/shipments/shipment/gift-message GiftMessage This value is only populated if


order/shipments/shipment/gift=true.

order/shipments/shipment/shipping-method OrderDeliveryMethodId This value is set to the ID of the


OrderDeliveryMethod record whose
ReferenceNumber field matches the
order/shipments/shipment/shipping-method
value in the order data.

N/A OrderId This value is set to the ID of the associated


original Order record.

order/shipments/shipment/custom_attribute custom_attribute_name If the Salesforce OrderDeliveryGroup object


has a custom field matching a custom
attribute on the storefront shipment object,
the value is copied to the
OrderDeliveryGroup record. If the Salesforce
OrderDeliveryGroupSummary object also
has a matching custom field, it’s copied to
both records. If a custom field is non-nillable,
then order data must include a value for the
corresponding custom attribute. If the value
is missing, the integration fails.

OrderItem Object
If an order has a TaxLocaleType of Net, then the integration also creates an OrderItemTaxLineItem record for each OrderItem record.

154
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/product-lineitems/product-lineitem/lineitem-text Description If the record represents a shipping charge,
this value is set to Shipping. Otherwise,
it’s set to
order/product-lineitems/product-lineitem/lineitem-text.

N/A Type If the record represents a shipping charge,


this picklist value is set to Delivery
Charge. Otherwise, it’s set to Order
Product.

order/product-lineitems/product-lineitem/quantity Quantity

order/product-lineitems/product-lineitem/net-price TotalLineAmount

order/product-lineitems/product-lineitem/position LineNumber Records that represent charges are assigned


a value starting at 1000 so they appear
after all order products in lists.

order/product-lineitems/product-lineitem/base-price UnitPrice The integration calculates this value to a


or limited number of decimal places and
order/product-lineitems/product-lineitem/net-price includes it for reference. Because the
and calculation can introduce small rounding
order/product-lineitems/product-lineitem/quantity errors, Order Management doesn’t use this
value for any processing. The calculation
formula depends on the tax locale type of
the order:
• Net Taxation- base-price
• Gross Taxation- net-price /
quantity

order/product-lineitems/product-lineitem/base-price GrossUnitPrice The integration calculates this value to a


or limited number of decimal places and
order/product-lineitems/product-lineitem/gross-price includes it for reference. Because the
and calculation can introduce small rounding
order/product-lineitems/product-lineitem/quantity errors, Order Management doesn’t use this
value for any processing. The calculation
formula depends on the tax locale type of
the order:
• Net Taxation- gross-price /
quantity
• Gross Taxation- base-price

order/product-lineitems/product-lineitem/base-price ListPrice This value is only set if the Optional Price


Books feature is enabled. It’s needed when
the OrderItem has no associated
PriceBookEntry.

N/A OrderId This value is set to the ID of the associated


original Order record.

155
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


N/A OrderDeliveryGroupId This value is set to the ID of the associated
OrderDeliveryGroup record.

N/A PricebookEntryId This value is set to the ID of the associated


PriceBookEntry record. If the Optional Price
Books feature is enabled, this value isn’t set.

N/A Product2Id This value is set to the ID of the associated


Product2 record.

order/product-lineitems/product-lineitem/custom_attribute, custom_attribute_name If the Salesforce OrderItem object has a


order/giftcertifcate-lineitems/giftcertifcate-lineitem/custom_attribute, custom field matching a custom attribute
or on the storefront product-lineitem object,
order/shipping-lineitems/shipping-lineitem/custom_attribute giftcertificate-lineitem object, or
shipping-lineitem object, the value is copied
to the OrderItem record. If the Salesforce
OrderItemSummary object also has a
matching custom field, it’s copied to both
records. If a custom field is non-nillable, then
order data must include a value for the
corresponding custom attribute. If the value
is missing, the integration fails.

OrderItemAdjustmentLineItem Object
An OrderItemAdjustmentLineItem record represents the application of a promotion to an OrderItem record. Thus, an OrderItem record
has one associated OrderItemAdjustmentLineItem record for each promotion that applies to it.
If an order has a TaxLocaleType of Net, then the integration also creates an OrderItemTaxLineItem record for each
OrderItemAdjustmentLineItem record.

B2C Commerce XSD Value Salesforce Object Field Notes


order/product-lineitems/product-lineitem/product-id Name This value is set to
and order/product-lineitems/product-lineitem/product-id
order/price-adjustments/price-adjustment/lineitem-text + "-" +
order/price-adjustments/price-adjustment/lineitem-text.

price-adjustments/price-adjustment/net-price Amount

price-adjustments/price-adjustment/tax TotalTaxAmount

order/price-adjustments/price-adjustment/lineitem-text PromotionText

N/A OrderItemId This value is set to the ID of the OrderItem


record that the adjustment applies to.

N/A OrderAdjustmentGroupId For an order-level promotion, or an


item-level promotion that applies to
multiple OrderItems, this value is set to the
ID of the parent OrderAdjustmentGroup

156
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


record. For an item-level promotion that
applies to only one OrderItem, it isn’t set.

N/A AdjustmentCauseId This value is set to the ID of the associated


Promotion record.

OrderItemTaxLineItem Object
If an order has a TaxLocaleType of Net, then the integration creates an OrderItemTaxLineItem record for each OrderItem and
OrderItemAdjustmentLineItem record in the order. If an order has a TaxLocaleType of Gross, then the integration doesn’t create any
OrderItemTaxLineItem records for it.

B2C Commerce XSD Value Salesforce Object Field Notes


See notes Name This value is generated based on the Type
of the associated OrderItem or
OrderItemAdjustmentLineItem record and,
if applicable, the StockKeepingUnit
of the associated Product2:
• OrderItem:
– Order Product-
StockKeepingUnit + " -
Tax"
– Delivery Charge- "Delivery
Charge - Tax"

• OrderItemAdjustmentLineItem:
– Product- StockKeepingUnit
+ " - Adjustment Tax"
– Shipping- "Delivery Charge
- Adjustment Tax"

N/A Type This picklist value is always set to


Estimated.

order/product-lineitems/product-lineitem/tax Amount

order/product-lineitems/product-lineitem/tax-rate Rate

order/order-date TaxEffectiveDate

N/A OrderItemId If the tax applies to an OrderItem record,


this value is set to the ID of that order item.
If it applies to an
OrderItemAdjustmentLineItem record, this
value is set to the ID of the order item that
the adjustment applies to.

157
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


N/A OrderItemAdjustmentLineItemId This value is only set for tax that applies to
an OrderItemAdjustmentLineItem record.

Payment Object
If an order/payments/payment/transaction-type value in the order data is sale or capture, then the integration
creates a Payment record for that transaction. If the value starts with auth, then it creates a PaymentAuthorization record. These checks
aren’t case-sensitive .

B2C Commerce XSD Value Salesforce Object Field Notes


N/A PaymentGatewayId This value is set to the ID of the
PaymentGateway record whose
ExternalReference value matches the
processor ID value of the order payment
instrument associated with the order
payment transaction.

N/A PaymentGatewayLogId This value is set to the ID of the


PaymentGatewayLog record associated with
the payment.

order/payments/payment/amount Amount

N/A ProcessingMode This picklist value is always set to


External.

N/A Status This picklist value is always set to


Processed.

order/payments/payment/transaction-id GatewayRefNumber This value isn’t required in the order data.


The default value is null.

order/customer/customer-email Email

order/order-date Date

order/payments/payment/transaction-type Type

order/billing-address/phone Phone

N/A PaymentGroupId This value is set to the ID of the


PaymentGroup record associated with the
payment.

N/A AccountId This value is set to the ID of the Account or


Person Account record associated with the
shopper.

N/A PaymentMethodId This value is set to the ID of the


CardPaymentMethod or DigitalWallet record
associated with the payment.

158
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


order/currency CurrencyIsoCode This value is only set if the Salesforce org
has Multicurrency enabled.

order/payments/payment/custom_attribute custom_attribute_name If the Salesforce Payment object has a


or a custom attribute on the payment type custom field matching a custom attribute
on the storefront payment type or order
payment transaction object, the value is
copied to the Payment record. If a custom
field is non-nillable, then order data must
include a value for the corresponding
custom attribute. If the value is missing, the
integration fails.

PaymentAuthorization Object
If an order/payments/payment/transaction-type value in the order data starts with auth, then the integration creates
a PaymentAuthorization record for that transaction. If the value is sale or capture, then it creates a Payment record. These checks
aren’t case-sensitive .

B2C Commerce XSD Value Salesforce Object Field Notes


N/A PaymentGatewayId This value is set to the ID of the
PaymentGateway record whose
ExternalReference value matches the
processor ID value of the order payment
instrument associated with the order
payment transaction.

N/A PaymentGatewayLogId This value is set to the ID of the


PaymentGatewayLog record associated with
the payment authorization.

order/payments/payment/amount Amount

N/A ProcessingMode This picklist value is always set to


External.

N/A Status This picklist value is always set to


Processed.

order/payments/payment/transaction-id GatewayRefNumber This value isn’t required in the order data.


The default value is null.

(custom attribute) GatewayAuthCode The default Payment Transaction object in


order/payments/payment/authCode B2C Commerce doesn’t include an
authCode attribute. To use it, add it as a
custom attribute and populate it before
sending the order data. If you name it
authCode, the integration automatically
copies it to the GatewayAuthCode field.

159
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


N/A PaymentGroupId This value is set to the ID of the
PaymentGroup record associated with the
payment authorization.

N/A AccountId This value is set to the ID of the Account or


Person Account record associated with the
shopper.

N/A PaymentMethodId This value is set to the ID of the


CardPaymentMethod or DigitalWallet record
associated with the payment authorization.

order/currency CurrencyIsoCode This value is only set if the Salesforce org


has Multicurrency enabled.

order/payments/payment/custom_attribute custom_attribute_name If the Salesforce PaymentAuthorization


or a custom attribute on the payment type object has a custom field matching a
custom attribute on the storefront payment
type or order payment transaction object,
the value is copied to the
PaymentAuthorization record. If a custom
field is non-nillable, then order data must
include a value for the corresponding
custom attribute. If the value is missing, the
integration fails.

PaymentGatewayLog Object
B2C Commerce XSD Value Salesforce Object Field Notes
N/A PaymentGatewayId This value is set to the ID of the
PaymentGateway record whose
ExternalReference value matches the
processor ID value of the order payment
instrument associated with the order
payment transaction.

N/A InteractionStatus This picklist value is always set to


Success.

order/payments/payment/transaction-type InteractionType The default value is Authorization.

(custom attribute) GatewayAuthCode The default Payment Transaction object in


order/payments/payment/authCode B2C Commerce doesn’t include an
authCode attribute. To use it, add it as a
custom attribute and populate it before
sending the order data. If you name it
authCode, the integration automatically
copies it to the GatewayAuthCode field.

160
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

B2C Commerce XSD Value Salesforce Object Field Notes


(custom attribute) GatewayAvsCode The default Payment Transaction object in
order/payments/payment/avsResultCode B2C Commerce doesn’t include an
avsResultCode attribute. To use it, add
it as a custom attribute and populate it
before sending the order data. If you name
it avsResultCode, the integration
automatically copies it to the
GatewayAvsCode field.

(custom attribute) GatewayResultCode The default Payment Transaction object in


order/payments/payment/approvalStatus B2C Commerce doesn’t include an
approvalStatus field. To use it, add
it as a custom attribute and populate it
before sending the order data. If you name
it approvalStatus, the integration
automatically copies it to the
GatewayResultCode field.

order/payments/payment/custom_attribute custom_attribute_name If the Salesforce PaymentGatewayLog object


or a custom attribute on the payment type has a custom field matching a custom
attribute on the storefront payment type or
order payment transaction object, the value
is copied to the PaymentGatewayLog
record. However, the integration copies
certain Order Payment Transaction custom
attributes to standard PaymentGatewayLog
fields, as described in this table. If a custom
field is non-nillable, then order data must
include a value for the corresponding
custom attribute. If the value is missing, the
integration fails.

PaymentGroup Object
B2C Commerce XSD Value Salesforce Object Field Notes
N/A SourceObjectId This value is set to the ID of the original
Order record that the payments in the group
apply to.

order/currency CurrencyIsoCode This value is only set if the Salesforce org


has Multicurrency enabled.

161
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map

PricebookEntry Object
Salesforce Order Management doesn’t use the PricebookEntry object. It creates a PriceBookEntry record for each Product2 because the
OrderItem object requires a PricebookEntryId value.

Note: If you turn on the Optional Price Books feature, then Order Management doesn’t create price book entries for product
records that it creates from order data. If you turn off the feature, then you must add price book entries manually.

B2C Commerce XSD Value Salesforce Object Field Notes


N/A Pricebook2Id This value is set to the ID of the Pricebook2
record for the standard price book.

N/A Product2Id This value is set to the ID of the associated


Product2 record.

order/product-lineitems/product-lineitem/base-price UnitPrice This value is only set when the


PriceBookEntry record is created. It isn’t
updated when an OrderItem associated with
the same Product2 is created. It isn’t used
for any calculations in Order Management.

order/currency CurrencyIsoCode This value is only set if the Salesforce org


has Multicurrency enabled.

Product2 Object
The integration identifies products by first searching for a Product2 with a StockKeepingUnit value that matches the product-id
value in the order data. If it doesn’t find one, it looks for a Product2 with a ProductCode value that matches the product-id value.
If it still doesn’t find one, then it creates a Product2 record.

B2C Commerce XSD Value Salesforce Object Field Notes


order/product-lineitem/lineitem-text Description

order/product-lineitem/product-name Name

order/product-lineitem/product-id StockKeepingUnit If the product is an electronic gift certificate,


this value is set to eGiftCertificate.

order/product-lineitem/product-id ProductCode If the product is an electronic gift certificate,


this value is set to eGiftCertificate.

N/A IsActive The default value is true.

Promotion Object
For information on the Promotion object, see the Loyalty Management Developer Guide.

B2C Commerce XSD Value Salesforce Object Field Notes


order/price-adjustments/price-adjustment/promotion-id Name

162
Order Management Standard Objects Import Existing Data

B2C Commerce XSD Value Salesforce Object Field Notes


order/price-adjustments/price-adjustment/lineitem-text DisplayName

order/price-adjustments/price-adjustment/lineitem-text Description

StartDate The default value is the current date.

IsCommercePromotion The default value is true.

IsActive The default value is true.

SalesChannel Object
The integration associates B2C Commerce catalog IDs with Salesforce SalesChannels.

B2C Commerce XSD Value Salesforce Object Field Notes


catalog/catalog-id Description

catalog/catalog-id SalesChannelName

Import Existing Data


Import order and storefront data into Salesforce Order Management outside of the B2C Commerce integration.
You can import data such as customer accounts, products, and historical orders outside of the B2C Commerce integration.
When importing orders, use the Salesforce B2C Commerce Storefront Order Data Map to identify what data to include, and load it using
the Salesforce Bulk API or Composite API. Allow Order Management to process each imported order via a Create Order Summary flow
or API, as it does with ingested storefront orders. Doing so ensures proper creation of each OrderSummary and its related records. When
creating an OrderSummary, the source Order record must meet the following requirements:
• The Order’s Status value must be associated with the Activated StatusCode.
• At least one OrderDeliveryGroup associated with the Order must exist in Salesforce.
Each OrderSummary has an OrderLifecycleType field, which specifies whether you’ll manage it with Order Management features. The
Create Order Summary flow or API sets the Order Lifecycle Type field to Managed or Unmanaged, and the value can’t be changed.
The default value is Managed. If you want to use the unmanaged order lifecycle, implement logic in your Create Order Summary flow
or API calls to set the OrderLifecycleType. For details about the differences between the managed and unmanaged order lifecycle types,
see Order Lifecycle Management in Salesforce Help.

Note: Examples of orders that use the unmanaged lifecycle type include historical orders and orders managed by an external
system.
When importing order data, consider Order Management’s complex object dependencies. To maintain data integrity, use a composite
REST API request to import order data that lives in multiple related Salesforce records. For example, you can make one composite request
to import order data in this sequence, which ensures that a record is created after other records that it references.

Note: This list is a simple example. Real order data usually involves more objects.

1. Shopper account
2. Products

163
Order Management Standard Objects Import Existing Data

3. Order, which references the account record


4. Order delivery group, which references the order record
5. Order products, which reference the product records, order delivery group record, and the order record
If any part of a Composite API request fails, the entire transaction is rolled back. For information on making Composite API requests, see
Composite in the REST API Developer Guide.
To import large amounts of data that doesn’t have interobject dependencies, such as catalog or shopper data, use the Salesforce Bulk
API. For information on using the Bulk API, see the Bulk API Developer Guide.

Important: When importing data using API calls, remember 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 two weeks for Support
to arrange the increase.

Salesforce B2C Commerce Data


This table illustrates how some data fields map between B2C Commerce and Salesforce Order Management. The integration uses these
fields to look up records, so if you import or create Salesforce records used by Order Management, keep them synchronized.
For example, when the integration creates an OrderItem record, it searches for a Product2 record whose StockKeepingUnit matches the
product SKU in the order data. If you import catalog product data, and the StockKeepingUnit values don’t match the product SKU values
in B2C Commerce, then the integration can’t recognize those products. In that case, when an order comes in with a mismatched product,
the integration creates a separate Product2 record for it.

B2C Commerce Data Order Management Object Field


Shipping Method ID Order Delivery Method object—Reference ID field

Product SKU Product object—SKU field

Payment Processor ID Payment Gateway object—Reference ID field

Site ID / Domain ID Sales Channel object—Name field

Customer Email Address • When using person accounts for the shopper: Account
object—Person Email field
• When using a standard account and contact for the shopper:
Contact object—Email field

Customer Billing Address First Name and Last Name (concatenated) Account object—Name field (individual shoppers when not using
person accounts)

Customer Billing Address Company Name Account object—Name field (business shoppers)

164
CHAPTER 3 Salesforce Order Management in Apex
In this chapter ... Salesforce Order Management and Omnichannel Inventory include Apex classes in the ConnectApi
namespace.
• Salesforce Order
Management Apex
Classes
• Salesforce Order
Management Apex
Inputs
• Salesforce Order
Management Apex
Outputs

165
Salesforce Order Management in Apex Salesforce Order Management Apex Classes

Salesforce Order Management Apex Classes


Salesforce Order Management includes Apex classes in the ConnectApi namespace.

FulfillmentOrder Class
Fulfill orders in Order Management.
OmnichannelInventoryService Class
Route orders to inventory locations in Order Management.
OrderPaymentSummary Class
Work with payments in Order Management.
OrderSummary Class
Work with orders in Order Management.
OrderSummaryCreation Class
Create Order Summaries in Order Management.
ReturnOrder Class
Process ReturnOrders in Order Management.
Routing Class
Route orders to inventory locations in Order Management.

FulfillmentOrder Class
Fulfill orders in Order Management.

Namespace
ConnectApi

FulfillmentOrder Methods
The following are methods for FulfillmentOrder. All methods are static.

cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)
Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.
createFulfillmentOrders(fulfillmentOrderInput)
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.
createInvoice(fulfillmentOrderId, invoiceInput)
Create an invoice for a FulfillmentOrder that doesn’t have one.
createMultipleFulfillmentOrder(multipleFulfillmentOrderInput)
Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.

166
Salesforce Order Management in Apex FulfillmentOrder Class

createMultipleInvoices(invoicesInput)
Create Invoices for multiple FulfillmentOrders.

cancelFulfillmentOrderLineItems(fulfillmentOrderId,
cancelFulfillmentOrderLineItemsInput)
Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
cancelFulfillmentOrderLineItems(String fulfillmentOrderId,
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
cancelFulfillmentOrderLineItemsInput)

Parameters
fulfillmentOrderId
Type: String
ID of the FulfilllmentOrder.
cancelFulfillmentOrderLineItemsInput
Type: ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
List of FulfillmentOrderLineItems to cancel.

Return Value
Type: ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation

Example
String fulfillmentOrderId = '0a3xx0000000085AAA';
List<ConnectApi.FulfillmentOrderLineItemInputRepresentation> itemToCancelList = new
List<ConnectApi.FulfillmentOrderLineItemInputRepresentation>();

for(FulfillmentOrderLineItem fulfillmentOrderLineItem :
fulfillmentOrder.FulfillmentOrderLineItems){
ConnectApi.FulfillmentOrderLineItemInputRepresentation itemToCancel = new
ConnectApi.FulfillmentOrderLineItemInputRepresentation();
itemToCancel.fulfillmentOrderLineItemId = fulfillmentOrderLineItem.Id;
itemToCancel.quantity = 1;

167
Salesforce Order Management in Apex FulfillmentOrder Class

itemToCancelList.add(itemToCancel);
}

ConnectAPI.FulfillmentOrderLineItemsToCancelInputRepresentation input = new


ConnectAPI.FulfillmentOrderLineItemsToCancelInputRepresentation();
input.fulfillmentOrderLineItemsToCancel = itemToCancelList;

ConnectAPI.FulfillmentOrderCancelLineItemsOutputRepresentation result =
ConnectAPI.FulfillmentOrder.cancelFulfillmentOrderLineItems(fulfillmentOrderId, input);

createFulfillmentOrders(fulfillmentOrderInput)
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.FulfillmentOrderOutputRepresentation
createFulfillmentOrders(ConnectApi.FulfillmentOrderInputRepresentation
fulfillmentOrderInput)

Parameters
fulfillmentOrderInput
Type: ConnectApi.FulfillmentOrderInputRepresentation
OrderItemSummaries to allocate, with location and delivery information.

Return Value
Type: ConnectApi.FulfillmentOrderOutputRepresentation

Example
String orderSummaryId = '1Osxx0000004CCG';
String fulfillmentType = 'warehouse';

String warehouseFromLocationId = [SELECT Id from Location WHERE LocationType='Warehouse'


LIMIT 1].Id;

ConnectApi.FulfillmentOrderInputRepresentation fulfillmentOrderInput = new


ConnectApi.FulfillmentOrderInputRepresentation();

168
Salesforce Order Management in Apex FulfillmentOrder Class

fulfillmentOrderInput.orderSummaryId = orderSummaryId;

List<OrderDeliveryGroupSummary> orderDeliveryGroupSummaryList = [SELECT Id FROM


OrderDeliveryGroupSummary WHERE OrderSummaryId =: orderSummaryId];

for (OrderDeliveryGroupSummary orderDeliveryGroupSummary: orderDeliveryGroupSummaryList){

fulfillmentOrderInput.orderDeliveryGroupSummaryId = orderDeliveryGroupSummary.Id;
List<ConnectApi.FulfillmentGroupInputRepresentation> fulfillmentGroups = new
List<ConnectApi.FulfillmentGroupInputRepresentation>();
ConnectApi.FulfillmentGroupInputRepresentation fulfillmentGroup = new
ConnectApi.FulfillmentGroupInputRepresentation();
fulfillmentGroup.fulfilledFromLocationId = warehouseFromLocationId;
fulfillmentGroup.fulfillmentType = fulfillmentType;

List<ConnectApi.OrderItemSummaryInputRepresentation> orderItemSummaries = new


List<ConnectApi.OrderItemSummaryInputRepresentation>();

List<OrderItemSummary> orderItemSummaryList = [Select Id, quantity FROM OrderItemSummary


WHERE OrderSummaryId =: orderSummaryId AND OrderDeliveryGroupSummaryId =:
orderDeliveryGroupSummary.Id];
for(OrderItemSummary orderItemSummary : orderItemSummaryList){
ConnectApi.OrderItemSummaryInputRepresentation oisInputRepresentation = new
ConnectApi.OrderItemSummaryInputRepresentation();
oisInputRepresentation.orderItemSummaryId = orderItemSummary.Id;
oisInputRepresentation.quantity = orderItemSummary.quantity;
orderItemSummaries.add(oisInputRepresentation);
}

fulfillmentGroup.orderItemSummaries = orderItemSummaries;
fulfillmentGroups.add(fulfillmentGroup);
fulfillmentOrderInput.fulfillmentGroups = fulfillmentGroups;

ConnectApi.FulfillmentOrderOutputRepresentation result =
ConnectAPI.FulfillmentOrder.createFulfillmentOrders(fulfillmentOrderInput);

createInvoice(fulfillmentOrderId, invoiceInput)
Create an invoice for a FulfillmentOrder that doesn’t have one.

API Version
48.0

Requires Chatter
No

169
Salesforce Order Management in Apex FulfillmentOrder Class

Signature
public static ConnectApi.FulfillmentOrderInvoiceOutputRepresentation createInvoice(String
fulfillmentOrderId, ConnectApi.FulfillmentOrderInvoiceInputRepresentation invoiceInput)

Parameters
fulfillmentOrderId
Type: String
ID of the FulfillmentOrder.
invoiceInput
Type: ConnectApi.FulfillmentOrderInvoiceInputRepresentation
Required input with no data.

Return Value
Type: ConnectApi.FulfillmentOrderInvoiceOutputRepresentation

Example
String fulfillmentOrderId = '0a3xx0000000085AAA';

ConnectApi.FulfillmentOrderInvoiceInputRepresentation input = new


ConnectApi.FulfillmentOrderInvoiceInputRepresentation();
ConnectAPI.FulfillmentOrderInvoiceOutputRepresentation result =
ConnectApi.FulfillmentOrder.createInvoice(fulfillmentOrderId, input);

createMultipleFulfillmentOrder(multipleFulfillmentOrderInput)
Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.

API Version
50.0

Requires Chatter
No

Signature
public static ConnectApi.MultipleFulfillmentOrderOutputRepresentation
createMultipleFulfillmentOrder(ConnectApi.MultipleFulfillmentOrderInputRepresentation
multipleFulfillmentOrderInput)

Parameters
multipleFulfillmentOrderInput
Type: ConnectApi.MultipleFulfillmentOrderInputRepresentation
Wraps a list of inputs for creating fulfillment orders.

170
Salesforce Order Management in Apex OmnichannelInventoryService Class

Return Value
Type: ConnectApi.MultipleFulfillmentOrderOutputRepresentation

createMultipleInvoices(invoicesInput)
Create Invoices for multiple FulfillmentOrders.

API Version
52.0

Requires Chatter
No

Signature
public static ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
createMultipleInvoices(ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
invoicesInput)

Parameters
invoicesInput
Type: ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
The FulfillmentOrders to create Invoices for.

Return Value
Type: ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation

OmnichannelInventoryService Class
Route orders to inventory locations in Order Management.

Namespace
ConnectApi

OmnichannelInventoryService Methods
The following are methods for OmnichannelInventoryService. All methods are static.

createReservation(createReservationInputRepresentation)
Create an inventory reservation in Omnichannel Inventory.
fulfillReservation(fulfillReservationInputRepresentation)
Fulfill one or more inventory reservations.

171
Salesforce Order Management in Apex OmnichannelInventoryService Class

getInventoryAvailability(inventoryAvailabilityInputRepresentation)
Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
getInventoryAvailabilityUploadStatus(uploadId)
Retrieve the status of an inventory availability upload job.
getPublishLocationStructureStatus(uploadId)
Retrieve the status of a publish location structure job.
publishLocationStructure()
Asynchronously publish information about your inventory locations and location groups to Omnichannel Inventory. The publish
includes records whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use to
retrieve the status of the publish job.
releaseReservation(releaseReservationInputRepresentation)
Release one or more existing inventory reservations to free up that inventory.
submitInventoryAvailabilityUpload(fileUpload)
Upload an inventory availability data file to Omnichannel Inventory.
transferReservation(transferReservationInputRepresentation)
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.

createReservation(createReservationInputRepresentation)
Create an inventory reservation in Omnichannel Inventory.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCICreateReservationOutputRepresentation
createReservation(ConnectApi.OCICreateReservationInputRepresentation
createReservationInputRepresentation)

Parameters
createReservationInputRepresentation
Type: ConnectApi.OCICreateReservationInputRepresentation
Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.

Return Value
Type: ConnectApi.OCICreateReservationOutputRepresentation

172
Salesforce Order Management in Apex OmnichannelInventoryService Class

fulfillReservation(fulfillReservationInputRepresentation)
Fulfill one or more inventory reservations.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIFulfillReservationOutputRepresentation
fulfillReservation(ConnectApi.OCIFulfillReservationInputRepresentation
fulfillReservationInputRepresentation)

Parameters
fulfillReservationInputRepresentation
Type: ConnectApi.OCIFulfillReservationInputRepresentation
Wraps a list of inventory reservations to fulfill.

Return Value
Type: ConnectApi.OCIFulfillReservationOutputRepresentation

getInventoryAvailability(inventoryAvailabilityInputRepresentation)
Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
getInventoryAvailability(ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
inventoryAvailabilityInputRepresentation)

Parameters
inventoryAvailabilityInputRepresentation
Type: ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
Details of a request to retrieve inventory availability.

173
Salesforce Order Management in Apex OmnichannelInventoryService Class

Return Value
Type: ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation

getInventoryAvailabilityUploadStatus(uploadId)
Retrieve the status of an inventory availability upload job.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
getInventoryAvailabilityUploadStatus(String uploadId)

Parameters
uploadId
Type: String
The upload ID of the upload job.

Return Value
Type: ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation

getPublishLocationStructureStatus(uploadId)
Retrieve the status of a publish location structure job.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
getPublishLocationStructureStatus(String uploadId)

174
Salesforce Order Management in Apex OmnichannelInventoryService Class

Parameters
uploadId
Type: String
The upload ID of the publish job.

Return Value
Type: ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation

publishLocationStructure()
Asynchronously publish information about your inventory locations and location groups to Omnichannel Inventory. The publish includes
records whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use to retrieve the status
of the publish job.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIPublishLocationStructureOutputRepresentation
publishLocationStructure()

Return Value
Type: ConnectApi.OCIPublishLocationStructureOutputRepresentation

releaseReservation(releaseReservationInputRepresentation)
Release one or more existing inventory reservations to free up that inventory.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIReleaseReservationOutputRepresentation
releaseReservation(ConnectApi.OCIReleaseReservationInputRepresentation
releaseReservationInputRepresentation)

175
Salesforce Order Management in Apex OmnichannelInventoryService Class

Parameters
releaseReservationInputRepresentation
Type: ConnectApi.OCIReleaseReservationInputRepresentation
Details of one or more inventory reservations to release.

Return Value
Type: ConnectApi.OCIReleaseReservationOutputRepresentation

submitInventoryAvailabilityUpload(fileUpload)
Upload an inventory availability data file to Omnichannel Inventory.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
submitInventoryAvailabilityUpload(ConnectApi.BinaryInput fileUpload)

Parameters
fileUpload
Type: ConnectApi.BinaryInput
JSON file containing inventory availability data.

Return Value
Type: ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation

Usage
To create an inventory data file, format the data as a series of JSON entries representing locations and individual inventory records.
Inventory Import Data Considerations:
• Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
• When the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location
entry.
• For each location entry, specify "mode":"UPDATE".
• Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The record Id protects against importing
duplicate data.
• Each inventory record entry requires an effectiveDate.

176
Salesforce Order Management in Apex OmnichannelInventoryService Class

• Each futures entry requires a nonzero quantity and a future expectedDate.


• The system only creates or updates entries that are included in the data. It doesn’t delete entries that aren’t included. However, if
an included entry has an empty value, that value is deleted.

Note: The file size limit is 100 MB. For larger data sets, you can compress the file using GZIP or split the data into multiple files.

This example illustrates the data format:

Note: For readability, this example shows the first few entries on multiple lines. In the import file, each location and inventory
record entry must be on a single line.
{
"location":"Warehouse-A", // location identifier
"mode":"UPDATE" // must be UPDATE (other operations might be available in future releases)
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0", // unique identifier for the inventory
record
"onHand":10,
"sku":"12389156",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[ // list of future restocks
{
"quantity":1,
"expectedDate":"2021-04-18T14:05:22.781-07:00"
},
{
"quantity":5,
"expectedDate":"2021-05-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e312345",
"onHand":10,
"sku":"9485728",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[
{
"quantity":10,
"expectedDate":"2021-04-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{"location":"Warehouse-B","mode":"UPDATE"}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc123de","onHand":10,"sku":"12389156","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":1,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc98765","onHand":10,"sku":"93867201","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":5,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}

transferReservation(transferReservationInputRepresentation)
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.

177
Salesforce Order Management in Apex OrderPaymentSummary Class

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.OCITransferReservationOutputRepresentation
transferReservation(ConnectApi.OCITransferReservationInputRepresentation
transferReservationInputRepresentation)

Parameters
transferReservationInputRepresentation
Type: ConnectApi.OCITransferReservationInputRepresentation
Wraps a list of inventory reservation transfers and specifies whether a single failure cancels the entire list.

Return Value
Type: ConnectApi.OCITransferReservationOutputRepresentation

OrderPaymentSummary Class
Work with payments in Order Management.

Namespace
ConnectApi

OrderPaymentSummary Methods
The following are methods for OrderPaymentSummary. All methods are static.

createOrderPaymentSummary(orderPaymentSummaryInput)
Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.

createOrderPaymentSummary(orderPaymentSummaryInput)
Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.

178
Salesforce Order Management in Apex OrderSummary Class

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
createOrderPaymentSummary(ConnectApi.CreateOrderPaymentSummaryInputRepresentation
orderPaymentSummaryInput)

Parameters
orderPaymentSummaryInput
Type: ConnectApi.CreateOrderPaymentSummaryInputRepresentation
The OrderSummary and payment authorization or payments.

Return Value
Type: ConnectApi.CreateOrderPaymentSummaryOutputRepresentation

Example
String orderSummaryId = '1Osxx0000004CCG';
String paymentId1 = '0a3xx0000000085AAA';
String paymentId2 = '0a3xx0000000085BBB';

ConnectApi.CreateOrderPaymentSummaryInputRepresentation orderPaymentSummaryInput = new


ConnectApi.CreateOrderPaymentSummaryInputRepresentation();
orderPaymentSummaryInput.orderSummaryId = orderSummaryId;
List<String> paymentList = new List<String>();
paymentList.add(paymentId1);
paymentList.add(paymentId2);
orderPaymentSummaryInput.paymentIds = paymentList;

ConnectApi.CreateOrderPaymentSummaryOutputRepresentation result =
ConnectAPI.OrderPaymentSummary.createOrderPaymentSummary(orderPaymentSummaryInput);

OrderSummary Class
Work with orders in Order Management.

Namespace
ConnectApi

179
Salesforce Order Management in Apex OrderSummary Class

OrderSummary Methods
The following are methods for OrderSummary. All methods are static.

adjustPreview(orderSummaryId, adjustInput)
Retrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actually
executing the adjustment. The response data contains the financial changes that would result from submitting the proposed
adjustment.
adjustSubmit(orderSummaryId, adjustInput)
Adjust the price of one or more OrderItemSummaries from an OrderSummary, and create one or two corresponding change orders.
createCreditMemo(orderSummaryId, creditMemoInput)
Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.
ensureFundsAsync(orderSummaryId, ensureFundsInput)
Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider.
This method inserts a background operation into an asynchronous job queue and returns the ID of that operation so you can track
its status. Payment gateway responses appear in the payment gateway log and do not affect the background operation status.
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a background
operation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responses
appear in the payment gateway log and do not affect the background operation status.
previewCancel(orderSummaryId, changeInput)
Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actually
executing the cancel.
previewReturn(orderSummaryId, changeInput)
Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actually
executing the return.
submitCancel(orderSummaryId, changeInput)
Cancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
submitReturn(orderSummaryId, changeInput)
Return one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.

adjustPreview(orderSummaryId, adjustInput)
Retrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actually
executing the adjustment. The response data contains the financial changes that would result from submitting the proposed adjustment.

API Version
49.0

Requires Chatter
No

180
Salesforce Order Management in Apex OrderSummary Class

Signature
public static ConnectApi.AdjustOrderSummaryOutputRepresentation adjustPreview(String
orderSummaryId, ConnectApi.AdjustOrderItemSummaryInputRepresentation adjustInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
adjustInput
Type: ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.

Return Value
Type: ConnectApi.AdjustOrderSummaryOutputRepresentation

SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
adjustSubmit(orderSummaryId, adjustInput)

adjustSubmit(orderSummaryId, adjustInput)
Adjust the price of one or more OrderItemSummaries from an OrderSummary, and create one or two corresponding change orders.

API Version
49.0

Requires Chatter
No

Signature
public static ConnectApi.AdjustOrderSummaryOutputRepresentation adjustSubmit(String
orderSummaryId, ConnectApi.AdjustOrderItemSummaryInputRepresentation adjustInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
adjustInput
Type: ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.

181
Salesforce Order Management in Apex OrderSummary Class

Return Value
Type: ConnectApi.AdjustOrderSummaryOutputRepresentation

Usage
After submitting a price adjustment, process refunds as appropriate:
• If the discount only applied to OrderItemSummaries for which payment has not been captured, it does not require a refund. This
situation normally applies to OrderItemSummaries in the US that have not been fulfilled.
• If the discount applied to OrderItemSummaries that have not been fulfilled and for which payment has been captured, process a
refund. In this case, pass the totalExcessFundsAmount from the output representation to the ensureRefundsAsync()
method.
• If the discount applied to OrderItemSummaries that have been fulfilled, process a refund. Pass the
postFulfillmentChangeOrderId from the output representation to the createCreditMemo() method, then pass
the CreditMemo to the ensureRefundsAsync() method.
• If the discount applied to both fulfilled and unfulfilled OrderItemSummaries for which payment has been captured, process both
refunds. Pass the postFulfillmentChangeOrderId from the output representation to the createCreditMemo()
method, then pass the credit memo and the totalExcessFundsAmount from the output representation to the
ensureRefundsAsync() method.

SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
createCreditMemo(orderSummaryId, creditMemoInput)
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
adjustPreview(orderSummaryId, adjustInput)

createCreditMemo(orderSummaryId, creditMemoInput)
Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.CreateCreditMemoOutputRepresentation createCreditMemo(String
orderSummaryId, ConnectApi.CreateCreditMemoInputRepresentation creditMemoInput)

Parameters
orderSummaryId
Type: String

182
Salesforce Order Management in Apex OrderSummary Class

ID of the OrderSummary.
creditMemoInput
Type: ConnectApi.CreateCreditMemoInputRepresentation
The list of change order IDs.

Return Value
Type: ConnectApi.CreateCreditMemoOutputRepresentation

ensureFundsAsync(orderSummaryId, ensureFundsInput)
Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider. This
method inserts a background operation into an asynchronous job queue and returns the ID of that operation so you can track its status.
Payment gateway responses appear in the payment gateway log and do not affect the background operation status.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.EnsureFundsAsyncOutputRepresentation ensureFundsAsync(String
orderSummaryId, ConnectApi.EnsureFundsAsyncInputRepresentation ensureFundsInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
ensureFundsInput
Type: ConnectApi.EnsureFundsAsyncInputRepresentation
The ID of the invoice.

Return Value
Type: ConnectApi.EnsureFundsAsyncOutputRepresentation

Usage
This method checks the OrderPaymentSummaries associated with the specified OrderSummary for funds to apply to the invoice balance
as follows:

Note: If multiple OrderPaymentSummaries have the same amount, their order of selection is random.

1. Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.

183
Salesforce Order Management in Apex OrderSummary Class

2. If an OrderPaymentSummary exists with an amount that matches the invoice balance, use it.
3. Otherwise, if any OrderPaymentSummaries exist with an amount greater than the invoice balance, use the one with the smallest
amount greater than the invoice balance.
4. Otherwise, select OrderPaymentSummaries in order from largest amount to smallest until their amounts meet or exceed the invoice
balance.
5. If any selected funds are authorized, capture them.
6. Apply the selected funds to the invoice.

ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a background
operation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responses
appear in the payment gateway log and do not affect the background operation status.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.EnsureRefundsAsyncOutputRepresentation ensureRefundsAsync(String
orderSummaryId, ConnectApi.EnsureRefundsAsyncInputRepresentation ensureRefundsInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
ensureRefundsInput
Type: ConnectApi.EnsureRefundsAsyncInputRepresentation
Object that wraps the ID of the credit memo and the excess funds amount.

Return Value
Type: ConnectApi.EnsureRefundsAsyncOutputRepresentation

previewCancel(orderSummaryId, changeInput)
Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actually
executing the cancel.

API Version
48.0

184
Salesforce Order Management in Apex OrderSummary Class

Requires Chatter
No

Signature
public static ConnectApi.PreviewCancelOutputRepresentation previewCancel(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

Return Value
Type: ConnectApi.PreviewCancelOutputRepresentation

SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
submitCancel(orderSummaryId, changeInput)

previewReturn(orderSummaryId, changeInput)
Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actually
executing the return.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.PreviewReturnOutputRepresentation previewReturn(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters
orderSummaryId
Type: String

185
Salesforce Order Management in Apex OrderSummary Class

ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

Return Value
Type: ConnectApi.PreviewReturnOutputRepresentation

SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
submitReturn(orderSummaryId, changeInput)

submitCancel(orderSummaryId, changeInput)
Cancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.SubmitCancelOutputRepresentation submitCancel(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

186
Salesforce Order Management in Apex OrderSummary Class

Return Value
Type: ConnectApi.SubmitCancelOutputRepresentation

SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
createCreditMemo(orderSummaryId, creditMemoInput)
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
previewCancel(orderSummaryId, changeInput)

submitReturn(orderSummaryId, changeInput)
Return one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.SubmitReturnOutputRepresentation submitReturn(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

Return Value
Type: ConnectApi.SubmitReturnOutputRepresentation

187
Salesforce Order Management in Apex OrderSummaryCreation Class

Usage
After submitting a return, process a refund. Pass the changeOrderId from the output representation to the createCreditMemo()
method, then pass the credit memo to the ensureRefundsAsync() method.

SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
createCreditMemo(orderSummaryId, creditMemoInput)
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
previewReturn(orderSummaryId, changeInput)

OrderSummaryCreation Class
Create Order Summaries in Order Management.

Namespace
ConnectApi

OrderSummaryCreation Methods
The following are methods for OrderSummaryCreation. All methods are static.

createOrderSummary(orderSummaryInput)
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce
Order Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.

createOrderSummary(orderSummaryInput)
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce Order
Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.

API Version
48.0

Requires Chatter
No

Signature
public static ConnectApi.OrderSummaryOutputRepresentation
createOrderSummary(ConnectApi.OrderSummaryInputRepresentation orderSummaryInput)

188
Salesforce Order Management in Apex ReturnOrder Class

Parameters
orderSummaryInput
Type: ConnectApi.OrderSummaryInputRepresentation
Input object that wraps the ID of the source order.

Return Value
Type: ConnectApi.OrderSummaryOutputRepresentation

ReturnOrder Class
Process ReturnOrders in Order Management.

Namespace
ConnectApi

ReturnOrder Methods
The following are methods for ReturnOrder. All methods are static.

createReturnOrder(returnOrderInput)
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.
returnItems(returnOrderId, returnItemsInput)
Process ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makes
that ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates
a separate ReturnOrderLineItem representing that quantity.

createReturnOrder(returnOrderInput)
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.

API Version
50.0

Requires Chatter
No

Signature
public static ConnectApi.ReturnOrderOutputRepresentation
createReturnOrder(ConnectApi.ReturnOrderInputRepresentation returnOrderInput)

189
Salesforce Order Management in Apex Routing Class

Parameters
returnOrderInput
Type: ConnectApi.ReturnOrderInputRepresentation
Data for creating a ReturnOrder and ReturnOrderLineItems.

Return Value
Type: ConnectApi.ReturnOrderOutputRepresentation

returnItems(returnOrderId, returnItemsInput)
Process ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makes
that ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates a
separate ReturnOrderLineItem representing that quantity.

API Version
52.0

Requires Chatter
No

Signature
public static ConnectApi.ReturnItemsOutputRepresentation returnItems(String
returnOrderId, ConnectApi.ReturnItemsInputRepresentation returnItemsInput)

Parameters
returnOrderId
Type: String
ID of the ReturnOrder.
returnItemsInput
Type: ConnectApi.ReturnItemsInputRepresentation
Data about products and delivery charges to return.

Return Value
Type: ConnectApi.ReturnItemsOutputRepresentation

Routing Class
Route orders to inventory locations in Order Management.

Namespace
ConnectApi

190
Salesforce Order Management in Apex Routing Class

Routing Methods
The following are methods for Routing. All methods are static.

findRoutesWithFewestSplits(findRoutesWithFewestSplitsInputRepresentation)
Returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits.
rankAverageDistance(rankAverageDistanceInputRepresentation)
Calculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare
the average shipping distances for different sets of locations that can fulfill an order.

findRoutesWithFewestSplits(findRoutesWithFewestSplitsInputRepresentation)
Returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits.

API Version
51.0

Requires Chatter
No

Signature
public static ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
findRoutesWithFewestSplits(ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
findRoutesWithFewestSplitsInputRepresentation)

Parameters
findRoutesWithFewestSplitsInputRepresentation
Type: ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
The input includes the ordered item quantities, data about available inventory, and, optionally, a maximum allowable number of
shipment splits.

Return Value
Type: ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation

rankAverageDistance(rankAverageDistanceInputRepresentation)
Calculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare the
average shipping distances for different sets of locations that can fulfill an order.

API Version
51.0

191
Salesforce Order Management in Apex Salesforce Order Management Apex Inputs

Requires Chatter
No

Signature
public static ConnectApi.RankAverageDistanceOutputRepresentation
rankAverageDistance(ConnectApi.RankAverageDistanceInputRepresentation
rankAverageDistanceInputRepresentation)

Parameters
rankAverageDistanceInputRepresentation
Type: ConnectApi.RankAverageDistanceInputRepresentation
An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.

Return Value
Type: ConnectApi.RankAverageDistanceOutputRepresentation

Salesforce Order Management Apex Inputs


Salesforce Order Management includes these Apex input classes.

ConnectApi.AdjustItemInputRepresentation
A price adjustment to an OrderItemSummary. It only supports discounts, not increases.
ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
ConnectApi.ChangeItemInputRepresentation
Change to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based
on the price change. The OrderItemSummary can’t be a shipping charge.
ConnectApi.CreateCreditMemoInputRepresentation
A list of change orders used to create a credit memo.
ConnectApi.CreateOrderPaymentSummaryInputRepresentation
An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.
ConnectApi.EnsureFundsAsyncInputRepresentation
ID of an invoice to ensure funds for and apply them to.
ConnectApi.EnsureRefundsAsyncInputRepresentation
ID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.
ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
Data used to calculate order fulfillment routes involving the fewest number of shipment splits.

192
Salesforce Order Management in Apex Salesforce Order Management Apex Inputs

ConnectApi.FulfillmentGroupInputRepresentation
A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the
values defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned
to the FulfillmentOrder for this fulfillment group.
ConnectApi.FulfillmentOrderInputRepresentation
An OrderDeliveryGroupSummary that defines a delivery method and recipient, and a list of fulfillment groups to assign to
FulfillmentOrders. Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and share
the same fulfillment location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for
each OrderItemSummary.
ConnectApi.FulfillmentOrderInvoiceInputRepresentation
Instantiate and include this object with no properties when creating an invoice.
ConnectApi.FulfillmentOrderLineItemInputRepresentation
A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the
canceled quantity to a different FulfillmentOrder.
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
A list of FulfillmentOrderLineItems and quantities to cancel.
ConnectApi.LocationInputRepresentation
Inventory location data used to calculate shipping distance.
ConnectApi.LocationAvailabilityInputRepresentation
The available quantity of a product at an inventory location.
ConnectApi.MultipleFulfillmentOrderInputRepresentation
List of inputs for creating fulfillment orders.
ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
The FulfillmentOrders to create Invoices for.
ConnectApi.OCICreateReservationInputRepresentation
Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.
ConnectApi.OCICreateReservationSingleInputRepresentation
A quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.
ConnectApi.OCIFulfillReservationInputRepresentation
A list of inventory reservations to fulfill.
ConnectApi.OCIFulfillReservationSingleInputRepresentation
An inventory reservation to fulfill.
ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
Details of a request to retrieve inventory availability.
ConnectApi.OCIReleaseReservationInputRepresentation
Details of one or more inventory reservations to release.
ConnectApi.OCIReleaseReservationSingleInputRepresentation
A single inventory reservation to release.
ConnectApi.OCITransferReservationInputRepresentation
A list of inventory reservation transfers and specifies whether a single failure cancels the entire list.

193
Salesforce Order Management in Apex ConnectApi.AdjustItemInputRepresentation

ConnectApi.OCITransferReservationSingleInputRepresentation
An inventory reservation transfer.
ConnectApi.OrderItemSummaryInputRepresentation
An OrderItemSummary and quantity.
ConnectApi.OrderSummaryInputRepresentation
An order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you can
specify an OrderNumber or Status.
ConnectApi.QuantityWithSkuInputRepresentation
A quantity of a product.
ConnectApi.RankAverageDistanceInputRepresentation
An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.
ConnectApi.ReturnItemsInputRepresentation
Data about products and delivery charges to return.
ConnectApi.ReturnOrderInputRepresentation
Data for creating a ReturnOrder and ReturnOrderLineItems.
ConnectApi.ReturnOrderItemInputRepresentation
ID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remaining
quantity to be returned is added to a new ReturnOrderLineItem.
ConnectApi.ReturnOrderLineItemInputRepresentation
Data for creating a ReturnOrderLineItem.
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
ID of a ReturnOrderLineItem representing a delivery charge.
ConnectApi.TargetLocationInputRepresentation
A set of inventory locations that together can fulfill an order.

ConnectApi.AdjustItemInputRepresentation
A price adjustment to an OrderItemSummary. It only supports discounts, not increases.

Property Type Description Required or Available Version


Optional
adjustmentType String Describes how the amount is calculated. It Required 49.0
can have one of these values:
• AmountWithTax—Value of amount
is the adjustment, including tax.
• AmountWithoutTax—Value of
amount is the adjustment, not including
tax. Tax is calculated on the value and
added.
• Percentage—Value of amount is a
percentage discount. It is divided by
100, and then multiplied by the
TotalPrice and TotalTaxAmount of the

194
Salesforce Order Management in Apex ConnectApi.AdjustOrderItemSummaryInputRepresentation

Property Type Description Required or Available Version


Optional
OrderItemSummary to determine the
adjustment amount.

amount Double Value used to calculate the adjustment Required 49.0


amount, as described by the
adjustmentType. It must be a negative
value.

description String Description of the adjustment. Optional 49.0

orderItem String ID of the OrderItemSummary. Required 49.0


SummaryId

reason String Reason for the adjustment. The value must Required 49.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.

SEE ALSO:
ConnectApi.AdjustOrderItemSummaryInputRepresentation
adjustPreview(orderSummaryId, adjustInput)
adjustSubmit(orderSummaryId, adjustInput)

ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.

Property Type Description Required or Available Version


Optional
adjustItems List<ConnectApi. List of price adjustments to Required 49.0
AdjustItemInput OrderItemSummaries.
Representation>

SEE ALSO:
adjustPreview(orderSummaryId, adjustInput)
adjustSubmit(orderSummaryId, adjustInput)

ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

195
Salesforce Order Management in Apex ConnectApi.ChangeItemInputRepresentation

Property Type Description Required or Available Version


Optional
changeItems List<ConnectApi. List of changes to OrderItemSummaries. Required 48.0
ChangeItemInput
Representation>

SEE ALSO:
previewCancel(orderSummaryId, changeInput)
previewReturn(orderSummaryId, changeInput)
submitCancel(orderSummaryId, changeInput)
submitReturn(orderSummaryId, changeInput)

ConnectApi.ChangeItemInputRepresentation
Change to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based on
the price change. The OrderItemSummary can’t be a shipping charge.

Property Type Description Required or Available Version


Optional
orderItem String ID of the OrderItemSummary. Required 48.0
SummaryId

quantity Double Quantity to change. Use a positive value. Required 48.0


For example, a value of 2 means “cancel or
return 2 units.”

reason String Reason for the change. The value must Required 48.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.

shipping Boolean Specifies whether to prorate the shipping Required 48.0


ReductionFlag charge.

SEE ALSO:
ConnectApi.ChangeInputRepresentation
previewCancel(orderSummaryId, changeInput)
previewReturn(orderSummaryId, changeInput)
submitCancel(orderSummaryId, changeInput)
submitReturn(orderSummaryId, changeInput)

ConnectApi.CreateCreditMemoInputRepresentation
A list of change orders used to create a credit memo.

196
Salesforce Order Management in Apex ConnectApi.CreateOrderPaymentSummaryInputRepresentation

Property Type Description Required or Available Version


Optional
changeOrderIds List<String> List of IDs of the change orders. Required 48.0

SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)

ConnectApi.CreateOrderPaymentSummaryInputRepresentation
An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.

Property Type Description Required or Available Version


Optional
orderSummaryId String ID of the OrderSummary. Required 48.0

payment String ID of the payment authorization. Either a payment 48.0


AuthorizationId authorization or at
least one payment is
required.

paymentIds List<String> List of IDs of the payments. Either a payment 48.0


authorization or at
least one payment is
required.

SEE ALSO:
createOrderPaymentSummary(orderPaymentSummaryInput)

ConnectApi.EnsureFundsAsyncInputRepresentation
ID of an invoice to ensure funds for and apply them to.

Property Type Description Required or Available Version


Optional
invoiceId String ID of the invoice. Required 48.0

SEE ALSO:
ensureFundsAsync(orderSummaryId, ensureFundsInput)

ConnectApi.EnsureRefundsAsyncInputRepresentation
ID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.

197
Salesforce Order Management in Apex ConnectApi.FindRoutesWithFewestSplitsInputRepresentation

Property Type Description Required or Available Version


Optional
creditMemoId String ID of the credit memo that represents a Optional, but at least 48.0
refund amount. one input property is
required

excessFundsAmount Double Amount of excess funds to refund. Optional, but at least 49.0
one input property is
required

SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)

ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
Data used to calculate order fulfillment routes involving the fewest number of shipment splits.

Property Type Description Required or Available Version


Optional
locationAvailable List<ConnectApi. Each list element represents the available At least one element 51.0
Inventory LocationAvailability quantity of a product at an inventory is required
InputRepresentation> location.

maximumNumber Integer The maximum allowable number of Optional 51.0


OfSplits shipment splits. Routing options that involve
more than this number of splits are not
returned.

Note: Each split represents an


additional shipment. Specifying a
maximum of 0 returns only locations
that can fulfill the entire order in a
single shipment. A maximum of 1
returns combinations of locations
that can fulfill the order in one or two
shipments, and so on.

orderedQuantities List<ConnectApi. Each list element represents a quantity of a At least one element 51.0
QuantityWithSku product to be routed for fulfillment. is required
InputRepresentation>

ConnectApi.FulfillmentGroupInputRepresentation
A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the values
defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned to the
FulfillmentOrder for this fulfillment group.

198
Salesforce Order Management in Apex ConnectApi.FulfillmentOrderInputRepresentation

Property Type Description Required or Available Version


Optional
fulfilledFrom String ID of the fulfillment location. Required 48.0
LocationId

fulfillmentType String Fulfillment type. One of the Type field values Required 48.0
defined for FulfillmentOrders.

orderItem List<ConnectApi. List of OrderItemSummaries. Required 48.0


Summaries OrderItem
SummaryInput
Representation>

referenceId String Reference to this input for use in Optional 50.0


troubleshooting failures. This value is only
used by the APIs for creating fulfillment
orders for multiple order delivery group
summaries.

SEE ALSO:
ConnectApi.FulfillmentOrderInputRepresentation
createFulfillmentOrders(fulfillmentOrderInput)

ConnectApi.FulfillmentOrderInputRepresentation
An OrderDeliveryGroupSummary that defines a delivery method and recipient, and a list of fulfillment groups to assign to FulfillmentOrders.
Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and share the same fulfillment
location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for each OrderItemSummary.

Property Type Description Required or Available Version


Optional
fulfillmentGroups List<ConnectApi. List of fulfillment groups that specify the Required 48.0
FulfillmentGroup OrderItemSummaries and fulfillment
Input locations.
Representation>

orderDelivery String ID of the OrderDeliveryGroupSummary. Required 48.0


GroupSummaryId

orderSummaryId String ID of the OrderSummary. Required 48.0

SEE ALSO:
createFulfillmentOrders(fulfillmentOrderInput)

ConnectApi.FulfillmentOrderInvoiceInputRepresentation
Instantiate and include this object with no properties when creating an invoice.

199
Salesforce Order Management in Apex ConnectApi.FulfillmentOrderLineItemInputRepresentation

This input class has no properties.

SEE ALSO:
createInvoice(fulfillmentOrderId, invoiceInput)

ConnectApi.FulfillmentOrderLineItemInputRepresentation
A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the canceled
quantity to a different FulfillmentOrder.

Property Type Description Required or Available Version


Optional
fulfillmentOrder String ID of the FulfillmentOrderLineItem. Required 48.0
LineItemId

quantity Double Quantity to cancel. Required 48.0

SEE ALSO:
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)

ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
A list of FulfillmentOrderLineItems and quantities to cancel.

Property Type Description Required or Available Version


Optional
fulfillment List<ConnectApi. List of FulfillmentOrderLineItems and Required 48.0
OrderLine FulfillmentOrder quantities.
ItemsToCancel LineItemInput
Representation>

SEE ALSO:
cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)

ConnectApi.LocationInputRepresentation
Inventory location data used to calculate shipping distance.

Property Type Description Required or Available Version


Optional
countryCode String The country code of the location. Required 51.0

locationIdentifier String The identifier of the location. Required 51.0

200
Salesforce Order Management in Apex ConnectApi.LocationAvailabilityInputRepresentation

Property Type Description Required or Available Version


Optional
postalCode String The postal code of the location. Required 51.0

ConnectApi.LocationAvailabilityInputRepresentation
The available quantity of a product at an inventory location.

Property Type Description Required or Available Version


Optional
externalReferenceId String The external reference ID of the inventory Optional 51.0
location.

quantity Double The available quantity of the product. Required 51.0

stockKeepingUnit String The Stock Keeping Unit of the product. Required 51.0

ConnectApi.MultipleFulfillmentOrderInputRepresentation
List of inputs for creating fulfillment orders.

Property Type Description Required or Available Version


Optional
fulfillmentOrders List<ConnectApi. Each element contains the data to create Required 50.0
FulfillmentOrder one fulfillment order.
InputRepresentation>

ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
The FulfillmentOrders to create Invoices for.

Property Type Description Required or Available Version


Optional
fulfillmentOrderIds List<String> List of IDs of FulfillmentOrders to create At least one ID is 52.0
Invoices for. required.

ConnectApi.OCICreateReservationInputRepresentation
Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.

201
Salesforce Order Management in Apex ConnectApi.OCICreateReservationSingleInputRepresentation

Property Type Description Required or Available Version


Optional
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or failed.

allowPartial Boolean When true, if the system can’t create the 51.0
Reservations entire reservation, then it attempts to create
a partial reservation.

createRecords List<ConnectApi. A list of product quantities and locations or At least one element 51.0
OCICreateReservation location groups. is required
SingleInputRepresentation>

expirationSeconds Integer A length of time in seconds. If the 51.0


reservation is not fulfilled within this amount
of time after the reservationTime,
then it expires.

externalRefId String External reference ID. 51.0

reservationTime String The time at which to record the reservation. 51.0


Example: 2020-07-24T21:13:00Z

ConnectApi.OCICreateReservationSingleInputRepresentation
A quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.

Property Type Description Required or Available Version


Optional
locationGroupIdentifier String Identifier of the location group at which to Either 51.0
reserve inventory. locationGroupIdentifier
or locationIdentifier
is required, but not
both

locationIdentifier String Identifier of the location at which to reserve Either 51.0


inventory. locationGroupIdentifier
or locationIdentifier
is required, but not
both

quantity Double The quantity of the product to reserve. Required 51.0

stockKeepingUnit String The SKU of the product to reserve. Required 51.0

ConnectApi.OCIFulfillReservationInputRepresentation
A list of inventory reservations to fulfill.

202
Salesforce Order Management in Apex ConnectApi.OCIFulfillReservationSingleInputRepresentation

Property Type Description Required or Available Version


Optional
fulfillmentRecords List<ConnectApi. A list of inventory reservations. At least one element 51.0
OCIFulfillReservation is required.
SingleInputRepresentation>

ConnectApi.OCIFulfillReservationSingleInputRepresentation
An inventory reservation to fulfill.

Property Type Description Required or Available Version


Optional
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or failed.

externalRefId String The external reference ID of the location Optional 51.0


that’s fulfilling the reservation.

locationIdentifier String The identifier of the location that’s fulfilling Required 51.0
the reservation.

quantity Double The quantity being fulfilled. Required 51.0

stockKeepingUnit String The SKU of the product being fulfilled. Required 51.0

ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
Details of a request to retrieve inventory availability.

Property Type Description Required or Available Version


Optional
locationGroupIdentifier String The identifier of a location group to retrieve Optional; can’t 51.0
inventory availability data for. Specifying this combine with
value retrieves inventory data for all locationGroupIdentifiers
locations belonging to this group. or
locationIdentifiers

locationGroupIdentifiers List<String> A list of up to 100 identifiers of location Optional; can’t 51.0


groups to retrieve inventory availability data combine with
for. locationGroupIdentifier
or
locationIdentifiers

locationIdentifiers List<String> A list of up to 100 identifiers of locations to Optional; can’t 51.0


retrieve inventory availability data for. combine with
locationGroupIdentifier

203
Salesforce Order Management in Apex ConnectApi.OCIReleaseReservationInputRepresentation

Property Type Description Required or Available Version


Optional
or
locationGroupIdentifiers

stockKeepingUnit String The SKU of a product to retrieve inventory Optional; can’t 51.0
availability data for. Specifying a SKU with combine with
no locations or location groups returns stockKeepingUnits
availability data for that SKU at all inventory
locations that are not assigned to location
groups.

stockKeepingUnits List<String> A list of up to 100 SKUs of products to Optional; can’t 51.0


retrieve inventory availability data for. combine with
stockKeepingUnit

useCache Boolean Whether to fetch the inventory data from Optional 51.0
the cache. Default value is true.

ConnectApi.OCIReleaseReservationInputRepresentation
Details of one or more inventory reservations to release.

Property Type Description Required or Available Version


Optional
releaseRecords List<ConnectApi. List of inventory reservations to release. At least one element 51.0
OCIReleaseReservation is required.
SingleInputRepresentation>

ConnectApi.OCIReleaseReservationSingleInputRepresentation
A single inventory reservation to release.

Property Type Description Required or Available Version


Optional
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or failed.

externalRefId String The external reference ID of the location or Optional 51.0


location group that has the reservation.

locationGroupIdentifier String The identifier of the location group that has The identifier for a 51.0
the reservation. location or location
group, but not both,
is required.

204
Salesforce Order Management in Apex ConnectApi.OCITransferReservationInputRepresentation

Property Type Description Required or Available Version


Optional
locationIdentifier String The identifier of the location that has the The identifier for a 51.0
reservation. location or location
group, but not both,
is required.

quantity Double The quantity of reserved inventory to Required 51.0


release.

stockKeepingUnit String The SKU of the product to release. Required 51.0

ConnectApi.OCITransferReservationInputRepresentation
A list of inventory reservation transfers and specifies whether a single failure cancels the entire list.

Property Type Description Required or Available Version


Optional
allOrNothing String Controls whether a single failed transfer Optional 51.0
TransferId cancels all other transfers in the
transferRecords list.
• To allow some transfers in the
transferRecords list to succeed
when others fail, don’t include this
property.
• To cancel all the transfers in the
transferRecords list when any
of them fail, set this property to a UUID.
The ID must be unique, but isn’t
otherwise used in this version.

transferRecords List<ConnectApi. A list of inventory reservation transfers. At least one element 51.0
OCITransferReservation is required.
SingleInputRepresentation>

ConnectApi.OCITransferReservationSingleInputRepresentation
An inventory reservation transfer.

Property Type Description Required or Available Version


Optional
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or failed.

205
Salesforce Order Management in Apex ConnectApi.OrderItemSummaryInputRepresentation

Property Type Description Required or Available Version


Optional
externalRefId String The external reference ID of the location Optional 51.0
receiving the transfer.

fromLocationGroupIdentifier String The identifier of the location group sending The identifier for a 51.0
the reservation. sending location or
location group, but
not both, is required

fromLocationIdentifier String The identifier of the location sending the The identifier for a 51.0
reservation. sending location or
location group, but
not both, is required

ignoreAvailabilityCheck Boolean If true, force the transfer even if the receiving Optional 52.0
location doesn’t have sufficient available
inventory. The default value is false.

quantity Double The quantity of inventory being transferred. Required 51.0

stockKeepingUnit String The SKU of the product being transferred. Required 51.0

toLocationGroupIdentifier String The identifier of the location group receiving The identifier for a 51.0
the reservation. receiving location or
location group, but
not both, is required

toLocationIdentifier String The identifier of the location receiving the The identifier for a 51.0
reservation. receiving location or
location group, but
not both, is required

ConnectApi.OrderItemSummaryInputRepresentation
An OrderItemSummary and quantity.

Property Type Description Required or Available Version


Optional
orderItem String ID of the OrderItemSummary. Required 48.0
SummaryId

quantity Double Quantity to include. Required 48.0

SEE ALSO:
ConnectApi.FulfillmentGroupInputRepresentation
ConnectApi.FulfillmentOrderInputRepresentation
createFulfillmentOrders(fulfillmentOrderInput)

206
Salesforce Order Management in Apex ConnectApi.OrderSummaryInputRepresentation

ConnectApi.OrderSummaryInputRepresentation
An order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you can
specify an OrderNumber or Status.

Property Type Description Required or Available Version


Optional
name String Specifies an OrderNumber to assign to the Optional 50.0
order summary.

orderId String ID of the original order. Required 48.0

orderLifeCycleType String Specifies whether the order is managed in Optional 49.0


Salesforce Order Management or by an
external system. It can have one of these
values:
• MANAGED—Managed in Salesforce
Order Management.
• UNMANAGED—Managed by an
external system.
If no value is specified, the default is
MANAGED.

status String Specifies a status to assign to the order Optional 50.0


summary. The value must match one of the
picklist values on the Status field of the
OrderSummary object.

SEE ALSO:
createOrderSummary(orderSummaryInput)

ConnectApi.QuantityWithSkuInputRepresentation
A quantity of a product.

Property Type Description Required or Available Version


Optional
quantity Double Quantity of the product. Required 51.0

stockKeepingUnit String SKU of the product. Required 51.0

ConnectApi.RankAverageDistanceInputRepresentation
An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.

207
Salesforce Order Management in Apex ConnectApi.ReturnItemsInputRepresentation

Property Type Description Required or Available Version


Optional
deliveryCountryCode String The country code of the order recipient. Required 51.0

deliveryPostalCode String The postal code of the order recipient. Required 51.0

distanceUnit String Specify mi or km to return average 51.0


distances in miles or kilometers, respectively.

sortResult String Specify ASC or DESC to rank the results 51.0


by average shipping distance in ascending
or descending order, respectively.

targetLocations List<ConnectApi. Each element is a set of inventory locations At least one element 51.0
TargetLocation that can combine to fulfill the order. is required
InputRepresentation>

ConnectApi.ReturnItemsInputRepresentation
Data about products and delivery charges to return.

Property Type Description Required or Available Version


Optional
returnOrderItem List<ConnectApi. List of ReturnOrderLineItems to return that Optional 52.0
DeliveryCharges ReturnOrderItem represent delivery charges.
DeliveryCharge
InputRepresentation>

returnOrderItems List<ConnectApi. List of ReturnOrderLineItems to process that Required 52.0


ReturnOrderItem represent products, along with data about
InputRepresentation> how to process them.

ConnectApi.ReturnOrderInputRepresentation
Data for creating a ReturnOrder and ReturnOrderLineItems.

Property Type Description Required or Available Version


Optional
orderSummaryId String ID of the OrderSummary containing the Required 50.0
items to be returned. The OrderSummary’s
OrderLifeCycleType must be Managed.

returnOrder String The LifeCycleType of the ReturnOrder. Required 51.0


LifeCycleType Possible values are:
• Managed—Process the ReturnOrder
using the APIs and actions. It can

208
Salesforce Order Management in Apex ConnectApi.ReturnOrderItemInputRepresentation

Property Type Description Required or Available Version


Optional
generate change orders and affects
financial fields and rollup calculations.
• Unmanaged—The ReturnOrder is for
tracking purposes only. It isn’t involved
in any financial calculations and doesn’t
generate any change orders. The system
doesn’t prevent the creation of
duplicate ReturnOrderLineItems in an
unmanaged ReturnOrder for the same
OrderItem.

returnOrderLineItems List<ConnectApi. List of data for creating At least one element 50.0
ReturnOrderLineItem ReturnOrderLineItems. is required
InputRepresentation>

status String Status to assign the ReturnOrder. This value Required 51.0
must match an entry in the ReturnOrder
object’s Status picklist.

ConnectApi.ReturnOrderItemInputRepresentation
ID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remaining
quantity to be returned is added to a new ReturnOrderLineItem.

Property Type Description Required or Available Version


Optional
quantityReceived Double The quantity of the ReturnOrderLineItem Required 52.0
that has been received. The value must be
zero or greater. This value isn’t used by any
standard features, but is provided for use in
customizations.

quantityRejected Double The quantity of the ReturnOrderLineItem Required 52.0


that has been rejected for return. The value
must be zero or greater. This value isn’t used
by any standard features, but is provided for
use in customizations.

quantityReturned Double The quantity of the ReturnOrderLineItem Required 52.0


that has been returned. The value must be
greater than zero. If this value plus
quantityToCancel is less than the expected
return quantity, then the remaining quantity
to be returned is added to a new
ReturnOrderLineItem.

209
Salesforce Order Management in Apex ConnectApi.ReturnOrderLineItemInputRepresentation

Property Type Description Required or Available Version


Optional
quantityToCancel Double The quantity of the ReturnOrderLineItem to Required 52.0
remove because it’s not being returned. The
value must be zero or greater. If this value
plus quantityReturned is less than the
expected return quantity, then the
remaining quantity to be returned is added
to a new ReturnOrderLineItem.

reasonForRejection String The reason why the rejected quantity, if any, Optional 52.0
was rejected. This value isn’t used by any
standard features, but is provided for use in
customizations.

returnOrder String The ID of the ReturnOrderLineItem. Required 52.0


LineItemId

ConnectApi.ReturnOrderLineItemInputRepresentation
Data for creating a ReturnOrderLineItem.

Property Type Description Required or Available Version


Optional
canReduceShipping Boolean Whether the associated shipping charge Required 50.0
can be refunded.

orderItemSummaryId String ID of the associated OrderItemSummary. Required 50.0

quantityExpected Double Quantity expected to be returned. Required 50.0

quantityReceived Double Quantity already physically returned. Optional 50.0

reasonForReturn String Reason for the return. The value must match Optional 50.0
an entry in the ReturnOrderLineItem object’s
ReasonForReturn picklist.

ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
ID of a ReturnOrderLineItem representing a delivery charge.

Property Type Description Required or Available Version


Optional
returnOrder String ID of a ReturnOrderLineItem to return. Required 52.0
LineItemId

210
Salesforce Order Management in Apex ConnectApi.TargetLocationInputRepresentation

ConnectApi.TargetLocationInputRepresentation
A set of inventory locations that together can fulfill an order.

Property Type Description Required or Available Version


Optional
locations List<ConnectApi. A list of locations with information about Required 51.0
LocationInputRepresentation> their country and postal codes.

Salesforce Order Management Apex Outputs


Salesforce Order Management includes these Apex output classes.

ConnectApi.AdjustOrderSummaryOutputRepresentation
Output representation of the financial changes for an adjust items action. For a preview action, these values are the expected output.
For a submit action, these values are the actual output.
ConnectApi.AvailableLocationOutputRepresentation
A set of inventory locations that can combine to fulfill an order.
ConnectApi.AverageDistanceResultOutputRepresentation
Wraps inventory location shipping distance calculation results.
ConnectApi.BaseOutputRepresentation
Base Order Management output class.
ConnectApi.ChangeItemOutputRepresentation
The financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the
values on the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record.
For example, a discount is a positive value here and a negative value on a change order record.
ConnectApi.CreateCreditMemoOutputRepresentation
ID of a created Credit Memo.
ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
ID of the created Order Payment Summary.
ConnectApi.DistanceCalculationOutputRepresentation
Shipping distance data for a set of inventory locations.
ConnectApi.EnsureFundsAsyncOutputRepresentation
ID of the background operation.
ConnectApi.EnsureRefundsAsyncOutputRepresentation
ID of the background operation.
ConnectApi.ErrorResponse
Base error response.
ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.

211
Salesforce Order Management in Apex Salesforce Order Management Apex Outputs

ConnectApi.FulfillmentGroupOutputRepresentation
Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If
the FulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.
ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
Wraps the base output.
ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
ID of the created invoice.
ConnectApi.FulfillmentOrderOutputRepresentation
A list of IDs of the created FulfillmentOrders.
ConnectApi.LocationOutputRepresentation
An inventory location’s distance to an order recipient.
ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
IDs of the created Invoices.
ConnectApi.MultipleFulfillmentOrderOutputRepresentation
List of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.
ConnectApi.OCIBaseOutputRepresentation
Base Omnichannel Inventory output class.
ConnectApi.OCICreateReservationErrorOutputRepresentation
Error returned from an attempt to create an Omnichannel Inventory reservation.
ConnectApi.OCICreateReservationOutputRepresentation
Result of an Omnichannel Inventory reservation creation request.
ConnectApi.OCICreateReservationSingleOutputRepresentation
Details of an inventory reservation for one product.
ConnectApi.OCIFulfillReservationErrorOutputRepresentation
Response to a request to fulfill one inventory reservation.
ConnectApi.OCIFulfillReservationOutputRepresentation
Response to a request to fulfill one or more inventory reservations.
ConnectApi.OCIFulfillReservationSingleOutputRepresentation
Details of a single fulfilled reservation.
ConnectApi.OCIFutureInventoryOutputRepresentation
An expected future inventory restock.
ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
Response to a request for inventory availability data.
ConnectApi.OCIInventoryRecordOutputRepresentation
Inventory availability data for a product.
ConnectApi.OCILocationAvailabilityOutputRepresentation
A set of inventory availability data for one inventory location.
ConnectApi.OCILocationGroupAvailabilityOutputRepresentation
A set of inventory availability data for one inventory location group.
ConnectApi.OCIPublishLocationStructureOutputRepresentation
Response to a publish location structure request.

212
Salesforce Order Management in Apex Salesforce Order Management Apex Outputs

ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
Detailed status of a publish location structure job.
ConnectApi.OCIReleaseReservationErrorOutputRepresentation
Response to a request to release one inventory reservation.
ConnectApi.OCIReleaseReservationOutputRepresentation
Response to a request to release one or more inventory reservations.
ConnectApi.OCIReleaseReservationSingleOutputRepresentation
Details of a single released reservation.
ConnectApi.OCITransferReservationErrorOutputRepresentation
Response to a request to fulfill one inventory reservation.
ConnectApi.OCITransferReservationOutputRepresentation
Response to a request to transfer one or more inventory reservations.
ConnectApi.OCITransferReservationSingleOutputRepresentation
Details of a single transferred reservation.
ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
Response to an upload inventory availability job.
ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
Detailed status of an upload inventory availability job.
ConnectApi.OrderItemSummaryOutputRepresentation
Details of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.
ConnectApi.OrderSummaryOutputRepresentation
ID of the created Order Summary.
ConnectApi.PreviewCancelOutputRepresentation
Expected financial values for a proposed cancel action.
ConnectApi.PreviewReturnOutputRepresentation
Expected financial values for a proposed return action.
ConnectApi.RankAverageDistanceOutputRepresentation
The results of calculating the average distances from sets of inventory locations to an order recipient.
ConnectApi.ReturnItemsOutputRepresentation
Output of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that were
created to represent remaining return quantities.
ConnectApi.ReturnOrderItemSplitLineOutputRepresentation
After a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to
return a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it
returns this output property, which contains the IDs of the original and split ReturnOrderLineItems.
ConnectApi.ReturnOrderOutputRepresentation
ID of the created ReturnOrder.
ConnectApi.SubmitCancelOutputRepresentation
ID of the change order created for a cancel action, and a set of its financial values.
ConnectApi.SubmitReturnOutputRepresentation
ID of the change order created for a return action, and a set of its financial values.

213
Salesforce Order Management in Apex ConnectApi.AdjustOrderSummaryOutputRepresentation

ConnectApi.AdjustOrderSummaryOutputRepresentation
Output representation of the financial changes for an adjust items action. For a preview action, these values are the expected output.
For a submit action, these values are the actual output.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


changeBalances ConnectApi. Expected (for preview) or actual (for submit) financial 49.0
ChangeItem values for the price adjustment action. Most of the
OutputRepresentation values match the change order values. If two change
orders are returned, then these values combine them.
The sign of a value in this output is the opposite of
the corresponding value on a change order record.
For example, a discount is a positive value in
changeBalances and a negative value on a
change order record.

orderSummaryId String ID of the OrderSummary. 49.0

postFulfillment String ID of the change Order that holds the financial 49.0
ChangeOrderId changes applicable to order products that have been
fulfilled. For an adjustPreview call, this value is always
null.

preFulfillment String ID of the change Order that holds the financial 49.0
ChangeOrderId changes applicable to order products that have not
been fulfilled. For an adjustPreview call, this value is
always null.

ConnectApi.AvailableLocationOutputRepresentation
A set of inventory locations that can combine to fulfill an order.

Property Name Type Description Available Version


locations List<String> A list of inventory locations. 51.0

ConnectApi.AverageDistanceResultOutputRepresentation
Wraps inventory location shipping distance calculation results.

Property Name Type Description Available Version


distanceCalculation ConnectApi. Results of the shipping distance calculations. 51.0
DistanceCalculation
OutputRepresentation

214
Salesforce Order Management in Apex ConnectApi.BaseOutputRepresentation

ConnectApi.BaseOutputRepresentation
Base Order Management output class.
This class is abstract.
Superclass of:
• ConnectApi.AdjustOrderSummaryOutputRepresentation
• ConnectApi.CreateCreditMemoOutputRepresentation
• ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
• ConnectApi.EnsureFundsAsyncOutputRepresentation
• ConnectApi.EnsureRefundsAsyncOutputRepresentation
• ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
• ConnectApi.FulfillmentGroupOutputRepresentation
• ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
• ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
• ConnectApi.FulfillmentOrderOutputRepresentation
• ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
• ConnectApi.MultipleFulfillmentOrderOutputRepresentation
• ConnectApi.OrderSummaryOutputRepresentation
• ConnectApi.PreviewCancelOutputRepresentation
• ConnectApi.PreviewReturnOutputRepresentation
• ConnectApi.RankAverageDistanceOutputRepresentation
• ConnectApi.ReturnItemsOutputRepresentation
• ConnectApi.ReturnOrderItemSplitLineOutputRepresentation
• ConnectApi.ReturnOrderOutputRepresentation
• ConnectApi.SubmitCancelOutputRepresentation
• ConnectApi.SubmitReturnOutputRepresentation

Property Name Type Description Available Version


errors List<ConnectApi. Any errors that were returned. 48.0
ErrorResponse>

success Boolean Indicates whether the transaction was successful. 48.0

ConnectApi.ChangeItemOutputRepresentation
The financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the values
on the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record. For
example, a discount is a positive value here and a negative value on a change order record.

Property Name Type Description Available Version


grandTotalAmount Double Change to the GrandTotalAmount field. 48.0

215
Salesforce Order Management in Apex ConnectApi.ChangeItemOutputRepresentation

Property Name Type Description Available Version


totalAdjDelivery Double Change to the TotalAdjDeliveryAmtWithTax field. 49.0
AmtWithTax

totalAdjDist Double Change to the TotalAdjDistAmountWithTax field. 49.0


AmountWithTax

totalAdjProduct Double Change to the TotalAdjProductAmtWithTax field. 49.0


AmtWithTax

totalAdjusted Double Change to the TotalAdjustedDeliveryAmount field. 48.0


DeliveryAmount

totalAdjusted Double Change to the TotalAdjustedDeliveryTaxAmount field. 48.0


DeliveryTaxAmount

totalAdjusted Double Change to the TotalAdjustedProductAmount field. 48.0


ProductAmount

totalAdjusted Double Change to the TotalAdjustedProductTaxAmount field. 48.0


ProductTaxAmount

totalAdjustment Double Change to the TotalAdjustmentDistributedAmount 48.0


DistributedAmount field.

totalAdjustment Double Change to the 48.0


DistributedTaxAmount TotalAdjustmentDistributedTaxAmount field.

totalAmount Double Change to the TotalAmount field. 48.0

totalExcess Double Amount of excess funds available on the 48.0


FundsAmount OrderPaymentSummaries related to the
OrderSummary. It is equal to the captured amount
that is owed as a refund but is not associated with
an invoice or credit memo. Excess funds normally
occur when order items are canceled before
fulfillment but after payment has been captured. This
situation is not common in the US, where funds are
normally authorized but not captured until the
fulfillment process begins. This value includes all
current excess funds related to the OrderSummary,
not only the funds related to the current change.

totalRefundable Double Total amount available to be refunded. It is the sum 48.0


Amount of the excess funds and any outstanding change
order grand total amounts that apply to
post-fulfillment changes. This value includes all
current refundable amounts related to the
OrderSummary, not only the amount related to the
current change.

216
Salesforce Order Management in Apex ConnectApi.CreateCreditMemoOutputRepresentation

Property Name Type Description Available Version


totalTaxAmount Double Change to the TotalTaxAmount field. 48.0

SEE ALSO:
ConnectApi.PreviewCancelOutputRepresentation
ConnectApi.PreviewReturnOutputRepresentation
ConnectApi.SubmitCancelOutputRepresentation
ConnectApi.SubmitReturnOutputRepresentation
ConnectApi.AdjustOrderSummaryOutputRepresentation

ConnectApi.CreateCreditMemoOutputRepresentation
ID of a created Credit Memo.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


creditMemoId String ID of the created Credit Memo. 48.0

ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
ID of the created Order Payment Summary.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


orderPayment String ID of the Order Payment Summary. 48.0
SummaryId

ConnectApi.DistanceCalculationOutputRepresentation
Shipping distance data for a set of inventory locations.

Property Name Type Description Available Version


averageDistance Double The average distance from the locations to the order 51.0
recipient.

locations List<ConnectApi. The list of locations and their distances to the order 51.0
LocationOutput recipient.
Representation>

rank Integer This result’s rank among all results by average 51.0
distance to the order recipient.

217
Salesforce Order Management in Apex ConnectApi.EnsureFundsAsyncOutputRepresentation

ConnectApi.EnsureFundsAsyncOutputRepresentation
ID of the background operation.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


background String ID of the background operation. 48.0
OperationId

ConnectApi.EnsureRefundsAsyncOutputRepresentation
ID of the background operation.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


background String ID of the background operation. 48.0
OperationId

ConnectApi.ErrorResponse
Base error response.

Property Name Type Description Available Version


errorCode String Error code. 48.0

message String More error detail, if available. 48.0

SEE ALSO:
ConnectApi.BaseOutputRepresentation

ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


targetLocations List<ConnectApi. Each element of the list is a set of inventory locations 51.0
AvailableLocation that together can fulfill the order being routed.
OutputRepresentation>

218
Salesforce Order Management in Apex ConnectApi.FulfillmentGroupOutputRepresentation

ConnectApi.FulfillmentGroupOutputRepresentation
Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If the
FulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


fulfilledFromLocationId String (Creation failed) The input FulfilledFromLocationId. 50.0

fulfillmentOrderId String The FulfillmentOrderId from the successfully created 50.0


FulfillmentOrder.

fulfillmentType String (Creation failed) The input FulfillmentType. 50.0

orderDeliveryGroup String (Creation failed) The input 50.0


SummaryId OrderDeliveryGroupSummaryId.

orderItemSummaries List<ConnectApi. (Creation failed) The input list of 50.0


OrderItemSummary OrderItemSummaries.
OutputRepresentation>

orderSummaryId String (Creation failed) The input OrderSummaryId. 50.0

referenceId String The referenceId from the FulfillmentGroup input 50.0


representation. Use this value to troubleshoot a
failure.

ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
Wraps the base output.
Subclass of ConnectApi.BaseOutputRepresentation.
No additional properties.

ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
ID of the created invoice.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


invoiceId String ID of the created invoice. 48.0

ConnectApi.FulfillmentOrderOutputRepresentation
A list of IDs of the created FulfillmentOrders.
Subclass of ConnectApi.BaseOutputRepresentation.

219
Salesforce Order Management in Apex ConnectApi.LocationOutputRepresentation

Property Name Type Description Available Version


fulfillment List<String> A list of IDs of created Fulfillment Orders. 48.0
OrderIds

ConnectApi.LocationOutputRepresentation
An inventory location’s distance to an order recipient.

Property Name Type Description Available Version


distance Double The distance from the location to the order recipient. 51.0

locationIdentifier String The location identifier. 51.0

ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
IDs of the created Invoices.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


invoiceIds List<String> List of IDs of the created Invoices. 52.0

ConnectApi.MultipleFulfillmentOrderOutputRepresentation
List of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


fulfillmentOrders List<ConnectApi. A list of response data for created and failed 50.0
FulfillmentGroup FulfillmentOrders.
OutputRepresentation>

ConnectApi.OCIBaseOutputRepresentation
Base Omnichannel Inventory output class.
This class is abstract.
Superclass of:
• ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
• ConnectApi.OCIPublishLocationStructureOutputRepresentation
• ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
• ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
• ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation

220
Salesforce Order Management in Apex ConnectApi.OCICreateReservationErrorOutputRepresentation

Property Name Type Description Available Version


errors List<ConnectApi. Any errors that were returned. 51.0
ErrorResponse>

success Boolean Indicates whether the request was successful. 51.0

ConnectApi.OCICreateReservationErrorOutputRepresentation
Error returned from an attempt to create an Omnichannel Inventory reservation.

Property Name Type Description Available Version


errorCode String The error code. 51.0

message String Details of the error, if available. 51.0

ConnectApi.OCICreateReservationOutputRepresentation
Result of an Omnichannel Inventory reservation creation request.

Property Name Type Description Available Version


details List<ConnectApi. Details for each product in the reservation. 51.0
OCICreateReservation
SingleOutputRepresentation>

errors List<ConnectApi. Any errors returned by the reservation request. 51.0


OCICreateReservation
ErrorOutputRepresentation>

expirationTime String The time at which the reservation would expire. 51.0

reservationTime String The time when the reservation was recorded. 51.0

success Boolean Indicates whether the reservation was successfully 51.0


created.

ConnectApi.OCICreateReservationSingleOutputRepresentation
Details of an inventory reservation for one product.

Property Name Type Description Available Version


errorCode String The error code, if any. 51.0

locationGroupIdentifier String Identifier of the location group where the inventory 51.0
is reserved.

locationIdentifier String Identifier of the location where the inventory is 51.0


reserved.

221
Salesforce Order Management in Apex ConnectApi.OCIFulfillReservationErrorOutputRepresentation

Property Name Type Description Available Version


quantity Double The reserved quantity of the product. 51.0

stockKeepingUnit String The SKU of the reserved product. 51.0

ConnectApi.OCIFulfillReservationErrorOutputRepresentation
Response to a request to fulfill one inventory reservation.

Property Name Type Description Available Version


details ConnectApi. Details of the fulfilled reservation, if successful. 51.0
OCIFulfillReservation
SingleOutputRepresentation

errorCode String Error code, if any. 51.0

message String Details of the error, if available. 51.0

ConnectApi.OCIFulfillReservationOutputRepresentation
Response to a request to fulfill one or more inventory reservations.

Property Name Type Description Available Version


errors List<ConnectApi. Responses for the individual reservations in the 51.0
OCIFulfillReservation fulfillment request.
ErrorOutputRepresentation>

success Boolean Indicates whether the request was successful. 51.0

ConnectApi.OCIFulfillReservationSingleOutputRepresentation
Details of a single fulfilled reservation.

Property Name Type Description Available Version


actionRequestId String The UUID that identifies the original fulfill reservation 51.0
request.

externalRefId String The external reference ID of the location that fulfilled 51.0
the reservation.

locationIdentifier String The identifier of the location that fulfilled the 51.0
reservation.

quantity Double The fulfilled quantity. 51.0

stockKeepingUnit String The SKU of the fulfilled product. 51.0

222
Salesforce Order Management in Apex ConnectApi.OCIFutureInventoryOutputRepresentation

ConnectApi.OCIFutureInventoryOutputRepresentation
An expected future inventory restock.

Property Name Type Description Available Version


expectedDate Datetime Date when the future inventory is expected. 51.0

quantity Double Quantity of the future inventory. 51.0

ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
Response to a request for inventory availability data.
Subclass of ConnectApi.OCIBaseOutputRepresentation.

Property Name Type Description Available Version


locationGroups List<ConnectApi. A list of inventory availability data for individual 51.0
OCILocationGroup location groups.
AvailabilityOutputRepresentation>

locations List<ConnectApi. A list of inventory availability data for individual 51.0


OCILocationAvailability locations.
OutputRepresentation>

ConnectApi.OCIInventoryRecordOutputRepresentation
Inventory availability data for a product.

Property Name Type Description Available Version


availableToFulfill Double The Available To Fulfill quantity. 51.0

availableToOrder Double The Available To Order quantity. 51.0

effectiveDate Datetime The effective date of the inventory. 51.0

futures List<ConnectApi. A list of any expected future inventory restocks. 51.0


OCIFutureInventory
OutputRepresentation>

onHand Double The On Hand quantity. 51.0

reserved Double The Reserved quantity. 51.0

safetyStockCount Double The Safety Stock Count. 51.0

stockKeepingUnit String The SKU of the product. 51.0

223
Salesforce Order Management in Apex ConnectApi.OCILocationAvailabilityOutputRepresentation

ConnectApi.OCILocationAvailabilityOutputRepresentation
A set of inventory availability data for one inventory location.

Property Name Type Description Available Version


inventoryRecords List<ConnectApi. A list of availability data for individual products at this 51.0
OCIInventoryRecord location.
OutputRepresentation>

locationIdentifier String The identifier of the location. 51.0

ConnectApi.OCILocationGroupAvailabilityOutputRepresentation
A set of inventory availability data for one inventory location group.

Property Name Type Description Available Version


inventoryRecords List<ConnectApi. A list of availability data for individual products. The 51.0
OCIInventoryRecord data combines the quantities for all locations
OutputRepresentation> belonging to this location group.

locationGroup String The identifier of the location group. 51.0


Identifier

ConnectApi.OCIPublishLocationStructureOutputRepresentation
Response to a publish location structure request.
Subclass of ConnectApi.OCIBaseOutputRepresentation.

Property Name Type Description Available Version


uploadId String Identifier of the publish job. Use this value to retrieve 51.0
the status of the job.

ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
Detailed status of a publish location structure job.
Subclass of ConnectApi.OCIBaseOutputRepresentation.

Property Name Type Description Available Version


endTimeUTC String The UTC time when the job finished. (for example: 51.0
"2020-07-06T22:54:08.012Z")

recordsProcessedCount Integer The number of records processed by the job. 51.0

recordsReadCount Integer The number of records read by the job. 51.0

224
Salesforce Order Management in Apex ConnectApi.OCIReleaseReservationErrorOutputRepresentation

Property Name Type Description Available Version


recordsSkippedCount Integer The number of records skipped by the job. 51.0

startTimeUTC String The UTC time when the job started. (for example: 51.0
"2020-07-06T22:53:06.788Z")

status String The status of the job. (e.g., "PENDING," "COMPLETED," 51.0
etc.).

uploadId String Identifier of the job. 51.0

validationErrors List<String> List of any validation errors returned by the job. 51.0

validationStatus String The validation status of the job. 51.0

ConnectApi.OCIReleaseReservationErrorOutputRepresentation
Response to a request to release one inventory reservation.

Property Name Type Description Available Version


details ConnectApi. Details of the released reservation, if successful. 51.0
OCIReleaseReservation
SingleOutputRepresentation

errorCode String Error code, if any. 51.0

message String Details of the error, if available. 51.0

ConnectApi.OCIReleaseReservationOutputRepresentation
Response to a request to release one or more inventory reservations.

Property Name Type Description Available Version


errors List<ConnectApi. Responses for the individual reservations in the 51.0
OCIReleaseReservation release request.
ErrorOutputRepresentation>

success Boolean Indicates whether the request was successful. 51.0

ConnectApi.OCIReleaseReservationSingleOutputRepresentation
Details of a single released reservation.

Property Name Type Description Available Version


actionRequestId String The UUID that identifies the original release 51.0
reservation request.

225
Salesforce Order Management in Apex ConnectApi.OCITransferReservationErrorOutputRepresentation

Property Name Type Description Available Version


externalRefId String The external reference ID of the location that released 51.0
the reservation.

locationGroupIdentifier String The identifier of the location group that released the 51.0
reservation.

locationIdentifier String The identifier of the location that released the 51.0
reservation.

quantity Double The released quantity. 51.0

stockKeepingUnit String The SKU of the released product. 51.0

ConnectApi.OCITransferReservationErrorOutputRepresentation
Response to a request to fulfill one inventory reservation.

Property Name Type Description Available Version


details ConnectApi. Details of the transferred reservation, if successful. 51.0
OCITransferReservation
SingleOutputRepresentation

errorCode String Error code, if any. 51.0

message String Details of the error, if available. 51.0

ConnectApi.OCITransferReservationOutputRepresentation
Response to a request to transfer one or more inventory reservations.

Property Name Type Description Available Version


errors List<ConnectApi. Responses for the individual reservations in the 51.0
OCITransferReservation transfer request.
ErrorOutputRepresentation>

success Boolean Indicates whether the request was successful. 51.0

ConnectApi.OCITransferReservationSingleOutputRepresentation
Details of a single transferred reservation.

Property Name Type Description Available Version


actionRequestId String The UUID that identifies the original transfer 51.0
reservation request.

226
Salesforce Order Management in Apex ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation

Property Name Type Description Available Version


externalRefId String The external reference ID of the location that received 51.0
the reservation.

fromLocationGroupIdentifier String The identifier of the location group that sent the 51.0
reservation.

fromLocationIdentifier String The identifier of the location that sent the reservation. 51.0

ignoreAvailabilityCheck Boolean Whether this call ignored availability data at the 52.0
location that received the reservation.

quantity Double The quantity of transferred inventory. 51.0

stockKeepingUnit String The SKU of the transferred product. 51.0

toLocationGroupIdentifier String The identifier of the location group that received the 51.0
reservation.

toLocationIdentifier String The identifier of the location that received the 51.0
reservation.

ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
Response to an upload inventory availability job.
Subclass of ConnectApi.OCIBaseOutputRepresentation.

Property Name Type Description Available Version


uploadId String Identifier of the upload job. Use this value to retrieve 51.0
the status of the job.

ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
Detailed status of an upload inventory availability job.
Subclass of ConnectApi.OCIBaseOutputRepresentation.

Property Name Type Description Available Version


endTimeUTC String The UTC time when the job finished. (for example: 51.0
"2020-07-06T22:54:08.012Z")

recordsProcessedCount Integer The number of records processed by the job. 51.0

recordsReadCount Integer The number of records read by the job. 51.0

recordsSkippedCount Integer The number of records skipped by the job. 51.0

startTimeUTC String The UTC time when the job started. (for example: 51.0
"2020-07-06T22:53:06.788Z")

227
Salesforce Order Management in Apex ConnectApi.OrderItemSummaryOutputRepresentation

Property Name Type Description Available Version


status String The status of the job. (e.g., "PENDING," "COMPLETED," 51.0
etc.).

uploadId String Identifier of the job. 51.0

validationErrors List<String> List of any validation errors returned by the job. 51.0

validationStatus String The validation status of the job. 51.0

ConnectApi.OrderItemSummaryOutputRepresentation
Details of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.

Property Name Type Description Available Version


errors List<ConnectApi. List of errors specific to the OrderItemSummary, if 50.0
ErrorResponse> any.

orderItemSummaryId String ID of the OrderItemSummary. 50.0

quantity Double Quantity of the OrderItemSummary. 50.0

ConnectApi.OrderSummaryOutputRepresentation
ID of the created Order Summary.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


orderSummaryId String ID of the Order Summary. 48.0

ConnectApi.PreviewCancelOutputRepresentation
Expected financial values for a proposed cancel action.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


changeBalances ConnectApi. Expected financial values for the proposed cancel 48.0
ChangeItem action.
OutputRepresentation

orderSummaryId String ID of the OrderSummary. 48.0

ConnectApi.PreviewReturnOutputRepresentation
Expected financial values for a proposed return action.

228
Salesforce Order Management in Apex ConnectApi.RankAverageDistanceOutputRepresentation

Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


changeBalances ConnectApi. Expected financial values for the proposed return 48.0
ChangeItem action.
OutputRepresentation

orderSummaryId String ID of the OrderSummary. 48.0

ConnectApi.RankAverageDistanceOutputRepresentation
The results of calculating the average distances from sets of inventory locations to an order recipient.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


distanceUnit String The specified unit of distance (miles or kilometers). 51.0

results List<ConnectApi. The results of the shipping distance calculations. 51.0


AverageDistanceResult
OutputRepresentation>

ConnectApi.ReturnItemsOutputRepresentation
Output of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that were
created to represent remaining return quantities.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


changeOrderId String ID of the change order representing the 52.0
ReturnOrderLineItem processing performed by this
call.

returnLineItem List<ConnectApi. A list of properties representing any remaining 52.0


Splits ReturnOrderItem quantities from partial returns processed by this call.
SplitLine Each element of the list includes the ID of a split
OutputRepresentation> ReturnOrderLineItem and the ID of the partially
processed ReturnOrderLineItem whose remaining
quantity it holds.

ConnectApi.ReturnOrderItemSplitLineOutputRepresentation
After a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to return
a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it returns this
output property, which contains the IDs of the original and split ReturnOrderLineItems.
Subclass of ConnectApi.BaseOutputRepresentation.

229
Salesforce Order Management in Apex ConnectApi.ReturnOrderOutputRepresentation

Property Name Type Description Available Version


newReturnOrderItemId String ID of the new ReturnOrderLineItem that holds the 52.0
remaining return quantity.

original String ID of the original ReturnOrderLineItem. 52.0


ReturnOrderItemId

ConnectApi.ReturnOrderOutputRepresentation
ID of the created ReturnOrder.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


returnOrderId String ID of the created ReturnOrder. 50.0

ConnectApi.SubmitCancelOutputRepresentation
ID of the change order created for a cancel action, and a set of its financial values.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


changeBalances ConnectApi. Financial values resulting from the cancel. 48.0
ChangeItem
OutputRepresentation

changeOrderId String ID of the created change order. 48.0

ConnectApi.SubmitReturnOutputRepresentation
ID of the change order created for a return action, and a set of its financial values.
Subclass of ConnectApi.BaseOutputRepresentation.

Property Name Type Description Available Version


changeBalances ConnectApi. Financial values resulting from the return. 48.0
ChangeItem
OutputRepresentation

changeOrderId String ID of the created change order. 48.0

230
CHAPTER 4 Salesforce Order Management in the Chatter
Connect API
In this chapter ... Salesforce Order Management and Omnichannel Inventory include resources in the Chatter Connect
API.
• Salesforce
Omnichannel
Inventory Resources
• Salesforce Order
Management
Resources
• Salesforce Order
Management
Requests
• Salesforce Order
Management
Responses

231
Salesforce Order Management in the Chatter Connect API Salesforce Omnichannel Inventory Resources

Salesforce Omnichannel Inventory Resources


Manage inventory across locations. Available in Salesforce Omnichannel Inventory.
Available resources are:

Resource Description
/commerce/oci/availability/availability-records/actions/get-availability Retrieve inventory availability data for one or more products at one
or more inventory locations or location groups.

/commerce/oci/availability-records/uploads Upload an inventory availability data file to Omnichannel Inventory.

/commerce/oci/availability-records/uploads/uploadId Retrieve the status of an inventory availability upload job.

/commerce/oci/location-graph/uploads Asynchronously publish information about your inventory locations


and location groups to Omnichannel Inventory. The publish
includes records whose IsEnabled and ShouldSyncWithOci fields
are both true. This method returns an ID that you can use to
retrieve the status of the publish job.

/commerce/oci/location-graph/uploads/uploadId Retrieve the status of a publish location structure job.

/commerce/oci/reservation/actions/reservations Create an inventory reservation in Omnichannel Inventory.

/commerce/oci/reservation/actions/fulfillments Fulfill one or more inventory reservations.

/commerce/oci/reservation/actions/releases Release one or more existing inventory reservations to free up that


inventory.

/commerce/oci/reservation/actions/transfers Transfer one or more inventory reservations between locations or


location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the
destination.

Availability Records, Get Availability


Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
Availability Records, Upload
Asynchronously upload inventory data to Omnichannel Inventory and check the status of upload jobs.
Location Graph, Upload
Asynchonously upload inventory location and location group data to Omnichannel Inventory and check the status of upload jobs.
Reservations, Create
Create an inventory reservation in Omnichannel Inventory.
Reservations, Fulfill
Fulfill one or more inventory reservations.
Reservations, Release
Release one or more existing inventory reservations to free up that inventory.

232
Salesforce Order Management in the Chatter Connect API Availability Records, Get Availability

Reservations, Transfer
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.

Availability Records, Get Availability


Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
Resource
/commerce/oci/availability/availability-records/actions/get-availability

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Get Inventory Availability Input
Root XML tag
<ociGetInventoryInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
locationGroupIdentifier String The identifier of a location group to Optional; can’t 51.0
retrieve inventory availability data for. combine with
Specifying this value retrieves inventory locationGroupIdentifiers
data for all locations belonging to this or
group. locationIdentifiers

locationGroupIdentifiers String[] A list of up to 100 identifiers of location Optional; can’t 51.0


groups to retrieve inventory availability combine with
data for. locationGroupIdentifier
or
locationIdentifiers

locationIdentifiers String[] A list of up to 100 identifiers of locations Optional; can’t 51.0


to retrieve inventory availability data for. combine with
locationGroupIdentifier
or
locationGroupIdentifiers

233
Salesforce Order Management in the Chatter Connect API Availability Records, Upload

Name Type Description Required or Available


Optional Version
stockKeepingUnit String The SKU of a product to retrieve inventory Optional; can’t 51.0
availability data for. Specifying a SKU with combine with
no locations or location groups returns stockKeepingUnits
availability data for that SKU at all
inventory locations that are not assigned
to location groups.

stockKeepingUnits String[] A list of up to 100 SKUs of products to Optional; can’t 51.0


retrieve inventory availability data for. combine with
stockKeepingUnit

useCache Boolean Whether to fetch the inventory data from Optional 51.0
the cache. Default value is true.

Response body for POST


OCI Get Inventory Availability Output

Availability Records, Upload


Asynchronously upload inventory data to Omnichannel Inventory and check the status of upload jobs.
Available resources are:

Resource Description
/commerce/oci/availability-records/uploads POST - Upload an inventory availability data file to Omnichannel
Inventory.

/commerce/oci/availability-records/uploads/uploadId GET - Retrieve the status of an inventory availability upload job.

Resource
/commerce/oci/availability-records/uploads

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request parameters for POST

Parameter Type Description Required or Available


Name Optional Version
fileUpload Binary JSON file containing inventory availability Required 51.0
data.

234
Salesforce Order Management in the Chatter Connect API Availability Records, Upload

To create an inventory data file, format the data as a series of JSON entries representing locations and individual inventory records.
Inventory Import Data Considerations:
• Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
• When the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location
entry.
• For each location entry, specify "mode":"UPDATE".
• Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The record Id protects against importing
duplicate data.
• Each inventory record entry requires an effectiveDate.
• Each futures entry requires a nonzero quantity and a future expectedDate.
• The system only creates or updates entries that are included in the data. It doesn’t delete entries that aren’t included. However,
if an included entry has an empty value, that value is deleted.

Note: The file size limit is 100 MB. For larger data sets, you can compress the file using GZIP or split the data into multiple
files.
This example illustrates the data format:

Note: For readability, this example shows the first few entries on multiple lines. In the import file, each location and inventory
record entry must be on a single line.
{
"location":"Warehouse-A", // location identifier
"mode":"UPDATE" // must be UPDATE (other operations might be available in future
releases)
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0", // unique identifier for the
inventory record
"onHand":10,
"sku":"12389156",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[ // list of future restocks
{
"quantity":1,
"expectedDate":"2021-04-18T14:05:22.781-07:00"
},
{
"quantity":5,
"expectedDate":"2021-05-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e312345",
"onHand":10,
"sku":"9485728",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[
{
"quantity":10,

235
Salesforce Order Management in the Chatter Connect API Location Graph, Upload

"expectedDate":"2021-04-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{"location":"Warehouse-B","mode":"UPDATE"}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc123de","onHand":10,"sku":"12389156","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":1,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc98765","onHand":10,"sku":"93867201","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":5,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}

Response body for POST


OCI Upload Inventory Availability Output
Resource

/commerce/oci/availability-records/uploads/uploadId

Available version
51.0
Requires Chatter
No
HTTP methods
GET
Response body for GET
OCI Upload Inventory Availability Status Output

Location Graph, Upload


Asynchonously upload inventory location and location group data to Omnichannel Inventory and check the status of upload jobs.
Available resources are:

Resource Description
/commerce/oci/location-graph/uploads POST - Asynchronously publish information about your inventory
locations and location groups to Omnichannel Inventory. The
publish includes records whose IsEnabled and ShouldSyncWithOci
fields are both true. This method returns an ID that you can use
to retrieve the status of the publish job.

/commerce/oci/location-graph/uploads/uploadId GET - Retrieve the status of a publish location structure job.

Resource
/commerce/oci/location-graph/uploads

Available version
51.0
Requires Chatter
No
HTTP methods
POST (No request payload)

236
Salesforce Order Management in the Chatter Connect API Reservations, Create

Response body for POST


OCI Publish Location Structure Output
Resource

/commerce/oci/location-graph/uploads/uploadId

Available version
51.0
Requires Chatter
No
HTTP methods
GET
Response body for GET
OCI Publish Location Structure Status Output

Reservations, Create
Create an inventory reservation in Omnichannel Inventory.
Resource
/commerce/oci/reservation/actions/reservations

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Create Reservation Input
Root XML tag
<ociCreateReservationInput>
Properties

Name Type Description Required or Available


Optional Version
actionRequestId String A UUID that identifies the request. Use Required 51.0
the action request IDs in response data
to identify which requests succeeded or
failed.

allowPartial Boolean When true, if the system can’t create the Optional 51.0
Reservations entire reservation, then it attempts to
create a partial reservation.

237
Salesforce Order Management in the Chatter Connect API Reservations, Fulfill

Name Type Description Required or Available


Optional Version
createRecords OCI Create A list of product quantities and locations At least one 51.0
Reservation Single or location groups. element is required
Input[]

expirationSeconds Integer A length of time in seconds. If the Optional 51.0


reservation is not fulfilled within this
amount of time after the
reservationTime, then it expires.

externalRefId String External reference ID. Optional 51.0

reservationTime String The time at which to record the Optional 51.0


reservation. Example:
2020-07-24T21:13:00Z

Response body for POST


OCI Create Reservation Output

Reservations, Fulfill
Fulfill one or more inventory reservations.
Resource
/commerce/oci/reservation/actions/fulfillments

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Fulfill Reservation Input
Root XML tag
<ociFulfillReservationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
fulfillmentRecords OCI Fulfill A list of inventory reservations. At least one 51.0
Reservation Single element is required.
Input[]

238
Salesforce Order Management in the Chatter Connect API Reservations, Release

Response body for POST


OCI Fulfill Reservation Output

Reservations, Release
Release one or more existing inventory reservations to free up that inventory.
Resource
/commerce/oci/reservation/actions/releases

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Release Reservation Input
Root XML tag
<ociReleaseReservationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
releaseRecords OCI Release List of inventory reservations to release. At least one 51.0
Reservation Single element is required.
Input[]

Response body for POST


OCI Release Reservation Output

Reservations, Transfer
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.
Resource
/commerce/oci/reservation/actions/transfers

Available version
51.0
Requires Chatter
No

239
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Resources

HTTP methods
POST
Request body for POST
OCI Transfer Reservation Input
Root XML tag
<ociTransferReservationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
allOrNothingTransferId String Controls whether a single failed transfer Optional 51.0
cancels all other transfers in the
transferRecords list.
• To allow some transfers in the
transferRecords list to
succeed when others fail, don’t
include this property.
• To cancel all the transfers in the
transferRecords list when
any of them fail, set this property to
a UUID. The ID must be unique, but
isn’t otherwise used in this version.

transferRecords OCI Transfer A list of inventory reservation transfers. At least one 51.0
Reservation Single element is required.
Input[]

Response body for POST


OCI Transfer Reservation Output

Salesforce Order Management Resources


Manage orders and the order fulfillment process. Available in Salesforce Order Management orgs.
Available resources are:

Resource Description
/commerce/fulfillment/fulfillment-orders Create one or more FulfillmentOrders and
FulfillmentOrderLineItems for an OrderDeliveryGroupSummary,
which defines a delivery method and recipient for an
OrderSummary. You specify the OrderItemSummaries to allocate,
which can be fulfilled from different locations. Specifying multiple
fulfillment groups creates one FulfillmentOrder for each location.

240
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Resources

Resource Description
For each OrderItemSummary, a FulfillmentOrderLineItem is created
and assigned to the corresponding FulfillmentOrder.

/commerce/fulfillment/fulfillment-orders/ Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This


fulfillmentOrderId/actions/cancel-item action doesn’t cancel the associated OrderItemSummaries, so
reallocate the canceled quantities to a new FulfillmentOrder.

/commerce/fulfillment/fulfillment-orders/ Create an invoice for a FulfillmentOrder that doesn’t have one.


fulfillmentOrderId/actions/create-invoice

/commerce/fulfillment/actions/create-multiple Create FulfillmentOrders for multiple OrderDeliveryGroups in a


single request.

/commerce/order-management/order-payment-summaries Create an OrderPaymentSummary for an OrderSummary. Specify


a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the
OrderPaymentSummary inherits the CurrencyIsoCode value from
the OrderSummary.

/commerce/order-management/order-summaries Create an OrderSummary based on an order. That order is


considered the original order for the OrderSummary. Subsequent
change orders that apply to the OrderSummary are also
represented as orders. You can specify whether the order is
managed in Salesforce Order Management or by an external
system. Most Salesforce Order Management APIs can run only on
orders that it manages.

/commerce/order-management/order-summaries/ Create a credit memo to represent the refund for one or more
orderSummaryId/actions/create-credit-memo change orders associated with an OrderSummary.

/commerce/order-management/order-summaries Ensure funds for an invoice and apply them to it. If needed, capture
orderSummaryId/async-actions/ authorized funds by sending a request to a payment provider. This
ensure-funds-async method inserts a background operation into an asynchronous job
queue and returns the ID of that operation so you can track its
status. Payment gateway responses appear in the payment gateway
log and do not affect the background operation status.

/commerce/order-management/order-summaries/ Ensure refunds for a credit memo or excess funds by sending a


orderSummaryId/async-actions/ request to a payment provider. This method inserts a background
ensure-refunds-async operation into an asynchronous job queue and returns the ID of
that operation so you can track its status. Payment gateway
responses appear in the payment gateway log and do not affect
the background operation status.

/commerce/order-management/order-summaries/ Retrieve the expected change order values for canceling one or
orderSummaryId/actions/preview-cancel more OrderItemSummaries from an OrderSummary, without
actually executing the cancel.

/commerce/order-management/order-summaries/ Retrieve the expected change order values for returning one or
orderSummaryId/actions/preview-return more OrderItemSummaries from an OrderSummary, without
actually executing the return.

241
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Resources

Resource Description
/commerce/order-management/order-summaries/ Cancel one or more OrderItemSummaries from an OrderSummary,
orderSummaryId/actions/submit-cancel and create a corresponding change order.

/commerce/order-management/order-summaries/ Return one or more OrderItemSummaries from an OrderSummary,


orderSummaryId/actions/submit-return and create a corresponding change order.

/commerce/returns/return-orders/ Create a ReturnOrder and ReturnOrderLineItems for items


belonging to an OrderSummary.

/commerce/returns/return-orders/returnOrderId Process ReturnOrderLineItems belonging to a ReturnOrder.


/actions/return-items Processing a ReturnOrderLineItem generates a change Order and
makes that ReturnOrderLineItem read-only. If a processed
ReturnOrderLineItem has any remaining expected quantity, then
the API creates a separate ReturnOrderLineItem representing that
quantity.

/commerce/order-management/routing/actions Returns combinations of inventory locations that can fulfill an order


/find-routes-with-fewest-splits within a specified limit of shipment splits.

/commerce/order-management/routing/actions Calculates the average distance from sets of inventory locations


/rank-byaverage-distance to an order recipient, and ranks them. Use this method to compare
the average shipping distances for different sets of locations that
can fulfill an order.

Fulfillment Orders
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.
Fulfillment Orders, Cancel Item
Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.
Fulfillment Orders, Create Invoice
Create an invoice for a FulfillmentOrder that doesn’t have one.
Fulfillment Orders, Create Multiple
Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.
Order Payment Summaries
Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.
Order Summaries
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce
Order Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.
Order Summaries, Create Credit Memo
Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.

242
Salesforce Order Management in the Chatter Connect API Fulfillment Orders

Order Summaries, Ensure Funds Async


Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider.
This method inserts a background operation into an asynchronous job queue and returns the ID of that operation so you can track
its status. Payment gateway responses appear in the payment gateway log and do not affect the background operation status.
Order Summaries, Ensure Refunds Async
Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a background
operation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responses
appear in the payment gateway log and do not affect the background operation status.
Order Summaries, Preview Adjust
Retrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actually
executing the adjustment. The response data contains the financial changes that would result from submitting the proposed
adjustment.
Order Summaries, Preview Cancel
Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actually
executing the cancel.
Order Summaries, Preview Return
Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actually
executing the return.
Order Summaries, Submit Adjust
Adjust the price of one or more OrderItemSummaries from an OrderSummary, and create one or two corresponding change orders.
Order Summaries, Submit Cancel
Cancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
Order Summaries, Submit Return
Return one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
Return Orders
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.
Return Orders, Return Items
Process ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makes
that ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates
a separate ReturnOrderLineItem representing that quantity.
Routing, Find Routes with Fewest Splits
Returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits.
Routing, Rank By Average Distance
Calculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare
the average shipping distances for different sets of locations that can fulfill an order.

Fulfillment Orders
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.

243
Salesforce Order Management in the Chatter Connect API Fulfillment Orders

Resource
/commerce/fulfillment/fulfillment-orders

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Fulfillment Order Input
Root XML tag
<fulfillmentOrderInput>
JSON example
{
"orderSummaryId":"1Osxx0000000000001",
"orderDeliveryGroupSummaryId":"2Dgxx00000000W0001",
"fulfillmentGroups":[
{
"fulfilledFromLocationId":"131xx00000000W0001",
"fulfillmentType":"warehouse",
"orderItemSummaries":[
{
"orderItemSummaryId":"10uxx00000000W0001",
"quantity":3
},
{
"orderItemSummaryId":"10uxx00000000W0002",
"quantity":1
}
]
}
]
}

Properties

Name Type Description Required or Available


Optional Version
fulfillmentGroups Fulfillment Group List of fulfillment groups that specify the Required 48.0
Input[] OrderItemSummaries and fulfillment
locations.

orderDeliveryGroup String ID of the OrderDeliveryGroupSummary. Required 48.0


SummaryId

orderSummaryId String ID of the OrderSummary. Required 48.0

244
Salesforce Order Management in the Chatter Connect API Fulfillment Orders, Cancel Item

Response body for POST


• When the HTTP status code indicates success, the response body is a Fulfillment Order Output. The response body can still
indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Fulfillment Order Output, and the value of the enhancedErrorType property can be ignored.

Fulfillment Orders, Cancel Item


Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.
Resource

/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/cancel-item

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Fulfillment Order Line Items To Cancel Input
Root XML tag
<fulfillmentOrderLineItemsToCancelInput>
JSON example
{
"fulfillmentOrderLineItemsToCancel" : [
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0001",
"quantity":1
},
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0002",
"quantity":2
}
]
}

Properties

Name Type Description Required or Available


Optional Version
fulfillmentOrder Fulfillment Order List of FulfillmentOrderLineItems and Required 48.0
LineItems Line Item Input[] quantities.
ToCancel

245
Salesforce Order Management in the Chatter Connect API Fulfillment Orders, Create Invoice

Response body for POST


• When the HTTP status code indicates success, the response body is a Fulfillment Order Cancel Line Items Output. The response
body can still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Fulfillment Order Cancel Line Items Output, and the value of the enhancedErrorType property
can be ignored.

Fulfillment Orders, Create Invoice


Create an invoice for a FulfillmentOrder that doesn’t have one.
Resource

/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/create-invoice

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Fulfillment Order Invoice Input
Root XML tag
<fulfillmentOrderInvoiceInput>
JSON example
{
}

Properties
None.
Response body for POST
• When the HTTP status code indicates success, the response body is a Fulfillment Order Invoice Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Fulfillment Order Invoice Output, and the value of the enhancedErrorType property can be
ignored.

Fulfillment Orders, Create Multiple


Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.
Resource
/commerce/fulfillment/actions/create-multiple

Available version
50.0

246
Salesforce Order Management in the Chatter Connect API Order Payment Summaries

Requires Chatter
No
HTTP methods
POST
Request body for POST
Multiple Fulfillment Order Input
Root XML tag
<multipleFulfillmentOrderInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
fulfillmentOrders Fulfillment Order Each element contains the data to create Required 50.0
Input[] one fulfillment order.

Response body for POST


• When the HTTP status code indicates success, the response body is a Multiple Fulfillment Order Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Multiple Fulfillment Order Output, and the value of the enhancedErrorType property can be
ignored.

Order Payment Summaries


Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.
Resource
/commerce/order-management/order-payment-summaries

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Create Order Payment Summary Input
Root XML tag
<orderPaymentSummaryInput>

247
Salesforce Order Management in the Chatter Connect API Order Summaries

JSON examples
{
"orderSummaryId":"1Osxx0000000000001",
"paymentAuthorizationId":"2Dgxx00000000W0001"
}

{
"orderSummaryId":"1Osxx0000000000001",
"paymentIds":[
"0a3xx0000000085AAA",
"0a3xx0000000085BBB"
]
}

Properties

Name Type Description Required or Available


Optional Version
orderSummaryId String ID of the OrderSummary. Required 48.0

payment String ID of the payment authorization. Either a payment 48.0


AuthorizationId authorization or at
least one payment
is required.

paymentIds String[] List of IDs of the payments. Either a payment 48.0


authorization or at
least one payment
is required.

Response body for POST


• When the HTTP status code indicates success, the response body is a Create Order Payment Summary Output. The response
body can still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Create Order Payment Summary Output, and the value of the enhancedErrorType property can
be ignored.

Order Summaries
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce Order
Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.
Resource
/commerce/order-management/order-summaries

Available version
48.0

248
Salesforce Order Management in the Chatter Connect API Order Summaries

Requires Chatter
No
HTTP methods
POST
Request body for POST
Order Summary Input
Root XML tag
<orderSummaryInput>
JSON example
{
"orderId": "801xx000003GbTgAAK"
}

Properties

Name Type Description Required or Available


Optional Version
name String Specifies an OrderNumber to assign to Optional 50.0
the order summary.

orderId String ID of the original order. Required 48.0

orderLifeCycleType String Specifies whether the order is managed Optional 49.0


in Salesforce Order Management or by
an external system. It can have one of
these values:
• MANAGED—Managed in Salesforce
Order Management.
• UNMANAGED—Managed by an
external system.
If no value is specified, the default is
MANAGED.

status String Specifies a status to assign to the order Optional 50.0


summary. The value must match one of
the picklist values on the Status field of
the OrderSummary object.

Response body for POST


• When the HTTP status code indicates success, the response body is an Order Summary Output. The response body can still
indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is an Order Summary Output, and the value of the enhancedErrorType property can be ignored.

249
Salesforce Order Management in the Chatter Connect API Order Summaries, Create Credit Memo

Order Summaries, Create Credit Memo


Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.
Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/create-credit-memo

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Create Credit Memo Input
Root XML tag
<createCreditMemoInput>
JSON example
{
"changeOrderIds": [
"801R0000000EAAkIAO"
]
}

Properties

Name Type Description Required or Available


Optional Version
changeOrderIds String[] List of IDs of the change orders. Required 48.0

Response body for POST


• When the HTTP status code indicates success, the response body is a Create Credit Memo Output. The response body can still
indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Create Credit Memo Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Ensure Funds Async


Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider. This
method inserts a background operation into an asynchronous job queue and returns the ID of that operation so you can track its status.
Payment gateway responses appear in the payment gateway log and do not affect the background operation status.
Resource

/commerce/order-management/order-summaries/orderSummaryId/async-actions/ensure-funds-async

250
Salesforce Order Management in the Chatter Connect API Order Summaries, Ensure Funds Async

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Ensure Funds Async Input
Root XML tag
<ensureFundsAsyncInput>
JSON example
{
"invoiceId": "50gR000000000JNIAY"
}

Properties

Name Type Description Required or Available


Optional Version
invoiceId String ID of the invoice. Required 48.0

Response body for POST


• When the HTTP status code indicates success, the response body is an Ensure Funds Async Output. The response body can still
indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is an Ensure Funds Async Output, and the value of the enhancedErrorType property can be ignored.
Usage
This method checks the OrderPaymentSummaries associated with the specified OrderSummary for funds to apply to the invoice
balance as follows:

Note: If multiple OrderPaymentSummaries have the same amount, their order of selection is random.

1. Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.
2. If an OrderPaymentSummary exists with an amount that matches the invoice balance, use it.
3. Otherwise, if any OrderPaymentSummaries exist with an amount greater than the invoice balance, use the one with the smallest
amount greater than the invoice balance.
4. Otherwise, select OrderPaymentSummaries in order from largest amount to smallest until their amounts meet or exceed the
invoice balance.
5. If any selected funds are authorized, capture them.
6. Apply the selected funds to the invoice.

251
Salesforce Order Management in the Chatter Connect API Order Summaries, Ensure Refunds Async

Order Summaries, Ensure Refunds Async


Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a background
operation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responses
appear in the payment gateway log and do not affect the background operation status.
Resource

/commerce/order-management/order-summaries/orderSummaryId/async-actions/ensure-refunds-async

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Ensure Refunds Async Input
Root XML tag
<ensureRefundsAsyncInput>
JSON example
{
"creditMemoId": "50gR000000000JNIAY"
}

Properties

Name Type Description Required or Available


Optional Version
creditMemoId String ID of the credit memo that represents a Optional, but at 48.0
refund amount. least one input
property is required

excessFundsAmount Double Amount of excess funds to refund. Optional, but at 49.0


least one input
property is required

Response body for POST


• When the HTTP status code indicates success, the response body is an Ensure Refunds Async Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is an Ensure Refunds Async Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Preview Adjust


Retrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actually
executing the adjustment. The response data contains the financial changes that would result from submitting the proposed adjustment.

252
Salesforce Order Management in the Chatter Connect API Order Summaries, Preview Cancel

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/adjust-item-preview

Available version
49.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Adjust Order Item Summary Input
Root XML tag
<adjustOrderItemSummaryInput>
JSON example
{
"adjustItems": [{
"reason": "Unknown",
"amount": 45,
"appeasementType": "AmountWithoutTax",
"orderItemSummaryId": "10uxx0000004EXLAA2",
"description": "foobar"
}]
}

Properties

Name Type Description Required or Available


Optional Version
adjustItems Adjust Item Input[] List of price adjustments to Required 49.0
OrderItemSummaries.

Response body for POST


• When the HTTP status code indicates success, the response body is an Adjust Order Summary Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is an Adjust Order Summary Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Preview Cancel


Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actually
executing the cancel.
Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/preview-cancel

253
Salesforce Order Management in the Chatter Connect API Order Summaries, Preview Return

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}

Properties

Name Type Description Required or Available


Optional Version
changeItems Change Item List of changes to OrderItemSummaries. Required 48.0
Input[]

Response body for POST


• When the HTTP status code indicates success, the response body is a Preview Cancel Output. The response body can still indicate
processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Preview Cancel Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Preview Return


Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actually
executing the return.
Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/preview-return

Available version
48.0

254
Salesforce Order Management in the Chatter Connect API Order Summaries, Submit Adjust

Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}

Properties

Name Type Description Required or Available


Optional Version
changeItems Change Item List of changes to OrderItemSummaries. Required 48.0
Input[]

Response body for POST


• When the HTTP status code indicates success, the response body is a Preview Return Output. The response body can still indicate
processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Preview Return Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Submit Adjust


Adjust the price of one or more OrderItemSummaries from an OrderSummary, and create one or two corresponding change orders.
Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/adjust-item-submit

Available version
49.0
Requires Chatter
No
HTTP methods
POST

255
Salesforce Order Management in the Chatter Connect API Order Summaries, Submit Cancel

Request body for POST


Adjust Order Item Summary Input
Root XML tag
<adjustOrderItemSummaryInput>
JSON example
{
"adjustItems": [{
"reason": "Unknown",
"amount": 45,
"appeasementType": "AmountWithoutTax",
"orderItemSummaryId": "10uxx0000004EXLAA2",
"description": "foobar"
}]
}

Properties

Name Type Description Required or Available


Optional Version
adjustItems Adjust Item Input[] List of price adjustments to Required 49.0
OrderItemSummaries.

Response body for POST


• When the HTTP status code indicates success, the response body is an Adjust Order Summary Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is an Adjust Order Summary Output, and the value of the enhancedErrorType property can be ignored.
Usage
After submitting a price adjustment, process refunds as appropriate:
• If the discount only applied to OrderItemSummaries for which payment has not been captured, it does not require a refund.
This situation normally applies to OrderItemSummaries in the US that have not been fulfilled.
• If the discount applied to OrderItemSummaries that have not been fulfilled and for which payment has been captured, process
a refund. In this case, pass the totalExcessFundsAmount from the response body to the Order Summaries, Ensure
Refunds Async resource.
• If the discount applied to OrderItemSummaries that have been fulfilled, process a refund. Pass the
postFulfillmentChangeOrderId from the response body to the Order Summaries, Create Credit Memo resource,
then pass the CreditMemo to the Order Summaries, Ensure Refunds Async resource.
• If the discount applied to both fulfilled and unfulfilled OrderItemSummaries for which payment has been captured, process both
refunds. Pass the postFulfillmentChangeOrderId from the response body to the Order Summaries, Create Credit
Memo resource, then pass the credit memo and the totalExcessFundsAmount from the response body to the Order
Summaries, Ensure Refunds Async resource.

Order Summaries, Submit Cancel


Cancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.

256
Salesforce Order Management in the Chatter Connect API Order Summaries, Submit Return

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/submit-cancel

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}

Properties

Name Type Description Required or Available


Optional Version
changeItems Change Item List of changes to OrderItemSummaries. Required 48.0
Input[]

Response body for POST


• When the HTTP status code indicates success, the response body is a Submit Cancel Output. The response body can still indicate
processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Submit Cancel Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Submit Return


Return one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/submit-return

257
Salesforce Order Management in the Chatter Connect API Return Orders

Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}

Properties

Name Type Description Required or Available


Optional Version
changeItems Change Item List of changes to OrderItemSummaries. Required 48.0
Input[]

Response body for POST


• When the HTTP status code indicates success, the response body is a Submit Return Output. The response body can still indicate
processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Submit Return Output, and the value of the enhancedErrorType property can be ignored.
Usage
After submitting a return, process a refund. Pass the changeOrderId from the response body to the Order Summaries, Create
Credit Memo resource, then pass the CreditMemo to the Order Summaries, Ensure Refunds Async resource.

Return Orders
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.
Resource
/commerce/returns/return-orders

258
Salesforce Order Management in the Chatter Connect API Return Orders

Available version
50.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Return Order Input
Root XML tag
<returnOrderInput>
JSON example
{
"orderSummaryId": "1Osxx0000004EAqCAM",
"status" : "Submitted",
"returnOrderLifeCycleType" : "Unmanaged",
"returnOrderLineItems": [
{
"quantityExpected": "1",
"reasonForReturn": "Not Satisfied",
"canReduceShipping": false,
"orderItemSummaryId": "10uxx0000004GKbAAM",
"quantityReceived": "0"
}
]
}

Properties

Name Type Description Required or Available


Optional Version
orderSummaryId String ID of the OrderSummary containing the Required 50.0
items to be returned. The
OrderSummary’s OrderLifeCycleType
must be Managed.

returnOrder String The LifeCycleType of the ReturnOrder. Required 51.0


LifeCycleType Possible values are:
• Managed—Process the ReturnOrder
using the APIs and actions. It can
generate change orders and affects
financial fields and rollup calculations.
• Unmanaged—The ReturnOrder is for
tracking purposes only. It isn’t
involved in any financial calculations
and doesn’t generate any change
orders. The system doesn’t prevent
the creation of duplicate
ReturnOrderLineItems in an

259
Salesforce Order Management in the Chatter Connect API Return Orders, Return Items

Name Type Description Required or Available


Optional Version
unmanaged ReturnOrder for the
same OrderItem.

returnOrder Return Order Line List of data for creating At least one 50.0
LineItems Item Input[] ReturnOrderLineItems. element is required

status String Status to assign the ReturnOrder. This Required 50.0


value must match an entry in the
ReturnOrder object’s Status picklist.

Response body for POST


Return Order Output

Return Orders, Return Items


Process ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makes
that ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates a
separate ReturnOrderLineItem representing that quantity.
Resource

/commerce/returns/return-orders/returnOrderId/actions/return-items

Available version
52.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Return Items Input
Root XML tag
<returnItemsInput>
JSON example
{
"returnOrderItems": [
{
"returnOrderLineItemId": "10uxx0000004GKbAAM",
"quantityReturned": "1",
"quantityToCancel": "0",
"quantityReceived": "1",
"quantityRejected": "0",
"reasonForRejection": "N/A"
}
],
"returnOrderItemDeliveryCharges": [

260
Salesforce Order Management in the Chatter Connect API Routing, Find Routes with Fewest Splits

{
"returnOrderLineItemId": "10uxx0000004GKbAAP"
}
]
}

Properties

Name Type Description Required or Available


Optional Version
returnOrderItem Return Order Item List of ReturnOrderLineItems to return Optional 52.0
DeliveryCharges Delivery Charge that represent delivery charges.
Input[]

returnOrderItems Return Order Item List of ReturnOrderLineItems to process Required 52.0


Input[] that represent products, along with data
about how to process them.

Response body for POST


Return Items Output

Routing, Find Routes with Fewest Splits


Returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits.
Resource
/commerce/order-management/routing/actions/find-routes-with-fewest-splits

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Find Routes With Fewest Splits Input
Root XML tag
<findRoutesWithFewestSplits>
Properties

Name Type Description Required or Available


Optional Version
locationAvailable Location Each list element represents the available At least one 51.0
Inventory Availability Input[] quantity of a product at an inventory element is required
location.

261
Salesforce Order Management in the Chatter Connect API Routing, Rank By Average Distance

Name Type Description Required or Available


Optional Version
maximumNumberOf Integer The maximum allowable number of Optional 51.0
Splits shipment splits. Routing options that
involve more than this number of splits
are not returned.

Note: Each split represents an


additional shipment. Specifying a
maximum of 0 returns only
locations that can fulfill the entire
order in a single shipment. A
maximum of 1 returns
combinations of locations that can
fulfill the order in one or two
shipments, and so on.

ordered Quantity With Sku Each list element represents a quantity At least one 51.0
Quantities Input[] of a product to be routed for fulfillment. element is required

Response body for POST


• When the HTTP status code indicates success, the response body is a Find Routes With Fewest Splits Output. The response body
can still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Find Routes With Fewest Splits Output, and the value of the enhancedErrorType property can
be ignored.

Routing, Rank By Average Distance


Calculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare the
average shipping distances for different sets of locations that can fulfill an order.
Resource
/commerce/order-management/routing/actions/rank-byaverage-distance

Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Rank Average Distance Input
Root XML tag
<rankAverageDistanceInput>

262
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Requests

JSON example

Properties

Name Type Description Required or Available


Optional Version
deliveryCountryCode String The country code of the order recipient. Required 51.0

deliveryPostalCode String The postal code of the order recipient. Required 51.0

distanceUnit String Specify mi or km to return average 51.0


distances in miles or kilometers,
respectively.

sortResult String Specify ASC or DESC to rank the results 51.0


by average shipping distance in
ascending or descending order,
respectively.

targetLocations Target Location Each element is a set of inventory At least one 51.0
Input[] locations that can combine to fulfill the element is required
order.

Response body for POST


• When the HTTP status code indicates success, the response body is a Rank Average Distance Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Rank Average Distance Output, and the value of the enhancedErrorType property can be ignored.

Salesforce Order Management Requests


Salesforce Order Management includes these Chatter Connect API requests.

Adjust Item Input


A price adjustment to an OrderItemSummary. It only supports discounts, not increases.
Adjust Order Item Summary Input
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
Change Input
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Change Item Input
Change to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based
on the price change. The OrderItemSummary can’t be a shipping charge.
Create Credit Memo Input
A list of change orders used to create a credit memo.

263
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Requests

Create Order Payment Summary Input


An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.
Ensure Funds Async Input
ID of an invoice to ensure funds for and apply them to.
Ensure Refunds Async Input
ID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.
Find Routes With Fewest Splits Input
Data used to calculate order fulfillment routes involving the fewest number of shipment splits.
Fulfillment Group Input
A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the
values defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned
to the FulfillmentOrder for this fulfillment group.
Fulfillment Order Input
An OrderDeliveryGroupSummary that defines a delivery method and recipient, and a list of fulfillment groups to assign to
FulfillmentOrders. Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and share
the same fulfillment location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for
each OrderItemSummary.
Fulfillment Order Invoice Input
Use an empty request body for this input.
Fulfillment Order Line Item Input
A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the
canceled quantity to a different FulfillmentOrder.
Fulfillment Order Line Items To Cancel Input
A list of FulfillmentOrderLineItems and quantities to cancel.
Location Availability Input
The available quantity of a product at an inventory location.
Location Input
Inventory location data used to calculate shipping distance.
Multiple Fulfillment Order Input
List of inputs for creating fulfillment orders.
OCI Create Reservation Input
Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.
OCI Create Reservation Single Input
A quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.
OCI Fulfill Reservation Input
A list of inventory reservations to fulfill.
OCI Fulfill Reservation Single Input
An inventory reservation to fulfill.
OCI Get Inventory Availability Input
Details of a request to retrieve inventory availability.

264
Salesforce Order Management in the Chatter Connect API Adjust Item Input

OCI Release Reservation Input


Details of one or more inventory reservations to release.
OCI Release Reservation Single Input
A single inventory reservation to release.
OCI Transfer Reservation Input
A list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
OCI Transfer Reservation Single Input
An inventory reservation transfer.
Order Item Summary Input
An OrderItemSummary and quantity.
Order Summary Input
An order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you can
specify an OrderNumber or Status.
Quantity With Sku Input
A quantity of a product.
Rank Average Distance Input
An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.
Return Items Input
Data about products and delivery charges to return.
Return Order Input
Data for creating a ReturnOrder and ReturnOrderLineItems.
Return Order Item Delivery Charge Input
ID of a ReturnOrderLineItem representing a delivery charge.
Return Order Item Input
ID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remaining
quantity to be returned is added to a new ReturnOrderLineItem.
Return Order Line Item Input
Data for creating a ReturnOrderLineItem.
Target Location Input
A set of inventory locations that together can fulfill an order.

Adjust Item Input


A price adjustment to an OrderItemSummary. It only supports discounts, not increases.
Root XML tag
<adjustItem>
JSON example
{
"reason": "Unknown",
"amount": 45,
"appeasementType": "AmountWithoutTax",
"orderItemSummaryId": "10uxx0000004EXLAA2",

265
Salesforce Order Management in the Chatter Connect API Adjust Order Item Summary Input

"description": "foobar"
}

Properties

Name Type Description Required or Available


Optional Version
adjustmentType String Describes how the amount is calculated. Required 49.0
It can have one of these values:
• AmountWithTax—Value of
amount is the adjustment, including
tax.
• AmountWithoutTax—Value of
amount is the adjustment, not
including tax. Tax is calculated on the
value and added.
• Percentage—Value of amount is
a percentage discount. It is divided by
100, and then multiplied by the
TotalPrice and TotalTaxAmount of the
OrderItemSummary to determine the
adjustment amount.

amount Double Value used to calculate the adjustment Required 49.0


amount, as described by the
adjustmentType. It must be a negative
value.

description String Description of the adjustment. Optional 49.0

orderItemSummaryId String ID of the OrderItemSummary. Required 49.0

reason String Reason for the adjustment. The value must Required 49.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.

SEE ALSO:
Order Summaries, Preview Adjust
Order Summaries, Submit Adjust

Adjust Order Item Summary Input


A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
Root XML tag
<adjustOrderItemSummaryInput>

266
Salesforce Order Management in the Chatter Connect API Change Input

JSON example
{
"adjustItems": [{
"reason": "Unknown",
"amount": 45,
"appeasementType": "AmountWithoutTax",
"orderItemSummaryId": "10uxx0000004EXLAA2",
"description": "foobar"
}]
}

Properties

Name Type Description Required or Available


Optional Version
adjustItems Adjust Item Input[] List of price adjustments to Required 49.0
OrderItemSummaries.

SEE ALSO:
Order Summaries, Preview Adjust
Order Summaries, Submit Adjust

Change Input
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}

267
Salesforce Order Management in the Chatter Connect API Change Item Input

Properties

Name Type Description Required or Available


Optional Version
changeItems Change Item Input[] List of changes to OrderItemSummaries. Required 48.0

SEE ALSO:
Order Summaries, Preview Cancel
Order Summaries, Preview Return
Order Summaries, Submit Cancel
Order Summaries, Submit Return

Change Item Input


Change to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based on
the price change. The OrderItemSummary can’t be a shipping charge.
Root XML tag
<changeItem>
JSON example
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}

Properties

Name Type Description Required or Available


Optional Version
orderItem String ID of the OrderItemSummary. Required 48.0
SummaryId

quantity Double Quantity to change. Use a positive value. Required 48.0


For example, a value of 2 means “cancel
or return 2 units.”

reason String Reason for the change. The value must Required 48.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.

268
Salesforce Order Management in the Chatter Connect API Create Credit Memo Input

Name Type Description Required or Available


Optional Version
shippingReduction Boolean Specifies whether to prorate the shipping Required 48.0
Flag charge.

SEE ALSO:
Order Summaries, Preview Cancel
Order Summaries, Preview Return
Order Summaries, Submit Cancel
Order Summaries, Submit Return
Change Input

Create Credit Memo Input


A list of change orders used to create a credit memo.
Root XML tag
<createCreditMemoInput>
JSON example
{
"changeOrderIds": [
"801R0000000EAAkIAO"
]
}

Properties

Name Type Description Required or Available


Optional Version
changeOrderIds String[] List of IDs of the change orders. Required 48.0

SEE ALSO:
Order Summaries, Create Credit Memo

Create Order Payment Summary Input


An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.
Root XML tag
<orderPaymentSummaryInput>
JSON examples
{
"orderSummaryId":"1Osxx0000000000001",

269
Salesforce Order Management in the Chatter Connect API Ensure Funds Async Input

"paymentAuthorizationId":"2Dgxx00000000W0001"
}

{
"orderSummaryId":"1Osxx0000000000001",
"paymentIds":[
"0a3xx0000000085AAA",
"0a3xx0000000085BBB"
]
}

Properties

Name Type Description Required or Available


Optional Version
orderSummaryId String ID of the OrderSummary. Required 48.0

payment String ID of the payment authorization. Either a payment 48.0


AuthorizationId authorization or at
least one payment
is required.

paymentIds String[] List of IDs of the payments. Either a payment 48.0


authorization or at
least one payment
is required.

SEE ALSO:
Order Payment Summaries

Ensure Funds Async Input


ID of an invoice to ensure funds for and apply them to.
Root XML tag
<ensureFundsAsyncInput>
JSON example
{
"invoiceId": "50gR000000000JNIAY"
}

270
Salesforce Order Management in the Chatter Connect API Ensure Refunds Async Input

Properties

Name Type Description Required or Available


Optional Version
invoiceId String ID of the invoice. Required 48.0

SEE ALSO:
Order Summaries, Ensure Funds Async

Ensure Refunds Async Input


ID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.
Root XML tag
<ensureRefundsAsyncInput>
JSON example
{
"creditMemoId": "50gR000000000JNIAY"
}

Properties

Name Type Description Required or Available


Optional Version
creditMemoId String ID of the credit memo that represents a Optional, but at 48.0
refund amount. least one input
property is required

excessFundsAmount Double Amount of excess funds to refund. Optional, but at 49.0


least one input
property is required

SEE ALSO:
Order Summaries, Ensure Refunds Async

Find Routes With Fewest Splits Input


Data used to calculate order fulfillment routes involving the fewest number of shipment splits.
Root XML tag
<findRoutesWithFewestSplits>

271
Salesforce Order Management in the Chatter Connect API Fulfillment Group Input

Properties

Name Type Description Required or Available


Optional Version
locationAvailable Location Availability Each list element represents the available At least one 51.0
Inventory Input[] quantity of a product at an inventory element is required
location.

maximumNumberOf Integer The maximum allowable number of Optional 51.0


Splits shipment splits. Routing options that
involve more than this number of splits are
not returned.

Note: Each split represents an


additional shipment. Specifying a
maximum of 0 returns only
locations that can fulfill the entire
order in a single shipment. A
maximum of 1 returns
combinations of locations that can
fulfill the order in one or two
shipments, and so on.

ordered Quantity With Sku Each list element represents a quantity of At least one 51.0
Quantities Input[] a product to be routed for fulfillment. element is required

Fulfillment Group Input


A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the values
defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned to the
FulfillmentOrder for this fulfillment group.
Root XML tag
<fulfillmentGroup>
JSON example
{
"fulfilledFromLocationId":"131xx00000000W0001",
"fulfillmentType":"warehouse",
"orderItemSummaries":[
{
"orderItemSummaryId":"10uxx00000000W0001",
"quantity":3
},
{
"orderItemSummaryId":"10uxx00000000W0002",
"quantity":1
}
]
}

272
Salesforce Order Management in the Chatter Connect API Fulfillment Order Input

Properties

Name Type Description Required or Available


Optional Version
fulfilledFrom String ID of the fulfillment location. Required 48.0
LocationId

fulfillmentType String Fulfillment type. One of the Type field Required 48.0
values defined for FulfillmentOrders.

orderItem Order Item List of OrderItemSummaries. Required 48.0


Summaries Summary Input[]

referenceId String Reference to this input for use in Optional 50.0


troubleshooting failures. This value is only
used by the APIs for creating fulfillment
orders for multiple order delivery group
summaries.

SEE ALSO:
Fulfillment Orders
Fulfillment Order Input

Fulfillment Order Input


An OrderDeliveryGroupSummary that defines a delivery method and recipient, and a list of fulfillment groups to assign to FulfillmentOrders.
Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and share the same fulfillment
location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for each OrderItemSummary.
Root XML tag
<fulfillmentOrderInput>
JSON example
{
"orderSummaryId":"1Osxx0000000000001",
"orderDeliveryGroupSummaryId":"2Dgxx00000000W0001",
"fulfillmentGroups":[
{
"fulfilledFromLocationId":"131xx00000000W0001",
"fulfillmentType":"warehouse",
"orderItemSummaries":[
{
"orderItemSummaryId":"10uxx00000000W0001",
"quantity":3
},
{
"orderItemSummaryId":"10uxx00000000W0002",
"quantity":1
}
]

273
Salesforce Order Management in the Chatter Connect API Fulfillment Order Invoice Input

}
]
}

Properties

Name Type Description Required or Available


Optional Version
fulfillmentGroups Fulfillment Group List of fulfillment groups that specify the Required 48.0
Input[] OrderItemSummaries and fulfillment
locations.

orderDeliveryGroup String ID of the OrderDeliveryGroupSummary. Required 48.0


SummaryId

orderSummaryId String ID of the OrderSummary. Required 48.0

SEE ALSO:
Fulfillment Orders

Fulfillment Order Invoice Input


Use an empty request body for this input.
Root XML tag
<fulfillmentOrderInvoiceInput>
JSON example
{
}

Properties
None.

SEE ALSO:
Fulfillment Orders, Create Invoice

Fulfillment Order Line Item Input


A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the canceled
quantity to a different FulfillmentOrder.
Root XML tag
<fulfillmentOrderLineItem>
JSON example
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0001",
"quantity":1
}

274
Salesforce Order Management in the Chatter Connect API Fulfillment Order Line Items To Cancel Input

Properties

Name Type Description Required or Available


Optional Version
fulfillmentOrder String ID of the FulfillmentOrderLineItem. Required 48.0
LineItemId

quantity Double Quantity to cancel. Required 48.0

SEE ALSO:
Fulfillment Orders, Cancel Item
Fulfillment Order Line Items To Cancel Input

Fulfillment Order Line Items To Cancel Input


A list of FulfillmentOrderLineItems and quantities to cancel.
Root XML tag
<fulfillmentOrderLineItemsToCancelInput>
JSON example
{
"fulfillmentOrderLineItemsToCancel" : [
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0001",
"quantity":1
},
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0002",
"quantity":2
}
]
}

Properties

Name Type Description Required or Available


Optional Version
fulfillmentOrder Fulfillment Order List of FulfillmentOrderLineItems and Required 48.0
LineItems Line Item Input[] quantities.
ToCancel

SEE ALSO:
Fulfillment Orders, Cancel Item

275
Salesforce Order Management in the Chatter Connect API Location Availability Input

Location Availability Input


The available quantity of a product at an inventory location.
Root XML tag
<locationAvailabilityInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
externalReferenceId String The external reference ID of the inventory Optional 51.0
location.

quantity Double The available quantity of the product. Required 51.0

stockKeepingUnit String The Stock Keeping Unit of the product. Required 51.0

Location Input
Inventory location data used to calculate shipping distance.
Root XML tag
<locationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
countryCode String The country code of the location. Required 51.0

locationIdentifier String The identifier of the location. Required 51.0

postalCode String The postal code of the location. Required 51.0

Multiple Fulfillment Order Input


List of inputs for creating fulfillment orders.
Root XML tag
<multipleFulfillmentOrderInput>

276
Salesforce Order Management in the Chatter Connect API OCI Create Reservation Input

JSON example

Properties

Name Type Description Required or Available


Optional Version
fulfillmentOrders Fulfillment Order Each element contains the data to create Required 50.0
Input[] one fulfillment order.

OCI Create Reservation Input


Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.
Root XML tag
<ociCreateReservationInput>
Properties

Name Type Description Required or Available


Optional Version
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or
failed.

allowPartial Boolean When true, if the system can’t create the Optional 51.0
Reservations entire reservation, then it attempts to
create a partial reservation.

createRecords OCI Create A list of product quantities and locations At least one 51.0
Reservation Single or location groups. element is required
Input[]

expirationSeconds Integer A length of time in seconds. If the Optional 51.0


reservation is not fulfilled within this
amount of time after the
reservationTime, then it expires.

externalRefId String External reference ID. Optional 51.0

reservationTime String The time at which to record the Optional 51.0


reservation. Example:
2020-07-24T21:13:00Z

OCI Create Reservation Single Input


A quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.
Root XML tag
<ociCreateReservationSingle>

277
Salesforce Order Management in the Chatter Connect API OCI Fulfill Reservation Input

JSON example

Properties

Name Type Description Required or Available


Optional Version
locationGroupIdentifier String Identifier of the location group at which Either 51.0
to reserve inventory. locationGroupIdentifier
or locationIdentifier
is required, but not
both

locationIdentifier String Identifier of the location at which to Either 51.0


reserve inventory. locationGroupIdentifier
or locationIdentifier
is required, but not
both

quantity Double The quantity of the product to reserve. Required 51.0

stockKeepingUnit String The SKU of the product to reserve. Required 51.0

OCI Fulfill Reservation Input


A list of inventory reservations to fulfill.
Root XML tag
<ociFulfillReservationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
fulfillmentRecords OCI Fulfill A list of inventory reservations. At least one 51.0
Reservation Single element is required.
Input[]

OCI Fulfill Reservation Single Input


An inventory reservation to fulfill.
Root XML tag
<ociFulfillReservationSingle>

278
Salesforce Order Management in the Chatter Connect API OCI Get Inventory Availability Input

JSON example

Properties

Name Type Description Required or Available


Optional Version
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or
failed.

externalRefId String The external reference ID of the location Optional 51.0


that’s fulfilling the reservation.

locationIdentifier String The identifier of the location that’s fulfilling Required 51.0
the reservation.

quantity Double The quantity being fulfilled. Required 51.0

stockKeepingUnit String The SKU of the product being fulfilled. Required 51.0

OCI Get Inventory Availability Input


Details of a request to retrieve inventory availability.
Root XML tag
<ociGetInventoryInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
locationGroupIdentifier String The identifier of a location group to Optional; can’t 51.0
retrieve inventory availability data for. combine with
Specifying this value retrieves inventory locationGroupIdentifiers
data for all locations belonging to this or
group. locationIdentifiers

locationGroupIdentifiers String[] A list of up to 100 identifiers of location Optional; can’t 51.0


groups to retrieve inventory availability combine with
data for. locationGroupIdentifier
or
locationIdentifiers

locationIdentifiers String[] A list of up to 100 identifiers of locations Optional; can’t 51.0


to retrieve inventory availability data for. combine with
locationGroupIdentifier

279
Salesforce Order Management in the Chatter Connect API OCI Release Reservation Input

Name Type Description Required or Available


Optional Version
or
locationGroupIdentifiers

stockKeepingUnit String The SKU of a product to retrieve inventory Optional; can’t 51.0
availability data for. Specifying a SKU with combine with
no locations or location groups returns stockKeepingUnits
availability data for that SKU at all inventory
locations that are not assigned to location
groups.

stockKeepingUnits String[] A list of up to 100 SKUs of products to Optional; can’t 51.0


retrieve inventory availability data for. combine with
stockKeepingUnit

useCache Boolean Whether to fetch the inventory data from Optional 51.0
the cache. Default value is true.

OCI Release Reservation Input


Details of one or more inventory reservations to release.
Root XML tag
<ociReleaseReservationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
releaseRecords OCI Release List of inventory reservations to release. At least one 51.0
Reservation Single element is required.
Input[]

OCI Release Reservation Single Input


A single inventory reservation to release.
Root XML tag
<ociReleaseReservationSingle>

280
Salesforce Order Management in the Chatter Connect API OCI Transfer Reservation Input

JSON example

Properties

Name Type Description Required or Available


Optional Version
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or
failed.

externalRefId String The external reference ID of the location Optional 51.0


or location group that has the reservation.

locationGroupIdentifier String The identifier of the location group that The identifier for a 51.0
has the reservation. location or location
group, but not both,
is required.

locationIdentifier String The identifier of the location that has the The identifier for a 51.0
reservation. location or location
group, but not both,
is required.

quantity Double The quantity of reserved inventory to Required 51.0


release.

stockKeepingUnit String The SKU of the product to release. Required 51.0

OCI Transfer Reservation Input


A list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
Root XML tag
<ociTransferReservationInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
allOrNothingTransferId String Controls whether a single failed transfer Optional 51.0
cancels all other transfers in the
transferRecords list.
• To allow some transfers in the
transferRecords list to succeed
when others fail, don’t include this
property.

281
Salesforce Order Management in the Chatter Connect API OCI Transfer Reservation Single Input

Name Type Description Required or Available


Optional Version
• To cancel all the transfers in the
transferRecords list when any
of them fail, set this property to a
UUID. The ID must be unique, but isn’t
otherwise used in this version.

transferRecords OCI Transfer A list of inventory reservation transfers. At least one 51.0
Reservation Single element is required.
Input[]

OCI Transfer Reservation Single Input


An inventory reservation transfer.
Root XML tag
<ociTransferReservationSingle>
Properties

Name Type Description Required or Available


Optional Version
actionRequestId String A UUID that identifies the request. Use the Required 51.0
action request IDs in response data to
identify which requests succeeded or
failed.

externalRefId String The external reference ID of the location Optional 51.0


receiving the transfer.

fromLocationGroupIdentifier String The identifier of the location group The identifier for a 51.0
sending the reservation. sending location or
location group, but
not both, is required

fromLocationIdentifier String The identifier of the location sending the The identifier for a 51.0
reservation. sending location or
location group, but
not both, is required

ignoreAvailabilityCheck Boolean If true, force the transfer even if the Optional 52.0
receiving location doesn’t have sufficient
available inventory. The default value is
false.

quantity Double The quantity of inventory being Required 51.0


transferred.

stockKeepingUnit String The SKU of the product being transferred. Required 51.0

282
Salesforce Order Management in the Chatter Connect API Order Item Summary Input

Name Type Description Required or Available


Optional Version
toLocationGroupIdentifier String The identifier of the location group The identifier for a 51.0
receiving the reservation. receiving location or
location group, but
not both, is required

toLocationIdentifier String The identifier of the location receiving the The identifier for a 51.0
reservation. receiving location or
location group, but
not both, is required

Order Item Summary Input


An OrderItemSummary and quantity.
Root XML tag
<orderItemSummary>
JSON example
{
"orderItemSummaryId":"10uxx00000000W0001",
"quantity":3
}

Properties

Name Type Description Required or Available


Optional Version
orderItem String ID of the OrderItemSummary. Required 48.0
SummaryId

quantity Double Quantity to include. Required 48.0

SEE ALSO:
Fulfillment Orders
Fulfillment Order Input
Fulfillment Group Input

Order Summary Input


An order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you can
specify an OrderNumber or Status.
Root XML tag
<orderSummaryInput>

283
Salesforce Order Management in the Chatter Connect API Quantity With Sku Input

JSON example
{
"orderId": "801xx000003GbTgAAK"
}

Properties

Name Type Description Required or Available


Optional Version
name String Specifies an OrderNumber to assign to the Optional 50.0
order summary.

orderId String ID of the original order. Required 48.0

orderLifeCycleType String Specifies whether the order is managed in Optional 49.0


Salesforce Order Management or by an
external system. It can have one of these
values:
• MANAGED—Managed in Salesforce
Order Management.
• UNMANAGED—Managed by an
external system.
If no value is specified, the default is
MANAGED.

status String Specifies a status to assign to the order Optional 50.0


summary. The value must match one of
the picklist values on the Status field of the
OrderSummary object.

SEE ALSO:
Order Summaries

Quantity With Sku Input


A quantity of a product.
Root XML tag
<quantityWithSkuInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
quantity Double Quantity of the product. Required 51.0

284
Salesforce Order Management in the Chatter Connect API Rank Average Distance Input

Name Type Description Required or Available


Optional Version
stockKeepingUnit String SKU of the product. Required 51.0

Rank Average Distance Input


An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.
Root XML tag
<rankAverageDistanceInput>
JSON example

Properties

Name Type Description Required or Available


Optional Version
deliveryCountryCode String The country code of the order recipient. Required 51.0

deliveryPostalCode String The postal code of the order recipient. Required 51.0

distanceUnit String Specify mi or km to return average 51.0


distances in miles or kilometers,
respectively.

sortResult String Specify ASC or DESC to rank the results 51.0


by average shipping distance in ascending
or descending order, respectively.

targetLocations Target Location Each element is a set of inventory locations At least one 51.0
Input[] that can combine to fulfill the order. element is required

Return Items Input


Data about products and delivery charges to return.
Root XML tag
<returnItemsInput>
JSON example
{
"returnOrderItems": [
{
"returnOrderLineItemId": "10uxx0000004GKbAAM",
"quantityReturned": "1",
"quantityToCancel": "0",
"quantityReceived": "1",
"quantityRejected": "0",
"reasonForRejection": "N/A"
}

285
Salesforce Order Management in the Chatter Connect API Return Order Input

],
"returnOrderItemDeliveryCharges": [
{
"returnOrderLineItemId": "10uxx0000004GKbAAP"
}
]
}

Properties

Name Type Description Required or Available


Optional Version
returnOrderItem Return Order Item List of ReturnOrderLineItems to return that Optional 52.0
DeliveryCharges Delivery Charge represent delivery charges.
Input[]

returnOrderItems Return Order Item List of ReturnOrderLineItems to process Required 52.0


Input[] that represent products, along with data
about how to process them.

Return Order Input


Data for creating a ReturnOrder and ReturnOrderLineItems.
Root XML tag
<returnOrderInput>
JSON example
{
"orderSummaryId": "1Osxx0000004EAqCAM",
"status" : "Submitted",
"returnOrderLifeCycleType" : "Unmanaged",
"returnOrderLineItems": [
{
"quantityExpected": "1",
"reasonForReturn": "Not Satisfied",
"canReduceShipping": false,
"orderItemSummaryId": "10uxx0000004GKbAAM",
"quantityReceived": "0"
}
]
}

Properties

Name Type Description Required or Available


Optional Version
orderSummaryId String ID of the OrderSummary containing the Required 50.0
items to be returned. The OrderSummary’s
OrderLifeCycleType must be Managed.

286
Salesforce Order Management in the Chatter Connect API Return Order Item Delivery Charge Input

Name Type Description Required or Available


Optional Version
returnOrder String The LifeCycleType of the ReturnOrder. Required 51.0
LifeCycleType Possible values are:
• Managed—Process the ReturnOrder
using the APIs and actions. It can
generate change orders and affects
financial fields and rollup calculations.
• Unmanaged—The ReturnOrder is for
tracking purposes only. It isn’t involved
in any financial calculations and
doesn’t generate any change orders.
The system doesn’t prevent the
creation of duplicate
ReturnOrderLineItems in an
unmanaged ReturnOrder for the same
OrderItem.

returnOrder Return Order Line List of data for creating At least one 50.0
LineItems Item Input[] ReturnOrderLineItems. element is required

status String Status to assign the ReturnOrder. This value Required 50.0
must match an entry in the ReturnOrder
object’s Status picklist.

Return Order Item Delivery Charge Input


ID of a ReturnOrderLineItem representing a delivery charge.
Root XML tag
<returnOrderItemDeliveryCharge>
JSON example

{
"returnOrderLineItemId": "10uxx0000004GKbAAP"
}

Properties

Name Type Description Required or Available


Optional Version
returnOrderLineItemId String ID of a ReturnOrderLineItem to return. Required 52.0

287
Salesforce Order Management in the Chatter Connect API Return Order Item Input

Return Order Item Input


ID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remaining
quantity to be returned is added to a new ReturnOrderLineItem.
Root XML tag
<returnOrderItem>
JSON example

{
"returnOrderLineItemId": "10uxx0000004GKbAAM",
"quantityReturned": "1",
"quantityToCancel": "0",
"quantityReceived": "1",
"quantityRejected": "0",
"reasonForRejection": "N/A"
}

Properties

Name Type Description Required or Available


Optional Version
quantityReceived Double The quantity of the ReturnOrderLineItem Required 52.0
that has been received. The value must be
zero or greater. This value isn’t used by any
standard features, but is provided for use
in customizations.

quantityRejected Double The quantity of the ReturnOrderLineItem Required 52.0


that has been rejected for return. The value
must be zero or greater. This value isn’t
used by any standard features, but is
provided for use in customizations.

quantityReturned Double The quantity of the ReturnOrderLineItem Required 52.0


that has been returned. The value must be
greater than zero. If this value plus
quantityToCancel is less than the expected
return quantity, then the remaining
quantity to be returned is added to a new
ReturnOrderLineItem.

quantityToCancel Double The quantity of the ReturnOrderLineItem Required 52.0


to remove because it’s not being returned.
The value must be zero or greater. If this
value plus quantityReturned is less than
the expected return quantity, then the
remaining quantity to be returned is added
to a new ReturnOrderLineItem.

288
Salesforce Order Management in the Chatter Connect API Return Order Line Item Input

Name Type Description Required or Available


Optional Version
reasonForRejection String The reason why the rejected quantity, if Optional 52.0
any, was rejected. This value isn’t used by
any standard features, but is provided for
use in customizations.

returnOrder String The ID of the ReturnOrderLineItem. Required 52.0


LineItemId

Return Order Line Item Input


Data for creating a ReturnOrderLineItem.
Root XML tag
<returnOrderLineItem>
JSON example
{
"quantityExpected": "1",
"reasonForReturn": "Not Satisfied",
"canReduceShipping": false,
"orderItemSummaryId": "10uxx0000004GKbAAM",
"quantityReceived": "0"
}

Properties

Name Type Description Required or Available


Optional Version
canReduceShipping Boolean Whether the associated shipping charge Required 50.0
can be refunded.

orderItemSummaryId String ID of the associated OrderItemSummary. Required 50.0

quantityExpected Double Quantity expected to be returned. Required 50.0

quantityReceived Double Quantity already physically returned. Optional 50.0

reasonForReturn String Reason for the return. The value must Optional 50.0
match an entry in the ReturnOrderLineItem
object’s ReasonForReturn picklist.

Target Location Input


A set of inventory locations that together can fulfill an order.
Root XML tag
<targetLocationInput>

289
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Responses

JSON example

Properties

Name Type Description Required or Available


Optional Version
locations Location Input[] A list of locations with information about Required 51.0
their country and postal codes.

Salesforce Order Management Responses


Salesforce Order Management includes these Chatter Connect API responses.

Adjust Order Summary Output


Output representation of the financial changes for an adjust items action. For a preview action, these values are the expected output.
For a submit action, these values are the actual output.
Available Location Output
A set of inventory locations that can combine to fulfill an order.
Average Distance Result Output
Wraps inventory location shipping distance calculation results.
Change Item Output
The financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the
values on the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record.
For example, a discount is a positive value here and a negative value on a change order record.
Create Credit Memo Output
ID of a created Credit Memo.
Create Order Payment Summary Output
ID of the created Order Payment Summary.
Distance Calculation Output
Shipping distance data for a set of inventory locations.
Ensure Funds Async Output
ID of the background operation.
Ensure Refunds Async Output
ID of the background operation.
Error Response Output
Error response representation
Error with Output
Contains extra information about errors. In rare cases, an error message isn't enough to describe the reason for a failure. For example,
when a conflicting precondition exists, the error result can include the information about the cause of the conflict.
Find Routes With Fewest Splits Output
A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.

290
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Responses

Fulfillment Group Output


Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If
the FulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.
Fulfillment Order Cancel Line Items Output
Wraps the base output.
Fulfillment Order Invoice Output
ID of the created invoice.
Fulfillment Order Output
A list of IDs of the created FulfillmentOrders.
Location Output
An inventory location’s distance to an order recipient.
Multiple Fulfillment Order Output
List of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.
OCI Create Reservation Error Output
Error returned from an attempt to create an Omnichannel Inventory reservation.
OCI Create Reservation Output
Result of an Omnichannel Inventory reservation creation request.
OCI Create Reservation Single Output
Details of an inventory reservation for one product.
OCI Fulfill Reservation Error Output
Response to a request to fulfill one inventory reservation.
OCI Fulfill Reservation Output
Response to a request to fulfill one or more inventory reservations.
OCI Fulfill Reservation Single Output
Details of a single fulfilled reservation.
OCI Future Inventory Output
An expected future inventory restock.
OCI Get Inventory Availability Output
Response to a request for inventory availability data.
OCI Inventory Record Output
Inventory availability data for a product.
OCI Location Availability Output
Output representation of one location’s inventory availability
OCI Location Group Availability Output
A set of inventory availability data for one inventory location group.
OCI Publish Location Structure Output
Response to a publish location structure request.
OCI Publish Location Structure Status Output
Detailed status of a publish location structure job.
OCI Release Reservation Error Output
Response to a request to release one inventory reservation.

291
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Responses

OCI Release Reservation Output


Response to a request to release one or more inventory reservations.
OCI Release Reservation Single Output
Details of a single released reservation.
OCI Transfer Reservation Error Output
Response to a request to fulfill one inventory reservation.
OCI Transfer Reservation Output
Response to a request to transfer one or more inventory reservations.
OCI Transfer Reservation Single Output
Details of a single transferred reservation.
OCI Upload Inventory Availability Output
Response to an upload inventory availability job.
OCI Upload Inventory Availability Status Output
Detailed status of an upload inventory availability job.
Order Item Summary Output
Details of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.
Order Summary Output
ID of the created Order Summary.
Preview Cancel Output
Expected financial values for a proposed cancel action.
Preview Return Output
Expected financial values for a proposed return action.
Rank Average Distance Output
The results of calculating the average distances from sets of inventory locations to an order recipient.
Return Items Output
Output of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that were
created to represent remaining return quantities.
Return Order Item Split Line Output
After a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to
return a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it
returns this output property, which contains the IDs of the original and split ReturnOrderLineItems.
Return Order Output
Output representation of the created Return Order.
Submit Cancel Output
ID of the change order created for a cancel action, and a set of its financial values.
Submit Return Output
ID of the change order created for a return action, and a set of its financial values.

292
Salesforce Order Management in the Chatter Connect API Adjust Order Summary Output

Adjust Order Summary Output


Output representation of the financial changes for an adjust items action. For a preview action, these values are the expected output.
For a submit action, these values are the actual output.

Property Name Type Description Filter Group and Available Version


Version
changeBalances Change Item Output Expected (for preview) or actual (for submit) Big, 49.0 49.0
financial values for the price adjustment
action. Most of the values match the change
order values. If two change orders are
returned, then these values combine them.
The sign of a value in this output is the
opposite of the corresponding value on a
change order record. For example, a
discount is a positive value in
changeBalances and a negative value
on a change order record.

errors Error Response Any errors that were returned. Big, 49.0 49.0
Output[]

orderSummaryId String ID of the OrderSummary. Big, 49.0 49.0

postFulfillment String ID of the change Order that holds the Big, 49.0 49.0
ChangeOrderId financial changes applicable to order
products that have been fulfilled. For an
adjustPreview call, this value is always null.

preFulfillment String ID of the change Order that holds the Big, 49.0 49.0
ChangeOrderId financial changes applicable to order
products that have not been fulfilled. For an
adjustPreview call, this value is always null.

success Boolean Indicates whether the transaction was Big, 49.0 49.0
successful.

SEE ALSO:
Order Summaries, Preview Adjust
Order Summaries, Submit Adjust

Available Location Output


A set of inventory locations that can combine to fulfill an order.

Property Name Type Description Filter Group and Available Version


Version
locations String[] A list of inventory locations. Big, 51.0 51.0

293
Salesforce Order Management in the Chatter Connect API Average Distance Result Output

Average Distance Result Output


Wraps inventory location shipping distance calculation results.

Property Name Type Description Filter Group and Available Version


Version
distanceCalculation Distance Calculation Results of the shipping distance calculations. Big, 51.0 51.0
Output

Change Item Output


The financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the values
on the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record. For
example, a discount is a positive value here and a negative value on a change order record.

Property Name Type Description Filter Group and Available Version


Version
grandTotalAmount Double Change to the GrandTotalAmount field. Big, 48.0 48.0

totalAdjDelivery Double Change to the TotalAdjDeliveryAmtWithTax 49.0


AmtWithTax field.

totalAdjDist Double Change to the TotalAdjDistAmountWithTax 49.0


AmountWithTax field.

totalAdjProduct Double Change to the TotalAdjProductAmtWithTax 49.0


AmtWithTax field.

totalAdjusted Double Change to the Big, 48.0 48.0


DeliveryAmount TotalAdjustedDeliveryAmount field.

totalAdjusted Double Change to the Big, 48.0 48.0


DeliveryTax TotalAdjustedDeliveryTaxAmount field.
Amount

totalAdjusted Double Change to the Big, 48.0 48.0


ProductAmount TotalAdjustedProductAmount field.

totalAdjusted Double Change to the Big, 48.0 48.0


ProductTax TotalAdjustedProductTaxAmount field.
Amount

totalAdjustment Double Change to the Big, 48.0 48.0


Distributed TotalAdjustmentDistributedAmount field.
Amount

totalAdjustment Double Change to the Big, 48.0 48.0


Distributed TotalAdjustmentDistributedTaxAmount
TaxAmount field.

totalAmount Double Change to the TotalAmount field. Big, 48.0 48.0

294
Salesforce Order Management in the Chatter Connect API Create Credit Memo Output

Property Name Type Description Filter Group and Available Version


Version
totalExcess Double Amount of excess funds available on the Big, 48.0 48.0
FundsAmount OrderPaymentSummaries related to the
OrderSummary. It is equal to the captured
amount that is owed as a refund but is not
associated with an invoice or credit memo.
Excess funds normally occur when order
items are canceled before fulfillment but
after payment has been captured. This
situation is not common in the US, where
funds are normally authorized but not
captured until the fulfillment process begins.
This value includes all current excess funds
related to the OrderSummary, not only the
funds related to the current change.

totalRefundable Double Total amount available to be refunded. It is Big, 48.0 48.0


Amount the sum of the excess funds and any
outstanding change order grand total
amounts that apply to post-fulfillment
changes. This value includes all current
refundable amounts related to the
OrderSummary, not only the amount related
to the current change.

totalTaxAmount Double Change to the TotalTaxAmount field. Big, 48.0 48.0

SEE ALSO:
Preview Cancel Output
Preview Return Output
Submit Cancel Output
Submit Return Output
Adjust Order Summary Output

Create Credit Memo Output


ID of a created Credit Memo.

Property Name Type Description Filter Group and Available Version


Version
creditMemoId String ID of the created Credit Memo. Big, 48.0 48.0

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

295
Salesforce Order Management in the Chatter Connect API Create Order Payment Summary Output

Property Name Type Description Filter Group and Available Version


Version
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Create Order Payment Summary Output


ID of the created Order Payment Summary.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

orderPayment String ID of the Order Payment Summary. Big, 48.0 48.0


SummaryId

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Distance Calculation Output


Shipping distance data for a set of inventory locations.

Property Name Type Description Filter Group and Available Version


Version
averageDistance Double The average distance from the locations to Big, 51.0 51.0
the order recipient.

locations Location Output[] The list of locations and their distances to Big, 51.0 51.0
the order recipient.

rank Integer This result’s rank among all results by Big, 51.0 51.0
average distance to the order recipient.

Ensure Funds Async Output


ID of the background operation.

Property Name Type Description Filter Group and Available Version


Version
background String ID of the background operation. Big, 48.0 48.0
OperationId

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

296
Salesforce Order Management in the Chatter Connect API Ensure Refunds Async Output

Property Name Type Description Filter Group and Available Version


Version
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Ensure Refunds Async Output


ID of the background operation.

Property Name Type Description Filter Group and Available Version


Version
background String ID of the background operation. Big, 47.0 47.0
OperationId

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Error Response Output


Error response representation

Property Name Type Description Filter Group and Available Version


Version
errorCode String Error code. Small, 48.0 48.0

message String Message stating the reason for error, if any. Small, 48.0 48.0

Error with Output


Contains extra information about errors. In rare cases, an error message isn't enough to describe the reason for a failure. For example,
when a conflicting precondition exists, the error result can include the information about the cause of the conflict.

Property Type Description Filter Group Available


and Version Version
enhancedErrorType String Indicates the type of the output property. This value Small, 39.0 39.0
is either null or:
• GroupMembershipRequestError–A
nested Group Membership Request.

message String Description of the error Small, 29.0 27.0

297
Salesforce Order Management in the Chatter Connect API Find Routes With Fewest Splits Output

Property Type Description Filter Group Available


and Version Version
output Any response body The response body returned by the requested resource. Small, 29.0 27.0
For example, if a successful request returns a Like
response body but an error triggers the Error with
Output response body, the value of the output
property is a Like response body.

Find Routes With Fewest Splits Output


A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 51.0 51.0
Output[]

success Boolean Indicates whether the transaction was Big, 51.0 51.0
successful.

targetLocations Available Location Each element of the list is a set of inventory Big, 51.0 51.0
Output[] locations that together can fulfill the order
being routed.

Fulfillment Group Output


Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If the
FulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 50.0 50.0
Output[]

fulfilledFromLocationId String (Creation failed) The input Big, 50.0 50.0


FulfilledFromLocationId.

fulfillmentOrderId String The FulfillmentOrderId from the successfully Big, 50.0 50.0
created FulfillmentOrder.

fulfillmentType String (Creation failed) The input FulfillmentType. Big, 50.0 50.0

orderDeliveryGroupSummaryId String (Creation failed) The input Big, 50.0 50.0


OrderDeliveryGroupSummaryId.

orderItemSummaries Order Item Summary (Creation failed) The input list of Big, 50.0 50.0
Output[] OrderItemSummaries.

orderSummaryId String (Creation failed) The input OrderSummaryId. Big, 50.0 50.0

298
Salesforce Order Management in the Chatter Connect API Fulfillment Order Cancel Line Items Output

Property Name Type Description Filter Group and Available Version


Version
referenceId String The referenceId from the FulfillmentGroup Big, 50.0 50.0
input representation. Use this value to
troubleshoot a failure.

success Boolean Indicates whether the transaction was Big, 50.0 50.0
successful.

Fulfillment Order Cancel Line Items Output


Wraps the base output.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Fulfillment Order Invoice Output


ID of the created invoice.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

invoiceId String ID of the created invoice. Big, 48.0 48.0

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Fulfillment Order Output


A list of IDs of the created FulfillmentOrders.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

fulfillmentOrder String[] A list of IDs of created Fulfillment Orders. Big, 48.0 48.0
Ids

299
Salesforce Order Management in the Chatter Connect API Location Output

Property Name Type Description Filter Group and Available Version


Version
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Location Output
An inventory location’s distance to an order recipient.

Property Name Type Description Filter Group and Available Version


Version
distance Double The distance from the location to the order Big, 51.0 51.0
recipient.

locationIdentifier String The location identifier. Big, 51.0 51.0

Multiple Fulfillment Order Output


List of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 50.0 50.0
Output[]

fulfillmentOrders Fulfillment Group A list of response data for created and failed Big, 50.0 50.0
Output[] FulfillmentOrders.

success Boolean Indicates whether the transaction was Big, 50.0 50.0
successful.

OCI Create Reservation Error Output


Error returned from an attempt to create an Omnichannel Inventory reservation.

Property Name Type Description Filter Group and Available Version


Version
errorCode String The error code. Small, 51.0 51.0

message String Details of the error, if available. Small, 51.0 51.0

OCI Create Reservation Output


Result of an Omnichannel Inventory reservation creation request.

300
Salesforce Order Management in the Chatter Connect API OCI Create Reservation Single Output

Property Name Type Description Filter Group and Available Version


Version
details OCI Create Details for each product in the reservation. Small, 51.0 51.0
Reservation Single
Output[]

errors OCI Create Any errors returned by the reservation Big, 51.0 51.0
Reservation Error request.
Output[]

expirationTime String The time at which the reservation would Small, 51.0 51.0
expire.

reservationTime String The time when the reservation was Small, 51.0 51.0
recorded.

success Boolean Indicates whether the reservation was Big, 51.0 51.0
successfully created.

OCI Create Reservation Single Output


Details of an inventory reservation for one product.

Property Name Type Description Filter Group and Available Version


Version
errorCode String The error code, if any. Small, 51.0 51.0

locationGroupIdentifier String Identifier of the location group where the Small, 51.0 51.0
inventory is reserved.

locationIdentifier String Identifier of the location where the Small, 51.0 51.0
inventory is reserved.

quantity Double The reserved quantity of the product. Small, 51.0 51.0

stockKeepingUnit String The SKU of the reserved product. Small, 51.0 51.0

OCI Fulfill Reservation Error Output


Response to a request to fulfill one inventory reservation.

Property Name Type Description Filter Group and Available Version


Version
details OCI Fulfill Details of the fulfilled reservation, if Small, 51.0 51.0
Reservation Single successful.
Output

errorCode String Error code, if any. Small, 51.0 51.0

message String Details of the error, if available. Small, 51.0 51.0

301
Salesforce Order Management in the Chatter Connect API OCI Fulfill Reservation Output

OCI Fulfill Reservation Output


Response to a request to fulfill one or more inventory reservations.

Property Name Type Description Filter Group and Available Version


Version
errors OCI Fulfill Responses for the individual reservations in Big, 51.0 51.0
Reservation Error the fulfillment request.
Output[]

success Boolean Indicates whether the request was Big, 51.0 51.0
successful.

OCI Fulfill Reservation Single Output


Details of a single fulfilled reservation.

Property Name Type Description Filter Group and Available Version


Version
actionRequestId String The UUID that identifies the original fulfill Small, 51.0 51.0
reservation request.

externalRefId String The external reference ID of the location that Small, 51.0 51.0
fulfilled the reservation.

locationIdentifier String The identifier of the location that fulfilled Small, 51.0 51.0
the reservation.

quantity Double The fulfilled quantity. Small, 51.0 51.0

stockKeepingUnit String The SKU of the fulfilled product. Small, 51.0 51.0

OCI Future Inventory Output


An expected future inventory restock.

Property Name Type Description Filter Group and Available Version


Version
expectedDate String Date when the future inventory is expected. Big, 51.0 51.0

quantity Double Quantity of the future inventory. Big, 51.0 51.0

OCI Get Inventory Availability Output


Response to a request for inventory availability data.

302
Salesforce Order Management in the Chatter Connect API OCI Inventory Record Output

Property Name Type Description Filter Group and Available Version


Version
locationGroups OCI Location Group A list of inventory availability data for Big, 51.0 51.0
Availability Output[] individual location groups.

locations OCI Location A list of inventory availability data for Big, 51.0 51.0
Availability Output[] individual locations.

OCI Inventory Record Output


Inventory availability data for a product.

Property Name Type Description Filter Group and Available Version


Version
availableToFulfill Double The Available To Fulfill quantity. Big, 51.0 51.0

availableToOrder Double The Available To Order quantity. Big, 51.0 51.0

effectiveDate String The effective date of the inventory. Big, 51.0 51.0

futures OCI Future Inventory A list of any expected future inventory Big, 51.0 51.0
Output[] restocks.

onHand Double The On Hand quantity. Big, 51.0 51.0

reserved Double The Reserved quantity. Big, 51.0 51.0

safetyStockCount Double The Safety Stock Count. Big, 51.0 51.0

stockKeepingUnit String The SKU of the product. Big, 51.0 51.0

OCI Location Availability Output


Output representation of one location’s inventory availability

Property Name Type Description Filter Group and Available Version


Version
inventoryRecords OCI Inventory Record The Inventory Records Big, 51.0 51.0
Output[]

locationIdentifier String The Location Identifier Big, 51.0 51.0

OCI Location Group Availability Output


A set of inventory availability data for one inventory location group.

303
Salesforce Order Management in the Chatter Connect API OCI Publish Location Structure Output

Property Name Type Description Filter Group and Available Version


Version
inventoryRecords OCI Inventory Record A list of availability data for individual Big, 51.0 51.0
Output[] products. The data combines the quantities
for all locations belonging to this location
group.

locationGroupIdentifier String The identifier of the location group. Big, 51.0 51.0

OCI Publish Location Structure Output


Response to a publish location structure request.

Property Name Type Description Filter Group and Available Version


Version
uploadId String Identifier of the publish job. Use this value Big, 51.0 51.0
to retrieve the status of the job.

OCI Publish Location Structure Status Output


Detailed status of a publish location structure job.

Property Name Type Description Filter Group and Available Version


Version
endTimeUTC String The UTC time when the job finished. (for Big, 51.0 51.0
example: "2020-07-06T22:54:08.012Z")

recordsProcessedCount Integer The number of records processed by the Big, 51.0 51.0
job.

recordsReadCount Integer The number of records read by the job. Big, 51.0 51.0

recordsSkippedCount Integer The number of records skipped by the job. Big, 51.0 51.0

startTimeUTC String The UTC time when the job started. (for Big, 51.0 51.0
example: "2020-07-06T22:53:06.788Z")

status String The status of the job. (e.g., "PENDING," Big, 51.0 51.0
"COMPLETED," etc.).

uploadId String Identifier of the job. Big, 51.0 51.0

validationErrors String[] List of any validation errors returned by the Big, 51.0 51.0
job.

validationStatus String The validation status of the job. Big, 51.0 51.0

304
Salesforce Order Management in the Chatter Connect API OCI Release Reservation Error Output

OCI Release Reservation Error Output


Response to a request to release one inventory reservation.

Property Name Type Description Filter Group and Available Version


Version
details OCI Release Details of the released reservation, if Small, 51.0 51.0
Reservation Single successful.
Output

errorCode String Error code, if any. Small, 51.0 51.0

message String Details of the error, if available. Small, 51.0 51.0

OCI Release Reservation Output


Response to a request to release one or more inventory reservations.

Property Name Type Description Filter Group and Available Version


Version
errors OCI Release Responses for the individual reservations in Big, 51.0 51.0
Reservation Error the release request.
Output[]

success Boolean Indicates whether the request was Big, 51.0 51.0
successful.

OCI Release Reservation Single Output


Details of a single released reservation.

Property Name Type Description Filter Group and Available Version


Version
actionRequestId String The UUID that identifies the original release Small, 51.0 51.0
reservation request.

externalRefId String The external reference ID of the location that Small, 51.0 51.0
released the reservation.

locationGroupIdentifier String The identifier of the location group that Small, 51.0 51.0
released the reservation.

locationIdentifier String The identifier of the location that released Small, 51.0 51.0
the reservation.

quantity Double The released quantity. Small, 51.0 51.0

stockKeepingUnit String The SKU of the released product. Small, 51.0 51.0

305
Salesforce Order Management in the Chatter Connect API OCI Transfer Reservation Error Output

OCI Transfer Reservation Error Output


Response to a request to fulfill one inventory reservation.

Property Name Type Description Filter Group and Available Version


Version
details OCI Transfer Details of the transferred reservation, if Small, 51.0 51.0
Reservation Single successful.
Output

errorCode String Error code, if any. Small, 51.0 51.0

message String Details of the error, if available. Small, 51.0 51.0

OCI Transfer Reservation Output


Response to a request to transfer one or more inventory reservations.

Property Name Type Description Filter Group and Available Version


Version
errors OCI Transfer Responses for the individual reservations in Big, 51.0 51.0
Reservation Error the transfer request.
Output[]

success Boolean Indicates whether the request was Big, 51.0 51.0
successful.

OCI Transfer Reservation Single Output


Details of a single transferred reservation.

Property Name Type Description Filter Group and Available Version


Version
actionRequestId String The UUID that identifies the original transfer Small, 51.0 51.0
reservation request.

externalRefId String The external reference ID of the location that Small, 51.0 51.0
received the reservation.

fromLocationGroupIdentifier String The identifier of the location group that sent Small, 51.0 51.0
the reservation.

fromLocationIdentifier String The identifier of the location that sent the Small, 51.0 51.0
reservation.

ignoreAvailabilityCheck Boolean Whether this call ignored availability data Small, 52.0 52.0
at the location that received the reservation.

quantity Double The quantity of transferred inventory. Small, 51.0 51.0

306
Salesforce Order Management in the Chatter Connect API OCI Upload Inventory Availability Output

Property Name Type Description Filter Group and Available Version


Version
stockKeepingUnit String The SKU of the transferred product. Small, 51.0 51.0

toLocationGroupIdentifier String The identifier of the location group that Small, 51.0 51.0
received the reservation.

toLocationIdentifier String The identifier of the location that received Small, 51.0 51.0
the reservation.

OCI Upload Inventory Availability Output


Response to an upload inventory availability job.

Property Name Type Description Filter Group and Available Version


Version
uploadId String Identifier of the upload job. Use this value Big, 51.0 51.0
to retrieve the status of the job.

OCI Upload Inventory Availability Status Output


Detailed status of an upload inventory availability job.

Property Name Type Description Filter Group and Available Version


Version
endTimeUTC String The UTC time when the job finished. (for Big, 51.0 51.0
example: "2020-07-06T22:54:08.012Z")

recordsProcessedCount Integer The number of records processed by the Big, 51.0 51.0
job.

recordsReadCount Integer The number of records read by the job. Big, 51.0 51.0

recordsSkippedCount Integer The number of records skipped by the job. Big, 51.0 51.0

startTimeUTC String Big, 51.0 51.0

status String The status of the job. (e.g., "PENDING," Big, 51.0 51.0
"COMPLETED," etc.).

uploadId String Identifier of the job. Big, 51.0 51.0

validationErrors String[] List of any validation errors returned by the Big, 51.0 51.0
job.

validationStatus String The validation status of the job. Big, 51.0 51.0

307
Salesforce Order Management in the Chatter Connect API Order Item Summary Output

Order Item Summary Output


Details of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response List of errors specific to the Big, 50.0 50.0
Output[] OrderItemSummary, if any.

orderItemSummaryId String ID of the OrderItemSummary. Big, 50.0 50.0

quantity Double Quantity of the OrderItemSummary. Big, 50.0 50.0

Order Summary Output


ID of the created Order Summary.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

orderSummaryId String ID of the Order Summary. Big, 48.0 48.0

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Preview Cancel Output


Expected financial values for a proposed cancel action.

Property Name Type Description Filter Group and Available Version


Version
changeBalances Change Item Output Expected financial values for the proposed Big, 48.0 48.0
cancel action.

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

orderSummaryId String ID of the OrderSummary. Big, 48.0 48.0

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Preview Return Output


Expected financial values for a proposed return action.

308
Salesforce Order Management in the Chatter Connect API Rank Average Distance Output

Property Name Type Description Filter Group and Available Version


Version
changeBalances Change Item Output Expected financial values for the proposed Big, 48.0 48.0
return action.

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

orderSummaryId String ID of the OrderSummary. Big, 48.0 48.0

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Rank Average Distance Output


The results of calculating the average distances from sets of inventory locations to an order recipient.

Property Name Type Description Filter Group and Available Version


Version
distanceUnit String The specified unit of distance (miles or Big, 51.0 51.0
kilometers).

errors Error Response Any errors that were returned. Big, 51.0 51.0
Output[]

results ConnectApR.iesutlOutputRepresentatoi n[] The results of the shipping distance Big, 51.0 51.0
calculations.

success Boolean Indicates whether the transaction was Big, 51.0 51.0
successful.

Return Items Output


Output of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that were
created to represent remaining return quantities.

Property Name Type Description Filter Group and Available Version


Version
changeOrderId String ID of the change order representing the Big, 52.0 52.0
ReturnOrderLineItem processing performed
by this call.

errors Error Response Any errors that were returned. Big, 52.0 52.0
Output[]

returnLineItem Return Order Item A list of properties representing any Big, 52.0 52.0
Splits Split Line Output[] remaining quantities from partial returns
processed by this call. Each element of the
list includes the ID of a split

309
Salesforce Order Management in the Chatter Connect API Return Order Item Split Line Output

Property Name Type Description Filter Group and Available Version


Version
ReturnOrderLineItem and the ID of the
partially processed ReturnOrderLineItem
whose remaining quantity it holds.

success Boolean Indicates whether the transaction was Big, 52.0 52.0
successful.

Return Order Item Split Line Output


After a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to return
a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it returns this
output property, which contains the IDs of the original and split ReturnOrderLineItems.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 52.0 52.0
Output[]

new String ID of the new ReturnOrderLineItem that Big, 52.0 52.0


ReturnOrderItemId holds the remaining return quantity.

original String ID of the original ReturnOrderLineItem. Big, 52.0 52.0


ReturnOrderItemId

success Boolean Indicates whether the transaction was Big, 52.0 52.0
successful.

Return Order Output


Output representation of the created Return Order.

Property Name Type Description Filter Group and Available Version


Version
errors Error Response Any errors that were returned. Big, 52.0 50.0
Output[]

returnOrderId String A newly created Return Order ID Big, 50.0 50.0

success Boolean Indicates whether the transaction was Big, 52.0 50.0
successful.

Submit Cancel Output


ID of the change order created for a cancel action, and a set of its financial values.

310
Salesforce Order Management in the Chatter Connect API Submit Return Output

Property Name Type Description Filter Group and Available Version


Version
changeBalances Change Item Output Financial values resulting from the cancel. Big, 48.0 48.0

changeOrderId String ID of the created change order. Big, 48.0 48.0

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

Submit Return Output


ID of the change order created for a return action, and a set of its financial values.

Property Name Type Description Filter Group and Available Version


Version
changeBalances Change Item Output Financial values resulting from the return. Big, 48.0 48.0

changeOrderId String ID of the created change order. Big, 48.0 48.0

errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]

success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.

311
CHAPTER 5 Order Management Invocable Actions
In this chapter ... Salesforce Order Management provides standard invocable actions to support order management
functionality.
• Salesforce Order
Management
Actions
• Flow Core Action for
Order Management:
Adjust Order Item
Summaries Preview
• Flow Core Action for
Order Management:
Adjust Order Item
Summaries Submit
• Flow Core Action for
Order Management:
Cancel Fulfillment
Order Item
• Flow Core Action for
Order Management:
Cancel Order Item
Summaries Preview
• Flow Core Action for
Order Management:
Cancel Order Item
Summaries Submit
• Flow Core Action for
Order Management:
Create Credit Memo
• Flow Core Action for
Order Management:
Create Fulfillment
Order
• Flow Core Action for
Order Management:
Create an Invoice
from Fulfillment
Order
• Flow Core Action for
Order Management:

312
Order Management Invocable Actions

Create Order
Payment Summary
• Flow Core Action for
Order Management:
Create Order
Summary
• Flow Core Action for
Order Management:
Create Return Order
• Flow Core Action for
Order Management:
Ensure Funds Async
• Flow Core Action for
Order Management:
Ensure Refunds
Async
• Flow Core Action for
Order Management:
Return Order Item
Summaries Preview
• Flow Core Action for
Order Management:
Return Order Item
Summaries Submit
• Flow Core Action for
Order Management:
Return Return Order
Items

313
Order Management Invocable Actions Salesforce Order Management Actions

Salesforce Order Management Actions


Manage, fulfill, and service orders in flows with Salesforce Order Management.
For more information about using Order Management actions in flows, see Salesforce Order Management Flow Core Actions in Salesforce
Help.
These actions are available in API version 48.0 and later.
Your org must have a Salesforce Order Management license.

Supported REST HTTP Methods


URI
Get a specific Order Management action:
/services/data/vXX.X/actions/standard/om_action_name
Formats
JSON, XML
HTTP Methods
GET
Authentication
Authorization: Bearer token
Notes
You can also call the corresponding Connect REST API endpoints or Apex ConnectApi methods. For more information, see Order
Management Resources in the Connect REST API Developer Guide and ConnectApi Namespace in the Apex Developer Guide.
In flows, Order Management action inputs and outputs use Apex-defined variables that map to input and output classes in the
ConnectApi namespace.

Flow Core Action for Order Management: Adjust Order Item Summaries
Preview
Preview the expected results of adjusting the price of one or more order product summaries on an
EDITIONS
order summary, without executing the adjustment. You can only apply a discount, not an increase.
The output of this action contains the values that would be set on the change orders created by Available in: Lightning
submitting the proposed adjustment. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Adjust Order Item Summaries Preview.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Order Summary ID of the order summary associated with the order product summaries that you want to preview adjusting the
Id prices of.

314
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Preview

Input Parameter Description


Adjust Order This input is an Apex-defined variable of class ConnectApi.AdjustOrderItemSummaryInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined variables of class
Summaries ConnectApi.AdjustItemInputRepresentation. Each of the variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to preview a price adjustment for.
• description — Optional description of the adjustment.
• adjustmentType — Describes how the adjustment amount is calculated. It can have one of these
values:
– AmountWithTax—The value of discountValue is the adjustment, including tax.
– AmountWithoutTax—The value of discountValue is the adjustment, not including tax. Tax
is calculated on the value and added.
– Percentage—The value of discountValue is a percentage discount. It is divided by 100, and
then multiplied by the total price and total tax amount of the order product summary to determine
the adjustment amount.

• discountValue — The value used to calculate the adjustment amount, as described by the
adjustmentType. It must be a negative value.
• reason — Adjustment reason. The value must match one of the picklist values on the Reason field of
the Order Product Summary Change object.

Store Output Values


Output Parameter Description
Adjust Order This output is an Apex-defined variable of class ConnectApi.AdjustOrderSummaryOutputRepresentation, which
Product contains the financial changes that would result from the proposed adjustment. Most of the values represent
Summary Output the deltas of the values on the associated order summary.

Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.

315
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Submit

Output Parameter Description


• totalAdjustmentDistributedAmount — Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
• totalAmount — Change to the pretax total.
• totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It is equal to the captured amount that is owed as a refund but
is not associated with an invoice or credit memo. Excess funds normally occur when order products are
canceled before fulfillment but after payment has been captured. This situation is not common in the US,
where funds are normally authorized but not captured until the fulfillment process begins. This value
includes all excess funds related to the order summary, not only the funds related to the current action.
• totalRefundableAmount — The total amount available to be refunded. It is the sum of the excess
funds and any outstanding change order grand total amounts that apply to post-fulfillment changes. This
value includes all refundable amounts related to the order summary, not only the amount related to the
current action.
• totalTaxAmount — Change to the total tax.
The postFulfillmentChangeOrderId field is always null for a preview action.
The preFulfillmentChangeOrderId field is always null for a preview action.

Usage
To set up the Adjust Order Product Summaries Input:
1. Use Assignment elements to set the orderItemSummaryId, description, adjustmentType, discountValue,
and reason field values on one or more ConnectApi.AdjustItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.AdjustItemInputRepresentation variables to the
changeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.
3. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID in
the action input.
In a flow for adjusting the prices of order product summaries, display the output of this action for the user to review before executing
the adjustment. When the user verifies the expected results, pass the same input to an Adjust Order Item Summaries Submit action.

Flow Core Action for Order Management: Adjust Order Item Summaries
Submit
Adjust the price of one or more order product summaries on an order summary. You can only apply
EDITIONS
a discount, not an increase. This action creates one or two change order records.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Adjust Order Item Summaries Submit. Experience

Available in: Enterprise,


Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management

316
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Submit

Input Parameter Description


Order Summary ID of the order summary associated with the order product summaries that you want to adjust the prices of.
Id

Adjust Order This input is an Apex-defined variable of class ConnectApi.AdjustOrderItemSummaryInputRepresentation.


Product The variable has one field, changeItems. This field is a list of Apex-defined variables of class
Summaries ConnectApi.AdjustItemInputRepresentation. Each of the variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to adjust the price of.
• description — Optional description of the adjustment.
• adjustmentType — Describes how the adjustment amount is calculated. It can have one of these
values:
– AmountWithTax—The value of discountValue is the adjustment, including tax.
– AmountWithoutTax—The value of discountValue is the adjustment, not including tax. Tax
is calculated on the value and added.
– Percentage—The value of discountValue is a percentage discount. It is divided by 100, and
then multiplied by the total price and total tax amount of the order product summary to determine
the adjustment amount.

• discountValue — The value used to calculate the adjustment amount, as described by the
adjustmentType. It must be a negative value.
• reason — Adjustment reason. The value must match one of the picklist values on the Reason field of
the Order Product Summary Change object.

Store Output Values


Output Parameter Description
Adjust Order This output is an Apex-defined variable of class ConnectApi.AdjustOrderSummaryOutputRepresentation.
Product Depending on the order product summaries included in the adjustment, one or two change orders are
Summary Output generated. If two change orders are generated, then the changeBalances values combine the values
from both of them.

Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.

317
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Submit

Output Parameter Description


• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount — Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
• totalAmount — Change to the pretax total.
• totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It is equal to the captured amount that is owed as a refund but
is not associated with an invoice or credit memo. Excess funds normally occur when order products are
canceled before fulfillment but after payment has been captured. This situation is not common in the US,
where funds are normally authorized but not captured until the fulfillment process begins. This value
includes all excess funds related to the order summary, not only the funds related to the current action.
• totalRefundableAmount — The total amount available to be refunded. It is the sum of the excess
funds and any outstanding change order grand total amounts that apply to post-fulfillment changes. This
value includes all refundable amounts related to the order summary, not only the amount related to the
current action.
• totalTaxAmount — Change to the total tax.
The postFulfillmentChangeOrderId is the ID of the change order representing the portion of the
adjustment that was applied to order product summaries that have been fulfilled.
The preFulfillmentChangeOrderId is the ID of the change order representing the portion of the
adjustment that was applied to order product summaries that have not been fulfilled.

Usage
To set up the Adjust Order Product Summaries Input:
1. Use Assignment elements to set the orderItemSummaryId, description, adjustmentType, discountValue,
and reason field values on one or more ConnectApi.AdjustItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.AdjustItemInputRepresentation variables to the
changeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.
3. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID in
the action input.
In a flow for adjusting the prices of order product summaries, run an Adjust Order Item Summaries Preview action before running this
action. Then display its output for the user to review. When the user verifies the expected results, pass the same input to this action.
After submitting a price adjustment, process refunds as appropriate:
• If the discount only applied to order product summaries for which payment has not been captured, it does not require a refund.
This situation normally applies to order products in the US that have not been fulfilled.
• If the discount applied to order product summaries that have not been fulfilled and for which payment has been captured, process
a refund. In this case, pass the totalExcessFundsAmount from changeBalances to the Ensure Refunds Async action.
• If the discount applied to order product summaries that have been fulfilled, process a refund. Pass the
postFulfillmentChangeOrderId to the Create Credit Memo action, then pass the credit memo to the Ensure Refunds
Async action.

318
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Fulfillment
Order Item

• If the discount applied to both fulfilled and unfulfilled order product summaries for which payment has been captured, process both
refunds. Pass the postFulfillmentChangeOrderId to the Create Credit Memo action, then pass the credit memo and
the totalExcessFundsAmount from changeBalances to the Ensure Refunds Async action.

Important: Excess funds are not reduced until the payment processor issues a refund. If you don’t process refunds promptly,
subsequent refunds can be inaccurate. Consider the following example.
1. An order with a total amount of $100 is placed, and the amount is captured immediately.
2. A product is canceled from the order, resulting in $20 of excess funds.
3. Before the excess funds are sent to the payment provider in an ensure refunds action, another product is canceled. This
cancellation adds another $20 of excess funds. However, because the original $20 hasn’t been refunded yet, the cancel action
returns a total excess funds amount of $40.
4. The first excess funds amount ($20) is sent to the payment provider in an ensure refunds request.
5. The second excess funds amount ($40) is sent to the payment provider in an ensure refunds request.
6. The payment provider receives requests for $60 of refunds, when the correct refund total is $40. Because the total refund
amount is less than the total captured amount of $100, the payment provider issues $60 in refunds.

Flow Core Action for Order Management: Cancel Fulfillment Order Item
Cancel fulfillment order products from a fulfillment order. You can cancel more than one product,
EDITIONS
and specify a quantity to cancel for each of them. This action doesn’t cancel the associated order
product summaries; it only reduces their allocated quantities. Usually, you reallocate the canceled Available in: Lightning
quantities to a new fulfillment order. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Cancel Fulfillment Order Item.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Cancel This input is an Apex-defined variable of class ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation.
Fulfillment The variable has one field, fulfillmentOrderLineItemsToCancel, which is a list of Apex-defined
Order Items variables of class ConnectApi.FulfillmentOrderLineItemInputRepresentation. Each of those variables includes
Input these fields:
• fulfillmentOrderLineItemId — Reference to the fulfillment order product to cancel.
• quantity — Quantity to cancel.

Fulfillment Reference to the fulfillment order that you want to cancel fulfillment order items from.
Order Id

319
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Preview

Store Output Values


Output Parameter Description
Cancel This value is an Apex-defined variable of class
Fulfillment ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation.
Order Items This action doesn’t return any data.
Output

Usage
To set up the Cancel Fulfillment Order Items Input, first use Assignment elements to set the fulfillmentOrderLineItemId
and quantity field values on one or more ConnectApi.FulfillmentOrderLineItemInputRepresentation
variables. Then use an Assignment element to add those variables to the FulfillmentOrderLineItemsToCancel field on
a ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation variable. Use that variable in the
action input.

Flow Core Action for Order Management: Cancel Order Item Summaries
Preview
Preview the expected results of canceling one or more order product summaries from an order
EDITIONS
summary without executing the cancel. The output of this action contains the values that would
be set on the change order created by submitting the proposed cancel. Available in: Lightning
Drag an Action element onto the canvas. Select the Order Management category, and search for Experience
Cancel Order Item Summaries Preview.
Available in: Enterprise,
Unlimited, and Developer
Editions with Salesforce
Set Input Values Order Management
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Cancel Order This input is an Apex-defined variable of class ConnectApi.ChangeInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined variables of class
Summary Items ConnectApi.ChangeItemInputRepresentation. Each of the variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to cancel. It can’t be a shipping charge
product.
• quantity — Quantity to cancel.
• reason — Cancel reason. The value must match one of the picklist values on the Reason field of the
Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to prorate any related delivery
charge based on the price change.

Order Summary Reference to the order summary that you want to preview canceling order product summaries from.
Id

320
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Preview

Store Output Values


Output Parameter Description
Cancel Order This output is an Apex-defined variable of class ConnectApi.PreviewCancelOutputRepresentation, which
Product contains the values that would populate a change order record for the proposed cancel.
Summary Output
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount — Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
• totalAmount — Change to the pretax total.
• totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It is equal to the captured amount that is owed as a refund but
is not associated with an invoice or credit memo. Excess funds normally occur when order products are
canceled before fulfillment but after payment is captured. This situation is not common in the US, where
funds are normally authorized but not captured until the fulfillment process begins. This value includes all
excess funds related to the order summary, not only the funds related to the current action.
• totalRefundableAmount — The total amount available to be refunded. It is the sum of the excess
funds and any outstanding change order grand total amounts that apply to post-fulfillment changes. This
value includes all refundable amounts related to the order summary, not only the amount related to the
current action.
• totalTaxAmount — Change to the total tax.

Usage
To set up the Cancel Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.

321
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Submit

3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for canceling order product summaries, display the output of this action for the user to review before executing the cancel.
When the user verifies the expected results, pass the same input to a Cancel Order Item Summaries Submit action.

Flow Core Action for Order Management: Cancel Order Item Summaries
Submit
Cancel one or more order product summaries from an order summary. This action creates a change
EDITIONS
order record.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Cancel Order Item Summaries Submit. Experience

Available in: Enterprise,


Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management

Input Description
Parameter
Cancel This input is an Apex-defined variable of class
Order ConnectApi.ChangeInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined
Summary variables of class ConnectApi.ChangeItemInputRepresentation. Each of the
Items variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to cancel.
It can’t be a shipping charge product.
• quantity — Quantity to cancel.
• reason — Cancel reason. The value must match one of the picklist values
on the Reason field of the Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to
prorate any related delivery charge based on the price change.

Order Reference to the order summary that you want to cancel order product summaries
Summary from.
Id

Store Output Values


Output Parameter Description
Cancel Order This output is an Apex-defined variable of class ConnectApi.SubmitCancelOutputRepresentation.
Product
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
Summary Output
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.

322
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Submit

Output Parameter Description


The changeOrderId field is the ID of the change order record created for the cancel.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount — Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
• totalAmount — Change to the pretax total.
• totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It is equal to the captured amount that is owed as a refund but
is not associated with an invoice or credit memo. Excess funds normally occur when order products are
canceled before fulfillment but after payment is captured. This situation is not common in the US, where
funds are normally authorized but not captured until the fulfillment process begins. This value includes all
excess funds related to the order summary, not only the funds related to the current action.
• totalRefundableAmount — The total amount available to be refunded. It is the sum of the excess
funds and any outstanding change order grand total amounts that apply to post-fulfillment changes. This
value includes all refundable amounts related to the order summary, not only the amount related to the
current action.
• totalTaxAmount — Change to the total tax.

Usage
To set up the Cancel Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for canceling order product summaries, run a Cancel Order Item Summaries Preview action before running this action. Then
display its output for the user to review. When the user verifies the expected results, pass the same input to this action.

323
Order Management Invocable Actions Flow Core Action for Order Management: Create Credit Memo

Flow Core Action for Order Management: Create Credit Memo


Create a credit memo to represent the refund for one or more change orders associated with an
EDITIONS
order summary.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Create Credit Memo. Experience

Available in: Enterprise,


Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management

Input Description
Parameter
Credit This input is an Apex-defined variable of class
Memo ConnectApi.CreateCreditMemoInputRepresentation.
Input The variable has one field, changeOrderIds, which is a list of IDs of the
change orders to create a credit memo for.

Order Reference to the order summary associated with the change orders.
Summary
Id

Store Output Values


Output Parameter Description
Credit Memo This value is an Apex-defined variable of class ConnectApi.CreateCreditMemoOutputRepresentation.
Output The creditMemoId field contains the ID of the created credit memo.

Usage
To set up the Credit Memo Input, first use Assignment elements to add the change order IDs to a list of strings variable. Then use that
variable in the action input.

324
Order Management Invocable Actions Flow Core Action for Order Management: Create Fulfillment
Order

Flow Core Action for Order Management: Create Fulfillment Order


Create one or more fulfillment orders and fulfillment order products for an order delivery group
EDITIONS
summary, which defines a recipient and delivery method. You specify the order product summaries
to fulfill and the fulfillment locations to handle them. If you specify multiple fulfillment locations, a Available in: Lightning
fulfillment order is created for each one. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Create Fulfillment Order.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Fulfillment This input is an Apex-defined variable of class ConnectApi.FulfillmentOrderInputRepresentation.
Order Input The variable has three fields:
• fulfillmentGroups — A list of Apex-defined variables of class
ConnectApi.FulfillmentGroupInputRepresentation. A fulfillment order is created for each fulfillment group.
A group represents a set of order product summaries to fulfill from a single location, using the same fulfillment
type. Each fulfillment group variable has these fields:
– fulfilledFromLocationId — Reference to the fulfillment location.
– fulfillmentType — The fulfillment type. Specify one of the values you’ve defined for the Type
field picklist on the Fulfillment Order object.
– orderItemSummaries — A list of Apex-defined variables of class
ConnectApi.OrderItemSummaryInputRepresentation. Each variable has these fields:
• orderItemSummaryId — Reference to an order product summary.
• quantity — The quantity of the order product summary to allocate to the fulfillment order.

– referenceId — Reference to the fulfillment group input. This action doesn’t use this value.

• orderDeliveryGroupSummaryId — Reference to the order delivery group summary associated


with the order product summaries.
• orderSummaryId — Reference to the order summary associated with the order product summaries.

Store Output Values


Output Parameter Description
Fulfillment This value is an Apex-defined variable of class ConnectApi.FulfillmentOrderOutputRepresentation.
Order Output The fulfillmentOrderIds field is a list of IDs of the created fulfillment orders.

325
Order Management Invocable Actions Flow Core Action for Order Management: Create an Invoice
from Fulfillment Order

Usage
To set up the Fulfillment Order Input:
1. Use Assignment elements to set the orderItemSummaryId and quantity field values on one or more
ConnectApi.OrderItemSummaryInputRepresentation variables for each fulfillment group.
2. Use Assignment elements to add the ConnectApi.OrderItemSummaryInputRepresentation variables to the
orderItemSummaries fields on one or more ConnectApi.FulfillmentGroupInputRepresentation variables,
one for each fulfillment group.
3. Use Assignment elements to set the fulfilledFromLocationId and fulfillmentType field values on the fulfillment
group variables.
4. Use Assignment elements to add the fulfillment group variables to the fulfillmentGroups field on a
ConnectApi.FulfillmentOrderInputRepresentation variable.
5. Use Assignment elements to set the orderDeliveryGroupSummaryId and orderSummaryId field values on the
ConnectApi.FulfillmentOrderInputRepresentation variable.
6. Use the ConnectApi.FulfillmentOrderInputRepresentation variable in the action input.

Flow Core Action for Order Management: Create an Invoice from


Fulfillment Order
Create an invoice for a fulfillment order that doesn’t have one.
EDITIONS
Drag an Action element onto the canvas. Select the Order Management category, and search for
Create an Invoice from Fulfillment Order. Available in: Lightning
Experience

Set Input Values Available in: Enterprise,


Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management
Input Description
Parameter
Fulfillment Reference to the fulfillment order that needs an invoice.
Order Id

Store Output Values


Output Parameter Description
Invoice This value is an Apex-defined variable of class ConnectApi.FulfillmentOrderInvoiceOutputRepresentation.
creation The invoiceId field contains the ID of the created invoice.
output

326
Order Management Invocable Actions Flow Core Action for Order Management: Create Order
Payment Summary

Flow Core Action for Order Management: Create Order Payment


Summary
Create an order payment summary for a payment authorization or payments that use the same
EDITIONS
payment method and are attached to the same order summary.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Create Order Payment Summary. Experience

Available in: Enterprise,


Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Include at least one payment authorization or Order Management
list of payments; you don’t need both.

Input Parameter Description


Order Payment This input is an Apex-defined variable of class ConnectApi.CreateOrderPaymentSummaryInputRepresentation.
Summary The variable includes these fields:
Create Input
• orderSummaryId — Reference to the order summary associated with the payments. In orgs with the
multicurrency feature enabled, the order payment summary inherits the ISO Currency value from
the order summary.
• paymentAuthorizationId — Reference to the payment authorization to associate with the
summary.
• paymentIds — List of IDs of the payments to associate with the summary.

Store Output Values


Output Parameter Description
Order Payment This value is an Apex-defined variable of class ConnectApi.CreateOrderPaymentSummaryOutputRepresentation.
Summary Output The orderPaymentSummaryId field contains the ID of the created order payment summary.

Usage
To set up the Order Payment Summary Create Input for payments, first use Assignment elements to add the payment IDs to a list of
strings variable. Then use that variable in the action input.

327
Order Management Invocable Actions Flow Core Action for Order Management: Create Order
Summary

Flow Core Action for Order Management: Create Order Summary


Create an order summary based on an order. That order is considered the original order for the
EDITIONS
order summary. Subsequent change orders that apply to the order summary are also represented
as order records. Available in: Lightning
Drag an Action element onto the canvas. Select the Order Management category, and search for Experience
Create Order Summary.
Available in: Enterprise,
Unlimited, and Developer
Editions with Salesforce
Set Input Values Order Management
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Order Summary This input is an Apex-defined variable of class ConnectApi.OrderSummaryInputRepresentation.
Create Input The variable has four fields:

• name—Optional. Order summary number to assign to the order summary.


• orderId — The ID of the original order to create an order summary for.
• orderLifeCycleType — Optional. Specifies whether the order is managed in Salesforce Order
Management or by an external system. It can have one of these values:
– MANAGED—The order is managed in Salesforce Order Management. If no value is specified, the default
is MANAGED.
– UNMANAGED—The order is managed by an external system.

• status—Optional. Status to assign to the order summary. The value must match one of the picklist values
on the Status field of the Order Summary object.

Store Output Values


Output Parameter Description
Order Summary This value is an Apex-defined variable of class OrderSummaryOutputRepresentation.
Output The orderSummaryId field contains the ID of the created order summary.

328
Order Management Invocable Actions Flow Core Action for Order Management: Create Return Order

Flow Core Action for Order Management: Create Return Order


Create a return order and return order items for order items belonging to an order summary.
EDITIONS
Drag an Action element onto the canvas. Select the Order Management category, and search for
Create Return Order. Available in: Lightning
Experience

Set Input Values Available in: Enterprise,


Unlimited, and Developer
Use values from earlier in the flow to set the inputs. Editions with Salesforce
Order Management and
Input Description Returns
Parameter
Return This input is an Apex-defined variable of class
Order ConnectApi.ReturnOrderInputRepresentation.
Input The variable has four fields:
• orderSummaryId—ID of the order summary containing the items to
be returned. The order summary’s order life cycle type must be Managed.
• returnOrderLifeCycleType—The LifeCycleType of the return
order. Possible values are:
– Managed—Process the return order using the actions and APIs. It can
generate change orders and affects financial fields and rollup calculations.
– Unmanaged—The return order is for tracking purposes only. It isn’t
involved in any financial calculations and doesn’t generate any change
orders. The system doesn’t prevent the creation of duplicate return order
line items in an unmanaged return order for the same order item.

• returnOrderLineItems—A list of Apex-defined variables of class


ConnectApi.ReturnOrderLineItemInputRepresentation. Each variable has
these fields:
– canReduceShipping—Whether the associated shipping charge
can be refunded.
– orderItemSummaryId—ID of the associated OrderItemSummary.
– quantityExpected—Quantity expected to be returned.
– quantityReceived—(Optional) Quantity already physically
returned. This value isn’t used by any standard features, but is provided
for use in customizations.
– reasonForReturn—(Optional) Reason for the return. The value
must match an entry in the ReturnOrderLineItem object’s
ReasonForReturn picklist.

• status—Status to assign to the return order. The value must match one
of the picklist values on the Status field of the Return Order object.

329
Order Management Invocable Actions Flow Core Action for Order Management: Ensure Funds Async

Store Output Values


Output Parameter Description
Return Order This value is an Apex-defined variable of class ConnectApi.ReturnOrderOutputRepresentation.
Output The returnOrderId field contains the ID of the created return order.

Usage
To set up the Create Return Order Input:
1. Use Assignment elements to set the canReduceShipping, orderItemSummaryId, quantityExpected,
quantityReceived, and reasonForReturn field values on one or more
ConnectApi.ReturnOrderLineItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ReturnOrderLineItemInputRepresentation variables to
the returnOrderLineItems field on a ConnectApi.ReturnOrderInputRepresentation variable.
3. Use Assignment elements to set the orderSummaryId, returnOrderLifeCycleType, and status field values on
the ConnectApi.ReturnOrderInputRepresentation variable.
4. Use the ConnectApi.ReturnOrderInputRepresentation variable in the action input.

Flow Core Action for Order Management: Ensure Funds Async


Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending
EDITIONS
a request to a payment provider. This action inserts a background operation into an asynchronous
job queue and returns the ID of that operation so you can track its status. Payment gateway responses Available in: Lightning
appear in the payment gateway log and do not affect the background operation status. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Ensure Funds Async.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Ensure Funds This input is an Apex-defined variable of class ConnectApi.EnsureFundsAsyncInputRepresentation.
Async Input The variable has one field, invoiceId, which is the ID of the invoice to ensure funds for and apply them to.

Order Summary Reference to the order summary associated with the invoice.
Id

330
Order Management Invocable Actions Flow Core Action for Order Management: Ensure Refunds
Async

Store Output Values


Output Parameter Description
Ensure Funds This value is an Apex-defined variable of class EnsureFundsAsyncOutputRepresentation.
Async Output The backgroundOperationId field contains the ID of the background operation.

Usage
This action checks the order payment summaries associated with the specified order summary for funds to pay the invoice balance as
follows:

Note: If multiple order payment summaries have the same amount, their order of selection is random.

1. Verify that the invoice balance doesn’t exceed the total amount of all the order payment summaries.
2. If an order payment summary exists with an amount that matches the invoice balance, use it.
3. Otherwise, if any order payment summaries exist with an amount greater than the invoice balance, use the one with the smallest
amount greater than the invoice balance.
4. Otherwise, select order payment summaries in order from largest amount to smallest until their amounts meet or exceed the invoice
balance.
5. If any selected funds are authorized, capture them.
6. Apply the selected funds to the invoice.

Flow Core Action for Order Management: Ensure Refunds Async


Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This
EDITIONS
action inserts a background operation into an asynchronous job queue and returns the ID of that
operation so you can track its status. Payment gateway responses appear in the payment gateway Available in: Lightning
log and do not affect the background operation status. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Ensure Refunds Async.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Ensure This input is an Apex-defined variable of class ConnectApi.EnsureReundsAsyncInputRepresentation.
Refunds Async The variable has two fields. You must specify at least one of them.
Input
• creditMemoId — The ID of the credit memo to ensure refunds for.
• excessFundsAmount — The amount of excess funds to apply the refunds against.

331
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Preview

Input Parameter Description


Order Summary Reference to the order summary associated with the credit memo.
Id

Store Output Values


Output Parameter Description
Ensure Refunds This value is an Apex-defined variable of class EnsureRefundsAsyncOutputRepresentation.
Async Output The backgroundOperationId field contains the ID of the background operation.

Flow Core Action for Order Management: Return Order Item Summaries
Preview
Preview the expected results of returning one or more order product summaries from an order
EDITIONS
summary without executing the return. The output of this action contains the values that would
be set on the change order created by submitting the proposed return. Available in: Lightning
Drag an Action element onto the canvas. Select the Order Management category, and search for Experience
Return Order Item Summaries Preview.
Available in: Enterprise,
Unlimited, and Developer
Editions with Salesforce
Set Input Values Order Management
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Order Summary Reference to the order summary that you want to preview returning order product summaries from.
Id

Return Order This input is an Apex-defined variable of class ConnectApi.ChangeInputRepresentation.


Product The variable has one field, changeItems. This field is a list of Apex-defined variables of class
Summary Items ConnectApi.ChangeItemInputRepresentation. Each of the variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to return. It can’t be a shipping charge
product.
• quantity — Quantity to return.
• reason — Return reason. The value must match one of the picklist values on the Reason field of the
Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to prorate any related delivery
charge based on the price change.

332
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Preview

Store Output Values


Output Parameter Description
Return Order This output is an Apex-defined variable of class ConnectApi.PreviewCancelOutputRepresentation, which
Product contains the values that would populate a change order record for the proposed return.
Summary Items
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
Output
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount — Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
• totalAmount — Change to the pretax total.
• totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It is equal to the captured amount that is owed as a refund but
is not associated with an invoice or credit memo. Excess funds normally occur when order products are
canceled before fulfillment but after payment is captured. This situation is not common in the US, where
funds are normally authorized but not captured until the fulfillment process begins. This value includes all
excess funds related to the order summary, not only the funds related to the current action.
• totalRefundableAmount — The total amount available to be refunded. It is the sum of the excess
funds and any outstanding change order grand total amounts that apply to post-fulfillment changes. This
value includes all refundable amounts related to the order summary, not only the amount related to the
current action.
• totalTaxAmount — Change to the total tax.

Usage
To set up the Return Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.

333
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Submit

3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for returning order product summaries, display the output of this action for the user to review before executing the return.
When the user verifies the expected results, pass the same input to a Return Order Item Summaries Submit action.

Flow Core Action for Order Management: Return Order Item Summaries
Submit
Return one or more order product summaries from an order summary. This action creates a change
EDITIONS
order record.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Return Order Item Summaries Submit. Experience

Available in: Enterprise,


Unlimited, and Developer
Set Input Values Editions with Salesforce
Use values from earlier in the flow to set the inputs. Order Management

Input Description
Parameter
Order Reference to the order summary that you want to return order product summaries
Summary from.
Id

Return This input is an Apex-defined variable of class


Order ConnectApi.ChangeInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined
Summary variables of class ConnectApi.ChangeItemInputRepresentation. Each of the
Items variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to return.
It can’t be a shipping charge product.
• quantity — Quantity to return.
• reason — Return reason. The value must match one of the picklist values
on the Reason field of the Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to
prorate any related delivery charge based on the price change.

Store Output Values


Output Parameter Description
Return Order This output is an Apex-defined variable of class ConnectApi.SubmitReturnOutputRepresentation.
Product
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
Summary Items
on a change order record. For example, a discount is a positive value in changeBalances and a
Output
negative value on a change order record.

334
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Submit

Output Parameter Description


The changeOrderId field is the ID of the change order record created for the return.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
• totalAdjustmentDistributedAmount — Change to the total order adjustments.
• totalAdjustmentDistributedTaxAmount — Change to the total order adjustments tax.
• totalAmount — Change to the pretax total.
• totalExcessFundsAmount — The amount of excess funds available on the order payment
summaries related to the order summary. It is equal to the captured amount that is owed as a refund but
is not associated with an invoice or credit memo. Excess funds normally occur when order products are
canceled before fulfillment but after payment is captured. This situation is not common in the US, where
funds are normally authorized but not captured until the fulfillment process begins. This value includes all
excess funds related to the order summary, not only the funds related to the current action.
• totalRefundableAmount — The total amount available to be refunded. It is the sum of the excess
funds and any outstanding change order grand total amounts that apply to post-fulfillment changes. This
value includes all refundable amounts related to the order summary, not only the amount related to the
current action.
• totalTaxAmount — Change to the total tax.

Usage
To set up the Return Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for returning order product summaries, run a Return Order Item Summaries Preview action before running this action. Then
display its output for the user to review. When the user verifies the expected results, pass the same input to this action.

335
Order Management Invocable Actions Flow Core Action for Order Management: Return Return Order
Items

Flow Core Action for Order Management: Return Return Order Items
Process one or more return order line items belonging to a return order. This action creates a change
EDITIONS
order record and makes the processed return order line items read-only. If a processed return order
line item has any remaining expected quantity, then the action creates a separate return order line Available in: Lightning
item representing that quantity. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Return Return Order Items.
Unlimited, and Developer
Editions with Salesforce
Order Management and
Set Input Values Returns
Use values from earlier in the flow to set the inputs.

Input Parameter Description


Return Order Reference to the return order that you want to process return order line items from.
Id

Return Items This input is an Apex-defined variable of class ConnectApi.ReturnItemsInputRepresentation. It has two fields.
Input The returnOrderItemDeliveryCharges field is an optional list of Apex-defined variables of class
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation. Each of the variables includes one field:
• returnOrderLineItemId—ID of a return order line item representing a shipping charge to return.
The returnOrderItems field is a list of Apex-defined variables of class
ConnectApi.ReturnOrderItemInputRepresentation. Each of the variables includes these fields:
• quantityReceived—(Optional) The quantity of the return order line item that has been received.
The value must be zero or greater. This value isn’t used by any standard features, but is provided for use in
customizations.
• quantityRejected—(Optional) The quantity of the return order line item that has been rejected for
return. The value must be zero or greater. This value isn’t used by any standard features, but is provided for
use in customizations.
• quantityReturned—The quantity of the return order line item that has been returned. The value
must be greater than zero. If this value plus quantityToCancel is less than the expected return quantity,
then the remaining quantity to be returned is added to a new return order line item.
• quantityToCancel—(Optional) The quantity of the return order line item to remove because it’s not
being returned. The value must be zero or greater. If this value plus quantityReturned is less than the
expected return quantity, then the remaining quantity to be returned is added to a new return order line
item.
• reasonForRejection—(Optional) The reason why the rejected quantity, if any, was rejected. This
value isn’t used by any standard features, but is provided for use in customizations.
• returnOrderLineItemId—The return order line item ID.

336
Order Management Invocable Actions Flow Core Action for Order Management: Return Return Order
Items

Store Output Values


Output Parameter Description
Return Items This output is an Apex-defined variable of class ConnectApi.ReturnItemsOutputRepresentation. It has two
Output fields.
The changeOrderId field is the ID of the change order record created for the return.
The returnLineItemSplits field is a list of Apex-defined variables of class
ConnectApi.ReturnOrderItemSplitLineOutputRepresentation, which includes these fields:
• newReturnOrderItemId—ID of the new return order line item that holds the remaining return
quantity.
• originalReturnOrderItemId—ID of the original return order line item.

Note: After a change order is created for a return order line item, that return order line item is read-only.
If this action is used to return a partial quantity, it creates a new “split” return order line item to hold the
remaining quantity to be returned. In that case, it returns the IDs of the original and split return order
line items in an element of the returnLineItemSplits output list property.

Usage
To set up the Return Return Order Items Input:
1. Use Assignment elements to set the quantityReceived, quantityRejected, quantityReturned,
quantityToCancel, reasonForRejection, and returnOrderLineItemId field values on one or more
ConnectApi.ReturnOrderItemInputRepresentation variables.
2. Use Assignment elements to set the returnOrderLineItemId field value on one or more
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation variables.
3. Use an Assignment element to add the ConnectApi.ReturnOrderItemInputRepresentation variables to the
returnOrderItems field on a ConnectApi.ReturnItemsInputRepresentation variable.
4. Use an Assignment element to add the ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
variables to the returnOrderItemDeliveryCharges field on a
ConnectApi.ReturnItemsInputRepresentation variable.
5. Use the ConnectApi.ReturnItemsInputRepresentation variable and the return order ID in the action input.

337
CHAPTER 6 Salesforce Order Management Platform Events
In this chapter ... Salesforce Order Management includes standard platform events. Processes, flows, and the Streaming
API can subscribe to them.
• FOStatusChangedEvent
• OrderSummaryCreatedEvent
• OrderSumStatusChangedEvent

338
Salesforce Order Management Platform Events FOStatusChangedEvent

FOStatusChangedEvent
Notifies subscribers of changes to the status of a fulfillment order record. Use this event to trigger flows and processes in your order
workflow. This object is available in API version 48.0 and later.

Supported Calls
describeSObjects()

Supported Subscribers
Subscriber Supported?
Apex Triggers

Flows

Processes

Streaming API (CometD)

Streaming API Subscription Channel


/event/FOStatusChangedEvent

Special Access Rules


FOStatusChangedEvent is available as part of Salesforce Order Management.

Fields
Field Details
EventUuid Type
string
Properties
Nillable
Description
A universally unique identifier (UUID) that identifies a platform event message. This field is
available in API version 52.0 and later.

FulfillmentOrderId Type
reference
Properties
Nillable

339
Salesforce Order Management Platform Events FOStatusChangedEvent

Field Details

Description
ID of the FulfillmentOrder whose status changed.
This value is functionally required, but is nillable because fulfillment order records can be
deleted to comply with data protection and privacy requirements.

NewStatus Type
picklist
Properties
None
Description
Required. The new value of the Status field on the FulfillmentOrder.
Possible values are defined by the Status field picklist on the FulfillmentOrder object.

NewStatusCategory Type
picklist
Properties
Restricted picklist
Description
Required. The new value of the StatusCategory field on the FulfillmentOrder.
Possible values are:
• Activated
• Cancelled
• Closed
• Draft
• Fulfilling

OldStatus Type
picklist
Properties
Nillable
Description
The previous value of the Status field on the FulfillmentOrder.
Possible values are defined by the Status field picklist on the FulfillmentOrder object.

OldStatusCategory Type
picklist
Properties
Nillable, Restricted picklist
Description
The previous value of the StatusCategory field on the FulfillmentOrder.

340
Salesforce Order Management Platform Events OrderSummaryCreatedEvent

Field Details
Possible values are:
• Activated
• Cancelled
• Closed
• Draft
• Fulfilling

OrderSummaryId Type
reference
Properties
Nillable
Description
ID of the OrderSummary associated with the FulfillmentOrder.

ReplayId Type
string
Properties
Nillable
Description
Represents an ID value that is populated by the system and refers to the position of the event
in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive
events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed
events that are within the retention window.

OrderSummaryCreatedEvent
Notifies subscribers of the creation of an order summary record. Use this event to trigger flows and processes in your order workflow.
This object is available in API version 48.0 and later.

Supported Calls
describeSObjects()

Supported Subscribers
Subscriber Supported?
Apex Triggers

Flows

Processes

341
Salesforce Order Management Platform Events OrderSummaryCreatedEvent

Subscriber Supported?
Streaming API (CometD)

Streaming API Subscription Channel


/event/OrderSummaryCreatedEvent

Special Access Rules


OrderSummaryCreatedEvent is available as part of Salesforce Order Management.

Fields
Field Details
EventUuid Type
string
Properties
Nillable
Description
A universally unique identifier (UUID) that identifies a platform event message. This field is
available in API version 52.0 and later.

OrderId Type
reference
Properties
Nillable
Description
ID of the original order associated with the created OrderSummary.

OrderSummaryId Type
reference
Properties
Nillable
Description
ID of the created OrderSummary

ReplayId Type
string
Properties
Nillable

342
Salesforce Order Management Platform Events OrderSumStatusChangedEvent

Field Details

Description
Represents an ID value that is populated by the system and refers to the position of the event
in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive
events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed
events that are within the retention window.

OrderSumStatusChangedEvent
Notifies subscribers of changes to the status of an order summary record. Use this event to trigger flows and processes in your order
workflow. This object is available in API version 48.0 and later.

Supported Calls
describeSObjects()

Supported Subscribers
Subscriber Supported?
Apex Triggers

Flows

Processes

Streaming API (CometD)

Streaming API Subscription Channel


/event/OrderSumStatusChangedEvent

Special Access Rules


OrderSumStatusChangedEvent is available as part of Salesforce Order Management.

Fields
Field Details
EventUuid Type
string

343
Salesforce Order Management Platform Events OrderSumStatusChangedEvent

Field Details

Properties
Nillable
Description
A universally unique identifier (UUID) that identifies a platform event message. This field is
available in API version 52.0 and later.

NewStatus Type
picklist
Properties
Defaulted on create
Description
Required. The new value of the Status field on the OrderSummary.
Possible values are based on the OrderSummary statuses defined in your org.

OldStatus Type
picklist
Properties
Defaulted on create
Description
Required. The previous value of the Status field on the OrderSummary.
Possible values are based on the OrderSummary statuses defined in your org.

OrderId Type
reference
Properties
Nillable
Description
ID of the original order associated with the OrderSummary.

OrderSummaryId Type
reference
Properties
Nillable
Description
The ID of the OrderSummary that changed.
This value is functionally required, but is nillable because order summary records can be
deleted to comply with data protection and privacy requirements.

ReplayId Type
string

344
Salesforce Order Management Platform Events OrderSumStatusChangedEvent

Field Details

Properties
Nillable
Description
Represents an ID value that is populated by the system and refers to the position of the event
in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive
events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed
events that are within the retention window.

345
CHAPTER 7 Salesforce Order Management Lightning
Components
Salesforce Order Management includes standard Lightning components .

Order Product Summaries by Recipient Component


Use the Order Product Summaries by Recipient component to display order product details on an Order
Summary record page. This component is available in Salesforce Order Management.
The Order Product Summaries by Recipient component displays information about the order delivery
group summaries associated with the order summary, including the order product summaries associated
with them.
The displayed order product summary fields are defined by the Order Product Summaries related list on
the OrderDeliveryGroup object page layout. To modify the columns in this component on the order
summary details page, edit the related list on the Order Delivery Group page layout, not the Order
Summary page layout.
You can create a custom filter to control which order delivery group summary records are displayed.

Order Summary Totals


Use the Order Summary Totals component to display order financial totals on an Order Summary record
page. This component is available in Salesforce Order Management.
You can customize the panel title and which values to display.

346

You might also like