370
Salesforce Order Management Developer Guide Version 53.0, Winter 22 @salesforcedocs Last updated: November 24, 2021

Salesforce Order Management Developer Guide

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Salesforce Order Management Developer Guide

Salesforce Order ManagementDeveloper Guide

Version 53.0, Winter ’22

@salesforcedocsLast updated: November 24, 2021

Page 2: Salesforce Order Management Developer Guide

© 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.

Page 3: Salesforce Order Management Developer Guide

CONTENTS

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

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

FulfillmentOrder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3FulfillmentOrderItemAdjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14FulfillmentOrderItemTax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16FulfillmentOrderLineItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25LocationGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33LocationGroupAssignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35OrderAdjustmentGroupSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37OrderDeliveryGroupSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40OrderItemAdjustmentLineSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48OrderItemSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51OrderItemSummaryChange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63OrderItemTaxLineItemSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66OrderPaymentSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69OrderSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74OrderSummaryRoutingSchedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86ProcessException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89ReturnOrder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93ReturnOrderItemAdjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107ReturnOrderItemTax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109ReturnOrderLineItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112SalesChannel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Shipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125ShipmentItem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Order Summary Entity Relationship Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Salesforce B2C Commerce Storefront Order Data Map . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Importing Order Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Fulfillment Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

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

Salesforce Order Management Apex Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177FulfillmentOrder Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177OmnichannelInventoryService Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182OrderPaymentSummary Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189OrderSummary Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190OrderSummaryCreation Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

Page 4: Salesforce Order Management Developer Guide

ReturnOrder Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Routing Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

Salesforce Order Management Apex Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204ConnectApi.AdjustItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206ConnectApi.AdjustOrderItemSummaryInputRepresentation . . . . . . . . . . . . . . . . . . . . 207ConnectApi.ChangeInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207ConnectApi.ChangeItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208ConnectApi.CreateCreditMemoInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 208ConnectApi.CreateOrderPaymentSummaryInputRepresentation . . . . . . . . . . . . . . . . . 208ConnectApi.EnsureFundsAsyncInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 209ConnectApi.EnsureRefundsAsyncInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 209ConnectApi.FindRoutesWithFewestSplitsInputRepresentation . . . . . . . . . . . . . . . . . . . 210ConnectApi.FulfillmentGroupInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 210ConnectApi.FulfillmentOrderInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211ConnectApi.FulfillmentOrderInvoiceInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 211ConnectApi.FulfillmentOrderLineItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 212ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation . . . . . . . . . . . . . . . 212ConnectApi.LocationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212ConnectApi.LocationAvailabilityInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 212ConnectApi.MultipleFulfillmentOrderInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 213ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation . . . . . . . . . . . . . . . . 213ConnectApi.OCICreateReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 213ConnectApi.OCICreateReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . . 214ConnectApi.OCIFulfillReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 214ConnectApi.OCIFulfillReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . . . 214ConnectApi.OCIGetInventoryAvailabilityInputRepresentation . . . . . . . . . . . . . . . . . . . . 215ConnectApi.OCIReleaseReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 216ConnectApi.OCIReleaseReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . 216ConnectApi.OCITransferReservationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . 216ConnectApi.OCITransferReservationSingleInputRepresentation . . . . . . . . . . . . . . . . . . 217ConnectApi.OrderItemSummaryInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 218ConnectApi.OrderSummaryInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218ConnectApi.QuantityWithSkuInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 219ConnectApi.RankAverageDistanceInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 219ConnectApi.ReturnItemsInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220ConnectApi.ReturnOrderInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220ConnectApi.ReturnOrderItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 221ConnectApi.ReturnOrderLineItemInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 222ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation . . . . . . . . . . . . . . . . 222ConnectApi.TargetLocationInputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

Salesforce Order Management Apex Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223ConnectApi.AdjustOrderSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . 225ConnectApi.AvailableLocationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 226ConnectApi.AverageDistanceResultOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 226

Contents

Page 5: Salesforce Order Management Developer Guide

ConnectApi.BaseOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226ConnectApi.ChangeItemOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227ConnectApi.CreateCreditMemoOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 229ConnectApi.CreateOrderPaymentSummaryOutputRepresentation . . . . . . . . . . . . . . . 229ConnectApi.DistanceCalculationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 229ConnectApi.EnsureFundsAsyncOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 229ConnectApi.EnsureRefundsAsyncOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . 230ConnectApi.ErrorResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation . . . . . . . . . . . . . . . . . . 230ConnectApi.FulfillmentGroupOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . 230ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation . . . . . . . . . . . . . . . 231ConnectApi.FulfillmentOrderInvoiceOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 231ConnectApi.FulfillmentOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 231ConnectApi.LocationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation . . . . . . . . . . . . . . . 232ConnectApi.MultipleFulfillmentOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . 232ConnectApi.OCIBaseOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232ConnectApi.OCICreateReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . 233ConnectApi.OCICreateReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . 233ConnectApi.OCICreateReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . 233ConnectApi.OCIFulfillReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . . . 233ConnectApi.OCIFulfillReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 234ConnectApi.OCIFulfillReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . . . 234ConnectApi.OCIFutureInventoryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 234ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . . 235ConnectApi.OCIInventoryRecordOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 235ConnectApi.OCILocationAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 235ConnectApi.OCILocationGroupAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . 236ConnectApi.OCIPublishLocationStructureOutputRepresentation . . . . . . . . . . . . . . . . . 236ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation . . . . . . . . . . . . . 236ConnectApi.OCIReleaseReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . 237ConnectApi.OCIReleaseReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 237ConnectApi.OCIReleaseReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . 237ConnectApi.OCITransferReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . 237ConnectApi.OCITransferReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 238ConnectApi.OCITransferReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . 238ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . 239ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation . . . . . . . . . . . 239ConnectApi.OrderItemSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 239ConnectApi.OrderSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 240ConnectApi.PreviewCancelOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 240ConnectApi.PreviewReturnOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 240ConnectApi.RankAverageDistanceOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 240ConnectApi.ReturnItemsOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Contents

Page 6: Salesforce Order Management Developer Guide

ConnectApi.ReturnOrderItemSplitLineOutputRepresentation . . . . . . . . . . . . . . . . . . . . 241ConnectApi.ReturnOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241ConnectApi.SubmitCancelOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241ConnectApi.SubmitReturnOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

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

Salesforce Omnichannel Inventory Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244Availability Records, Get Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Availability Records, Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246Location Graph, Upload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248Reservations, Create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Reservations, Fulfill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Reservations, Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251Reservations, Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

Salesforce Order Management Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252Fulfillment Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255Fulfillment Orders, Cancel Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Fulfillment Orders, Create Invoice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Fulfillment Orders, Create Multiple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Order Payment Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Order Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260Order Summaries, Create Credit Memo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262Order Summaries, Ensure Funds Async . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262Order Summaries, Ensure Refunds Async . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264Order Summaries, Preview Adjust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265Order Summaries, Preview Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Order Summaries, Preview Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267Order Summaries, Submit Adjust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268Order Summaries, Submit Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269Order Summaries, Submit Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270Return Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271Return Orders, Return Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273Routing, Find Routes with Fewest Splits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274Routing, Rank By Average Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

Salesforce Order Management Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Adjust Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Adjust Order Item Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279Change Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Change Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Create Credit Memo Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281Create Order Payment Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282Ensure Funds Async Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283Ensure Refunds Async Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283Find Routes With Fewest Splits Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

Contents

Page 7: Salesforce Order Management Developer Guide

Fulfillment Group Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284Fulfillment Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285Fulfillment Order Invoice Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Fulfillment Order Line Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Fulfillment Order Line Items To Cancel Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287Location Availability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288Location Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288Multiple Fulfillment Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289OCI Create Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289OCI Create Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290OCI Fulfill Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290OCI Fulfill Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290OCI Get Inventory Availability Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291OCI Release Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292OCI Release Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292OCI Transfer Reservation Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293OCI Transfer Reservation Single Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294Order Item Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295Order Summary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295Quantity With Sku Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296Rank Average Distance Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297Return Items Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297Return Order Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298Return Order Item Delivery Charge Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299Return Order Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300Return Order Line Item Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301Target Location Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

Salesforce Order Management Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302Adjust Order Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305Available Location Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305Average Distance Result Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Change Item Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Create Credit Memo Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307Create Order Payment Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308Distance Calculation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308Ensure Funds Async Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308Ensure Refunds Async Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Error Response Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Error with Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Find Routes With Fewest Splits Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310Fulfillment Group Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310Fulfillment Order Cancel Line Items Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Fulfillment Order Invoice Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Fulfillment Order Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

Contents

Page 8: Salesforce Order Management Developer Guide

Location Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Multiple Fulfillment Order Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312OCI Create Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312OCI Create Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313OCI Create Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313OCI Fulfill Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313OCI Fulfill Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314OCI Fulfill Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314OCI Future Inventory Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314OCI Get Inventory Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315OCI Inventory Record Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315OCI Location Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315OCI Location Group Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316OCI Publish Location Structure Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316OCI Publish Location Structure Status Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316OCI Release Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317OCI Release Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317OCI Release Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317OCI Transfer Reservation Error Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318OCI Transfer Reservation Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318OCI Transfer Reservation Single Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318OCI Upload Inventory Availability Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319OCI Upload Inventory Availability Status Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319Order Item Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Order Summary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Preview Cancel Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Preview Return Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321Rank Average Distance Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321Return Items Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Return Order Item Split Line Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Return Order Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Submit Cancel Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323Submit Return Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

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

Salesforce Order Management Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326Flow Core Action for Order Management: Adjust Order Item Summaries Preview . . . . . . . . . 326Flow Core Action for Order Management: Adjust Order Item Summaries Submit . . . . . . . . . 328Flow Core Action for Order Management: Cancel Fulfillment Order Item . . . . . . . . . . . . . . . 331Flow Core Action for Order Management: Cancel Order Item Summaries Preview . . . . . . . . 332Flow Core Action for Order Management: Cancel Order Item Summaries Submit . . . . . . . . . 334Flow Core Action for Order Management: Create Credit Memo . . . . . . . . . . . . . . . . . . . . . 336Flow Core Action for Order Management: Create Fulfillment Order . . . . . . . . . . . . . . . . . . . 337Flow Core Action for Order Management: Create an Invoice from Fulfillment Order . . . . . . . . 338

Contents

Page 9: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Create Order Payment Summary . . . . . . . . . . . . . 339Flow Core Action for Order Management: Create Order Summary . . . . . . . . . . . . . . . . . . . 340Flow Core Action for Order Management: Create Return Order . . . . . . . . . . . . . . . . . . . . . 341Flow Core Action for Order Management: Ensure Funds Async . . . . . . . . . . . . . . . . . . . . . 342Flow Core Action for Order Management: Ensure Refunds Async . . . . . . . . . . . . . . . . . . . . 343Flow Core Action for Order Management: Return Order Item Summaries Preview . . . . . . . . . 345Flow Core Action for Order Management: Return Order Item Summaries Submit . . . . . . . . . 347Flow Core Action for Order Management: Return Return Order Items . . . . . . . . . . . . . . . . . 349

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

FOStatusChangedEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352OrderSummaryCreatedEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354OrderSumStatusChangedEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

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

Chapter 8: API End-of-Life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

Contents

Page 10: Salesforce Order Management Developer Guide
Page 11: Salesforce Order Management Developer Guide

CHAPTER 1 Salesforce Order Management Developer Guide

Customize Salesforce Order Management and Omnichannel Inventory.

1

Page 12: Salesforce Order Management Developer Guide

CHAPTER 2 Order Management Standard Objects

Salesforce Order Management and Omnichannel Inventory include these standard objects.In this chapter ...

• FulfillmentOrder

• FulfillmentOrderItemAdjustment

• FulfillmentOrderItemTax

• FulfillmentOrderLineItem

• Location

• LocationGroup

• LocationGroupAssignment

• OrderAdjustmentGroupSummary

• OrderDeliveryGroupSummary

• OrderItemAdjustmentLineSummary

• OrderItemSummary

• OrderItemSummaryChange

• OrderItemTaxLineItemSummary

• OrderPaymentSummary

• OrderSummary

• OrderSummaryRoutingSchedule

• ProcessException

• ReturnOrder

• ReturnOrderItemAdjustment

• ReturnOrderItemTax

• ReturnOrderLineItem

• SalesChannel

• Shipment

• ShipmentItem

• Order SummaryEntity RelationshipDiagram

• Salesforce B2CCommerce StorefrontOrder Data Map

• Importing Order Data

• Fulfillment Orders

2

Page 13: Salesforce Order Management Developer Guide

FulfillmentOrder

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

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

Special Access RulesThis object is only available in Salesforce Order Management orgs.

Fields

DetailsField

Typereference

AccountId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the Account or Person Account associated with the FulfillmentOrder. It represents theshopper in the storefront.

Typereference

BillToContactId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the Contact associated with the FulfillmentOrder. It represents the shopper in thestorefront when not using person accounts.

This field is available in API version 49.0 and later.

Typepicklist

CurrencyIsoCode

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionISO code for the currency of the OrderSummary associated with the FulfillmentOrder. Thedefault value is USD.

Possible values are:

3

FulfillmentOrderOrder Management Standard Objects

Page 14: Salesforce Order Management Developer Guide

DetailsField

• DKK—Danish Krone

• EUR—Euro

• GBP—British Pound

• USD—U.S. Dollar

This field is available in API version 49.0 and later.

Typereference

DeliveryMethodId

PropertiesCreate, Filter, Group, Sort, Update

DescriptionID of the DeliveryMethod used for this FulfillmentOrder.

Typereference

FulfilledFromLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionID of the Location handling this FulfillmentOrder.

Typeaddress

FulfilledToAddress

PropertiesFilter, Nillable

DescriptionAddress of the recipient.

Typestring

FulfilledToCity

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address city.

Typestring

FulfilledToCountry

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address country.

4

FulfillmentOrderOrder Management Standard Objects

Page 15: Salesforce Order Management Developer Guide

DetailsField

Typeemail

FulfilledToEmailAddress

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionEmail address of the recipient.

Typepicklist

FulfilledToGeocodeAccuracy

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionAccuracy of the geocode for the recipient address.

Possible values are:

• Address

• Block

• City

• County

• ExtendedZip

• NearAddress

• Neighborhood

• State

• Street

• Unknown

• Zip

Typedouble

FulfilledToLatitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed 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.

Typedouble

FulfilledToLongitude

PropertiesCreate, Filter, Nillable, Sort, Update

5

FulfillmentOrderOrder Management Standard Objects

Page 16: Salesforce Order Management Developer Guide

DetailsField

DescriptionUsed 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.

Typestring

FulfilledToName

PropertiesCreate, Filter, Group, Sort, Update

DescriptionName on the recipient address.

Typephone

FulfilledToPhone

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionPhone number of the recipient.

Typestring

FulfilledToPostalCode

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address postal code.

Typestring

FulfilledToState

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address state.

Typetextarea

FulfilledToStreet

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address street.

Typestring

FulfillmentOrderNumber

6

FulfillmentOrderOrder Management Standard Objects

Page 17: Salesforce Order Management Developer Guide

DetailsField

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the FulfillmentOrder.

Typecurrency

GrandTotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments and tax, of the products and delivery charges on theFulfillmentOrder. This amount includes all FulfillmentOrderLineItems associated with theFulfillmentOrder. This amount is equal to TotalAmount + TotalTaxAmount.

Typereference

InvoiceId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionID of the Invoice associated with the FulfillmentOrder.

Typeboolean

IsReship

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates whether the FulfillmentOrder is for a reshipment. The default value is false.

This field is available in API version 53.0 and later.

Typeboolean

IsSuspended

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates whether the FulfillmentOrder is suspended. The default value is false.

Typedouble

ItemCount

PropertiesFilter, Nillable, Sort

7

FulfillmentOrderOrder Management Standard Objects

Page 18: Salesforce Order Management Developer Guide

DetailsField

DescriptionSum of the quantities of the FulfillmentOrderLineItems included in the FulfillmentOrder.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionTimestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionTimestamp for when the current user last viewed this record. A null value can mean that thisrecord has only been referenced (LastReferencedDate) and not viewed.

Typereference

OrderId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the original Order that generated the FulfillmentOrder.

Typereference

OrderSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the OrderSummary associated with the FulfillmentOrder.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionID of the User who currently owns this FulfillmentOrder. Default value is the User logged into the API to perform the create.

Typepicklist

Status

8

FulfillmentOrderOrder Management Standard Objects

Page 19: Salesforce Order Management Developer Guide

DetailsField

PropertiesCreate, Filter, Group, Sort, Update

DescriptionStatus of the FulfillmentOrder. Each status corresponds to one status category, shown herein 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 youcustomize the status picklist, include at least one status value for each status category.

Default values are:

• Allocated (Activated)

• Assigned (Fulfilling)

• Cancelled (Cancelled)

• Draft (Draft)

• Fulfilled (Closed)

• Pickpack (Fulfilling)

Typepicklist

StatusCategory

PropertiesFilter, Group, Restricted picklist, Sort

DescriptionStatus category of the FulfillmentOrder. Processing of the FulfillmentOrder depends on thisvalue. Each status category corresponds to one or more statuses.

Possible values are:

• ACTIVATED—Activated

• CANCELLED—Cancelled

• CLOSED—Closed

• DRAFT—Draft

• FULFILLING—Fulfilling

Typepicklist

TaxLocaleType

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionThe 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 likesales tax.

Possible values are:

• Gross (displays most prices and taxes as combined values)

• Net (displays most prices and taxes as separate values)

9

FulfillmentOrderOrder Management Standard Objects

Page 20: Salesforce Order Management Developer Guide

DetailsField

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjustmentAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the products on the FulfillmentOrder. Thisvalue only includes adjustments to FulfillmentOrderLineItems of type code Product.

Typecurrency

TotalAdjustmentAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the products on the FulfillmentOrder,inclusive of tax. This value only includes adjustments to FulfillmentOrderLineItems of typecode Product. This amount is equal to TotalAdjustmentAmount +TotalAdjustmentTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjustmentTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjustmentAmount.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionAdjusted total, not including tax, of the FulfillmentOrderLineItems, including products anddelivery charges, on the FulfillmentOrder.

Typecurrency

TotalDeliveryAdjustAmount

PropertiesFilter, Nillable, Sort

10

FulfillmentOrderOrder Management Standard Objects

Page 21: Salesforce Order Management Developer Guide

DetailsField

DescriptionTotal amount of the price adjustments applied to the delivery charges on the FulfillmentOrder.This value only includes adjustments to FulfillmentOrderLineItems of type code Charge.

Typecurrency

TotalDeliveryAdjustAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the delivery charges on the FulfillmentOrder,inclusive of tax. This value only includes adjustments to FulfillmentOrderLineItems of typecode Charge. This amount is equal to TotalDeliveryAdjustAmount +TotalDeliveryAdjustTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalDeliveryAdjustTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalDeliveryAdjustAmount.

Typecurrency

TotalDeliveryAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of the delivery charges on the FulfillmentOrder. This value only includesFulfillmentOrderLineItems of type code Charge.

Typecurrency

TotalDeliveryAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the delivery charges on the FulfillmentOrder, inclusive of tax. This value onlyincludes FulfillmentOrderLineItems of type code Charge. This amount is equal toTotalDeliveryAmount + TotalDeliveryTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalDeliveryTaxAmount

11

FulfillmentOrderOrder Management Standard Objects

Page 22: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalDeliveryAmount.

Typecurrency

TotalProductAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal price of the products on the FulfillmentOrder. This value only includesFulfillmentOrderLineItems of type code Product.

Typecurrency

TotalProductAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal price of the products on the FulfillmentOrder, inclusive of tax. This value only includesFulfillmentOrderLineItems of type code Product. This amount is equal to TotalProductAmount+ TotalProductTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalProductTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalProductAmount.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAmount.

Typepicklist

Type

PropertiesCreate, Filter, Group, Nillable, Sort, Update

12

FulfillmentOrderOrder Management Standard Objects

Page 23: Salesforce Order Management Developer Guide

DetailsField

DescriptionType of the FulfillmentOrder. Each type corresponds to one type category, shown here inparentheses. You can customize the type picklist to represent your business processes, butthe type category picklist is fixed because processing is based on those values. If you customizethe type picklist, include at least one type value for each type category.

Default values are:

• Download (Digital)

• Email (Digital)

• In Store Pickup (Physical)

• Retail Store (Physical)

• Supplier (Drop Ship)

• Warehouse (Physical)

Typepicklist

TypeCategory

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionType category of the FulfillmentOrder. Processing of the FulfillmentOrder depends on thisvalue. Each type category corresponds to one or more types.

Possible values are:

• DIGITAL—Digital

• DROPSHIP—Drop Ship

• PHYSICAL—Physical

Associated ObjectsThis object has the following associated objects. Unless noted, they are available in the same API version as this object.

FulfillmentOrderFeedFeed tracking is available for the object.

FulfillmentOrderOwnerSharingRuleSharing rules are available for the object.

FulfillmentOrderShareSharing is available for the object.

SEE ALSO:

FulfillmentOrderLineItem

OrderSummary

13

FulfillmentOrderOrder Management Standard Objects

Page 24: Salesforce Order Management Developer Guide

FulfillmentOrderItemAdjustment

Represents a price adjustment on a FulfillmentOrderLineItem. Corresponds to an OrderItemAdjustmentLineSummary associated withthe 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 Callscreate(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),retrieve(), update(), upsert()

Special Access RulesThis object is only available in Salesforce Order Management orgs.

Fields

DetailsField

Typecurrency

Amount

PropertiesCreate, Filter, Sort

DescriptionAmount, not including tax, of the adjustment.

Typestring

CampaignName

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionCampaign associated with the adjustment.

Typestring

CouponName

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionCoupon associated with the adjustment.

Typepicklist

CurrencyIsoCode

14

FulfillmentOrderItemAdjustmentOrder Management Standard Objects

Page 25: Salesforce Order Management Developer Guide

DetailsField

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO 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.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionText description of the adjustment.

Typereference

FulfillmentOrderId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the FulfillmentOrder associated with the FulfillmentOrderLineItem to which theadjustment applies.

Typestring

FulfillmentOrderItemAdjustmentNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the FulfillmentOrderLineItemAdjustment.

Typereference

FulfillmentOrderLineItemId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the FulfillmentOrderLineItem to which this adjustment applies.

15

FulfillmentOrderItemAdjustmentOrder Management Standard Objects

Page 26: Salesforce Order Management Developer Guide

DetailsField

Typereference

OrderItemAdjustLineSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the OrderItemAdjustmentLineSummary associated with the adjustment.

Typestring

PromotionName

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionPromotion associated with the adjustment.

Typecurrency

TotalAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal 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.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax 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.

16

FulfillmentOrderItemTaxOrder Management Standard Objects

Page 27: Salesforce Order Management Developer Guide

This object is used for calculations and doesn’t have a default record page.

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

Special Access RulesThis object is only available in Salesforce Order Management orgs.

Fields

DetailsField

Typecurrency

Amount

PropertiesCreate, Filter, Sort

DescriptionAmount of tax represented by the FulfillmentOrderItemTax.

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO code for the currency of the FulfillmentOrderLineItem to which the tax applies. Thedefault 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.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the FulfillmentOrderItemTax.

17

FulfillmentOrderItemTaxOrder Management Standard Objects

Page 28: Salesforce Order Management Developer Guide

DetailsField

Typereference

FulfillmentOrderId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the associated FulfillmentOrder.

Typereference

FulfillmentOrderItemAdjustId

PropertiesCreate, Filter, Group, Nillable, Sort

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

Typestring

FulfillmentOrderItemTaxNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the FulfillmentOrderItemTax.

Typereference

FulfillmentOrderLineItemId

PropertiesCreate, Filter, Group, Sort

DescriptionIf this object represents tax on a FulfillmentOrderLineItem, this value is the ID of thatFulfillmentOrderLineItem. If this object represents tax on an adjustment, this value is the IDof the FulfillmentOrderLineItem to which the adjustment applies.

Typereference

OrderItemTaxLineItemSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the OrderItemTaxLineItemSummary associated with the OrderItemSummary thatcorresponds to the FulfillmentOrderLineItem to which the tax applies.

Typepercent

Rate

18

FulfillmentOrderItemTaxOrder Management Standard Objects

Page 29: Salesforce Order Management Developer Guide

DetailsField

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionTax rate used to calculate the Amount.

Typedate

TaxEffectiveDate

PropertiesCreate, Filter, Group, Sort, Update

DescriptionDate on which the Amount was calculated. Important due to tax rate changes over time.

Typepicklist

Type

PropertiesCreate, Filter, Group, Restricted picklist, Sort, Update

DescriptionIndicates 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 availablein API version 48.0 and later.

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

19

FulfillmentOrderLineItemOrder Management Standard Objects

Page 30: Salesforce Order Management Developer Guide

Special Access RulesThis object is only available in Salesforce Order Management orgs.

Fields

DetailsField

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO 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.

Typestring

Description

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDescription of the FulfillmentOrderLineItem.

TypedateTime

EndDate

PropertiesCreate, Filter, Nillable, Sort

DescriptionEnd date of the FulfillmentOrderLineItem.

Typereference

FulfillmentOrderId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the FulfillmentOrder associated with the FulfillmentOrderLineItem.

20

FulfillmentOrderLineItemOrder Management Standard Objects

Page 31: Salesforce Order Management Developer Guide

DetailsField

Typestring

FulfillmentOrderLineItemNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the FulfillmentOrderLineItem.

Typecurrency

GrossUnitPrice

PropertiesCreate, Filter, Nillable, Sort

DescriptionUnit price, including tax, of the FulfillmentOrderLineItem. This value is equal to TotalPrice +TotalTaxAmount.

This field is available in API version 49.0 and later.

Typeboolean

IsReship

PropertiesDefaulted on create, Filter, Group, Sort

DescriptionIndicates whether the FulfillmentOrderLineItem belongs to a reshipment. The default valueis false.

This field is available in API version 53.0 and later.

Typereference

OrderItemId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the original OrderItem for the OrderItemSummary associated with theFulfillmentOrderLineItem.

Typereference

OrderItemSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the OrderItemSummary associated with the FulfillmentOrderLineItem.

21

FulfillmentOrderLineItemOrder Management Standard Objects

Page 32: Salesforce Order Management Developer Guide

DetailsField

Typedouble

OriginalQuantity

PropertiesCreate, Filter, Sort

DescriptionOriginal quantity of the FulfillmentOrderLineItem.

Typereference

Product2Id

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the product represented by the FulfillmentOrderLineItem.

Typedouble

Quantity

PropertiesCreate, Filter, Sort, Update

DescriptionCurrent quantity of the FulfillmentOrderLineItem. Equal to the original quantity minus anycanceled quantity.

Typestring

QuantityUnitOfMeasure

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionUnit of measure of the quantity, for example: unit, gallon, ton, or case.

Typepicklist

ReshipReason

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionIf the FulfillmentOrderLineItem belongs to a reshipment, the reason for the reshipment.

Default values are:

• Damaged

• Lost

• Unknown

• Wrong Item

This field is available in API version 53.0 and later.

22

FulfillmentOrderLineItemOrder Management Standard Objects

Page 33: Salesforce Order Management Developer Guide

DetailsField

TypedateTime

ServiceDate

PropertiesCreate, Filter, Nillable, Sort

DescriptionService or start date of the FulfillmentOrderLineItem.

Typecurrency

TotalAdjustmentAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of any price adjustments applied to the FulfillmentOrderLineItem.

Typecurrency

TotalAdjustmentAmountWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the FulfillmentOrderLineItem, inclusive oftax. This amount is equal to TotalAdjustmentAmount + TotalAdjustmentTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjustmentTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjustmentAmount.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments and tax, of the FulfillmentOrderLineItem.

Typecurrency

TotalLineAmount

PropertiesCreate, Defaulted on create, Filter, Nillable, Sort

23

FulfillmentOrderLineItemOrder Management Standard Objects

Page 34: Salesforce Order Management Developer Guide

DetailsField

DescriptionTotal, not including adjustments or tax, of the FulfillmentOrderLineItem.

Typecurrency

TotalLineAmountWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal price of the FulfillmentOrderLineItem, inclusive of tax. This amount is equal toTotalLineAmount + TotalLineTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalLineTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalLineAmount.

Typecurrency

TotalPrice

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments but not tax, of the FulfillmentOrderLineItem. Equal to UnitPricetimes Quantity.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalPrice.

Typepicklist

Type

PropertiesCreate, Filter, Group, Restricted picklist, Sort

DescriptionType of the FulfillmentOrderLineItem. Matches the type of the associated OrderItemSummary.Delivery Charge indicates that the FulfillmentOrderLineItem represents a delivery charge.

24

FulfillmentOrderLineItemOrder Management Standard Objects

Page 35: Salesforce Order Management Developer Guide

DetailsField

Order Product indicates that it represents any other type of product, service, or charge. Eachtype corresponds to one type code, shown here in parentheses.

Possible values are:

• Delivery Charge

• Order Product

Typepicklist

TypeCode

PropertiesCreate, Filter, Group, Restricted picklist, Sort

DescriptionType code of the FulfillmentOrderLineItem. Matches the type code of the associatedOrderItemSummary. Processing depends on this value. Charge indicates that theFulfillmentOrderLineItem represents a delivery charge. Product indicates that it representsany other type of product, service, or charge. Each type category corresponds to one or moretypes.

Possible values are:

• Charge

• Product

Typecurrency

UnitPrice

PropertiesCreate, Defaulted on create, Filter, Nillable, Sort

DescriptionUnit 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 APIversion 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 viewEmployees as a related list on Location records. In API version 51.0 and later, this object is available for Omnichannel Inventory andrepresents physical locations where inventory is available for fulfilling orders.

25

LocationOrder Management Standard Objects

Page 36: Salesforce Order Management Developer Guide

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

Special Access RulesAt least one of these features must be enabled:

• Commerce Store

• Contact Tracing for Employees

• Employee Experience

• Field Service

• Fulfillment Orders

• Health Cloud

• Industries Insurance

• Industries Visit

• Locations

• Omnichannel Inventory

• Public Sector

• Retail Execution

• Work.com

Fields

DetailsField Name

Typedate

CloseDate

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDate the location closed or went out of service.

Typedate

ConstructionEndDate

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDate construction ended at the location.

Typedate

ConstructionStartDate

26

LocationOrder Management Standard Objects

Page 37: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDate construction began at the location.

Typestring

Description

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionA brief description of the location.

Typestring

DrivingDirections

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionDirections to the location.

Typestring

ExternalReference

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionIdentifier of a location.

Typeboolean

IsInventoryLocation

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates whether the location stores parts.

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

Typeboolean

IsMobile

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates whether the location moves. For example, a truck or tool box.

27

LocationOrder Management Standard Objects

Page 38: Salesforce Order Management Developer Guide

DetailsField Name

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe date when the location was last modified. Its label in the user interface isLast Modified Date.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe date the location was last viewed.

Typedouble

Latitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionThe latitude of the location.

Typelocation

Location

PropertiesNillable

DescriptionThe geographic location.

Typeint

LocationLevel

PropertiesFilter, Group, Nillable, Sort

DescriptionThe location’s position in a location hierarchy. If the location has no parent orchild locations, its level is 1. Locations that belong to a hierarchy have a level of1 for the root location, 2 for the child locations of the root location, 3 for theirchildren, and so forth.

Typepicklist

LocationType

28

LocationOrder Management Standard Objects

Page 39: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesCreate, Filter, Group, Sort, Update

DescriptionPicklist of location types. It has no default values, so you must populate it beforecreating any location records.

Typereference

LogoId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionA ContentAsset representing a logo for the location.

This field is available in API version 50.0 and later.

This is a relationship field.

Relationship NameLogo

Relationship TypeLookup

Refers ToContentAsset

Typedouble

Longitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionThe longitude of the location.

Typestring

Name

PropertiesCreate, Filter, Group, idLookup, Sort, Update

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

Typedate

OpenDate

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDate the location opened or came into service.

29

LocationOrder Management Standard Objects

Page 40: Salesforce Order Management Developer Guide

DetailsField Name

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe location’s owner or driver.

This is a polymorphic relationship field.

Relationship NameOwner

Relationship TypeLookup

Refers ToGroup, User

Typereference

ParentLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe location’s parent location. For example, if vans are stored at a warehousewhen not in service, the warehouse is the parent location.

This is a relationship field.

Relationship NameParentLocation

Relationship TypeLookup

Refers ToLocation

Typedate

PossessionDate

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe date the location was purchased.

Typedate

RemodelEndDate

PropertiesCreate, Filter, Group, Nillable, Sort, Update

30

LocationOrder Management Standard Objects

Page 41: Salesforce Order Management Developer Guide

DetailsField Name

DescriptionDate when remodel construction ended at the location.

Typedate

RemodelStartDate

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDate when remodel construction started at the location.

Typereference

RootLocationId

PropertiesFilter, Group, Nillable, Sort

Description(Read Only) The top-level location in the location’s hierarchy.

This is a relationship field.

Relationship NameRootLocation

Relationship TypeLookup

Refers ToLocation

Typeboolean

ShouldSyncWithOci

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates 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.

Typepicklist

TimeZone

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionPicklist of available time zones.

31

LocationOrder Management Standard Objects

Page 42: Salesforce Order Management Developer Guide

DetailsField Name

Typereference

VisitorAddressId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionLookup to an account’s or client’s address.

This is a relationship field.

Relationship NameVisitorAddress

Relationship TypeLookup

Refers ToAddress

UsageBefore 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. Forexample, create a product item that represents the 500 bolts you have in stock at your Warehouse A location. Each product item mustbe 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 islocated 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. Whenreferencing the Location object in your Apex code, always use Schema.Location instead of Location to prevent confusionwith 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 ObjectsThis 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.

LocationFeedFeed tracking is available for the object.

LocationHistoryHistory is available for tracked fields of the object.

LocationOwnerSharingRuleSharing rules are available for the object.

LocationShareSharing is available for the object.

32

LocationOrder Management Standard Objects

Page 43: Salesforce Order Management Developer Guide

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 oneor 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 warehousesin a geographic region, or it can include the fulfillment centers associated with a particular online storefront.

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

Special Access RulesThis object is only available in Omnichannel Inventory orgs.

Fields

DetailsField

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the location group.

Typestring

ExternalReference

PropertiesCreate, Filter, Group, Nillable, Sort, Update

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

Typeboolean

IsEnabled

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates whether the location group is in use. If set to false, then inventory functionsignore this location group and its data isn’t synchronized with OCI. The default value is true.

33

LocationGroupOrder Management Standard Objects

Page 44: Salesforce Order Management Developer Guide

DetailsField

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed this record. A null value can mean thatthis record has only been referenced (LastReferencedDate) and not viewed.

Typestring

LocationGroupName

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionThe name of the location group.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe ID of the user who currently owns this location group. Default value is the API user thatcreated the record.

Typeboolean

ShouldSyncWithOci

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionSpecifies whether to synchronize inventory data for this location group with OmnichannelInventory. The default value is true.

Associated ObjectsThis object has the following associated objects. Unless noted, they are available in the same API version as this object.

34

LocationGroupOrder Management Standard Objects

Page 45: Salesforce Order Management Developer Guide

LocationGroupFeedFeed tracking is available for the object.

LocationGroupHistoryHistory is available for tracked fields of the object.

LocationGroupOwnerSharingRuleSharing rules are available for the object.

LocationGroupShareSharing 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 groupthat it’s assigned to. Each location group assignment represents the relationship between one location and one location group, so alocation or location group can be associated with multiple location group assignments.

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

Special Access RulesThis object is only available in Omnichannel Inventory orgs.

Fields

DetailsField

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed this record. A null value can mean thatthis record has only been referenced (LastReferencedDate) and not viewed.

35

LocationGroupAssignmentOrder Management Standard Objects

Page 46: Salesforce Order Management Developer Guide

DetailsField

Typestring

LocationExternalReference

PropertiesFilter, Group, Nillable, Sort

DescriptionThe external reference of the associated location.

Typestring

LocationGroupAssignment

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionThe name of the location group assignment.

Typestring

LocationGroupExternalReference

PropertiesFilter, Group, Nillable, Sort

DescriptionThe external reference of the associated location group.

Typereference

LocationGroupId

PropertiesCreate, Filter, Group, Sort

Description(Master-Detail) The associated location group.

Typestring

LocationGroupName

PropertiesFilter, Group, Nillable, Sort

DescriptionThe location group name of the associated location group.

Typereference

LocationId

PropertiesCreate, Filter, Group, Sort

Description(Master-Detail) The associated location.

36

LocationGroupAssignmentOrder Management Standard Objects

Page 47: Salesforce Order Management Developer Guide

DetailsField

Typestring

LocationName

PropertiesFilter, Group, Nillable, Sort

DescriptionThe name of the associated location.

OrderAdjustmentGroupSummary

Represents the current properties and state of a group of related price adjustments. Associated with a set ofOrderItemAdjustmentLineSummaries that apply to OrderItemSummaries belonging to one OrderSummary. Corresponds to one or moreorder adjustment group objects, consisting of an original object and any change objects applicable to it. This object is available in APIversion 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 anadjustment that applies to a subset of the products on an order. For example, representing “buy one, get one 50% off” as a 25% offadjustment to each of two products.

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

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

Fields

DetailsField

Typereference

AdjustmentCauseId

PropertiesFilter, Group, Nillable, Sort, Update

DescriptionReferences the specific promotions applied.

This is a polymorphic relationship field.

Relationship NameAdjustmentCause

37

OrderAdjustmentGroupSummaryOrder Management Standard Objects

Page 48: Salesforce Order Management Developer Guide

DetailsField

Relationship TypeLookup

Refers ToPromotion

This field is available in API version 52.0 and later.

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO code for the currency of the OrderSummary associated with the adjustments in thegroup. 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.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the OrderAdjustmentGroupSummary.

This field can be edited.

Typecurrency

GrandTotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including tax, of the associated OrderItemAdjustmentLineSummaries.

Typestring

Name

PropertiesCreate, Filter, Group, idLookup, Sort, Update

38

OrderAdjustmentGroupSummaryOrder Management Standard Objects

Page 49: Salesforce Order Management Developer Guide

DetailsField

DescriptionName of the OrderAdjustmentGroupSummary.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary associated with the OrderAdjustmentGroupSummary.

Typereference

OriginalOrderAdjGroupId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the original OrderAdjustmentGroup associated with this summary object. Nillable=trueonly if the associated order summary is unmanaged. For managed order summaries,nillable=false.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, not including tax, of the associated OrderItemAdjustmentIineSummaries.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAmount.

Typepicklist

Type

PropertiesFilter, Group, Restricted picklist, Sort

DescriptionType of the OrderAdjustmentGroupSummary. Header represents an order-level adjustmentwith an OrderItemAdjustmentLineSummary for each OrderItemSummary on theOrderSummary. SplitLine represents any other related set ofOrderItemAdjustmentLineSummaries.

39

OrderAdjustmentGroupSummaryOrder Management Standard Objects

Page 50: Salesforce Order Management Developer Guide

DetailsField

Possible values are:

• Header

• SplitLine

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator 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 usingthe same delivery method and delivered to the same address. A single shipment can include them all, but that isn’t guaranteed.Corresponds to one or more order delivery group objects, consisting of an original object and any change objects applicable to it. Thisobject is available in API version 48.0 and later.

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

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

Fields

DetailsField

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO code for the currency of the OrderSummary associated with theOrderDeliveryGroupSummary. The default value is USD.

Possible values are:

• DKK—Danish Krone

• EUR—Euro

40

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 51: Salesforce Order Management Developer Guide

DetailsField

• GBP—British Pound

• USD—U.S. Dollar

This field is available in API version 49.0 and later.

Typeaddress

DeliverToAddress

PropertiesFilter, Nillable

DescriptionAddress of the recipient. Users with the Edit Delivery Information user permission can modifythis field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typestring

DeliverToCity

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address city.

Typestring

DeliverToCountry

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address country.

Typepicklist

DeliverToGeocodeAccuracy

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionAccuracy of the geocode for the recipient address.

Possible values are:

• Address

• Block

• City

• County

• ExtendedZip

41

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 52: Salesforce Order Management Developer Guide

DetailsField

• NearAddress

• Neighborhood

• State

• Street

• Unknown

• Zip

Typedouble

DeliverToLatitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed 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.

Typedouble

DeliverToLongitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed 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.

Typestring

DeliverToName

PropertiesCreate, Filter, Group, Sort, Update

DescriptionName on the recipient address. Users with the Edit Delivery Information user permission canmodify this field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typestring

DeliverToPostalCode

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address postal code.

42

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 53: Salesforce Order Management Developer Guide

DetailsField

Typestring

DeliverToState

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address state.

Typetextarea

DeliverToStreet

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionRecipient address street.

Typetextarea

DeliveryInstructions

PropertiesCreate, Nillable, Update

DescriptionSpecial instructions for the delivery. Users with the Edit Delivery Information user permissioncan modify this field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the OrderDeliveryGroupSummary.

This field can be edited.

TypedateTime

DesiredDeliveryDate

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionDesired date for delivery. This field is informational, available for customizations. Users withthe Edit Delivery Information user permission can modify this field.

43

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 54: Salesforce Order Management Developer Guide

DetailsField

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typeemail

EmailAddress

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionEmail address of the recipient. Users with the Edit Delivery Information user permission canmodify this field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typetextarea

GiftMessage

PropertiesCreate, Nillable, Update

DescriptionGift message to include. Users with the Edit Delivery Information user permission can modifythis field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typecurrency

GrandTotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments and tax, of the delivery charges associated with theOrderDeliveryGroupSummary. This value only includes OrderItemSummaries of type codeCharge.

Typeboolean

IsGift

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionIndicates whether the OrderDeliveryGroupSummary represents a gift. Users with the EditDelivery Information user permission can modify this field.

44

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 55: Salesforce Order Management Developer Guide

DetailsField

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typestring

OrderDeliveryGroupSummaryNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the OrderDeliveryGroupSummary.

Typereference

OrderDeliveryMethodId

PropertiesFilter, Group, Sort

DescriptionID of the order delivery method specified for the OrderDeliveryGroupSummary. Users withthe Edit Delivery Information user permission can modify this field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary associated with the OrderDeliveryGroupSummary.

Typereference

OriginalOrderDeliveryGroupId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the original order delivery group associated with this summary object. Nillable=trueonly if the associated order summary is unmanaged. For managed order summaries,nillable=false.

Typephone

PhoneNumber

PropertiesCreate, Filter, Group, Nillable, Sort, Update

45

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 56: Salesforce Order Management Developer Guide

DetailsField

DescriptionPhone number of the recipient. Users with the Edit Delivery Information user permission canmodify this field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

TypedateTime

PromisedDeliveryDate

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionPromised date for delivery. This field is informational, available for customizations. Users withthe Edit Delivery Information user permission can modify this field.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typecurrency

TotalAdjustmentAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal price adjustments applied to delivery charges associated with theOrderDeliveryGroupSummary. This value only includes adjustments to OrderItemSummariesof type code Charge.

Typecurrency

TotalAdjustmentAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the delivery charges associated with theOrderDeliveryGroupSummary, inclusive of tax. This amount is equal toTotalAdjustmentAmount + TotalAdjustmentTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjustmentTaxAmount

PropertiesFilter, Nillable, Sort

46

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 57: Salesforce Order Management Developer Guide

DetailsField

DescriptionTax on the TotalAdjustmentAmount.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments but not tax, of the delivery charges associated with theOrderDeliveryGroupSummary. This value only includes adjustments to OrderItemSummariesof type code Charge.

Typecurrency

TotalLineAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, not including adjustments or tax, of the delivery charges associated with theOrderDeliveryGroupSummary.

Typecurrency

TotalLineAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal of the delivery charges associated with the OrderDeliveryGroupSummary, inclusive oftax. This amount is equal to TotalLineAmount + TotalLineTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalLineTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalLineAmount.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

47

OrderDeliveryGroupSummaryOrder Management Standard Objects

Page 58: Salesforce Order Management Developer Guide

DetailsField

DescriptionTax 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 itemadjustment line item objects, consisting of an original object and any change objects applicable to it. This object is available in API version48.0 and later.

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

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

Fields

DetailsField

Typereference

AdjustmentCauseId

PropertiesFilter, Group, Nillable, Sort, Update

DescriptionReferences the specific promotions applied.

This is a polymorphic relationship field.

Relationship NameAdjustmentCause

Relationship TypeLookup

Refers ToPromotion

This field is available in API version 52.0 and later.

48

OrderItemAdjustmentLineSummaryOrder Management Standard Objects

Page 59: Salesforce Order Management Developer Guide

DetailsField

Typecurrency

Amount

PropertiesFilter, Sort

DescriptionAmount, not including tax, of the OrderItemAdjustmentLineSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO code for the currency of the OrderItemSummary to which the adjustment applies. Thedefault 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.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the OrderItemAdjustmentLineSummary.

This field can be edited.

Typestring

Name

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionName of the OrderItemAdjustmentLineSummary.

Typereference

OrderAdjustmentGroupSummaryId

49

OrderItemAdjustmentLineSummaryOrder Management Standard Objects

Page 60: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Group, Nillable, Sort

DescriptionIf this object belongs to an OrderAdjustmentGroupSummary, this value is the ID of thatOrderAdjustmentGroupSummary.

Typereference

OrderItemSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderItemSummary to which the OrderItemAdjustmentLineSummary applies.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary associated with the OrderItemSummary to which thisOrderItemAdjustmentLineSummary applies.

Typereference

OriginalOrderItemAdjustmentLineItemId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the original OrderItemAdjustmentLine associated with this summary object. Nillable=trueonly if the associated order summary is unmanaged. For managed order summaries,nillable=false.

Typeinteger

Priority

PropertiesCreate, Nillable

DescriptionNumerical rank used to apply promotions in the correct order.

This field is available in API version 52.0 and later.

Typecurrency

TotalAmtWithTax

PropertiesFilter, Nillable, Sort

50

OrderItemAdjustmentLineSummaryOrder Management Standard Objects

Page 61: Salesforce Order Management Developer Guide

DetailsField

DescriptionTotal 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.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax 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 Callscreate(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),retrieve(), undelete(), update(), upsert()

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

Fields

DetailsField

Typecurrency

AdjustedLineAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments but not tax, of the OrderItemSummary.

51

OrderItemSummaryOrder Management Standard Objects

Page 62: Salesforce Order Management Developer Guide

DetailsField

Typecurrency

AdjustedLineAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal price of the OrderItemSummary, inclusive of adjustments and tax. This amount is equalto AdjustedLineAmount + TotalAdjustedLineTaxAmount.

This field is available in API version 49.0 and later.

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO 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.

Typestring

Description

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDescription of the OrderItemSummary.

This field can be edited.

Typedate

EndDate

PropertiesFilter, Group, Nillable, Sort

DescriptionEnd date of the OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

52

OrderItemSummaryOrder Management Standard Objects

Page 63: Salesforce Order Management Developer Guide

DetailsField

Typecurrency

GrossUnitPrice

PropertiesFilter, Nillable, Sort

DescriptionUnit price, including tax, of the OrderItemSummary. This value is equal to UnitPrice + theamount of tax on the UnitPrice.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

This field is available in API version 49.0 and later.

Typeint

LineNumber

PropertiesFilter, Group, Nillable, Sort

DescriptionThe order line number assigned to this OrderItemSummary. For example, if this object is thethird in the displayed list of OrderItemSummaries belonging to the OrderSummary, this valueis 3.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typecurrency

ListPrice

PropertiesFilter, Nillable, Sort

DescriptionList price of the product represented by this OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typestring

Name

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionName of the OrderItemSummary.

53

OrderItemSummaryOrder Management Standard Objects

Page 64: Salesforce Order Management Developer Guide

DetailsField

Typereference

OrderDeliveryGroupSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderDeliveryGroupSummary to which this object belongs.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary to which this object belongs.

Typereference

OriginalOrderItemId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the original order item associated with this summary object. Nillable=true only if theassociated order summary is unmanaged. For managed order summaries, nillable=false.

Typereference

Product2Id

PropertiesFilter, Group, Sort

DescriptionID of the product represented by this OrderItemSummary.

Typestring

ProductCode

PropertiesFilter, Group, Nillable, Sort

DescriptionProduct code of the product represented by this OrderItemSummary.

Typedouble

Quantity

PropertiesFilter, Sort

54

OrderItemSummaryOrder Management Standard Objects

Page 65: Salesforce Order Management Developer Guide

DetailsField

DescriptionCurrent total quantity of products represented by this order item summary. Equal toQuantityOrdered minus (QuantityCanceled and QuantityReturned).

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityAllocated

PropertiesFilter, Sort

DescriptionAllocated quantity on this order item summary. This quantity is associated with one or moreFulfillmentOrderLineItems.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityAvailableToCancel

PropertiesFilter, Nillable, Sort

DescriptionQuantity that can still be canceled on this OrderItemSummary. Equal to QuantityOrderedminus (QuantityCanceled and QuantityAllocated). This value duplicatesQuantityAvailableToFulfill.

Typedouble

QuantityAvailableToFulfill

PropertiesFilter, Nillable, Sort

DescriptionQuantity available to be fulfilled on this OrderItemSummary. Equal to QuantityOrdered minus(QuantityCanceled and QuantityAllocated). This value duplicates QuantityAvailableToCancel.

Typedouble

QuantityAvailableToReship

PropertiesFilter, Nillable, Sort

DescriptionQuantity available to be reshipped on this OrderItemSummary. Equal to QuantityFulfilledminus (QuantityReshipped and QuantityReturnInitiated).

55

OrderItemSummaryOrder Management Standard Objects

Page 66: Salesforce Order Management Developer Guide

DetailsField

This field is available in API version 53.0 and later.

Typedouble

QuantityAvailableToReturn

PropertiesFilter, Nillable, Sort

DescriptionQuantity available to be returned on this OrderItemSummary. Equal to QuantityFulfilledminus QuantityReturnInitiated.

Typedouble

QuantityCanceled

PropertiesFilter, Sort

DescriptionCanceled quantity on this OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityFulfilled

PropertiesFilter, Sort

DescriptionFulfilled quantity on this OrderItemSummary. This quantity can no longer be canceled.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityNetOrdered

PropertiesFilter, Nillable, Sort

DescriptionQuantity available to be allocated on this OrderItemSummary. Equal to QuantityOrderedminus QuantityCanceled.

Typedouble

QuantityOrdered

PropertiesFilter, Sort

56

OrderItemSummaryOrder Management Standard Objects

Page 67: Salesforce Order Management Developer Guide

DetailsField

DescriptionOrdered quantity on this OrderItemSummary. It includes the originally ordered quantity plusany quantity added to the order later.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityReshipped

PropertiesFilter, Sort

DescriptionReshipped quantity on this OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

This field is available in API version 53.0 and later.

Typedouble

QuantityReturned

PropertiesFilter, Sort

DescriptionReturned quantity on this OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityReturnInitiated

PropertiesFilter, Sort

DescriptionQuantity returned or pending return on this OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedouble

QuantityShipped

PropertiesFilter, Nillable, Sort, Update

57

OrderItemSummaryOrder Management Standard Objects

Page 68: Salesforce Order Management Developer Guide

DetailsField

DescriptionQuantity shipped on this OrderItemSummary.

This field is available in API version 52.0 and later.

Typereference

ReservedAtLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionReserved for future use.

Typedate

ServiceDate

PropertiesFilter, Group, Nillable, Sort

DescriptionService or start date of the OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typepicklist

Status

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionStatus of the OrderItemSummary. The default value is ORDERED. When a quantity valuechanges, each status formula is evaluated in order. If a formula is true, no more evaluationsare performed for that change.

Possible values and their formulas, in the order of evaluation, are:

• RETURNINITIATED—Return Initiated — (Quantity > 0) & (QuantityReturnInitiated= QuantityFulfilled) & (QuantityReturned < QuantityReturnInitiated)

• RESHIPPED—Reshipped — (QuantityReshipped = QuantityFullfilled) &(QuantityFullfilled > 0) & (QuantityReturnInitiated = 0) & (QuantityFulfilled =QuantityOrdered)

• RETURNED—Returned — (Quantity = 0) & (QuantityReturned > 0)

• CANCELED—Canceled — (Quantity = 0) & (QuantityCancelled > 0) & (QuantityReturned= 0)

• FULFILLED—Fulfilled — (Quantity > 0) & ((QuantityOrdered - QuantityCancelled)<= QuantityFulfilled)

58

OrderItemSummaryOrder Management Standard Objects

Page 69: Salesforce Order Management Developer Guide

DetailsField

• PARTIALLYFULFILLED—Partially Fulfilled — (QuantityFulfilled > 0) &(QuantityFulfilled < (QuantityOrdered - QuantityCancelled))

• ALLOCATED—Allocated — (Quantity > 0) & (Quantity <= QuantityAllocated)

• PARTIALLYALLOCATED—Partially Allocated — (QuantityAllocated > 0) &(QuantityAllocated < Quantity)

• ORDERED—Ordered — None of the other formulas apply

• PAID—Paid — N/A

Typestring

StockKeepingUnit

PropertiesFilter, Group, Nillable, Sort

DescriptionThe stock keeping unit (SKU) of the Product2 associated with the OrderItemSummary.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjustedLineTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the AdjustedLineAmount.

Typecurrency

TotalAdjustmentAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of all price adjustments applied to this OrderItemSummary.

Typecurrency

TotalAdjustmentAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal 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.

Typecurrency

TotalAdjustmentDistAmount

59

OrderItemSummaryOrder Management Standard Objects

Page 70: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort

DescriptionTotal of all order-level price adjustments applied to this OrderItemSummary. This valueincludes OrderItemAdjustmentLineSummaries that belong toOrderAdjustmentGroupSummaries of type Header.

Typecurrency

TotalAdjustmentDistAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal 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.

Typecurrency

TotalAdjustmentDistTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjustmentDistAmount.

Typecurrency

TotalAdjustmentTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjustmentAmount.

Typecurrency

TotalAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal 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.

Typecurrency

TotalLineAdjustmentAmount

60

OrderItemSummaryOrder Management Standard Objects

Page 71: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort

DescriptionTotal of all non-order-level price adjustments applied to this OrderItemSummary. This valueincludes OrderItemAdjustmentLineSummaries that don’t belong to anOrderAdjustmentGroupSummary, or that belong to an OrderAdjustmentGroupSummary oftype SplitLine.

Typecurrency

TotalLineAdjustmentAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal of all non-order-level price adjustments applied to this OrderItemSummary, inclusiveof tax. This amount is equal to TotalLineAdjustmentAmount +TotalLineAdjustmentTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalLineAdjustmentTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalLineAdjustmentAmount.

Typecurrency

TotalLineAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, not including adjustments or tax, of the OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typecurrency

TotalLineAmountWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal unadjusted amount of the OrderItemSummary, inclusive of tax. This amount is equalto TotalLineAmount + TotalLineTaxAmount.

61

OrderItemSummaryOrder Management Standard Objects

Page 72: Salesforce Order Management Developer Guide

DetailsField

This field is available in API version 49.0 and later.

Typecurrency

TotalLineTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalLineAmount.

Typecurrency

TotalPrice

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments but not tax, of the OrderItemSummary.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalPrice.

Typepicklist

Type

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionType of the OrderItemSummary. Delivery Charge indicates that the OrderItemSummaryrepresents a delivery charge. Order Product indicates that it represents any other type ofproduct, service, or charge. Each type corresponds to one type code, shown here inparentheses.

Possible values are:

• Delivery Charge (Charge)

• Order Product (Product)

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typepicklist

TypeCode

62

OrderItemSummaryOrder Management Standard Objects

Page 73: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionType code of the OrderItemSummary. Charge indicates that the OrderItemSummary representsa delivery charge. Product indicates that it represents any other type of product, service, orcharge.

Possible values are:

• Charge

• Product

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typecurrency

UnitPrice

PropertiesFilter, Nillable, Sort

DescriptionUnit price of the product represented by the OrderItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator 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 orderitem. 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 Callsdelete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

63

OrderItemSummaryChangeOrder Management Standard Objects

Page 74: Salesforce Order Management Developer Guide

Special Access RulesThis object is only available in Salesforce Order Management orgs.

Fields

DetailsField

Typereference

ChangeOrderItemId

PropertiesFilter, Group, Sort

DescriptionID of the associated change order item.

Typepicklist

ChangeType

PropertiesFilter, Group, Restricted picklist, Sort

DescriptionType of change represented by the OrderItemSummaryChange.

Possible values are:

• Cancel

• DeliveryChargeAdjustment

• ProductAdjustment

• Return

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO code for the currency of the OrderSummary associated with theOrderItemSummaryChange. 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.

64

OrderItemSummaryChangeOrder Management Standard Objects

Page 75: Salesforce Order Management Developer Guide

DetailsField

Typeboolean

IsPreFulfillment

PropertiesDefaulted on create, Filter, Group, Sort

DescriptionIndicates whether the change occurs before the OrderItemSummary has been fulfilled.

Typestring

OrderItemSummaryChangeNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the OrderItemSummaryChange.

Typereference

OrderItemSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderItemSummary to which the change applies.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary to which the associated OrderItemSummary belongs.

Typepicklist

Reason

PropertiesDefaulted on create, Filter, Group, Sort

DescriptionReason for the change. You can customize this list.

The list has one default value:

• Unknown

SEE ALSO:

OrderItemSummary

65

OrderItemSummaryChangeOrder Management Standard Objects

Page 76: Salesforce Order Management Developer Guide

OrderItemTaxLineItemSummary

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

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

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

Fields

DetailsField

Typecurrency

Amount

PropertiesFilter, Sort

DescriptionAmount of tax represented by the OrderItemTaxLineItemSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typepicklist

CurrencyIsoCode

PropertiesDefaulted on create, Filter, Group, Restricted picklist, Sort

DescriptionISO code for the currency of the OrderSummary associated with theOrderItemTaxLineItemSummary. 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.

66

OrderItemTaxLineItemSummaryOrder Management Standard Objects

Page 77: Salesforce Order Management Developer Guide

DetailsField

Typetextarea

Description

PropertiesNillable, Update

DescriptionDescription of the OrderItemTaxLineItemSummary.

This field can be edited.

Typestring

Name

PropertiesFilter, Group, idLookup, Sort, Update

DescriptionName of the OrderItemTaxLineItemSummary.

Typereference

OrderItemAdjustmentLineSummaryId

PropertiesFilter, Group, Nillable, Sort

DescriptionIf this object represents tax on an adjustment, this value is the ID of theOrderItemAdjustmentLineSummary to which the tax applies. If this value is null, theadjustment applies to an OrderItemSummary.

Typereference

OrderItemSummaryId

PropertiesFilter, Group, Sort

DescriptionIf this object represents tax on an OrderItemSummary, this value is the ID of thatOrderItemSummary. If this object represents tax on an adjustment, this value is the ID of theOrderItemSummary to which the adjustment applies.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary that the associated OrderItemSummary orOrderItemAdjustmentLineSummary belongs to.

67

OrderItemTaxLineItemSummaryOrder Management Standard Objects

Page 78: Salesforce Order Management Developer Guide

DetailsField

Typereference

OriginalOrderItemTaxLineItemId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the original order item tax line item associated with this summary object. Nillable=trueonly if the associated order summary is unmanaged. For managed order summaries,nillable=false.

Typepercent

Rate

PropertiesFilter, Nillable, Sort

DescriptionTax rate used to calculate the Amount.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typedate

TaxEffectiveDate

PropertiesFilter, Group, Sort

DescriptionDate on which the Amount was calculated. Important due to tax rate changes over time.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typepicklist

Type

PropertiesFilter, Group, Restricted picklist, Sort

DescriptionIndicates whether the Amount is actual or estimated.

Possible values are:

• Actual

• Estimated

68

OrderItemTaxLineItemSummaryOrder Management Standard Objects

Page 79: Salesforce Order Management Developer Guide

DetailsField

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator 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. Thisobject is available in API version 48.0 and later.

[other]: Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certainterms to avoid any effect on customer implementations.

Unlike most summary objects, an OrderPaymentSummary is not related to a similarly named order payment object. Instead, it combinesvalues from multiple payment objects that use the same payment method and apply to the same OrderSummary.

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

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

Fields

DetailsField

Typecurrency

AuthorizationAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that has been authorized.

Typecurrency

AuthorizationReversalAmount

69

OrderPaymentSummaryOrder Management Standard Objects

Page 80: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort

DescriptionAmount of the AuthorizationAmount that has been reversed.

Typecurrency

AvailableToCaptureAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that is available to be captured. Equal toAuthorizationAmount minus (CapturedAmount and PendingCaptureAmount andPendingReverseAuthAmount).

Typecurrency

AvailableToRefundAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that is available to be refunded. Equal toCapturedAmount minus (RefundedAmount and PendingCaptureAmount andPendingRefundAmount).

Typecurrency

BalanceAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal balance of all payments associated with this summary object.

Typecurrency

CapturedAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that has been captured.

Typepicklist

CurrencyIsoCode

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

70

OrderPaymentSummaryOrder Management Standard Objects

Page 81: Salesforce Order Management Developer Guide

DetailsField

DescriptionAvailable only for orgs with the multicurrency feature enabled. Contains the ISO code forthe currency of the OrderSummary associated with the OrderPaymentSummary. OrderManagement APIs and actions that create an OrderPaymentSummary for an OrderSummaryset 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.

Typestring

FullName

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe full name of the payment method user.

Typereference

LastPaymentGatewayLogId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the most recent payment gateway log associated with the OrderPaymentSummary.

Typestring

LastPaymentGatewayMessage

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionThe most recent message received from the payment gateway associated with theOrderPaymentSummary.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionTimestamp for when the current user last viewed a record related to this record.

This field is available in API version 49.0 and later.

71

OrderPaymentSummaryOrder Management Standard Objects

Page 82: Salesforce Order Management Developer Guide

DetailsField

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionTimestamp for when the current user last viewed this record. A null value can mean that thisrecord has only been referenced (LastReferencedDate) and not viewed.

This field is available in API version 49.0 and later.

Typestring

Method

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionName of the OrderPaymentSummary.

Typereference

OrderSummaryId

PropertiesFilter, Group, Sort

DescriptionID of the OrderSummary associated with the OrderPaymentSummary.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe ID of the user who currently owns this OrderPaymentSummary. Default value is the userlogged in to the API to perform the create.

Typereference

PaymentMethodId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the payment method associated with this OrderPaymentSummary.

Typecurrency

PendingAuthorizationAmount

72

OrderPaymentSummaryOrder Management Standard Objects

Page 83: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that is pending authorization.

Typecurrency

PendingCaptureAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that is pending capture.

Typecurrency

PendingRefundAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that is pending refund.

Typecurrency

PendingReverseAuthAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the AuthorizationAmount that is pending reversal.

Typecurrency

RefundedAmount

PropertiesFilter, Nillable, Sort

DescriptionAmount of the OrderPaymentSummary that has been refunded.

Typestring

Type

PropertiesFilter, Group, Sort

73

OrderPaymentSummaryOrder Management Standard Objects

Page 84: Salesforce Order Management Developer Guide

DetailsField

DescriptionThe 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 andany change objects applicable to it. This object is available in API version 48.0 and later.

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

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

Fields

DetailsField

Typereference

AccountId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the account or person account associated with the OrderSummary. It represents theshopper in the storefront.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typeint

ActiveProcessExceptionCount

PropertiesFilter, Group, Nillable, Sort

74

OrderSummaryOrder Management Standard Objects

Page 85: Salesforce Order Management Developer Guide

DetailsField

DescriptionTotal number of active process exceptions on the OrderSummary.

This field is available in API version 50.0 and later.

Typeaddress

BillingAddress

PropertiesFilter, Nillable

DescriptionBilling address associated with the OrderSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typestring

BillingCity

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionBilling address city.

Typestring

BillingCountry

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionBilling address country.

Typeemail

BillingEmailAddress

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionEmail address on the billing address.

Typepicklist

BillingGeocodeAccuracy

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionThe accuracy of the geocode for the billing address.

75

OrderSummaryOrder Management Standard Objects

Page 86: Salesforce Order Management Developer Guide

DetailsField

Possible values are:

• Address

• Block

• City

• County

• ExtendedZip

• NearAddress

• Neighborhood

• State

• Street

• Unknown

• Zip

Typedouble

BillingLatitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed 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.

Typedouble

BillingLongitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with BillingLatitude to specify the precise geolocation of the billing address. Acceptablevalues are numbers between –90 and 90 with up to 15 decimal places.

Typephone

BillingPhoneNumber

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionPhone number of the billing address.

Typestring

BillingPostalCode

PropertiesCreate, Filter, Group, Nillable, Sort, Update

76

OrderSummaryOrder Management Standard Objects

Page 87: Salesforce Order Management Developer Guide

DetailsField

DescriptionBilling address postal code.

Typestring

BillingState

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionBilling address state.

Typetextarea

BillingStreet

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionBilling address street.

Typereference

BillToContactId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the Contact associated with the OrderSummary. It represents the shopper in thestorefront when not using person accounts.

If the OrderLifeCycleType field is set to UNMANAGED, then users with the EditUnmanaged Order Summaries or B2B Commerce Integrator user permission can modify thisfield.

This field is available in API version 49.0 and later.

Typepicklist

BusinessModel

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionThe business model of the OrderSummary.

Possible values are:

• B2B

• B2C

This field is available in API version 53.0 and later.

77

OrderSummaryOrder Management Standard Objects

Page 88: Salesforce Order Management Developer Guide

DetailsField

Typereference

ChangeOrderId

PropertiesFilter, Group, Nillable, Sort

DescriptionReserved for future use.

Typepicklist

CurrencyIsoCode

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionAvailable only for orgs with the multicurrency feature enabled. Contains the ISO code forthe currency of the original Order associated with the OrderSummary. The default value isUSD.

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.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the OrderSummary.

This field can be edited.

Typecurrency

GrandTotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal amount, including adjustments and tax, of the OrderSummary.

Typeboolean

IsSuspended

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

78

OrderSummaryOrder Management Standard Objects

Page 89: Salesforce Order Management Developer Guide

DetailsField

DescriptionIndicates whether the OrderSummary is suspended. The default value is false.

This field is available in API version 50.0 and later.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed this record. A null value can mean thatthis record has only been referenced (LastReferencedDate) and not viewed.

TypedateTime

OrderedDate

PropertiesFilter, Nillable, Sort

DescriptionDate of the original order associated with this OrderSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typepicklist

OrderLifeCycleType

PropertiesFilter, Group, Restricted picklist, Sort

DescriptionSpecifies whether the OrderSummary is managed by Salesforce Order Management(MANAGED) or by an external system (UNMANAGED). An unmanaged OrderSummary isstored in Salesforce for reference purposes.

• Some Order Management APIs reject input records that are associated with unmanagedOrderSummaries.

• Order Management does not update financial bucket fields on some records that areassociated with unmanaged OrderSummaries.

79

OrderSummaryOrder Management Standard Objects

Page 90: Salesforce Order Management Developer Guide

DetailsField

• A user with the EditUnmanagedOrderSummaries or B2BCommerceIntegrator permissioncan edit certain fields on objects related to unmanaged OrderSummaries that are normallyonly accessible via APIs.

Possible values are:

• MANAGED—Managed

• UNMANAGED—Unmanaged

This field is available in API version 49.0 and later.

Typestring

OrderNumber

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionName of the OrderSummary.

Typeinteger

OrderProductLineCount

PropertiesFilter, Group, Nillable, Sort

DescriptionTotal number of unique products ordered on this Order Summary.

This field is available in API version 52.0 and later.

Typereference

OriginalOrderId

PropertiesFilter, Group, Sort

DescriptionID of the original order associated with this OrderSummary.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe ID of the user who currently owns this OrderSummary. Default value is the user loggedin to the API to perform the create.

TypedateTime

PoDate

80

OrderSummaryOrder Management Standard Objects

Page 91: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort, Update

DescriptionPurchase order date associated with this OrderSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

This field is available in API version 52.0 and later.

Typestring

PoNumber

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionPurchase order number associated with this OrderSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typeint

RoutingAttempts

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionThe number of attempts that have been made to route the order summary to inventorylocations.

This field is available in API version 51.0 and later.

Typereference

SalesChannelId

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the SalesChannel associated with this OrderSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

Typereference

SalesStoreId

81

OrderSummaryOrder Management Standard Objects

Page 92: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Group, Nillable, Sort

DescriptionID of the RetailStore or WebStore associated with this OrderSummary.

If the OrderLifeCycleType field on the associated OrderSummary is set toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

This field is only available in Salesforce B2B Commerce orgs.

Typepicklist

Status

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionStatus of the order summary. Unlike the Status and Status Category fields on the order andFulfillmentOrder objects, this field is optional.

We recommend that you use the same values in this picklist that you use in the Status picklistfor the order object.

Typepicklist

TaxLocaleType

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionThe 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 likesales 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 toUNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B CommerceIntegrator user permission can modify this field.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjDeliveryAmtWithTax

PropertiesFilter, Nillable, Sort

82

OrderSummaryOrder Management Standard Objects

Page 93: Salesforce Order Management Developer Guide

DetailsField

DescriptionTotal amount of all OrderItemSummaries of type code Charge belonging to thisOrderSummary, inclusive of item-level adjustments and tax. This amount is equal toTotalAdjustedDeliveryAmount + TotalAdjustedDeliveryTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjDistAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of distributed adjustments applied to OrderItemSummaries belonging to thisOrderSummary. This amount is equal to TotalProductAdjDistAmount plusTotalDeliveryAdjDistAmount.

Typecurrency

TotalAdjDistAmountWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal of distributed adjustments applied to OrderItemSummaries belonging to thisOrderSummary, inclusive of tax. This amount is equal to TotalAdjDistAmount plusTotalAdjDistTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalAdjDistTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjDistAmount.

Typecurrency

TotalAdjProductAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of all OrderItemSummaries of type code Product belonging to thisOrderSummary, inclusive of item-level adjustments and tax. This amount is equal toTotalAdjustedProductAmount plus TotalAdjustedProductTaxAmount.

This field is available in API version 49.0 and later.

83

OrderSummaryOrder Management Standard Objects

Page 94: Salesforce Order Management Developer Guide

DetailsField

Typecurrency

TotalAdjustedDeliveryAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including item-level adjustments but not order-level adjustments or tax, of allOrderItemSummaries of type code Charge belonging to this OrderSummary.

Typecurrency

TotalAdjustedDeliveryTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjustedDeliveryAmount.

Typecurrency

TotalAdjustedProductAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including item-level adjustments but not order-level adjustments or tax, of allOrderItemSummaries of type code Product belonging to this OrderSummary.

Typecurrency

TotalAdjustedProductTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAdjustedProductAmount.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments but not tax, of all OrderItemSummaries belonging to thisOrderSummary. Equal to TotalAdjustedProductAmount plus TotalAdjustedDeliveryAmount.

Typecurrency

TotalDeliveryAdjDistAmount

PropertiesFilter, Nillable, Sort

84

OrderSummaryOrder Management Standard Objects

Page 95: Salesforce Order Management Developer Guide

DetailsField

DescriptionTotal of all order-level price adjustments applied to OrderItemSummaries of type code Chargebelonging to this OrderSummary. This value includes OrderItemAdjustmentLineSummariesthat belong to OrderAdjustmentGroupSummaries of type Header.

Typecurrency

TotalDeliveryAdjDistAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal of all order-level price adjustments applied to OrderItemSummaries of type code Chargebelonging to this OrderSummary, inclusive of tax. This value includesOrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries oftype Header. It is equal to TotalDeliveryAdjDistAmount + TotalDeliveryAdjDistTaxAmount.

This field is available in API version 49.0 and later.

Typecurrency

TotalDeliveryAdjDistTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalDeliveryAdjDistAmount.

Typecurrency

TotalProductAdjDistAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of all order-level price adjustments applied to OrderItemSummaries of type codeProduct belonging to this OrderSummary. This value includesOrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries oftype Header.

Typecurrency

TotalProductAdjDistAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal of all order-level price adjustments applied to OrderItemSummaries of type codeProduct belonging to this OrderSummary, inclusive of tax. This value includesOrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries oftype Header. It is equal to TotalProductAdjDistAmount + TotalProductAdjDistTaxAmount.

85

OrderSummaryOrder Management Standard Objects

Page 96: Salesforce Order Management Developer Guide

DetailsField

This field is available in API version 49.0 and later.

Typecurrency

TotalProductAdjDistTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalProductAdjDistAmount.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal tax on all OrderItemSummaries belonging to this OrderSummary. Equal toTotalAdjustedDeliveryTaxAmount plus TotalAdjustedProductTaxAmount.

Associated ObjectsThis object has the following associated objects. Unless noted, they are available in the same API version as this object.

OrderSummaryFeedFeed tracking is available for the object.

OrderSummaryOwnerSharingRuleSharing rules are available for the object.

OrderSummaryShareSharing 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 futureattempts and to record completed attempts. This object is available in API version 51.0 and later.

86

OrderSummaryRoutingScheduleOrder Management Standard Objects

Page 97: Salesforce Order Management Developer Guide

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

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

Fields

DetailsField

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed this record. If this value is null, it’spossible that this record was referenced (LastReferencedDate) and not viewed.

Typestring

Name

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionThe name of the order summary routing schedule.

Typereference

OrderSummaryId

PropertiesCreate, Filter, Group, Sort

Description(Master-Detail) The order summary associated with the routing schedule.

Typereference

OwnerId

87

OrderSummaryRoutingScheduleOrder Management Standard Objects

Page 98: Salesforce Order Management Developer Guide

DetailsField

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionID of the User who currently owns this order summary routing schedule. Default value is theUser logged in to the API to perform the create.

Typepicklist

Reason

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionReason for the routing attempt. You can customize this list.

The list has one default value:

• Unknown

Typepicklist

ScheduleStatus

PropertiesCreate, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update

DescriptionIdentifies whether this routing attempt has already run or is scheduled to run.

Possible values are:

• ABANDONED

• COMPLETED

• SCHEDULED

TypedateTime

ScheduledDatetime

PropertiesCreate, Filter, Sort, Update

DescriptionIdentifies when this routing attempt was run or is scheduled to run. If theScheduleStatus is ABANDONED or COMPLETED, then you can’t modify this value.

Associated ObjectsThis object has the following associated objects. Unless noted, they are available in the same API version as this object.

OrderSummaryRoutingScheduleOwnerSharingRuleSharing rules are available for the object.

88

OrderSummaryRoutingScheduleOrder Management Standard Objects

Page 99: Salesforce Order Management Developer Guide

OrderSummaryRoutingScheduleShareSharing 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 processexception before order summary processing can continue. This object is available in API version 50.0 and later.

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

Fields

DetailsField

Typereference

AttachedToId

PropertiesCreate, Filter, Group, Sort, Update

DescriptionID of the object associated with the ProcessException.

This is a polymorphic relationship field.

Relationship NameAttachedTo

Relationship TypeLookup

Refers ToCreditMemo, Invoice, Order, OrderItem, Payment, PaymentAuthorization, Refund, ReturnOrder

Typereference

CaseId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionID of the case associated with the ProcessException.

This is a relationship field.

Relationship NameCase

Relationship TypeLookup

89

ProcessExceptionOrder Management Standard Objects

Page 100: Salesforce Order Management Developer Guide

DetailsField

Refers ToCase

Typepicklist

Category

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionProcessingException type. You can customize the category picklist to represent your businessprocesses.

Possible values are:

• Fulfillment

• Invoicing

• Order Activation

• Order Approval

• Payment

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDetailed description of the ProcessException.

Typestring

ExternalReference

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDescription of external entities associated with the ProcessException.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionTimestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

90

ProcessExceptionOrder Management Standard Objects

Page 101: Salesforce Order Management Developer Guide

DetailsField

PropertiesFilter, Nillable, Sort

DescriptionTimestamp for when the current user last viewed this record. A null value can mean that thisrecord has only been referenced (LastReferencedDate) and not viewed.

Typestring

Message

PropertiesCreate, Filter, Group, Sort, Update

DescriptionShort description of the ProcessException

Typereference

OrderSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionID of the OrderSummary associated with the ProcessException. The ProcessExceptioncomponent is displayed on this OrderSummary.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionID of the User who currently owns this ProcessException. Default value is the User logged into the API to perform the create.

This is a polymorphic relationship field.

Relationship NameOwner

Relationship TypeLookup

Refers ToGroup, User

Typepicklist

Priority

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

91

ProcessExceptionOrder Management Standard Objects

Page 102: Salesforce Order Management Developer Guide

DetailsField

DescriptionResolution priority for the ProcessException. You can customize the priority picklist torepresent your business processes.

Possible values are:

• High

• Low

Typestring

ProcessExceptionNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionThe unique name of the ProcessException, formatted as PE-(00000000).

Typepicklist

Severity

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionSeverity of the ProcessException. Each severity value corresponds to one severity category.You can customize the severity picklist to represent your business processes. If you customizethe severity picklist, include at least one severity value for each severity category.

Possible values are:

• High

• Low

Typepicklist

SeverityCategory

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionSeverity category of the ProcessException. Each severity category corresponds to one ormore severity values. The severity category is used to show the severity icon in theProcessException list view.

Possible values are:

• High

• Low

Typepicklist

Status

92

ProcessExceptionOrder Management Standard Objects

Page 103: Salesforce Order Management Developer Guide

DetailsField

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionStatus of the ProcessException. Each status corresponds to one status category, shown herein 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)

Typepicklist

StatusCategory

PropertiesFilter, Group, Restricted picklist, Sort

DescriptionStatus category of the ProcessException. Each status category corresponds to one or morestatuses.

Possible values are:

• ACTIVE

• INACTIVE

• RESOLVED

Associated ObjectsThis object has the following associated objects. Unless noted, they are available in the same API version as this object.

ProcessExceptionOwnerSharingRuleSharing rules are available for the object.

ProcessExceptionShareSharing 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 objectis available in API version 42.0 and later.

93

ReturnOrderOrder Management Standard Objects

Page 104: Salesforce Order Management Developer Guide

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

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

Special Access RulesField Service or Order Management must be enabled. If return orders are enabled by a Salesforce Order Management license, they mustbe created with a Status corresponding to the Status Category Activated. The default Statuses corresponding to Activated are Submittedand Approved.

Fields

DetailsField Name

Typereference

AccountId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe account associated with the return order.

This is a relationship field.

Relationship NameAccount

Relationship TypeLookup

Refers ToAccount

Typereference

CaseId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe case associated with the return order.

This is a relationship field.

Relationship NameCase

Relationship TypeLookup

94

ReturnOrderOrder Management Standard Objects

Page 105: Salesforce Order Management Developer Guide

DetailsField Name

Refers ToCase

Typereference

ContactId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe contact associated with the return order.

This is a relationship field.

Relationship NameContact

Relationship TypeLookup

Refers ToContact

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionNotes or context about the return order.

Typereference

DestinationLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe location where the items are being returned to. For example, if the returnorder tracks the return of products from a technician’s van to a warehouse, thewarehouse is the destination location.

This is a relationship field.

Relationship NameDestinationLocation

Relationship TypeLookup

Refers ToLocation

95

ReturnOrderOrder Management Standard Objects

Page 106: Salesforce Order Management Developer Guide

DetailsField Name

TypedateTime

ExpectedArrivalDate

PropertiesCreate, Filter, Nillable, Sort, Update

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

TypedateTime

ExpirationDate

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionAuthorizations can’t be captured after their expiration dates.

This field is available in API version 50.0 and later.

Typecurrency

GrandTotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments and tax, of the products and delivery charges onthe return order. This includes all return order line items associated with thereturn order. This amount is equal to TotalAmount + TotalTaxAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe date when the return order was last modified. Its label in the user interfaceis Last Modified Date.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe date when the return order was last viewed.

96

ReturnOrderOrder Management Standard Objects

Page 107: Salesforce Order Management Developer Guide

DetailsField Name

Typepicklist

LifeCycleType

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionSpecifies whether the order summary is managed by Salesforce OrderManagement (MANAGED) or by an external system (UNMANAGED). Anunmanaged order summary is stored in Salesforce for reference purposes.

• Some Order Management APIs reject input records that are associated withunmanaged order summaries.

• Order Management does not update financial bucket fields on some recordsthat are associated with unmanaged order summaries.

• A user with the EditUnmanagedOrderSummaries or B2BCommerceIntegratorpermission 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 50.0 and later.

Typereference

OrderId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe order associated with the return order. When you associated a return orderwith an order, you can associate the return order’s line items with order products.

This is a relationship field.

Relationship NameOrder

Relationship TypeLookup

Refers ToOrder

Typereference

OrderSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the order summary associated with the return order.

97

ReturnOrderOrder Management Standard Objects

Page 108: Salesforce Order Management Developer Guide

DetailsField Name

This field is available in API version 50.0 and later.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe owner of the return order.

This is a polymorphic relationship field.

Relationship NameOwner

Relationship TypeLookup

Refers ToGroup, User

Typereference

ProductRequestId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product request associated with the return order. When you associated areturn order with a product request, you can associate the return order’s lineitems with the product request’s line items.

A return order might be related to a product request if the return order tracksthe 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 returnorder to return the third to the original location, and list the product request inthis field.

This is a relationship field.

Relationship NameProductRequest

Relationship TypeLookup

Refers ToProductRequest

This field is available only if Field Service or Health Cloud is enabled.

Typereference

ProductServiceCampaignId

98

ReturnOrderOrder Management Standard Objects

Page 109: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product service campaign associated with the return order

This field is available only if Field Service is enabled.

Typestring

ReturnOrderNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

Description(Read only) Auto-generated number identifying the return order.

Typereference

ReturnedById

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionID of the user returning the items.

This is a relationship field.

Relationship NameReturnedBy

Relationship TypeLookup

Refers ToUser

Typeaddress

ShipFromAddress

PropertiesFilter, Nillable

DescriptionThe return shipping address. This address tracks the location of the items at thestart of the return or repair. For example, if a customer is returning an item, theShip From address is the customer’s address.

Typestring

ShipFromCity

PropertiesCreate, Filter, Group, Nillable, Sort, Update

99

ReturnOrderOrder Management Standard Objects

Page 110: Salesforce Order Management Developer Guide

DetailsField Name

DescriptionThe city of the return shipping address. This address tracks the location of theitems at the start of the return or repair. For example, if a customer is returningan item, the Ship From address is the customer’s address.

Typestring

ShipFromCountry

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe country of the return shipping address. This address tracks the location ofthe items at the start of the return or repair. For example, if a customer is returningan item, the Ship From address is the customer’s address.

Typepicklist

ShipFromGeocodeAccuracy

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionAccuracy level of the geocode for the return shipping address. See CompoundField Considerations and Limitations for details on geolocation compound fields.

Note: This field is available in the API only.

Typedouble

ShipFromLatitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with Longitude to specify the precise geolocation of the return shippingaddress. Acceptable values are numbers between –90 and 90 with up to 15decimal places. See Compound Field Considerations and Limitations for detailson geolocation compound fields.

Note: This field is available in the API only.

Typedouble

ShipFromLongitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with Latitude to specify the precise geolocation of the return shippingaddress. Acceptable values are numbers between –180 and 180 with up to 15

100

ReturnOrderOrder Management Standard Objects

Page 111: Salesforce Order Management Developer Guide

DetailsField Name

decimal places. See Compound Field Considerations and Limitations for detailson geolocation compound fields.

Note: This field is available in the API only.

Typestring

ShipFromPostalCode

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe postal code of the return shipping address. This address tracks the locationof the items at the start of the return or repair. For example, if a customer isreturning an item, the Ship From address is the customer’s address.

Typestring

ShipFromState

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe state of the return shipping address. This address tracks the location of theitems at the start of the return or repair. For example, if a customer is returningan item, the Ship From address is the customer’s address.

Typetextarea

ShipFromStreet

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe street of the return shipping address. This address tracks the location of theitems at the start of the return or repair. For example, if a customer is returningan item, the Ship From address is the customer’s address.

Typepicklist

ShipmentType

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionThe type of shipment associated with the return order. Available values are:

• Standard (default value)

• Rush

• Overnight

• Next Business Day

101

ReturnOrderOrder Management Standard Objects

Page 112: Salesforce Order Management Developer Guide

DetailsField Name

• Pick Up

Typereference

SourceLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe items’ location at the start of the return or repair. For example, if the returnorder tracks the return of products from a technician’s service vehicle to awarehouse, the service vehicle is the source location.

This is a relationship field.

Relationship NameSourceLocation

Relationship TypeLookup

Refers ToLocation

Typepicklist

Status

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionThe status of the return order. Available values are:

• Draft

• Submitted

• Approved

• Canceled

• Closed

If return orders are enabled by a Salesforce Order Management license, they mustbe created with a Status corresponding to the Status Category Activated.The default Statuses corresponding to Activated are Submitted and Approved.

Typepicklist

StatusCategory

PropertiesDefaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

DescriptionStatus category of the return order. Processing of the return order depends onthis value. Each status category corresponds to one or more statuses.

Possible values are:

102

ReturnOrderOrder Management Standard Objects

Page 113: Salesforce Order Management Developer Guide

DetailsField Name

• Activated

• Canceled

• Closed

• Draft

This field is available in API version 50.0 and later.

Typepicklist

TaxLocaleType

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionThe system used to handle tax on the original order associated with the returnorder. Gross usually applies to taxes like value-added tax (VAT), and Net usuallyapplies 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.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionAdjusted total, not including tax, of the return order line items, including productsand delivery charges, on the ReturnOrder.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalDeliveryAdjustAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the delivery charges on thereturn order. This value only includes adjustments to return order line items oftype code Charge.

This is a calculated field.

This field is available in API version 50.0 and later.

103

ReturnOrderOrder Management Standard Objects

Page 114: Salesforce Order Management Developer Guide

DetailsField Name

Typecurrency

TotalDeliveryAdjustAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the delivery charges on thereturn order, inclusive of tax. This value only includes adjustments to return orderline items of type code Charge. This amount is equal toTotalDeliveryAdjustAmount + TotalDeliveryAdjustTaxAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalDeliveryAdjustTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalDeliveryAdjustmentAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalDeliveryAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of the delivery charges on the return order. This value only includes returnorder line items of type code Charge.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalDeliveryAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the delivery charges on the return order, inclusive of tax. Thisvalue only includes return order line items of type code Charge. This amount isequal to TotalDeliveryAmount + TotalDeliveryTaxAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

104

ReturnOrderOrder Management Standard Objects

Page 115: Salesforce Order Management Developer Guide

DetailsField Name

Typecurrency

TotalDeliveryTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalDeliveryAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalProductAdjustAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the products on the returnorder. This value only includes adjustments to return order line items of typecode Product.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalProductAdjustAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the price adjustments applied to the products on the returnorder, inclusive of tax. This value only includes adjustments to return order lineitems 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.

Typecurrency

TotalProductAdjustTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalProductAdjustmentAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

105

ReturnOrderOrder Management Standard Objects

Page 116: Salesforce Order Management Developer Guide

DetailsField Name

Typecurrency

TotalProductAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal of the product charges on the return order. This value only includes returnorder line items of type code Product.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalProductAmtWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal amount of the product charges on the return order, inclusive of tax. Thisvalue only includes return order line items of type code Product. This amount isequal to TotalProductAmount + TotalProductTaxAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalProductTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalProductAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

106

ReturnOrderOrder Management Standard Objects

Page 117: Salesforce Order Management Developer Guide

UsageYou can use return orders to track customer returns, customer repairs, or the return of inventory from a technician’s van stock to awarehouse or supplier. Customers can initiate a return from a community, or agents can create return orders in response to a customercall 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 thereturned items, each line item must list one or more of the following: product, product item, asset, product request line item, and orderproduct. Return orders can be associated with a product request, case, account, contact, and order if needed. This versatility lets you usereturn orders to track a wide range of return scenarios.

Associated ObjectsThis 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.

ReturnOrderFeedFeed tracking is available for the object.

ReturnOrderHistoryHistory is available for tracked fields of the object.

ReturnOrderOwnerSharingRuleSharing rules are available for the object.

ReturnOrderShareSharing 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 Callscreate(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),retrieve(), update(), upsert()

Special Access RulesOrder Management must be enabled.

Fields

DetailsField

Typecurrency

Amount

107

ReturnOrderItemAdjustmentOrder Management Standard Objects

Page 118: Salesforce Order Management Developer Guide

DetailsField

PropertiesCreate, Filter, Sort

DescriptionAmount, not including tax, of the adjustment.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the adjustment.

Typereference

OrderItemAdjustLineSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the order item adjustment line summary associated with the adjustment.

Typereference

ReturnOrderId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the return order associated with the return order line item to which the adjustmentapplies.

This is a relationship field.

Relationship NameReturnOrder

Relationship TypeLookup

Refers ToReturnOrder

Typestring

ReturnOrderItemAdjustmentNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the return order item adjustment.

108

ReturnOrderItemAdjustmentOrder Management Standard Objects

Page 119: Salesforce Order Management Developer Guide

DetailsField

Typereference

ReturnOrderLineItemId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the return order line item to which this adjustment applies.

This is a relationship field.

Relationship NameReturnOrderLineItem

Relationship TypeLookup

Refers ToReturnOrderLineItem

Typecurrency

TotalAmtWithTax

PropertiesFilter, Nillable, Sort

Description

Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +TotalTaxAmount.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax 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 Callscreate(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),retrieve(), update(), upsert()

109

ReturnOrderItemTaxOrder Management Standard Objects

Page 120: Salesforce Order Management Developer Guide

Special Access RulesOrder Management must be enabled.

Fields

DetailsField

Typecurrency

Amount

PropertiesCreate, Filter, Sort

DescriptionAmount of tax represented by the return order item tax.

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the return order item tax.

Typereference

OrderItemTaxLineItemSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the order item tax line item summary associated with the order item summary thatcorresponds to the return order line item to which the tax applies.

Typepercent

Rate

PropertiesFilter, Nillable, Sort

DescriptionTax rate used to calculate the Amount.

Typereference

ReturnOrderId

PropertiesCreate, Filter, Group, Sort

DescriptionID of the associated return order.

110

ReturnOrderItemTaxOrder Management Standard Objects

Page 121: Salesforce Order Management Developer Guide

DetailsField

This is a relationship field.

Relationship NameReturnOrder

Relationship TypeLookup

Refers ToReturnOrder

Typereference

ReturnOrderItemAdjustmentId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionIf this object represents a tax on an adjustment, this value is the ID of the return order itemadjustment to which the tax applies. If this value is null, the adjustment applies to a returnorder line item.

This is a relationship field.

Relationship NameReturnOrderItemAdjustment

Relationship TypeLookup

Refers ToReturnOrderItemAdjustment

Typestring

ReturnOrderItemTaxNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionID of the return order item tax.

Typereference

ReturnOrderLineItemId

PropertiesCreate, Filter, Group, Sort

DescriptionIf this object represents a tax on a return order line item, this value is the ID of that returnorder line item. If this object represents a tax on an adjustment, this value is the ID of thereturn order line item to which the adjustment applies.

This is a relationship field.

111

ReturnOrderItemTaxOrder Management Standard Objects

Page 122: Salesforce Order Management Developer Guide

DetailsField

Relationship NameReturnOrderLineItem

Relationship TypeLookup

Refers ToReturnOrderLineItem

Typedate

TaxEffectiveDate

PropertiesFilter, Group, Nillable, Sort

DescriptionDate on which the Amount was calculated. Important due to tax rate changes over time.

Typepicklist

Type

PropertiesCreate, Filter, Group, Restricted picklist, Sort, Update

DescriptionShows 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 asneeded.

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 returnedas 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 Androidand iOS, and communities built using Salesforce Tabs + Visualforce.

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

112

ReturnOrderLineItemOrder Management Standard Objects

Page 123: Salesforce Order Management Developer Guide

Special Access RulesField Service or Order Management must be enabled.

Fields

DetailsField Name

Typereference

AssetId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe asset associated with the return order line item. One or more of the followingfields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId, andProductRequestLineItemId.

This is a relationship field.

Relationship NameAsset

Relationship TypeLookup

Refers ToAsset

Typereference

ChangeOrderItemId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID 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 NameChangeOrderItem

Relationship TypeLookup

Refers ToOrderItem

Typetextarea

Description

PropertiesCreate, Nillable, Update

113

ReturnOrderLineItemOrder Management Standard Objects

Page 124: Salesforce Order Management Developer Guide

DetailsField Name

DescriptionNotes or context about the return order line item.

Typereference

DestinationLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe location where the items are being returned to. For example, if the returnorder tracks the return of products from a technician’s van to a warehouse, thewarehouse is the destination location.

This is a relationship field.

Relationship NameDestinationLocation

Relationship TypeLookup

Refers ToLocation

Typecurrency

GrossUnitPrice

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUnit price, including tax, of the product represented by the associated order itemsummary.

This field is available in API version 50.0 and later.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe date when the return order line item was last modified. Its label in the userinterface is Last Modified Date.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

114

ReturnOrderLineItemOrder Management Standard Objects

Page 125: Salesforce Order Management Developer Guide

DetailsField Name

DescriptionThe date when the return order line item was last viewed.

Typereference

OrderItemId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe order product associated with the return order line item. One or more of thefollowing fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId,and ProductRequestLineItemId.

This is a relationship field.

Relationship NameOrderItem

Relationship TypeLookup

Refers ToOrderItem

Typereference

OrderItemSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort

DescriptionID of the order item summary associated with the return order line item.

This field is available in API version 50.0 and later.

Typepicklist

ProcessingPlan

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionIndicates the preferred fate of the items following their return. Available valuesare:

• 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

Typereference

Product2Id

115

ReturnOrderLineItemOrder Management Standard Objects

Page 126: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product associated with the return order line item. One or more of thefollowing fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId,and ProductRequestLineItemId.

This is a relationship field.

Relationship NameProduct2

Relationship TypeLookup

Refers ToProduct2

Typereference

ProductItemId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product item representing the location of the product at the start of thereturn. One or more of the following fields must be filled out: AssetId, OrderItemId,Product2Id, ProductItemId, and ProductRequestLineItemId.

This is a relationship field.

Relationship NameProductItem

Relationship TypeLookup

Refers ToProductItem

Typereference

ProductRequestLineItemId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product request line item associated with the return order line item. One ormore of the following fields must be filled out: AssetId, OrderItemId, Product2Id,ProductItemId, and ProductRequestLineItemId.

This is a relationship field.

Relationship NameProductRequestLineItem

116

ReturnOrderLineItemOrder Management Standard Objects

Page 127: Salesforce Order Management Developer Guide

DetailsField Name

Relationship TypeLookup

Refers ToProductRequestLineItem

Typereference

ProductServiceCampaignId

PropertiesFilter, Group, Nillable, Sort

DescriptionThe product service campaign associated with the return order line item.

Typereference

ProductServiceCampaignItemId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product service campaign item associated with the return order line item.

Typedouble

QuantityExpected

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionThe quantity of items expected to be returned.

This field is available in API version 50.0 and later.

Typedouble

QuantityReceived

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionThe actual quantity of items received for return.

This field is available in API version 50.0 and later.

Typedouble

QuantityRejected

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionThe quantity of items rejected for return.

117

ReturnOrderLineItemOrder Management Standard Objects

Page 128: Salesforce Order Management Developer Guide

DetailsField Name

This field is available in API version 50.0 and later.

Typedouble

QuantityReturned

PropertiesCreate, Filter, Sort, Update

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

Typepicklist

QuantityUnitOfMeasure

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionUnits of the returned items; for example, kilograms or liters. Quantity Unit ofMeasure picklist values are inherited from the Quantity Unit of Measure field onproducts.

Typepicklist

ReasonForRejection

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionReason 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.

Typepicklist

ReasonForReturn

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionThe reason the items are being returned. Available values are:

• Damaged

• Defective

• Duplicate Order

118

ReturnOrderLineItemOrder Management Standard Objects

Page 129: Salesforce Order Management Developer Guide

DetailsField Name

• Wrong Item

• Wrong Quantity

• Not Satisfied

• Outdated

• Other

Typepicklist

RepaymentMethod

PropertiesCreate, Defaulted on create, Filter, Group, Nillable, Sort, Update

DescriptionThe method by which the customer or owner will be reimbursed for the itemsbeing 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 forthem

• Return—The items will be returned to the owner (for example, followingtheir repair)

Typereference

ReturnOrderId

PropertiesCreate, Filter, Group, Sort

DescriptionThe return order that the return order line item belongs to.

This is a relationship field.

Relationship NameReturnOrder

Relationship TypeLookup

Refers ToReturnOrder

Typestring

ReturnOrderLineItemNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

Description(Read only) Auto-generated number that identifies the return order line item.

119

ReturnOrderLineItemOrder Management Standard Objects

Page 130: Salesforce Order Management Developer Guide

DetailsField Name

Typereference

SourceLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe items’ location at the start of the return or repair. For example, if the returnorder tracks the return of products from a technician’s service vehicle to awarehouse, the service vehicle is the source location.

This is a relationship field.

Relationship NameSourceLocation

Relationship TypeLookup

Refers ToLocation

Typecurrency

TotalAdjustmentAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal 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.

Typecurrency

TotalAdjustmentAmountWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal 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.

Typecurrency

TotalAdjustmentTaxAmount

PropertiesFilter, Nillable, Sort

120

ReturnOrderLineItemOrder Management Standard Objects

Page 131: Salesforce Order Management Developer Guide

DetailsField Name

DescriptionTax on the TotalAdjustmentAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalAmount

PropertiesFilter, Nillable, Sort

DescriptionTotal, 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.

Typecurrency

TotalLineAmount

PropertiesCreate, Defaulted on create, Filter, Nillable, Sort, Update

DescriptionTotal, not including adjustments or tax, of the return order line item.

This field is available in API version 50.0 and later.

Typecurrency

TotalLineAmountWithTax

PropertiesFilter, Nillable, Sort

DescriptionTotal price of the return order line item, inclusive of tax. This amount is equal toTotalLineAmount + TotalLineTaxAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typecurrency

TotalLineTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalLineAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

121

ReturnOrderLineItemOrder Management Standard Objects

Page 132: Salesforce Order Management Developer Guide

DetailsField Name

Typecurrency

TotalPrice

PropertiesFilter, Nillable, Sort

DescriptionTotal, including adjustments but not tax, of the return order line item. Equal toUnitPrice times Quantity.

This is a calculated field.

Typecurrency

TotalTaxAmount

PropertiesFilter, Nillable, Sort

DescriptionTax on the TotalAmount.

This is a calculated field.

This field is available in API version 50.0 and later.

Typepicklist

Type

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionType of the return order line item. Matches the type of the associated order itemsummary. Delivery Charge indicates that the return order line item represents adelivery charge. Order Product indicates that it represents any other type ofproduct, 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.

Typepicklist

TypeCode

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionType code of the return order line item. Matches the type code of the associatedorder item summary. Processing depends on this value. Charge indicates thatthe return order line item represents a delivery charge. Product indicates that it

122

ReturnOrderLineItemOrder Management Standard Objects

Page 133: Salesforce Order Management Developer Guide

DetailsField Name

represents an other type of product, service, or charge. Each type categorycorresponds to one or more types.

Possible values are:

• Charge

• Product

This field is available in API version 50.0 and later.

Typecurrency

UnitPrice

PropertiesCreate, Defaulted on create, Filter, Nillable, Sort, Update

DescriptionUnit price of the return order line item.

This field is available in API version 50.0 and later.

Associated ObjectsThis 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.

ReturnOrderLineItemFeedFeed tracking is available for the object.

ReturnOrderLineItemHistoryHistory 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. If you integrate SalesforceOrder Management with Salesforce B2C Commerce, set up a SalesChannel corresponding to each Site in your B2C Commerceimplementation. This object is available in API version 48.0 and later.

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

Special Access RulesThis object is only available in Salesforce Order Management orgs.

123

SalesChannelOrder Management Standard Objects

Page 134: Salesforce Order Management Developer Guide

Fields

DetailsField

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDescription of the SalesChannel.

Typestring

ExternalChannelNumber

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionExternal system identifier for the SalesChannel.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed a record related to this record.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp for when the current user last viewed this record. A null value can mean thatthis record has only been referenced (LastReferencedDate) and not viewed.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe ID of the user who currently owns this SalesChannel. Default value is the user logged into the API to perform the create.

Typestring

SalesChannelName

124

SalesChannelOrder Management Standard Objects

Page 135: Salesforce Order Management Developer Guide

DetailsField

PropertiesCreate, Filter, Group, idLookup, Sort, Update

DescriptionName of the SalesChannel.

Typepicklist

Type

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionType of the SalesChannel. Each Type corresponds to one Type Category. You can customizethe Type picklist to represent your business processes, but the Type Category picklist is fixedbecause some order processing is based on those values. If you customize the Type picklist,include at least one value for each Type Category. This field is available in API version 53.0and later.

Default values are:

• B2B

• B2C

• Other

Typepicklist

TypeCategory

PropertiesFilter, Group, Nillable, Restricted picklist, Sort

DescriptionType Category of the SalesChannel. Each Type Category corresponds to one or more Types.This field isn’t visible in the UI. This field is available in API version 53.0 and later.

Possible values are:

• B2B

• B2C

• Other

SEE ALSO:

OrderSummary

Shipment

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

125

ShipmentOrder Management Standard Objects

Page 136: Salesforce Order Management Developer Guide

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

Special Access RulesThis object is only available in Salesforce Order Management orgs or if Field Service is enabled.

Fields

DetailsField Name

TypedateTime

ActualDeliveryDate

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionDate the product was delivered.

Typereference

DeliveredToId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe person or entity the product was delivered to.

This is a polymorphic relationship field.

Relationship NameDeliveredTo

Relationship TypeLookup

Refers ToGroup, User

Typereference

DeliveryMethodId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe delivery method used for the shipment.

This field is available in API version 51.0 and later.

126

ShipmentOrder Management Standard Objects

Page 137: Salesforce Order Management Developer Guide

DetailsField Name

Typetextarea

Description

PropertiesCreate, Nillable, Update

DescriptionDetails not recorded in the provided fields

Typereference

DestinationLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe place the product is to be delivered.

This is a relationship field.

Relationship NameDestinationLocation

Relationship TypeLookup

Refers ToLocation

TypedateTime

ExpectedDeliveryDate

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionDate the product is expected to be delivered.

Typereference

FulfillmentOrderId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe fulfillment order that the shipment belongs to.

This field is available in API version 51.0 and later.

TypedateTime

LastReferencedDate

PropertiesFilter, Nillable, Sort

127

ShipmentOrder Management Standard Objects

Page 138: Salesforce Order Management Developer Guide

DetailsField Name

DescriptionThe timestamp when the current user last accessed this record, a record relatedto this record, or a list view.

TypedateTime

LastViewedDate

PropertiesFilter, Nillable, Sort

DescriptionThe timestamp when the current user last viewed this record or list view. If thisvalue is null, the user might have only accessed this record or list view(LastReferencedDate) but not viewed it.

Typereference

OrderSummaryId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe order summary associated with the shipment.

This field is available in API version 51.0 and later.

Typereference

OwnerId

PropertiesCreate, Defaulted on create, Filter, Group, Sort, Update

DescriptionThe owner of the shipment.

This is a polymorphic relationship field.

Relationship NameOwner

Relationship TypeLookup

Refers ToGroup, User

Typepicklist

Provider

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe company or person making the transfer.

128

ShipmentOrder Management Standard Objects

Page 139: Salesforce Order Management Developer Guide

DetailsField Name

Typereference

ReturnOrderId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionFor a return Shipment, the associated ReturnOrder.

This field is available in API version 53.0 and later.

Typeaddress

ShipFromAddress

PropertiesFilter, Nillable

DescriptionThe place the product is coming from.

Typestring

ShipFromCity

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe city of the address where the shipment originates.

Typestring

ShipFromCountry

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe country of the address where the shipment originates.

Typepicklist

ShipFromGeocodeAccuracy

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionAccuracy level of the geocode for the address where the shipment originates.See Compound Field Considerations and Limitations for details on geolocationcompound fields.

Note: This field is available in the API only.

Typedouble

ShipFromLatitude

129

ShipmentOrder Management Standard Objects

Page 140: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with Longitude to specify the precise geolocation of the address where theshipment originates. Acceptable values are numbers between –90 and 90 withup to 15 decimal places. See Compound Field Considerations and Limitationsfor details on geolocation compound fields.

Note: This field is available in the API only.

Typedouble

ShipFromLongitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with Latitude to specify the precise geolocation of the address where theshipment originates. Acceptable values are numbers between –180 and 180 withup to 15 decimal places. See Compound Field Considerations and Limitationsfor details on geolocation compound fields.

Note: This field is available in the API only.

Typestring

ShipFromPostalCode

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe postal code of the address where the shipment originates.

Typestring

ShipFromState

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe state of the address where the shipment originates.

Typetextarea

ShipFromStreet

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe street of the address where the shipment originates.

130

ShipmentOrder Management Standard Objects

Page 141: Salesforce Order Management Developer Guide

DetailsField Name

Typeaddress

ShipToAddress

PropertiesFilter, Nillable

DescriptionThe physical address where the shipment is delivered.

Typestring

ShipToCity

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe city of the address where the shipment is delivered.

Typestring

ShipToCountry

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe country of the address where the shipment is delivered.

Typepicklist

ShipToGeocodeAccuracy

PropertiesCreate, Filter, Group, Nillable, Restricted picklist, Sort, Update

DescriptionAccuracy level of the geocode for the address where the shipment is delivered.See Compound Field Considerations and Limitations for details on geolocationcompound fields.

Note: This field is available in the API only.

Typedouble

ShipToLatitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with Longitude to specify the precise geolocation of the address where theshipment is delivered. Acceptable values are numbers between –90 and 90 withup to 15 decimal places. See Compound Field Considerations and Limitationsfor details on geolocation compound fields.

Note: This field is available in the API only.

131

ShipmentOrder Management Standard Objects

Page 142: Salesforce Order Management Developer Guide

DetailsField Name

Typedouble

ShipToLongitude

PropertiesCreate, Filter, Nillable, Sort, Update

DescriptionUsed with Latitude to specify the precise geolocation of the address where theshipment is delivered. Acceptable values are numbers between –180 and 180with up to 15 decimal places. See Compound Field Considerations and Limitationsfor details on geolocation compound fields.

Note: This field is available in the API only.

Typestring

ShipToName

PropertiesCreate, Filter, Group, Sort, Update

DescriptionThe shipment recipient.

Typestring

ShipToPostalCode

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe postal code of the address where the shipment is delivered.

Typestring

ShipToState

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe state of the address where the shipment is delivered.

Typetextarea

ShipToStreet

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe street of the address where the shipment is delivered.

Typestring

ShipmentNumber

132

ShipmentOrder Management Standard Objects

Page 143: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionAn auto-generated number identifying the shipment.

Typereference

SourceLocationId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe field service location where the shipment originates.

This is a relationship field.

Relationship NameSourceLocation

Relationship TypeLookup

Refers ToLocation

Typepicklist

Status

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe status of the shipment. The picklist includes the following values, which canbe customized:

• Shipped—The product is in transit.

• Delivered—The product is at the source location.

Typedouble

TotalItemsQuantity

PropertiesFilter, Nillable, Sort

DescriptionThe total quantity of items included in the shipment. This value is calculated asthe sum of the quantities of the shipment items in the shipment.

This field is available in API version 51.0 and later.

Typestring

TrackingNumber

133

ShipmentOrder Management Standard Objects

Page 144: Salesforce Order Management Developer Guide

DetailsField Name

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionTracking number for the shipment.

Typeurl

TrackingUrl

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionURL of website used for tracking the shipment.

Associated ObjectsThis 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.

ShipmentFeedFeed tracking is available for the object.

ShipmentHistoryHistory is available for tracked fields of the object.

ShipmentOwnerSharingRuleSharing rules are available for the object.

ShipmentShareSharing is available for the object.

ShipmentItem

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

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

Special Access RulesThis object is only available in Salesforce Order Management orgs or if Field Service is enabled.

134

ShipmentItemOrder Management Standard Objects

Page 145: Salesforce Order Management Developer Guide

Fields

DetailsField

Typestring

Description

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionDescription of the shipment item.

TypedateTime

ExpectedDeliveryDate

PropertiesFilter, Nillable, Sort

DescriptionExpected delivery date of the shipment that contains the shipment item.

Typereference

FulfillmentOrderLineItemId

PropertiesFilter, Nillable, Sort

DescriptionThe FulfillmentOrderLineItem (fulfillment order product) corresponding to the shipmentitem.

Typereference

OrderItemSummaryId

PropertiesFilter, Nillable, Sort

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

Typereference

Product2Id

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionThe product represented by the shipment item.

This is a relationship field.

Relationship NameProduct2

135

ShipmentItemOrder Management Standard Objects

Page 146: Salesforce Order Management Developer Guide

DetailsField

Relationship TypeLookup

Refers ToProduct2

Typedouble

Quantity

PropertiesCreate, Filter, Sort, Update

DescriptionThe quantity of products represented by the shipment item.

Typereference

ReturnOrderLineItemId

PropertiesCreate, Filter, Group, Nillable, Sort, Update

DescriptionFor a return ShipmentItem, the associated ReturnOrderLineItem.

This field is available in API version 53.0 and later.

Typereference

ShipmentId

PropertiesCreate, Filter, Group, Sort

Description(Master-Detail) The shipment that contains the shipment item.

This is a relationship field.

Relationship NameShipment

Relationship TypeLookup

Refers ToShipment

Typestring

ShipmentItemNumber

PropertiesAutonumber, Defaulted on create, Filter, idLookup, Sort

DescriptionAn auto-generated number identifying the shipment item.

136

ShipmentItemOrder Management Standard Objects

Page 147: Salesforce Order Management Developer Guide

DetailsField

Typestring

TrackingNumber

PropertiesFilter, Group, Nillable, Sort

DescriptionThe tracking number of the shipment that contains the shipment item.

Typeurl

TrackingUrl

PropertiesFilter, Group, Nillable, Sort

DescriptionThe tracking URL of the shipment that contains the shipment item.

Associated ObjectsThis object has the following associated objects. Unless noted, they are available in the same API version as this object.

ShipmentItemFeedFeed tracking is available for the object.

ShipmentItemHistoryHistory 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 OrderManagement.

To view a detailed diagram of all object relationships, from Setup, in the Quick Find box, enter Schema Builder, and then selectSchema Builder. For information on using Schema Builder, see Design Your Own Data Model in Extend Salesforce with Clicks, not Code.

137

Order Summary Entity Relationship DiagramOrder Management Standard Objects

Page 148: Salesforce Order Management Developer Guide

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’reimplementing your own storefront integration, this map can help you understand the order data requirements.

Integration NotesGeneral:

• B2C Commerce sends orders in New or Open status to Salesforce Order Management. To delay sending an order, for example, toperform 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 pendingorders reaches a certain size. The process is similar to the one used for Commerce Cloud Order Management. In addition, theintegration contacts B2C Commerce every 5 minutes to request any pending order data.

• The B2C Integration can’t create an order with a combined total of more than 200 OrderItems and OrderItemAdjustmentLineItems.For example, it can create an order with 150 OrderItems and 45 OrderItemAdjustmentLineItems, but can’t create an order with 110OrderItems and 100 OrderItemAdjustmentLineItems. To import an order that exceeds this limit, use Bulk API 2.0. For informationabout manually importing orders into Order Management, see Importing Order Data.

138

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 149: Salesforce Order Management Developer Guide

• The integration associates sites in B2C Commerce with SalesChannels in Order Management. It identifies the SalesChannel for anorder by searching for a SalesChannelName value that matches the site/site-id value in the order data.

• For details of the B2C Commerce order data format, see the Order XSD Schema in the B2C Commerce Infocenter.

• 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 ImplementationGuide.

• If you refresh a sandbox org, or change the Tenant ID of a B2C Commerce instance, repeat the implementation process as describedin 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 usesa 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 Integrationuses those types to represent shopper accounts.

• You can configure the integration to identify existing shoppers by applying your org’s duplicate and matching rules for Accounts,Contacts, and Person Accounts. To enable this feature, in Setup, in Order Management Settings, turn on B2C Integration DataMatching Rules. For more information on configuring duplicate management, see Manage Duplicate Records in Salesforce Help.

Note: If your org’s matching rules identify multiple potential duplicate records, the integration selects the one with the highestmatch score. If multiple records tie for the highest match score, you can’t guarantee which is selected.

Note: Applying complex custom matching rules can affect the integration’s performance.

• For detailed information on the storage and identification of shopper accounts, see Order Management Shopper Records in SalesforceOrder Management in Salesforce Help.

International Considerations

• If the order/taxation value for an order is net, then the integration creates an OrderItemTaxLineItem record for eachOrderItem 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 copiesthem to State fields on Salesforce records.

– The country-code values in order data must match a standard 2-character ISO country/territory code. The integrationcopies 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 integrationcopies them to StateCode fields on Salesforce records. The corresponding State fields are set to the matching integration valuesfrom the picklist.

– The country-code values in order data must match the country/territory code of an entry in the Salesforce country/territorypicklist. The integration copies them to CountryCode fields on Salesforce records. The corresponding Country fields are set tothe 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 integrationcreates 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.

139

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 150: Salesforce Order Management Developer Guide

• For a credit or debit card payment type, the payments/payment/credit-card/card-type value in the order datamust 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 paymentmethod as described later in this section.

• The integration recognizes certain custom attributes on order/payments/payment and copies them to standard fields onthe PaymentGatewayLog record in Salesforce. To take advantage of this feature, create and populate custom attributes with thefollowing 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)

Promotions

• The integration creates an OrderAdjustmentGroup record for each order-levelprice-adjustments/price-adjustment/promotion-id and for each item-levelprice-adjustments/price-adjustment/promotion-id that applies to more than one item in the order. For eachOrderAdjustmentGroup, it creates an OrderItemAdjustmentLineItem record for each OrderItem in the order that the associatedpromotion applies to. If an OrderItem is affected by multiple promotions, then it can have an OrderItemAdjustmentLineItem foreach one.

• If the order/taxation value for an order is net, then the integration creates an OrderItemTaxLineItem record for eachOrderItemAdjustmentLineItem record.

For information on the Salesforce state and country/territory picklists, see Let Users Select State and Country from Picklists in SalesforceHelp.

Set Up Payment GatewaysConfigure a payment gateway adapter for each merchant account. If you use multiple currencies or payment methods through a singlepayment processor, you can optionally set up multiple payment gateways for that processor. By default, the Order Managementintegration with Salesforce B2C Commerce only supports credit card and digital wallet payment types, but you can create your owncustomizations.

You can use Apex and the Connect REST API to set up payment gateways. See commercepayments namespace and Use Cases for thecommercepayments Namespace in the Apex Developer Guide, and Commerce Payments Resources in the Connect REST API DeveloperGuide.

Payment Method ProcessingThe 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 aDigitalWallet 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 GtwyProvPaymentMethodTyperecord in Salesforce? If so, then create a record in Salesforce according to the GtwyProvPaymentMethodType’s Payment MethodType.

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.

140

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 151: Salesforce Order Management Developer Guide

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 MethodsIf 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 AlternativePaymentMethodobject. Give the record type a name that represents the payment method. For information on creating record types, see Create RecordTypes in Salesforce Help.

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

Note: You can’t create or access a GtwyProvPaymentMethodType record in the Salesforce UI. To create one, insert a recordusing 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.

CommentsOptional description.

Developer NameThe unique API name of the record.

Master LabelA human-readable name for the record.

Gateway Provider Payment Method TypeThe name of the payment method in the storefront. This value must exactly match the payment method ID used in B2C Commerce.

Payment Gateway Provider IdReference to the Payment Gateway Provider record associated with the payment processor for the payment method.

Payment Method TypeAlternativePaymentMethod CardPaymentMethod, or DigitalWallet. To use AlternativePaymentMethod, firstcreate a corresponding RecordType record.

Record Type IdIf 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",

141

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 152: Salesforce Order Management Developer Guide

“RecordTypeId” : "012aa000000008A34F"}

Integrate Custom B2C Commerce Storefront DataThe integration can pass custom data on certain B2C Commerce objects to Order Management. To set up the transfer, add customattributes to objects in B2C Commerce, and add matching custom fields to the corresponding objects in Order Management. Theintegration compares the B2C Commerce attribute ID and the Order Management field name at the API level. (It doesn’t consider theirUI labels.) If they match and the data types match, the integration includes those values when it creates Order Management records. Ifyou also create a matching field on the corresponding summary object, Order Management includes the custom data when it createsa summary record.

You can add custom attributes to product options that exist as product line items, but not to product options that exist as attributes onparent products. You can’t add an attribute to an attribute.

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 flowsto set that field when they create a change order. Otherwise, the flow will fail.

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

Important: If a custom field in Salesforce is required, and it corresponds to a custom storefront attribute, then order data mustinclude 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 attributeson your storefront objects. However, if you include a custom namespace in a custom field name, also include it in the name of thematching storefront object attribute. For example, if the API name of your custom field in Salesforce ismynamespace_FieldName__c, name your matching storefront object attribute mynamespace_FieldName. Limityour 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 customguid 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 anothercustom 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 toyour business rules. For example, design your cancel process so that when you cancel a bundle product, any associated bundleproducts are also canceled. Likewise, you can design your return process to disallow the return of only some of the products in abundle.

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

Salesforce Order ManagementB2C Commerce

OrderItem and OrderItemSummaryProduct line item, gift certificate line item, and shipping line item

Order and OrderSummaryOrder

CardPaymentMethod, DigitalWallet, Payment,PaymentAuthorization, and PaymentGatewayLog (see note)

Order payment instrument and order payment transaction

142

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 153: Salesforce Order Management Developer Guide

Salesforce Order ManagementB2C Commerce

OrderDeliveryGroup and OrderDeliveryGroupSummaryShipment

Note: You can’t add custom fields to the PaymentGatewayLog object. However, the integration recognizes certain customattributes on order/payments/payment and copies them to standard fields on the PaymentGatewayLog record inSalesforce. To take advantage of this feature, create and populate custom attributes with the following exact names on the OrderPayment Transaction object in B2C Commerce:

• authCode (value copied to PaymentGatewayLog.GatewayAuthCode)

• avsResultCode (value copied to PaymentGatewayLog.GatewayAvsCode)

• approvalStatus (value copied to PaymentGatewayLog.GatewayResultCode)

The integration supports the following data types for matching custom attributes and fields:

• Boolean

• Currency

• Datetime (Date isn’t supported)

• Double

• Email

• Multipicklist

• Phone

• Picklist

• Reference

• String

• TextArea

• URL

The Order Management B2C Service permission set provides the integration with access to Salesforce records. When you add a customfield to a Salesforce object, update that permission set by adding read and edit access to the new field. You also must add edit accessto 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.

143

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 154: Salesforce Order Management Developer Guide

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 anorder/billing-address/company-name value, and no matching account record exists, then the integration creates astandard account, regardless of the Person Accounts for Shoppers setting.

Changing the Person Accounts for Shoppers admin setting doesn’t affect existing shopper data. However, it changes the way that theB2C Commerce integration stores new shopper data and whether it recognizes existing shopper data.

Note: If the B2C Integration Data Matching Rules setting is on, this behavior can vary depending on your org’s matching rules.

• While Order Management is configured to use standard accounts: the integration recognizes existing shoppers that are stored asperson 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 storedas standard accounts and contacts. If one of those shoppers places an order, the integration creates a person account record forthem and associates the new order with it. Order Management treats the accounts as separate shoppers. If an existing shopper hasrecords of both types, the integration associates new orders with their person account.

NotesSalesforce Object FieldB2C Commerce XSD Value

Iforder/billing-address/company-name

Nameorder/billing-address/company-name ororder/billing-address/first-name andorder/billing-address/last-name has a value in the order data packet, then

it’s copied to this value. If it has no value inthe order data, this value is set as follows:

• If this record is a person account, thisvalue isn’t set.

• If this record isn’t a person account, thisvalue is set toorder/billing-address/first-name+ " " +order/billing-address/last-name.

This value is only set for person accounts.It’s set to

FirstNameorder/billing-address/first-name andorder/billing-address/second-name

order/billing-address/first-name+ " " +order/billing-address/second-name.

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

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

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

144

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 155: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is only set for person accounts.It’s set to

BillingStreetorder/billing-address/address1,order/billing-address/address2, andorder/billing-address/address3 order/billing-address/address1

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

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

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

This value is only set for person accounts.Usage depends on whether state and

BillingStateorder/billing-address/state-code

country/territory picklists are enabled inSalesforce.

• Picklists not enabled- This value is settoorder/billing-address/state-code.It must be a standard 2-character ISOstate or province code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the state code that matchesorder/billing-address/state-code.

This value is only set for person accounts,and only when state and country/territory

BillingStateCodeorder/billing-address/state-code

picklists are enabled on your org.order/billing-address/state-codemust match the state code of an entry inthe Salesforce state picklist.

This value is only set for person accounts.Usage depends on whether state and

BillingCountryorder/billing-address/country-code

country/territory picklists are enabled inSalesforce.

• Picklists not enabled- This value is settoorder/billing-address/country-code.It must be a standard 2-character ISOcountry/territory code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the country/territory code thatmatchesorder/billing-address/country-code.

145

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 156: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is only set for person accounts,and only when state and country/territory

BillingCountryCodeorder/billing-address/country-code

picklists are enabled on your org.order/billing-address/country-codemust match the country/territory code ofan entry in the Salesforce country/territorypicklist.

This value is set for both person accountsand regular accounts.

Phoneorder/billing-address/phone

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

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

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of the RecordTyperecord assigned to theGtwyProvPaymentMethodType.

RecordTypeIdN/A

GatewayTokenorder/payments/payment/credit-card/card-token

Emailorder/customer/customer-email

This picklist value is always set to Active.StatusN/A

CompanyNameorder/billing-address/company-name

This value is set toorder/billing-address/address1

PaymentMethodStreetorder/billing-address/address1,order/billing-address/address2, andorder/billing-address/address3 + " " +

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

PaymentMethodCityorder/billing-address/city

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

PaymentMethodStateorder/billing-address/state-code

• Picklists not enabled- This value is settoorder/billing-address/state-code.

146

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 157: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

It must be a standard 2-character ISOstate or province code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the state code that matchesorder/billing-address/state-code.

This value is only set when state andcountry/territory picklists are enabled on

PaymentMethodStateCodeorder/billing-address/state-code

your org.order/billing-address/state-codemust match the state code of an entry inthe Salesforce state picklist.

PaymentMethodPostalCodeorder/billing-address/postal-code

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

PaymentMethodCountryorder/billing-address/country-code

• Picklists not enabled- This value is settoorder/billing-address/country-code.It must be a standard 2-character ISOcountry/territory code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the country/territory code thatmatchesorder/billing-address/country-code.

This value is only set when state andcountry/territory picklists are enabled on

PaymentMethodCountryCodeorder/billing-address/country-code

your org.order/billing-address/country-codemust match the country/territory code ofan entry in the Salesforce country/territorypicklist.

Phoneorder/billing-address/phone

IpAddressorderremoteHost

This value is set to the ID of the Account orPerson Account record associated with theshopper.

AccountIdN/A

This value is set to the ID of thePaymentGateway record associated with

PaymentGatewayIdN/A

the PaymentGatewayProvider record

147

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 158: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

assigned to theGtwyProvPaymentMethodType.

This value is always set to External. Itspecifies that an external payment providerhandles payment transactions.

ProcessingModeN/A

If the Salesforce AlternativePaymentMethodobject has a custom field matching a

custom_attribute_nameorder/payments/payment/custom_attributeor a custom attribute on the payment type

custom attribute on the storefront paymenttype or order payment transaction object,the value is copied to theAlternativePaymentMethod record. If acustom field is non-nillable, then order datamust include a value for the correspondingcustom attribute. If the value is missing, theintegration fails.

CardPaymentMethod ObjectThe 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 thepayment/credit-card/card-type value against the CardType picklist on the CardPaymentMethod object. If the picklistcontains a match, then the integration creates a CardPaymentMethod record for the instrument. Otherwise, to support the paymentmethod, 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.

NotesSalesforce Object FieldB2C Commerce XSD Value

The value must match a card type in theCardType picklist on the

CardTypeorder/payments/payment/credit-card/card-type

CardPaymentMethod object. To handle adifferent card type, create a custompayment method as described in the OrderManagement Implementation Guide.

InputCardNumberorder/payments/payment/credit-card/card-number

CardHolderNameorder/payments/payment/credit-card/card-holder

ExpiryYearorder/payments/payment/credit-card/expiration-year

ExpiryMonthorder/payments/payment/credit-card/expiration-month

This value can be CreditCard orDebitCard. The default value isCreditCard.

CardCategory[order payment method]

148

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 159: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This picklist value is always set to Active.StatusN/A

GatewayTokenorder/payments/payment/credit-card/card-token

This value is set toorder/billing-address/address1

PaymentMethodStreetorder/billing-address/address1,order/billing-address/address2, andorder/billing-address/address3 + " " +

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

PaymentMethodCityorder/billing-address/city

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

PaymentMethodStateorder/billing-address/state-code

• Picklists not enabled- This value is settoorder/billing-address/state-code.It must be a standard 2-character ISOstate or province code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the state code that matchesorder/billing-address/state-code.

This value is only set when state andcountry/territory picklists are enabled on

PaymentMethodStateCodeorder/billing-address/state-code

your org.order/billing-address/state-codemust match the state code of an entry inthe Salesforce state picklist.

PaymentMethodPostalCodeorder/billing-address/postal-code

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

PaymentMethodCountryorder/billing-address/country-code

• Picklists not enabled- This value is settoorder/billing-address/country-code.It must be a standard 2-character ISOcountry/territory code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the country/territory code thatmatchesorder/billing-address/country-code.

149

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 160: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is only set when state andcountry/territory picklists are enabled on

PaymentMethodCountryCodeorder/billing-address/country-code

your org.order/billing-address/country-codemust match the country/territory code ofan entry in the Salesforce country/territorypicklist.

This value is set to the ID of the Account orPerson Account record associated with theCardPaymentMethod.

AccountIdN/A

This value is set to the ID of thePaymentGateway record whose

PaymentGatewayIdN/A

ExternalReference value matches theprocessor ID value of the order paymentinstrument.

This value is always set to External. Itspecifies that an external payment providerhandles payment transactions.

ProcessingModeN/A

If the Salesforce CardPaymentMethod objecthas a custom field matching a custom

custom_attribute_nameorder/payments/payment/custom_attributeor a custom attribute on the payment type

attribute on the storefront payment type ororder payment transaction object, the valueis copied to the CardPaymentMethodrecord. If a custom field is non-nillable, thenorder data must include a value for thecorresponding custom attribute. If the valueis missing, the integration fails.

Contact ObjectWhen using person accounts, access shopper contact data using person account records, not contact records. When using standardaccounts and contacts, the BillToContactId field on these objects points to the associated contact record:

• Credit Memo

• Fulfillment Order

• Invoice

• Order

• Order Summary

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of the Accountrecord that represents the shopper.

AccountIdN/A

150

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 161: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

Emailorder/customer/customer-email

FirstNameorder/billing-address/first-name

LastNameorder/billing-address/last-name

Phoneorder/billing-address/phone

DigitalWallet ObjectThe integration checks the payment_method value of each payment instrument in an order. If it matches the following regex, thenthe integration creates a DigitalWallet record for the instrument. If it doesn’t match, then the integration tries to create anAlternativePaymentMethod 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.

NotesSalesforce Object FieldB2C Commerce XSD Value

This picklist value is always set to Active.StatusN/A

Type[order payment method]

GatewayTokenorder/payments/payment/credit-card/card-token

This value is set toorder/billing-address/address1

PaymentMethodStreetorder/billing-address/address1,order/billing-address/address2, andorder/billing-address/address3 + " " +

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

PaymentMethodCityorder/billing-address/city

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

PaymentMethodStateorder/billing-address/state-code

• Picklists not enabled- This value is settoorder/billing-address/state-code.It must be a standard 2-character ISOstate or province code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the state code that matchesorder/billing-address/state-code.

This value is only set when state andcountry/territory picklists are enabled on

PaymentMethodStateCodeorder/billing-address/state-code

151

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 162: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

your org.order/billing-address/state-codemust match the state code of an entry inthe Salesforce state picklist.

PaymentMethodPostalCodeorder/billing-address/postal-code

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

PaymentMethodCountryorder/billing-address/country-code

• Picklists not enabled- This value is settoorder/billing-address/country-code.It must be a standard 2-character ISOcountry/territory code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the country/territory code thatmatchesorder/billing-address/country-code.

This value is only set when state andcountry/territory picklists are enabled on

PaymentMethodCountryCodeorder/billing-address/country-code

your org.order/billing-address/country-codemust match the country/territory code ofan entry in the Salesforce country/territorypicklist.

This value is set to the ID of the Account orPerson Account record associated with theDigitalWallet.

AccountIdN/A

This value is set to the ID of thePaymentGateway record whose

PaymentGatewayIdN/A

ExternalReference value matches theprocessor ID value of the order paymentinstrument.

This value is always set to External. Itspecifies that an external payment providerhandles payment transactions.

ProcessingModeN/A

If the Salesforce DigitalWallet object has acustom field matching a custom attribute

custom_attribute_nameorder/payments/payment/custom_attributeor a custom attribute on the payment type

on the storefront payment type or orderpayment transaction object, the value iscopied to the DigitalWallet record. If acustom field is non-nillable, then order data

152

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 163: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

must include a value for the correspondingcustom attribute. If the value is missing, theintegration fails.

Order ObjectThe integration uses both the order/order-no and catalog/catalog-id values to check for duplicate orders. It looks foran existing order record with an OrderReferenceNumber matching the order-no and a SalesChannelId pointing to a SalesChannelthat 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 integrationconsiders it a new order and creates a duplicate record.

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of the Pricebook2record for the standard price book.

Pricebook2IdN/A

Nameorder/customer/customer-name

When the Order record is created, this valueis set to Draft. The last step in the

StatusN/A

Composite API call that creates the recordsrelated to the order sets this value toActive.

This value is set to the current datetimewhen the record is created.

EffectiveDateN/A

OrderReferenceNumberorder/order-no

This value is set toorder/billing-address/address1

BillingStreetorder/billing-address/address1,order/billing-address/address2, andorder/billing-address/address3 + " " +

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

BillingCityorder/billing-address/city

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

BillingStateorder/billing-address/state-code

• Picklists not enabled- This value is settoorder/billing-address/state-code.It must be a standard 2-character ISOstate or province code.

153

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 164: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

• Picklists enabled- This value is set to thepicklist integration value correspondingto the state code that matchesorder/billing-address/state-code.

This value is only set when state andcountry/territory picklists are enabled on

BillingStateCodeorder/billing-address/state-code

your org.order/billing-address/state-codemust match the state code of an entry inthe Salesforce state picklist.

BillingPostalCodeorder/billing-address/postal-code

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

BillingCountryorder/billing-address/country-code

• Picklists not enabled- This value is settoorder/billing-address/country-code.It must be a standard 2-character ISOcountry/territory code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the country/territory code thatmatchesorder/billing-address/country-code.

This value is only set when state andcountry/territory picklists are enabled on

BillingCountryCodeorder/billing-address/country-code

your org.order/billing-address/country-codemust match the country/territory code ofan entry in the Salesforce country/territorypicklist.

BillingPhoneNumberorder/billing-address/phone

OrderedDateorder/order-date

BillingEmailAddressorder/customer/customer-email

This value is set to the ID of the Contactrecord that represents the shopper. When

BillToContactIdN/A

using person accounts, this value isn’t set.In that case, access shopper contactinformation via the Account instead of theContact.

154

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 165: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of the Account orPerson Account record that represents theshopper.

AccountIdN/A

This value is set to the ID of theSalesChannel record whose

SalesChannelIdcatalog/catalog-id

SalesChannelName field matches thecatalog/catalog-id in the orderdata packet.

This value is set to Net or Gross basedon the value of order/taxation. If using Net

TaxLocaleTypeorder/taxation

taxation, this value is set to Net and theintegration creates OrderItemTaxLineItemrecords for the order. If using Gross taxation,this value is set to Gross and theintegration doesn’t createOrderItemTaxLineItem records for the order.If the value isn’t set, then the default valueis Net.

This value is only set if the Salesforce orghas Multicurrency enabled.

CurrencyIsoCodeorder/currency

If the Salesforce Order object has a customfield matching a custom attribute on the

custom_attribute_nameorder/custom_attribute

storefront order object, the value is copiedto the Order record. If the SalesforceOrderSummary object also has a matchingcustom field, it’s copied to both records. Ifa custom field is non-nillable, then orderdata must include a value for thecorresponding custom attribute. If the valueis missing, the integration fails.

OrderAdjustmentGroup ObjectThe integration creates one OrderAdjustmentGroup record for each promotion that applies to an entire order or to multiple items in anorder. For an order-level promotion, it assigns the OrderAdjustmentGroup to one OrderItemAdjustmentLineItem record for each OrderItemrecord in the order. It creates the OrderAdjustmentGroup even if the order only contains one OrderItem. For an item-level promotionthat applies to multiple OrderItems, it assigns the OrderAdjustmentGroup to one OrderItemAdjustmentLineItem record for each OrderItemrecord in the Order that the promotion applies to. If an item-level promotion only applies to one OrderItem, the integration doesn’tcreate 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 anorder-level promotion is “20% off and free shipping.”

155

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 166: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

Nameorder/price-adjustments/price-adjustment/promotion-id

Descriptionorder/price-adjustments/price-adjustment/promotion-id

This picklist value depends on the level ofthe promotion:

TypeN/A

• Order-level- This value is set toHeader.

• Item-level- This value is set toSplitLine.

This value is set to the ID of the associatedoriginal Order record.

OrderIdN/A

This value is set to the ID of the associatedPromotion record.

AdjustmentCauseIdN/A

OrderDeliveryGroup ObjectThe integration creates an OrderDeliveryGroup record for each shipment (also called a LineItemGroup in B2C Commerce) in the orderdata.

For order changes such as returns and cancellations that include prorated delivery amounts, the proration considers theOrderDeliveryGroups 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 chargesassociated with those two OrderDeliveryGroups. It prorates that amount across the OrderItems in those OrderDeliveryGroups by OrderItemprice. The shipping refund equals the prorated delivery amounts for the two returned OrderItems. The return doesn’t consider anydelivery charges associated with the third OrderDeliveryGroup.

NotesSalesforce Object FieldB2C Commerce XSD Value

EmailAddressorder/customer/customer-email

DeliverToCityorder/shipments/shipment/shipping-address/city

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

DeliverToCountryorder/shipments/shipment/shipping-address/country-code

• Picklists not enabled- This value is settoorder/shipments/shipment/shipping-address/country-code.It must be a standard 2-character ISOcountry/territory code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the country/territory code thatmatchesorder/shipments/shipment/shipping-address/country-code.

156

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 167: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is only set when state andcountry/territory picklists are enabled on

DeliverToCountryCodeorder/shipments/shipment/shipping-address/country-code

your org.order/shipments/shipment/shipping-address/country-codemust match the country/territory code ofan entry in the Salesforce country/territorypicklist.

This value is set toorder/shipments/shipment/shipping-address/title

DeliveryGroupToNameorder/shipments/shipment/shipping-address/title,order/shipments/shipment/shipping-address/first-name,order/shipments/shipment/shipping-address/last-name, + " " +andorder/shipments/shipment/shipping-address/suffix

order/shipments/shipment/shipping-address/first-name+ " " +order/shipments/shipment/shipping-address/last-name+ " " +order/shipments/shipment/shipping-address/suffix.

DeliverToPostalCodeorder/shipments/shipment/shipping-address/postal-code

Usage depends on whether state andcountry/territory picklists are enabled inSalesforce.

DeliverToStateorder/shipments/shipment/shipping-address/state-code

• Picklists not enabled- This value is settoorder/shipments/shipment/shipping-address/state-code.It must be a standard 2-character ISOstate or province code.

• Picklists enabled- This value is set to thepicklist integration value correspondingto the state code that matchesorder/shipments/shipment/shipping-address/state-code.

This value is only set when state andcountry/territory picklists are enabled on

DeliverToStateCodeorder/shipments/shipment/shipping-address/state-code

your org.order/shipments/shipment/shipping-address/state-codemust match the state code of an entry inthe Salesforce country/territory picklist.

This value is set toorder/shipments/shipment/shipping-address/address1

DeliverToStreetorder/shipments/shipment/shipping-address/address1,order/shipments/shipment/shipping-address/address2,andorder/shipments/shipment/shipping-address/address3

+ " " +order/shipments/shipment/shipping-address/address2+ " " +order/shipments/shipment/shipping-address/address3.

PhoneNumberorder/shipments/shipment/shipping-address/phone

157

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 168: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is only populated iforder/shipments/shipment/gift=true.

IsGiftorder/shipments/shipment/gift

This value is only populated iforder/shipments/shipment/gift=true.

GiftMessageorder/shipments/shipment/gift-message

This value is set to the ID of theOrderDeliveryMethod record whose

OrderDeliveryMethodIdorder/shipments/shipment/shipping-method

ReferenceNumber field matches theorder/shipments/shipment/shipping-methodvalue in the order data.

This value is set to the ID of the associatedoriginal Order record.

OrderIdN/A

If the Salesforce OrderDeliveryGroup objecthas a custom field matching a custom

custom_attribute_nameorder/shipments/shipment/custom_attribute

attribute on the storefront shipment object,the value is copied to theOrderDeliveryGroup record. If the SalesforceOrderDeliveryGroupSummary object alsohas a matching custom field, it’s copied toboth records. If a custom field is non-nillable,then order data must include a value for thecorresponding custom attribute. If the valueis missing, the integration fails.

OrderItem ObjectIf an order has a TaxLocaleType of Net, then the integration also creates an OrderItemTaxLineItem record for each OrderItem record.

NotesSalesforce Object FieldB2C Commerce XSD Value

If the record represents a shipping charge,this value is set to Shipping. Otherwise,

Descriptionorder/product-lineitems/product-lineitem/lineitem-text

it’s set toorder/product-lineitems/product-lineitem/lineitem-text.

If the record represents a shipping charge,this picklist value is set to Delivery

TypeN/A

Charge. Otherwise, it’s set to OrderProduct.

Quantityorder/product-lineitems/product-lineitem/quantity

TotalLineAmountorder/product-lineitems/product-lineitem/net-price

Records that represent charges are assigneda value starting at 1000 so they appearafter all order products in lists.

LineNumberorder/product-lineitems/product-lineitem/position

158

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 169: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

The integration calculates this value to alimited number of decimal places and

UnitPriceorder/product-lineitems/product-lineitem/base-priceor

includes it for reference. Because theorder/product-lineitems/product-lineitem/net-pricecalculation can introduce small roundingand

order/product-lineitems/product-lineitem/quantity errors, Order Management doesn’t use thisvalue for any processing. The calculationformula depends on the tax locale type ofthe order:

• Net Taxation- base-price

• Gross Taxation- net-price /quantity

The integration calculates this value to alimited number of decimal places and

GrossUnitPriceorder/product-lineitems/product-lineitem/base-priceor

includes it for reference. Because theorder/product-lineitems/product-lineitem/gross-pricecalculation can introduce small roundingand

order/product-lineitems/product-lineitem/quantity errors, Order Management doesn’t use thisvalue for any processing. The calculationformula depends on the tax locale type ofthe order:

• Net Taxation- gross-price /quantity

• Gross Taxation- base-price

This value is only set if the Optional PriceBooks feature is enabled. It’s needed when

ListPriceorder/product-lineitems/product-lineitem/base-price

the OrderItem has no associatedPriceBookEntry.

This value is set to the ID of the associatedoriginal Order record.

OrderIdN/A

This value is set to the ID of the associatedOrderDeliveryGroup record.

OrderDeliveryGroupIdN/A

This value is set to the ID of the associatedPriceBookEntry record. If the Optional PriceBooks feature is enabled, this value isn’t set.

PricebookEntryIdN/A

This value is set to the ID of the associatedProduct2 record.

Product2IdN/A

If the Salesforce OrderItem object has acustom field matching a custom attribute

custom_attribute_nameorder/product-lineitems/product-lineitem/custom_attribute,order/giftcertificate-lineitems/giftcertificate-lineitem/custom_attribute,

on the storefront product-lineitem object,ororder/shipping-lineitems/shipping-lineitem/custom_attribute giftcertificate-lineitem object, or

shipping-lineitem object, the value is copiedto the OrderItem record. If the Salesforce

159

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 170: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

OrderItemSummary object also has amatching custom field, it’s copied to bothrecords. If a custom field is non-nillable, thenorder data must include a value for thecorresponding custom attribute. If the valueis missing, the integration fails.

OrderItemAdjustmentLineItem ObjectAn OrderItemAdjustmentLineItem record represents the application of a promotion to an OrderItem record. Thus, an OrderItem recordhas 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 eachOrderItemAdjustmentLineItem record.

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set toorder/product-lineitems/product-lineitem/product-id

Nameorder/product-lineitems/product-lineitem/product-idandorder/price-adjustments/price-adjustment/lineitem-text + "-" +

order/price-adjustments/price-adjustment/lineitem-text.

Amountprice-adjustments/price-adjustment/net-price

TotalTaxAmountprice-adjustments/price-adjustment/tax

PromotionTextorder/price-adjustments/price-adjustment/lineitem-text

This value is set to the ID of the OrderItemrecord that the adjustment applies to.

OrderItemIdN/A

For an order-level promotion, or anitem-level promotion that applies to

OrderAdjustmentGroupIdN/A

multiple OrderItems, this value is set to theID of the parent OrderAdjustmentGrouprecord. For an item-level promotion thatapplies to only one OrderItem, it isn’t set.

This value is set to the ID of the associatedPromotion record.

AdjustmentCauseIdN/A

OrderItemTaxLineItem ObjectIf an order has a TaxLocaleType of Net, then the integration creates an OrderItemTaxLineItem record for each OrderItem andOrderItemAdjustmentLineItem record in the order. If an order has a TaxLocaleType of Gross, then the integration doesn’t create anyOrderItemTaxLineItem records for it.

160

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 171: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is generated based on the Typeof the associated OrderItem or

NameSee notes

OrderItemAdjustmentLineItem record and,if applicable, the StockKeepingUnitof the associated Product2:

• OrderItem:

– Order Product-StockKeepingUnit + " -Tax"

– Delivery Charge- "DeliveryCharge - Tax"

• OrderItemAdjustmentLineItem:

– Product- StockKeepingUnit+ " - Adjustment Tax"

– Shipping- "Delivery Charge- Adjustment Tax"

This picklist value is always set toEstimated.

TypeN/A

Amountorder/product-lineitems/product-lineitem/tax

Rateorder/product-lineitems/product-lineitem/tax-rate

TaxEffectiveDateorder/order-date

If the tax applies to an OrderItem record,this value is set to the ID of that order item.

OrderItemIdN/A

If it applies to anOrderItemAdjustmentLineItem record, thisvalue is set to the ID of the order item thatthe adjustment applies to.

This value is only set for tax that applies toan OrderItemAdjustmentLineItem record.

OrderItemAdjustmentLineItemIdN/A

Payment ObjectIf an order/payments/payment/transaction-type value in the order data is sale or capture, then the integrationcreates a Payment record for that transaction. If the value starts with auth, then it creates a PaymentAuthorization record. These checksaren’t case-sensitive .

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of thePaymentGateway record whose

PaymentGatewayIdN/A

161

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 172: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

ExternalReference value matches theprocessor ID value of the order paymentinstrument associated with the orderpayment transaction.

This value is set to the ID of thePaymentGatewayLog record associated withthe payment.

PaymentGatewayLogIdN/A

Amountorder/payments/payment/amount

This picklist value is always set toExternal.

ProcessingModeN/A

This picklist value is always set toProcessed.

StatusN/A

This value isn’t required in the order data.The default value is null.

GatewayRefNumberorder/payments/payment/transaction-id

Emailorder/customer/customer-email

Dateorder/order-date

Typeorder/payments/payment/transaction-type

Phoneorder/billing-address/phone

This value is set to the ID of thePaymentGroup record associated with thepayment.

PaymentGroupIdN/A

This value is set to the ID of the Account orPerson Account record associated with theshopper.

AccountIdN/A

This value is set to the ID of theCardPaymentMethod or DigitalWallet recordassociated with the payment.

PaymentMethodIdN/A

This value is only set if the Salesforce orghas Multicurrency enabled.

CurrencyIsoCodeorder/currency

If the Salesforce Payment object has acustom field matching a custom attribute

custom_attribute_nameorder/payments/payment/custom_attributeor a custom attribute on the payment type

on the storefront payment type or orderpayment transaction object, the value iscopied to the Payment record. If a customfield is non-nillable, then order data mustinclude a value for the correspondingcustom attribute. If the value is missing, theintegration fails.

162

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 173: Salesforce Order Management Developer Guide

PaymentAuthorization ObjectIf an order/payments/payment/transaction-type value in the order data starts with auth, then the integration createsa PaymentAuthorization record for that transaction. If the value is sale or capture, then it creates a Payment record. These checksaren’t case-sensitive .

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of thePaymentGateway record whose

PaymentGatewayIdN/A

ExternalReference value matches theprocessor ID value of the order paymentinstrument associated with the orderpayment transaction.

This value is set to the ID of thePaymentGatewayLog record associated withthe payment authorization.

PaymentGatewayLogIdN/A

Amountorder/payments/payment/amount

This picklist value is always set toExternal.

ProcessingModeN/A

This picklist value is always set toProcessed.

StatusN/A

This value isn’t required in the order data.The default value is null.

GatewayRefNumberorder/payments/payment/transaction-id

The default Payment Transaction object inB2C Commerce doesn’t include an

GatewayAuthCode(custom attribute)order/payments/payment/authCode

authCode attribute. To use it, add it as acustom attribute and populate it beforesending the order data. If you name itauthCode, the integration automaticallycopies it to the GatewayAuthCode field.

This value is set to the ID of thePaymentGroup record associated with thepayment authorization.

PaymentGroupIdN/A

This value is set to the ID of the Account orPerson Account record associated with theshopper.

AccountIdN/A

This value is set to the ID of theCardPaymentMethod or DigitalWallet recordassociated with the payment authorization.

PaymentMethodIdN/A

This value is only set if the Salesforce orghas Multicurrency enabled.

CurrencyIsoCodeorder/currency

163

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 174: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

If the Salesforce PaymentAuthorizationobject has a custom field matching a

custom_attribute_nameorder/payments/payment/custom_attributeor a custom attribute on the payment type

custom attribute on the storefront paymenttype or order payment transaction object,the value is copied to thePaymentAuthorization record. If a customfield is non-nillable, then order data mustinclude a value for the correspondingcustom attribute. If the value is missing, theintegration fails.

PaymentGatewayLog Object

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of thePaymentGateway record whose

PaymentGatewayIdN/A

ExternalReference value matches theprocessor ID value of the order paymentinstrument associated with the orderpayment transaction.

This picklist value is always set toSuccess.

InteractionStatusN/A

The default value is Authorization.InteractionTypeorder/payments/payment/transaction-type

The default Payment Transaction object inB2C Commerce doesn’t include an

GatewayAuthCode(custom attribute)order/payments/payment/authCode

authCode attribute. To use it, add it as acustom attribute and populate it beforesending the order data. If you name itauthCode, the integration automaticallycopies it to the GatewayAuthCode field.

The default Payment Transaction object inB2C Commerce doesn’t include an

GatewayAvsCode(custom attribute)order/payments/payment/avsResultCode

avsResultCode attribute. To use it, addit as a custom attribute and populate itbefore sending the order data. If you nameit avsResultCode, the integrationautomatically copies it to theGatewayAvsCode field.

The default Payment Transaction object inB2C Commerce doesn’t include an

GatewayResultCode(custom attribute)order/payments/payment/approvalStatus

approvalStatus field. To use it, addit as a custom attribute and populate it

164

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 175: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

before sending the order data. If you nameit approvalStatus, the integrationautomatically copies it to theGatewayResultCode field.

PaymentGroup Object

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of the originalOrder record that the payments in the groupapply to.

SourceObjectIdN/A

This value is only set if the Salesforce orghas Multicurrency enabled.

CurrencyIsoCodeorder/currency

PricebookEntry ObjectSalesforce Order Management doesn’t use the PricebookEntry object. It creates a PriceBookEntry record for each Product2 because theOrderItem 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 productrecords that it creates from order data. If you turn off the feature, then you must add price book entries manually.

NotesSalesforce Object FieldB2C Commerce XSD Value

This value is set to the ID of the Pricebook2record for the standard price book.

Pricebook2IdN/A

This value is set to the ID of the associatedProduct2 record.

Product2IdN/A

This value is only set when thePriceBookEntry record is created. It isn’t

UnitPriceorder/product-lineitems/product-lineitem/base-price

updated when an OrderItem associated withthe same Product2 is created. It isn’t usedfor any calculations in Order Management.

This value is only set if the Salesforce orghas Multicurrency enabled.

CurrencyIsoCodeorder/currency

Product2 ObjectThe integration identifies products by first searching for a Product2 with a StockKeepingUnit value that matches the product-idvalue 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.

165

Salesforce B2C Commerce Storefront Order Data MapOrder Management Standard Objects

Page 176: Salesforce Order Management Developer Guide

NotesSalesforce Object FieldB2C Commerce XSD Value

Descriptionorder/product-lineitem/lineitem-text

Nameorder/product-lineitem/product-name

If the product is an electronic gift certificate,this value is set to eGiftCertificate.

StockKeepingUnitorder/product-lineitem/product-id

If the product is an electronic gift certificate,this value is set to eGiftCertificate.

ProductCodeorder/product-lineitem/product-id

The default value is true.IsActiveN/A

Promotion ObjectFor information on the Promotion object, see the Loyalty Management Developer Guide.

NotesSalesforce Object FieldB2C Commerce XSD Value

Nameorder/price-adjustments/price-adjustment/promotion-id

DisplayNameorder/price-adjustments/price-adjustment/lineitem-text

Descriptionorder/price-adjustments/price-adjustment/lineitem-text

The default value is the current date.StartDateN/A

The default value is true.IsCommercePromotionN/A

The default value is true.IsActiveN/A

SalesChannel ObjectThe integration associates B2C Commerce site IDs with Salesforce SalesChannels.

NotesSalesforce Object FieldB2C Commerce XSD Value

Descriptionsite/site-id

SalesChannelNamesite/site-id

TypeN/A

Importing Order Data

Salesforce Order Management handles order data imported from your storefront. You can bulk load historical order data from a legacysystem into a new Order Management org or implement a custom import process for new orders from your storefront.

166

Importing Order DataOrder Management Standard Objects

Page 177: Salesforce Order Management Developer Guide

Importing Data into Order ManagementIn Order Management, each order is represented by an OrderSummary record and a set of supporting records, such as OrderItemSummariesand OrderDeliveryGroupSummaries. When you import order data, first create the Order record and supporting records, includingOrderItems and OrderDeliveryGroups. Then process the order with the Create Order Summary flow core action or API. That creates theOrderSummary and its supporting records.

Note: Always run the flow core action or call the API. Don’t directly create OrderSummary records.

To import large amounts of order data, use Bulk API 2.0. When importing small amounts of order data, you can make composite RESTAPI requests.

Note: A composite API call can only include 200 records. That limit applies to all objects, not only the orders. For example, anorder with five items and an order-level adjustment that applies to each of them would include at least 11 records: 1 order, 5 orderitems, and 5 order item adjustments.

Important: When making API calls to import data, keep in mind that they count toward your API limits. You can request atemporary increase for importing historical orders by opening a case with Salesforce Customer Support. Allow at least 2 weeks forSupport to arrange the increase.

For information on using Bulk API 2.0, see the Bulk API 2.0 Developer Guide.

For information on making composite API requests, see Composite Resources in the REST API Developer Guide.

Importing Historical Order Data from Order Management v1If you’re migrating from Order Management v1 (Mainstreet Order Management) to Salesforce Order Management, you can customizea sample code framework for importing historical orders. For information about this framework, contact Salesforce Support.

Managed Orders and Unmanaged OrdersThe OrderSummary field OrderLifecycleType specifies whether the order is managed with Order Management features. The default valueis Managed. You can configure the Create Order Summary action or API request to set the OrderLifecycleType field to Managed orUnmanaged when it creates a record, but you can’t change it later.

For information about the differences between managed and unmanaged order lifecycles, see Order Lifecycle Management in SalesforceHelp.

Note: Examples of orders that use the unmanaged lifecycle type include historical orders and orders managed by an externalsystem.

Data RequirementsWhen importing storefront data, the order in which you create records is important because of the relationships between objects. Forexample, an OrderItem record requires a Product2, a PriceBookEntry, and an Order. So you can’t create an OrderItem record until thosethree related records exist. For each imported order, create records in this order:

1. Shopper data

• Account

• Contact (not required if the account record type is Person Account)

2. SalesChannel

167

Importing Order DataOrder Management Standard Objects

Page 178: Salesforce Order Management Developer Guide

3. Product2

4. PriceBookEntry (unless using Optional Price Books)

5. Payment data (depending on the type of payment)

• AlternativePaymentMethod

• CardPaymentMethod

• DigitalWallet

• GtwyProvPaymentMethodType

• PaymentGatewayProvider

• PaymentGateway

6. OrderDeliveryMethod (optional)

7. Order

Note: The records created before the Order record aren’t specific to one order. When creating them, check for duplicates. Forinformation on configuring automatic identification and handling of duplicate records, see Manage Duplicate Records inSalesforce Help.

8. OrderItem (at least one)

9. OrderItemAdjustmentLineItem (optional)

10. OrderItemTaxLineItem (optional)

11. OrderDeliveryGroup (at least one)

12. PaymentGroup (optional)

13. PaymentAuthorization (optional)

14. Payment (optional)

For some objects, in addition to the normally required fields, Order Management requires values for certain other fields. When creatinga record of an object in this table, always define values for the listed fields.

Required FieldsObject

Account • AccountNumber

• BillingCity

• BillingCountry

• BillingCountryCode

• BillingState

• BillingStreet

• FirstName (if a Person Account)

• IsPersonAccount

• LastName (if a Person Account)

• Name (if not a Person Account)

SalesChannel • SalesChannelName

Product2 • Description

168

Importing Order DataOrder Management Standard Objects

Page 179: Salesforce Order Management Developer Guide

Required FieldsObject

• IsActive

• Name

• ProductCode

• StockKeepingUnit

CardPaymentMethod • AccountId

• CardCategory

• CardHolderName

• CardType

• ExpiryMonth

• ExpiryYear

• InputCardNumber

• ProcessingMode

• Status

Order • AccountId

• BillingCity

• BillingCountry

• BillingCountryCode

• BillingEmailAddress

• BillingState

• BillingStreet

• EffectiveDate

• Name

• OrderedDate

• OrderReferenceNumber

• SalesChannelId

• Status (always set this field to Draft for a new record, andchange it to Active before creating the OrderSummary)

OrderItem • Description

• GrossUnitPrice

• OrderDeliveryGroupId

• OrderId

• PricebookEntryId

• Product2id

• Quantity

• TotalLineAmount

• Type

169

Importing Order DataOrder Management Standard Objects

Page 180: Salesforce Order Management Developer Guide

Required FieldsObject

• UnitPrice

OrderItemAdjustmentLineItem • Amount

• Description

• Name

• OrderItemId

OrderItemTaxLineItem • Amount

• Description

• Name

• OrderItemAdjustmentLineItemId (if applicable)

• OrderItemId

• Rate

• TaxEffectiveDate

• Type

OrderDeliveryGroup • DeliverToCity

• DeliverToCountry

• DeliverToName

• DeliverToPostalCode

• DeliverToState

• DeliverToStreet

• EmailAddress

• OrderDeliveryMethodId

• OrderId

PaymentGroup • SourceObjectId

PaymentAuthorization • AccountId

• Amount

• PaymentGatewayId

• PaymentGroupId

• PaymentMethodId

• ProcessingMode

• Status

Payment • AccountId

• Amount

• Date

170

Importing Order DataOrder Management Standard Objects

Page 181: Salesforce Order Management Developer Guide

Required FieldsObject

• Email

• PaymentGatewayId

• PaymentGroupId

• PaymentMethodId

• Phone

• ProcessingMode

• Status

• Type

Creating Order SummariesYou can create order summaries for imported orders in a few different ways. This table explains the pros and cons of each.

Note: For details about each method, see the corresponding developer guides. To learn about using different types of flows, seethe Salesforce Flow Developer Center.

ConsProsMethod

Flow triggered by a Platform Event • No parallel execution; orders processedone at a time

• Simple to implement

• Asynchronous transaction separate fromorder creation improves performance • No control of timing

• Asynchronous execution requirescomplex error handling

Flow triggered by a record change (OrderStatus: Draft Activated)

• When the order and order summary arecreated in the same transaction, and theorder summary fails, the order also fails

• Simple to implement

• Allows a multithreaded approach forcreating order summaries in parallelwith orders • Large transactions

• •A Composite API call can create an orderand order summary in the same

Lowest performance method

transaction, allowing simpler errorhandling; for example:

1. Create the Order record and set itsStatus to Draft.

2. Create the supporting records suchas order items and order deliverygroups.

3. Change the order’s Status toActivated. That triggers the CreateOrder Summary flow to run on thatorder.

171

Importing Order DataOrder Management Standard Objects

Page 182: Salesforce Order Management Developer Guide

ConsProsMethod

Apex triggered by a Platform Event • No control of timing• Asynchronous transaction separate fromorder creation improves performance • Asynchronous execution requires

complex error handling• Allows a multithreaded approach forcreating order summaries in parallelwith orders

• Best performance method

Scheduled Apex job • Subject to Apex limits on the numberof records processed

• Allows controlled batch execution

• Requires programmatic identificationof the orders to process

• Runs even when no orders needprocessing

Direct calls to API resources • Subject to API call limits• Allows external control

• •Some clients allow parallel processing Requires external app design,authentication, and so on

Custom Order DataTo import custom order data, add a custom field to Order, OrderItem, or OrderDeliveryGroup and a matching custom field to thecorresponding summary object. When you set the custom value on the base record, the Create Order Summary action or API copies itto the matching field on the corresponding summary record.

For example, consider storefront data that includes an order value called Shopper Category. You can add a custom field calledShopperCategory__c to both Order and OrderSummary. When you import an order, set the ShopperCategory__c valueon the Order record. Then, when you run the Create Order Summary action or call the API for that order, it copies that value to theShopperCategory__c field on the OrderSummary record.

Order summary creation supports custom fields for these data types:

• Boolean

• Currency

• Datetime (Date isn’t supported)

• Double

• Email

• Multipicklist

• Phone

• Picklist

• Reference

• String

• TextArea

• URL

172

Importing Order DataOrder Management Standard Objects

Page 183: Salesforce Order Management Developer Guide

Importing Data When Using Salesforce B2C CommerceIf you import data that’s used by the B2C Commerce integration, such as product or shopper data, keep it synchronized with your B2CCommerce data. Otherwise, the integration can’t recognize it.

For example, when the integration creates an OrderItem record, it searches for a Product2 record whose StockKeepingUnit matches theproduct SKU in the order data. If you import catalog product data, and the StockKeepingUnit values don’t match the product SKU valuesin B2C Commerce, the integration can’t recognize those products. In that case, the integration adds the wrong products to orders orcreates duplicate Product2 records.

This table lists some of the data fields that the integration uses to look up records. If you import or create these objects, keep themsynchronized with your B2C Commerce data.

B2C Commerce DataOrder Management Object Field

Shipping Method IDOrderDeliveryMethod.ReferenceID

Product SKUProduct2.StockKeepingUnit

Payment Processor IDPaymentGateway.ReferenceID

Site ID or Domain IDSalesChannel.SalesChannelName

Customer Email Address• For a person account: Account.PersonEmail

• For other accounts: Contact.Email field

Account.Name • For an individual shopper not using a person account:Customer Billing Address First Name and Last Nameconcatenated

• For a business shopper: Customer Billing Address CompanyName

Fulfillment Orders

A FulfillmentOrder record has a set of supporting records, including FulfillmentOrderLineItems, FulfillmentOrderItemAdjustments, andFulfillmentOrderItemTaxes. When you call an Order Management API or the flow core action to create a fulfillment order, it also createsthe supporting records.

You can create a fulfillment order via Apex, Connect API, Flow, or externally using a platform API, such as sObject, Composite, or BulkAPI 2.0. However, when you create a fulfillment order for an unmanaged OrderSummary, you can’t use the Order Management APIs orflow core action.

When you create a fulfillment order in another way, you create the supporting records. In that case, when you create the fulfillmentorder, set its Status to Draft. After creating all of the supporting records, change its Status to Activated.

In addition to the normally required fields, Order Management requires values for certain fields for each FulfillmentOrder record andsupporting record. When creating a record of an object in this table, always define values for the listed fields.

Required FieldsObject

FulfillmentOrder • AccountId

173

Fulfillment OrdersOrder Management Standard Objects

Page 184: Salesforce Order Management Developer Guide

Required FieldsObject

• DeliveryMethodId

• FulfilledFromLocationId

• FulfilledToCity

• FulfilledToCountry

• FulfilledToEmailAddress

• FulfilledToLatitude

• FulfilledToLongitude

• FulfilledToName

• FulfilledToPhone

• FulfilledToPostalCode

• FulfilledToState

• FulfilledToStreet

• OrderId

• OrderSummaryId

• Status

• Type

FulfillmentOrderLineItem • Description

• FulfillmentOrderId

• GrossUnitPrice

• OrderItemId

• OrderItemSummaryId

• OriginalQuantity

• Product2Id

• Quantity

• TotalLineAmount

• Type

• TypeCode

• UnitPrice

FulfillmentOrderItemAdjustment • Amount

• Description

• FulfillmentOrderId

• FulfillmentOrderLineItemId

• OrderItemAdjustLineSummaryId

FulfillmentOrderItemTax • Amount

• Description

• FulfillmentOrderId

174

Fulfillment OrdersOrder Management Standard Objects

Page 185: Salesforce Order Management Developer Guide

Required FieldsObject

• FulfillmentOrderItemAdjustId (if applicable)

• FulfillmentOrderLineItemId

• OrderItemTaxLineItemSummaryId

• Rate

• TaxEffectiveDate

• Type

175

Fulfillment OrdersOrder Management Standard Objects

Page 186: Salesforce Order Management Developer Guide

CHAPTER 3 Salesforce Order Management in Apex

Salesforce Order Management and Omnichannel Inventory include Apex classes in the ConnectApinamespace.

In this chapter ...

• Salesforce OrderManagement ApexClasses

• Salesforce OrderManagement ApexInputs

• Salesforce OrderManagement ApexOutputs

176

Page 187: Salesforce Order Management Developer Guide

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 ClassFulfill orders in Order Management.

NamespaceConnectApi

FulfillmentOrder MethodsThe 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 reallocatethe canceled quantities to a new FulfillmentOrder.

createFulfillmentOrders(fulfillmentOrderInput)

Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a deliverymethod and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from differentlocations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, aFulfillmentOrderLineItem 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.

177

Salesforce Order Management Apex ClassesSalesforce Order Management in Apex

Page 188: Salesforce Order Management Developer Guide

createMultipleInvoices(invoicesInput)

Create Invoices for multiple FulfillmentOrders.

cancelFulfillmentOrderLineItems(fulfillmentOrderId,cancelFulfillmentOrderLineItemsInput)

Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocatethe canceled quantities to a new FulfillmentOrder.

API Version

48.0

Requires Chatter

No

Signature

public static ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentationcancelFulfillmentOrderLineItems(String fulfillmentOrderId,ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentationcancelFulfillmentOrderLineItemsInput)

Parameters

fulfillmentOrderIdType: String

ID of the FulfilllmentOrder.

cancelFulfillmentOrderLineItemsInputType: ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation

List of FulfillmentOrderLineItems to cancel.

Return Value

Type: ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation

Example

String fulfillmentOrderId = '0a3xx0000000085AAA';List<ConnectApi.FulfillmentOrderLineItemInputRepresentation> itemToCancelList = newList<ConnectApi.FulfillmentOrderLineItemInputRepresentation>();

for(FulfillmentOrderLineItem fulfillmentOrderLineItem :fulfillmentOrder.FulfillmentOrderLineItems){ConnectApi.FulfillmentOrderLineItemInputRepresentation itemToCancel = new

ConnectApi.FulfillmentOrderLineItemInputRepresentation();itemToCancel.fulfillmentOrderLineItemId = fulfillmentOrderLineItem.Id;itemToCancel.quantity = 1;

178

FulfillmentOrder ClassSalesforce Order Management in Apex

Page 189: Salesforce Order Management Developer Guide

itemToCancelList.add(itemToCancel);}

ConnectAPI.FulfillmentOrderLineItemsToCancelInputRepresentation input = newConnectAPI.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 deliverymethod and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from differentlocations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, aFulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.

API Version

48.0

Requires Chatter

No

Signature

public static ConnectApi.FulfillmentOrderOutputRepresentationcreateFulfillmentOrders(ConnectApi.FulfillmentOrderInputRepresentationfulfillmentOrderInput)

Parameters

fulfillmentOrderInputType: 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 = newConnectApi.FulfillmentOrderInputRepresentation();

179

FulfillmentOrder ClassSalesforce Order Management in Apex

Page 190: Salesforce Order Management Developer Guide

fulfillmentOrderInput.orderSummaryId = orderSummaryId;

List<OrderDeliveryGroupSummary> orderDeliveryGroupSummaryList = [SELECT Id FROMOrderDeliveryGroupSummary 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 = newList<ConnectApi.OrderItemSummaryInputRepresentation>();

List<OrderItemSummary> orderItemSummaryList = [Select Id, quantity FROM OrderItemSummaryWHERE 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

180

FulfillmentOrder ClassSalesforce Order Management in Apex

Page 191: Salesforce Order Management Developer Guide

Signature

public static ConnectApi.FulfillmentOrderInvoiceOutputRepresentation createInvoice(StringfulfillmentOrderId, ConnectApi.FulfillmentOrderInvoiceInputRepresentation invoiceInput)

Parameters

fulfillmentOrderIdType: String

ID of the FulfillmentOrder.

invoiceInputType: ConnectApi.FulfillmentOrderInvoiceInputRepresentation

Required input with no data.

Return Value

Type: ConnectApi.FulfillmentOrderInvoiceOutputRepresentation

Example

String fulfillmentOrderId = '0a3xx0000000085AAA';

ConnectApi.FulfillmentOrderInvoiceInputRepresentation input = newConnectApi.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.MultipleFulfillmentOrderOutputRepresentationcreateMultipleFulfillmentOrder(ConnectApi.MultipleFulfillmentOrderInputRepresentationmultipleFulfillmentOrderInput)

Parameters

multipleFulfillmentOrderInputType: ConnectApi.MultipleFulfillmentOrderInputRepresentation

Wraps a list of inputs for creating fulfillment orders.

181

FulfillmentOrder ClassSalesforce Order Management in Apex

Page 192: Salesforce Order Management Developer Guide

Return Value

Type: ConnectApi.MultipleFulfillmentOrderOutputRepresentation

createMultipleInvoices(invoicesInput)

Create Invoices for multiple FulfillmentOrders.

API Version

52.0

Requires Chatter

No

Signature

public static ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentationcreateMultipleInvoices(ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentationinvoicesInput)

Parameters

invoicesInputType: ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation

The FulfillmentOrders to create Invoices for.

Return Value

Type: ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation

OmnichannelInventoryService ClassRoute orders to inventory locations in Order Management.

NamespaceConnectApi

OmnichannelInventoryService MethodsThe 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.

182

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 193: Salesforce Order Management Developer Guide

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 publishincludes records whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use toretrieve 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, butreduces 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.OCICreateReservationOutputRepresentationcreateReservation(ConnectApi.OCICreateReservationInputRepresentationcreateReservationInputRepresentation)

Parameters

createReservationInputRepresentationType: ConnectApi.OCICreateReservationInputRepresentation

Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.

Return Value

Type: ConnectApi.OCICreateReservationOutputRepresentation

183

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 194: Salesforce Order Management Developer Guide

fulfillReservation(fulfillReservationInputRepresentation)

Fulfill one or more inventory reservations.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.OCIFulfillReservationOutputRepresentationfulfillReservation(ConnectApi.OCIFulfillReservationInputRepresentationfulfillReservationInputRepresentation)

Parameters

fulfillReservationInputRepresentationType: 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.OCIGetInventoryAvailabilityOutputRepresentationgetInventoryAvailability(ConnectApi.OCIGetInventoryAvailabilityInputRepresentationinventoryAvailabilityInputRepresentation)

Parameters

inventoryAvailabilityInputRepresentationType: ConnectApi.OCIGetInventoryAvailabilityInputRepresentation

Details of a request to retrieve inventory availability.

184

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 195: Salesforce Order Management Developer Guide

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.OCIUploadInventoryAvailabilityStatusOutputRepresentationgetInventoryAvailabilityUploadStatus(String uploadId)

Parameters

uploadIdType: 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.OCIPublishLocationStructureStatusOutputRepresentationgetPublishLocationStructureStatus(String uploadId)

185

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 196: Salesforce Order Management Developer Guide

Parameters

uploadIdType: 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 includesrecords whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use to retrieve the statusof the publish job.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.OCIPublishLocationStructureOutputRepresentationpublishLocationStructure()

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.OCIReleaseReservationOutputRepresentationreleaseReservation(ConnectApi.OCIReleaseReservationInputRepresentationreleaseReservationInputRepresentation)

186

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 197: Salesforce Order Management Developer Guide

Parameters

releaseReservationInputRepresentationType: 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.OCIUploadInventoryAvailabilityOutputRepresentationsubmitInventoryAvailabilityUpload(ConnectApi.BinaryInput fileUpload)

Parameters

fileUploadType: 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 locationentry.

• 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 importingduplicate data.

• Each inventory record entry requires an effectiveDate.

187

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 198: Salesforce Order Management Developer Guide

• 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, ifan included entry has an empty value, that value is deleted.

Note: The file size limit is 10 MB, and it must be in JSON format. For larger data sets, you can use the headless Commerce API orsplit the data into multiple files. The headless Commerce API accepts GZIP or JSON files up to 100 MB in size.

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 inventoryrecord 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 inventoryrecord"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, butreduces the reserved quantity at the source and increases it at the destination.

188

OmnichannelInventoryService ClassSalesforce Order Management in Apex

Page 199: Salesforce Order Management Developer Guide

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.OCITransferReservationOutputRepresentationtransferReservation(ConnectApi.OCITransferReservationInputRepresentationtransferReservationInputRepresentation)

Parameters

transferReservationInputRepresentationType: 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 ClassWork with payments in Order Management.

NamespaceConnectApi

OrderPaymentSummary MethodsThe 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 paymentmethod. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from theOrderSummary.

createOrderPaymentSummary(orderPaymentSummaryInput)

Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same paymentmethod. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from theOrderSummary.

189

OrderPaymentSummary ClassSalesforce Order Management in Apex

Page 200: Salesforce Order Management Developer Guide

API Version

48.0

Requires Chatter

No

Signature

public static ConnectApi.CreateOrderPaymentSummaryOutputRepresentationcreateOrderPaymentSummary(ConnectApi.CreateOrderPaymentSummaryInputRepresentationorderPaymentSummaryInput)

Parameters

orderPaymentSummaryInputType: 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 = newConnectApi.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 ClassWork with orders in Order Management.

NamespaceConnectApi

190

OrderSummary ClassSalesforce Order Management in Apex

Page 201: Salesforce Order Management Developer Guide

OrderSummary MethodsThe 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 actuallyexecuting the adjustment. The response data contains the financial changes that would result from submitting the proposedadjustment.

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 trackits 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 backgroundoperation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responsesappear 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 actuallyexecuting the cancel.

previewReturn(orderSummaryId, changeInput)

Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting 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 actuallyexecuting the adjustment. The response data contains the financial changes that would result from submitting the proposed adjustment.

API Version

49.0

Requires Chatter

No

191

OrderSummary ClassSalesforce Order Management in Apex

Page 202: Salesforce Order Management Developer Guide

Signature

public static ConnectApi.AdjustOrderSummaryOutputRepresentation adjustPreview(StringorderSummaryId, ConnectApi.AdjustOrderItemSummaryInputRepresentation adjustInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

adjustInputType: 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(StringorderSummaryId, ConnectApi.AdjustOrderItemSummaryInputRepresentation adjustInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

adjustInputType: ConnectApi.AdjustOrderItemSummaryInputRepresentation

A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.

192

OrderSummary ClassSalesforce Order Management in Apex

Page 203: Salesforce Order Management Developer Guide

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. Thissituation 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 arefund. 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 thepostFulfillmentChangeOrderId from the output representation to the createCreditMemo() method, then passthe CreditMemo to the ensureRefundsAsync() method.

• If the discount applied to both fulfilled and unfulfilled OrderItemSummaries for which payment has been captured, process bothrefunds. Pass the postFulfillmentChangeOrderId from the output representation to the createCreditMemo()method, then pass the credit memo and the totalExcessFundsAmount from the output representation to theensureRefundsAsync() 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(StringorderSummaryId, ConnectApi.CreateCreditMemoInputRepresentation creditMemoInput)

Parameters

orderSummaryIdType: String

193

OrderSummary ClassSalesforce Order Management in Apex

Page 204: Salesforce Order Management Developer Guide

ID of the OrderSummary.

creditMemoInputType: 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. Thismethod 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(StringorderSummaryId, ConnectApi.EnsureFundsAsyncInputRepresentation ensureFundsInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

ensureFundsInputType: 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 balancefollowing this logic:

Note: If multiple OrderPaymentSummaries have equal amounts, their order of selection is random.

1. Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.

194

OrderSummary ClassSalesforce Order Management in Apex

Page 205: Salesforce Order Management Developer Guide

2. Look for an OrderPaymentSummary with a captured amount equal to the invoice balance. If one exists, apply those funds.

3. If no exact match was found, identify all OrderPaymentSummaries with captured amounts greater than the invoice balance. If anyexist, select the smallest one and apply funds from it equal to the invoice balance.

4. If no captured amounts greater than the invoice balance were found, traverse the OrderPaymentSummaries in order of capturedamount, from largest to smallest. Apply each captured amount to the invoice until the invoice balance is zero or all captured fundsare applied.

5. If the invoice still has a balance, look for an OrderPaymentSummary with an authorized amount equal to the remaining invoicebalance. If one exists, capture and apply those funds.

6. If no exact match was found, identify all OrderPaymentSummaries with authorized amounts greater than the invoice balance. If anyexist, select the smallest one and apply funds from it equal to the invoice balance.

7. If no authorized amounts greater than the invoice balance were found, traverse the OrderPaymentSummaries in order of authorizedamount, from largest to smallest. Capture and apply funds until the invoice balance is zero.

ensureRefundsAsync(orderSummaryId, ensureRefundsInput)

Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a backgroundoperation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responsesappear 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(StringorderSummaryId, ConnectApi.EnsureRefundsAsyncInputRepresentation ensureRefundsInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

ensureRefundsInputType: ConnectApi.EnsureRefundsAsyncInputRepresentation

Object that wraps the ID of the credit memo and the excess funds amount.

Return Value

Type: ConnectApi.EnsureRefundsAsyncOutputRepresentation

195

OrderSummary ClassSalesforce Order Management in Apex

Page 206: Salesforce Order Management Developer Guide

Usage

This method checks the OrderPaymentSummaries associated with the specified OrderSummary for amounts to refund following thislogic:

Note: If multiple OrderPaymentSummaries have equal amounts, their order of selection is random.

1. If a credit memo is specified, identify OrderPaymentSummaries with captured amounts that were applied to the correspondinginvoice.

a. Examine those OrderPaymentSummaries. If one has a captured amount matching the credit memo amount, apply the refundto that payment.

b. If no exact match was found, look for captured amounts greater than the credit memo amount. If any exist, apply the refund tothe smallest one.

c. If no greater amounts were found, traverse the OrderPaymentSummaries in order of captured amount, from largest to smallest.Apply the refund to them until it’s fully applied.

2. If an excess funds amount is specified, identify OrderPaymentSummaries with captured amounts that weren’t applied to any invoice.

a. Examine those OrderPaymentSummaries. If one has a captured amount matching the excess funds amount, apply the refundto that payment.

b. If no exact match was found, look for captured amounts greater than the excess funds amount. If any exist, apply the refund tothe smallest one.

c. If no greater amounts were found, traverse the OrderPaymentSummaries in order of captured amount, from largest to smallest.Apply the refund to them until it’s fully applied.

previewCancel(orderSummaryId, changeInput)

Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting the cancel.

API Version

48.0

Requires Chatter

No

Signature

public static ConnectApi.PreviewCancelOutputRepresentation previewCancel(StringorderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

196

OrderSummary ClassSalesforce Order Management in Apex

Page 207: Salesforce Order Management Developer Guide

changeInputType: 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 actuallyexecuting the return.

API Version

48.0

Requires Chatter

No

Signature

public static ConnectApi.PreviewReturnOutputRepresentation previewReturn(StringorderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

changeInputType: ConnectApi.ChangeInputRepresentation

A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

197

OrderSummary ClassSalesforce Order Management in Apex

Page 208: Salesforce Order Management Developer Guide

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(StringorderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

changeInputType: ConnectApi.ChangeInputRepresentation

A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

Return Value

Type: ConnectApi.SubmitCancelOutputRepresentation

SEE ALSO:

ensureRefundsAsync(orderSummaryId, ensureRefundsInput)

createCreditMemo(orderSummaryId, creditMemoInput)

createCreditMemo(orderSummaryId, creditMemoInput)

ensureRefundsAsync(orderSummaryId, ensureRefundsInput)

previewCancel(orderSummaryId, changeInput)

198

OrderSummary ClassSalesforce Order Management in Apex

Page 209: Salesforce Order Management Developer Guide

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(StringorderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)

Parameters

orderSummaryIdType: String

ID of the OrderSummary.

changeInputType: 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

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 ClassCreate Order Summaries in Order Management.

199

OrderSummaryCreation ClassSalesforce Order Management in Apex

Page 210: Salesforce Order Management Developer Guide

NamespaceConnectApi

OrderSummaryCreation MethodsThe 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 changeorders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in SalesforceOrder 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 changeorders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce OrderManagement 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.OrderSummaryOutputRepresentationcreateOrderSummary(ConnectApi.OrderSummaryInputRepresentation orderSummaryInput)

Parameters

orderSummaryInputType: ConnectApi.OrderSummaryInputRepresentation

Input object that wraps the ID of the source order.

Return Value

Type: ConnectApi.OrderSummaryOutputRepresentation

ReturnOrder ClassProcess ReturnOrders in Order Management.

NamespaceConnectApi

200

ReturnOrder ClassSalesforce Order Management in Apex

Page 211: Salesforce Order Management Developer Guide

ReturnOrder MethodsThe 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 makesthat ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API createsa 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.ReturnOrderOutputRepresentationcreateReturnOrder(ConnectApi.ReturnOrderInputRepresentation returnOrderInput)

Parameters

returnOrderInputType: 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 makesthat ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates aseparate ReturnOrderLineItem representing that quantity.

API Version

52.0

201

ReturnOrder ClassSalesforce Order Management in Apex

Page 212: Salesforce Order Management Developer Guide

Requires Chatter

No

Signature

public static ConnectApi.ReturnItemsOutputRepresentation returnItems(StringreturnOrderId, ConnectApi.ReturnItemsInputRepresentation returnItemsInput)

Parameters

returnOrderIdType: String

ID of the ReturnOrder.

returnItemsInputType: ConnectApi.ReturnItemsInputRepresentation

Data about products and delivery charges to return.

Return Value

Type: ConnectApi.ReturnItemsOutputRepresentation

Routing ClassRoute orders to inventory locations in Order Management.

NamespaceConnectApi

Routing MethodsThe 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 comparethe 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

202

Routing ClassSalesforce Order Management in Apex

Page 213: Salesforce Order Management Developer Guide

Requires Chatter

No

Signature

public static ConnectApi.FindRoutesWithFewestSplitsOutputRepresentationfindRoutesWithFewestSplits(ConnectApi.FindRoutesWithFewestSplitsInputRepresentationfindRoutesWithFewestSplitsInputRepresentation)

Parameters

findRoutesWithFewestSplitsInputRepresentationType: ConnectApi.FindRoutesWithFewestSplitsInputRepresentation

The input includes the ordered item quantities, data about available inventory, and, optionally, a maximum allowable number ofshipment 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 theaverage shipping distances for different sets of locations that can fulfill an order.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.RankAverageDistanceOutputRepresentationrankAverageDistance(ConnectApi.RankAverageDistanceInputRepresentationrankAverageDistanceInputRepresentation)

Parameters

rankAverageDistanceInputRepresentationType: 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

203

Routing ClassSalesforce Order Management in Apex

Page 214: Salesforce Order Management Developer Guide

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 basedon 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.

ConnectApi.FulfillmentGroupInputRepresentation

A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of thevalues defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assignedto 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 toFulfillmentOrders. Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and sharethe same fulfillment location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem foreach 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 thecanceled 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.

204

Salesforce Order Management Apex InputsSalesforce Order Management in Apex

Page 215: Salesforce Order Management Developer Guide

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.

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 canspecify 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 remainingquantity to be returned is added to a new ReturnOrderLineItem.

205

Salesforce Order Management Apex InputsSalesforce Order Management in Apex

Page 216: Salesforce Order Management Developer Guide

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.AdjustItemInputRepresentationA price adjustment to an OrderItemSummary. It only supports discounts, not increases.

Available VersionRequired orOptional

DescriptionTypeProperty

49.0RequiredDescribes how the amount is calculated. Itcan have one of these values:

StringadjustmentType

• AmountWithTax—Value of amountis the adjustment, including tax.

• AmountWithoutTax—Value ofamount is the adjustment, not includingtax. Tax is calculated on the value andadded.

• Percentage—Value of amount is apercentage discount. It is divided by100, and then multiplied by theTotalPrice and TotalTaxAmount of theOrderItemSummary to determine theadjustment amount.

49.0RequiredValue used to calculate the adjustmentamount, as described by the

Doubleamount

adjustmentType. It must be a negativevalue.

49.0OptionalDescription of the adjustment.Stringdescription

49.0RequiredID of the OrderItemSummary.StringorderItemSummaryId

206

ConnectApi.AdjustItemInputRepresentationSalesforce Order Management in Apex

Page 217: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

49.0RequiredReason for the adjustment. The value mustmatch one of the picklist values on the

Stringreason

Reason field of theOrderItemSummaryChange object.

SEE ALSO:

ConnectApi.AdjustOrderItemSummaryInputRepresentation

adjustPreview(orderSummaryId, adjustInput)

adjustSubmit(orderSummaryId, adjustInput)

ConnectApi.AdjustOrderItemSummaryInputRepresentationA list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.

Available VersionRequired orOptional

DescriptionTypeProperty

49.0RequiredList of price adjustments toOrderItemSummaries.

List<ConnectApi.AdjustItemInputRepresentation>

adjustItems

SEE ALSO:

adjustPreview(orderSummaryId, adjustInput)

adjustSubmit(orderSummaryId, adjustInput)

ConnectApi.ChangeInputRepresentationA list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredList of changes to OrderItemSummaries.List<ConnectApi.ChangeItemInputRepresentation>

changeItems

SEE ALSO:

previewCancel(orderSummaryId, changeInput)

previewReturn(orderSummaryId, changeInput)

submitCancel(orderSummaryId, changeInput)

submitReturn(orderSummaryId, changeInput)

207

ConnectApi.AdjustOrderItemSummaryInputRepresentationSalesforce Order Management in Apex

Page 218: Salesforce Order Management Developer Guide

ConnectApi.ChangeItemInputRepresentationChange to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based onthe price change. The OrderItemSummary can’t be a shipping charge.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredID of the OrderItemSummary.StringorderItemSummaryId

48.0RequiredQuantity to change. Use a positive value.For example, a value of 2 means “cancel orreturn 2 units.”

Doublequantity

48.0RequiredReason for the change. The value mustmatch one of the picklist values on the

Stringreason

Reason field of theOrderItemSummaryChange object.

48.0RequiredSpecifies whether to prorate the shippingcharge.

BooleanshippingReductionFlag

SEE ALSO:

ConnectApi.ChangeInputRepresentation

previewCancel(orderSummaryId, changeInput)

previewReturn(orderSummaryId, changeInput)

submitCancel(orderSummaryId, changeInput)

submitReturn(orderSummaryId, changeInput)

ConnectApi.CreateCreditMemoInputRepresentationA list of change orders used to create a credit memo.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredList of IDs of the change orders.List<String>changeOrderIds

SEE ALSO:

createCreditMemo(orderSummaryId, creditMemoInput)

ConnectApi.CreateOrderPaymentSummaryInputRepresentationAn OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.

208

ConnectApi.ChangeItemInputRepresentationSalesforce Order Management in Apex

Page 219: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredID of the OrderSummary.StringorderSummaryId

48.0Either a paymentauthorization or at

ID of the payment authorization.StringpaymentAuthorizationId

least one payment isrequired.

48.0Either a paymentauthorization or at

List of IDs of the payments.List<String>paymentIds

least one payment isrequired.

SEE ALSO:

createOrderPaymentSummary(orderPaymentSummaryInput)

ConnectApi.EnsureFundsAsyncInputRepresentationID of an invoice to ensure funds for and apply them to.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredID of the invoice.StringinvoiceId

SEE ALSO:

ensureFundsAsync(orderSummaryId, ensureFundsInput)

ConnectApi.EnsureRefundsAsyncInputRepresentationID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0Optional, but at leastone input property isrequired

ID of the credit memo that represents arefund amount.

StringcreditMemoId

49.0Optional, but at leastone input property isrequired

Amount of excess funds to refund.DoubleexcessFundsAmount

SEE ALSO:

ensureRefundsAsync(orderSummaryId, ensureRefundsInput)

209

ConnectApi.EnsureFundsAsyncInputRepresentationSalesforce Order Management in Apex

Page 220: Salesforce Order Management Developer Guide

ConnectApi.FindRoutesWithFewestSplitsInputRepresentationData used to calculate order fulfillment routes involving the fewest number of shipment splits.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0At least one elementis required

Each list element represents the availablequantity of a product at an inventorylocation.

List<ConnectApi.LocationAvailabilityInputRepresentation>

locationAvailableInventory

51.0OptionalThe maximum allowable number ofshipment splits. Routing options that involve

IntegermaximumNumberOfSplits

more than this number of splits are notreturned.

Note: Each split represents anadditional shipment. Specifying amaximum of 0 returns only locationsthat can fulfill the entire order in asingle shipment. A maximum of 1returns combinations of locationsthat can fulfill the order in one or twoshipments, and so on.

51.0At least one elementis required

Each list element represents a quantity of aproduct to be routed for fulfillment.

List<ConnectApi.QuantityWithSkuInputRepresentation>

orderedQuantities

ConnectApi.FulfillmentGroupInputRepresentationA list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the valuesdefined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned to theFulfillmentOrder for this fulfillment group.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredID of the fulfillment location.StringfulfilledFromLocationId

48.0RequiredFulfillment type. One of the Type field valuesdefined for FulfillmentOrders.

StringfulfillmentType

48.0RequiredList of OrderItemSummaries.List<ConnectApi.OrderItem

orderItemSummaries

SummaryInputRepresentation>

210

ConnectApi.FindRoutesWithFewestSplitsInputRepresentationSalesforce Order Management in Apex

Page 221: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

50.0OptionalReference to this input for use introubleshooting failures. This value is only

StringreferenceId

used by the APIs for creating fulfillmentorders for multiple order delivery groupsummaries.

SEE ALSO:

ConnectApi.FulfillmentOrderInputRepresentation

createFulfillmentOrders(fulfillmentOrderInput)

ConnectApi.FulfillmentOrderInputRepresentationAn 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 fulfillmentlocation. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for each OrderItemSummary.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredList of fulfillment groups that specify theOrderItemSummaries and fulfillmentlocations.

List<ConnectApi.FulfillmentGroupInputRepresentation>

fulfillmentGroups

48.0RequiredID of the OrderDeliveryGroupSummary.StringorderDeliveryGroupSummaryId

48.0RequiredID of the OrderSummary.StringorderSummaryId

SEE ALSO:

createFulfillmentOrders(fulfillmentOrderInput)

ConnectApi.FulfillmentOrderInvoiceInputRepresentationInstantiate and include this object with no properties when creating an invoice.

This input class has no properties.

SEE ALSO:

createInvoice(fulfillmentOrderId, invoiceInput)

211

ConnectApi.FulfillmentOrderInputRepresentationSalesforce Order Management in Apex

Page 222: Salesforce Order Management Developer Guide

ConnectApi.FulfillmentOrderLineItemInputRepresentationA FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the canceledquantity to a different FulfillmentOrder.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredID of the FulfillmentOrderLineItem.StringfulfillmentOrderLineItemId

48.0RequiredQuantity to cancel.Doublequantity

SEE ALSO:

ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation

cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)

ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentationA list of FulfillmentOrderLineItems and quantities to cancel.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredList of FulfillmentOrderLineItems andquantities.

List<ConnectApi.FulfillmentOrderLineItemInputRepresentation>

fulfillmentOrderLineItemsToCancel

SEE ALSO:

cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)

ConnectApi.LocationInputRepresentationInventory location data used to calculate shipping distance.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredThe country code of the location.StringcountryCode

51.0RequiredThe identifier of the location.StringlocationIdentifier

51.0RequiredThe postal code of the location.StringpostalCode

ConnectApi.LocationAvailabilityInputRepresentationThe available quantity of a product at an inventory location.

212

ConnectApi.FulfillmentOrderLineItemInputRepresentationSalesforce Order Management in Apex

Page 223: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0OptionalThe external reference ID of the inventorylocation.

StringexternalReferenceId

51.0RequiredThe available quantity of the product.Doublequantity

51.0RequiredThe Stock Keeping Unit of the product.StringstockKeepingUnit

ConnectApi.MultipleFulfillmentOrderInputRepresentationList of inputs for creating fulfillment orders.

Available VersionRequired orOptional

DescriptionTypeProperty

50.0RequiredEach element contains the data to createone fulfillment order.

List<ConnectApi.FulfillmentOrderInputRepresentation>

fulfillmentOrders

ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentationThe FulfillmentOrders to create Invoices for.

Available VersionRequired orOptional

DescriptionTypeProperty

52.0At least one ID isrequired.

List of IDs of FulfillmentOrders to createInvoices for.

List<String>fulfillmentOrderIds

ConnectApi.OCICreateReservationInputRepresentationData to reserve inventory at one or more Omnichannel Inventory locations or location groups.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data toidentify which requests succeeded or failed.

StringactionRequestId

51.0When true, if the system can’t create theentire reservation, then it attempts to createa partial reservation.

BooleanallowPartialReservations

51.0At least one elementis required

A list of product quantities and locations orlocation groups.

List<ConnectApi.OCICreateReservationSingleInputRepresentation>

createRecords

213

ConnectApi.MultipleFulfillmentOrderInputRepresentationSalesforce Order Management in Apex

Page 224: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0A length of time in seconds. If thereservation is not fulfilled within this amount

IntegerexpirationSeconds

of time after the reservationTime,then it expires.

51.0External reference ID.StringexternalRefId

51.0The time at which to record the reservation.Example: 2020-07-24T21:13:00Z

StringreservationTime

ConnectApi.OCICreateReservationSingleInputRepresentationA quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0EitherlocationGroupIdentifier

Identifier of the location group at which toreserve inventory.

StringlocationGroupIdentifier

or locationIdentifieris required, but notboth

51.0EitherlocationGroupIdentifier

Identifier of the location at which to reserveinventory.

StringlocationIdentifier

or locationIdentifieris required, but notboth

51.0RequiredThe quantity of the product to reserve.Doublequantity

51.0RequiredThe SKU of the product to reserve.StringstockKeepingUnit

ConnectApi.OCIFulfillReservationInputRepresentationA list of inventory reservations to fulfill.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0At least one elementis required.

A list of inventory reservations.List<ConnectApi.OCIFulfillReservationSingleInputRepresentation>

fulfillmentRecords

ConnectApi.OCIFulfillReservationSingleInputRepresentationAn inventory reservation to fulfill.

214

ConnectApi.OCICreateReservationSingleInputRepresentationSalesforce Order Management in Apex

Page 225: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data toidentify which requests succeeded or failed.

StringactionRequestId

51.0OptionalThe external reference ID of the locationthat’s fulfilling the reservation.

StringexternalRefId

51.0RequiredThe identifier of the location that’s fulfillingthe reservation.

StringlocationIdentifier

51.0RequiredThe quantity being fulfilled.Doublequantity

51.0RequiredThe SKU of the product being fulfilled.StringstockKeepingUnit

ConnectApi.OCIGetInventoryAvailabilityInputRepresentationDetails of a request to retrieve inventory availability.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0Optional; can’tcombine with

The identifier of a location group to retrieveinventory availability data for. Specifying this

StringlocationGroupIdentifier

locationGroupIdentifiersvalue retrieves inventory data for alllocations belonging to this group. or

locationIdentifiers

51.0Optional; can’tcombine with

A list of up to 100 identifiers of locationgroups to retrieve inventory availability datafor.

List<String>locationGroupIdentifiers

locationGroupIdentifierorlocationIdentifiers

51.0Optional; can’tcombine with

A list of up to 100 identifiers of locations toretrieve inventory availability data for.

List<String>locationIdentifiers

locationGroupIdentifierorlocationGroupIdentifiers

51.0Optional; can’tcombine withstockKeepingUnits

The SKU of a product to retrieve inventoryavailability data for. Specifying a SKU withno locations or location groups returnsavailability data for that SKU at all inventory

StringstockKeepingUnit

locations that are not assigned to locationgroups.

51.0Optional; can’tcombine withstockKeepingUnit

A list of up to 100 SKUs of products toretrieve inventory availability data for.

List<String>stockKeepingUnits

215

ConnectApi.OCIGetInventoryAvailabilityInputRepresentationSalesforce Order Management in Apex

Page 226: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0OptionalWhether to fetch the inventory data fromthe cache. Default value is true.

BooleanuseCache

ConnectApi.OCIReleaseReservationInputRepresentationDetails of one or more inventory reservations to release.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0At least one elementis required.

List of inventory reservations to release.List<ConnectApi.OCIReleaseReservationSingleInputRepresentation>

releaseRecords

ConnectApi.OCIReleaseReservationSingleInputRepresentationA single inventory reservation to release.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data toidentify which requests succeeded or failed.

StringactionRequestId

51.0OptionalThe external reference ID of the location orlocation group that has the reservation.

StringexternalRefId

51.0The identifier for alocation or location

The identifier of the location group that hasthe reservation.

StringlocationGroupIdentifier

group, but not both,is required.

51.0The identifier for alocation or location

The identifier of the location that has thereservation.

StringlocationIdentifier

group, but not both,is required.

51.0RequiredThe quantity of reserved inventory torelease.

Doublequantity

51.0RequiredThe SKU of the product to release.StringstockKeepingUnit

ConnectApi.OCITransferReservationInputRepresentationA list of inventory reservation transfers and specifies whether a single failure cancels the entire list.

216

ConnectApi.OCIReleaseReservationInputRepresentationSalesforce Order Management in Apex

Page 227: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0OptionalControls whether a single failed transfercancels all other transfers in thetransferRecords list.

StringallOrNothingTransferId

• To allow some transfers in thetransferRecords list to succeedwhen others fail, don’t include thisproperty.

• To cancel all the transfers in thetransferRecords list when anyof them fail, set this property to a UUID.The ID must be unique, but isn’totherwise used in this version.

51.0At least one elementis required.

A list of inventory reservation transfers.List<ConnectApi.OCITransferReservationSingleInputRepresentation>

transferRecords

ConnectApi.OCITransferReservationSingleInputRepresentationAn inventory reservation transfer.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data toidentify which requests succeeded or failed.

StringactionRequestId

51.0OptionalThe external reference ID of the locationreceiving the transfer.

StringexternalRefId

51.0The identifier for asending location or

The identifier of the location group sendingthe reservation.

StringfromLocationGroupIdentifier

location group, butnot both, is required

51.0The identifier for asending location or

The identifier of the location sending thereservation.

StringfromLocationIdentifier

location group, butnot both, is required

52.0OptionalIf true, force the transfer even if the receivinglocation doesn’t have sufficient availableinventory. The default value is false.

BooleanignoreAvailabilityCheck

51.0RequiredThe quantity of inventory being transferred.Doublequantity

51.0RequiredThe SKU of the product being transferred.StringstockKeepingUnit

217

ConnectApi.OCITransferReservationSingleInputRepresentationSalesforce Order Management in Apex

Page 228: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0The identifier for areceiving location or

The identifier of the location group receivingthe reservation.

StringtoLocationGroupIdentifier

location group, butnot both, is required

51.0The identifier for areceiving location or

The identifier of the location receiving thereservation.

StringtoLocationIdentifier

location group, butnot both, is required

ConnectApi.OrderItemSummaryInputRepresentationAn OrderItemSummary and quantity.

Available VersionRequired orOptional

DescriptionTypeProperty

48.0RequiredID of the OrderItemSummary.StringorderItemSummaryId

48.0RequiredQuantity to include.Doublequantity

SEE ALSO:

ConnectApi.FulfillmentGroupInputRepresentation

ConnectApi.FulfillmentOrderInputRepresentation

createFulfillmentOrders(fulfillmentOrderInput)

ConnectApi.OrderSummaryInputRepresentationAn order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you canspecify an OrderNumber or Status.

Available VersionRequired orOptional

DescriptionTypeProperty

53.0OptionalThe order’s business model. It can have oneof these values:

StringbusinessModel

• B2B

• B2C

50.0OptionalSpecifies an OrderNumber to assign to theorder summary.

Stringname

48.0RequiredID of the original order.StringorderId

218

ConnectApi.OrderItemSummaryInputRepresentationSalesforce Order Management in Apex

Page 229: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

49.0OptionalSpecifies whether the order is managed inSalesforce Order Management or by an

StringorderLifeCycleType

external system. It can have one of thesevalues:

• MANAGED—Managed in SalesforceOrder Management.

• UNMANAGED—Managed by anexternal system.

If no value is specified, the default isMANAGED.

50.0OptionalSpecifies a status to assign to the ordersummary. The value must match one of the

Stringstatus

picklist values on the Status field of theOrderSummary object.

SEE ALSO:

createOrderSummary(orderSummaryInput)

ConnectApi.QuantityWithSkuInputRepresentationA quantity of a product.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredQuantity of the product.Doublequantity

51.0RequiredSKU of the product.StringstockKeepingUnit

ConnectApi.RankAverageDistanceInputRepresentationAn order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredThe country code of the order recipient.StringdeliveryCountryCode

51.0RequiredThe postal code of the order recipient.StringdeliveryPostalCode

51.0Specify mi or km to return averagedistances in miles or kilometers, respectively.

StringdistanceUnit

219

ConnectApi.QuantityWithSkuInputRepresentationSalesforce Order Management in Apex

Page 230: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

51.0Specify ASC or DESC to rank the resultsby average shipping distance in ascendingor descending order, respectively.

StringsortResult

51.0At least one elementis required

Each element is a set of inventory locationsthat can combine to fulfill the order.

List<ConnectApi.TargetLocationInputRepresentation>

targetLocations

ConnectApi.ReturnItemsInputRepresentationData about products and delivery charges to return.

Available VersionRequired orOptional

DescriptionTypeProperty

52.0OptionalList of ReturnOrderLineItems to return thatrepresent delivery charges.

List<ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation>

returnOrderItemDeliveryCharges

52.0RequiredList of ReturnOrderLineItems to process thatrepresent products, along with data abouthow to process them.

List<ConnectApi.ReturnOrderItemInputRepresentation>

returnOrderItems

ConnectApi.ReturnOrderInputRepresentationData for creating a ReturnOrder and ReturnOrderLineItems.

Available VersionRequired orOptional

DescriptionTypeProperty

50.0RequiredID of the OrderSummary containing theitems to be returned. The OrderSummary’sOrderLifeCycleType must be Managed.

StringorderSummaryId

51.0RequiredThe LifeCycleType of the ReturnOrder.Possible values are:

StringreturnOrderLifeCycleType

• Managed—Process the ReturnOrderusing the APIs and actions. It cangenerate change orders and affectsfinancial fields and rollup calculations.

• Unmanaged—The ReturnOrder is fortracking purposes only. It isn’t involvedin any financial calculations and doesn’tgenerate any change orders. The systemdoesn’t prevent the creation of

220

ConnectApi.ReturnItemsInputRepresentationSalesforce Order Management in Apex

Page 231: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

duplicate ReturnOrderLineItems in anunmanaged ReturnOrder for the sameOrderItem.

50.0At least one elementis required

List of data for creatingReturnOrderLineItems.

List<ConnectApi.ReturnOrderLineItemInputRepresentation>

returnOrderLineItems

51.0RequiredStatus to assign the ReturnOrder. This valuemust match an entry in the ReturnOrderobject’s Status picklist.

Stringstatus

ConnectApi.ReturnOrderItemInputRepresentationID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remainingquantity to be returned is added to a new ReturnOrderLineItem.

Available VersionRequired orOptional

DescriptionTypeProperty

52.0RequiredThe quantity of the ReturnOrderLineItemthat has been received. The value must be

DoublequantityReceived

zero or greater. This value isn’t used by anystandard features, but is provided for use incustomizations.

52.0RequiredThe quantity of the ReturnOrderLineItemthat has been rejected for return. The value

DoublequantityRejected

must be zero or greater. This value isn’t usedby any standard features, but is provided foruse in customizations.

52.0RequiredThe quantity of the ReturnOrderLineItemthat has been returned. The value must be

DoublequantityReturned

greater than zero. If this value plusquantityToCancel is less than the expectedreturn quantity, then the remaining quantityto be returned is added to a newReturnOrderLineItem.

52.0RequiredThe quantity of the ReturnOrderLineItem toremove because it’s not being returned. The

DoublequantityToCancel

value must be zero or greater. If this valueplus quantityReturned is less than theexpected return quantity, then theremaining quantity to be returned is addedto a new ReturnOrderLineItem.

221

ConnectApi.ReturnOrderItemInputRepresentationSalesforce Order Management in Apex

Page 232: Salesforce Order Management Developer Guide

Available VersionRequired orOptional

DescriptionTypeProperty

52.0OptionalThe reason why the rejected quantity, if any,was rejected. This value isn’t used by any

StringreasonForRejection

standard features, but is provided for use incustomizations.

52.0RequiredThe ID of the ReturnOrderLineItem.StringreturnOrderLineItemId

ConnectApi.ReturnOrderLineItemInputRepresentationData for creating a ReturnOrderLineItem.

Available VersionRequired orOptional

DescriptionTypeProperty

50.0RequiredWhether the associated shipping chargecan be refunded.

BooleancanReduceShipping

50.0RequiredID of the associated OrderItemSummary.StringorderItemSummaryId

50.0RequiredQuantity expected to be returned.DoublequantityExpected

50.0OptionalQuantity already physically returned.DoublequantityReceived

50.0OptionalReason for the return. The value must matchan entry in the ReturnOrderLineItem object’sReasonForReturn picklist.

StringreasonForReturn

ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentationID of a ReturnOrderLineItem representing a delivery charge.

Available VersionRequired orOptional

DescriptionTypeProperty

52.0RequiredID of a ReturnOrderLineItem to return.StringreturnOrderLineItemId

ConnectApi.TargetLocationInputRepresentationA set of inventory locations that together can fulfill an order.

Available VersionRequired orOptional

DescriptionTypeProperty

51.0RequiredA list of locations with information abouttheir country and postal codes.

List<ConnectApi.LocationInputRepresentation>

locations

222

ConnectApi.ReturnOrderLineItemInputRepresentationSalesforce Order Management in Apex

Page 233: Salesforce Order Management Developer Guide

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 thevalues 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 asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made toan external payment gateway. It doesn’t include any errors from the operation.

ConnectApi.EnsureRefundsAsyncOutputRepresentation

ID of the asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made toan external payment gateway. It doesn’t include any errors from the 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.

ConnectApi.FulfillmentGroupOutputRepresentation

Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. Ifthe 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.

223

Salesforce Order Management Apex OutputsSalesforce Order Management in Apex

Page 234: Salesforce Order Management Developer Guide

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.

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.

224

Salesforce Order Management Apex OutputsSalesforce Order Management in Apex

Page 235: Salesforce Order Management Developer Guide

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 werecreated 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 toreturn a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, itreturns 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.

ConnectApi.AdjustOrderSummaryOutputRepresentationOutput 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.

225

ConnectApi.AdjustOrderSummaryOutputRepresentationSalesforce Order Management in Apex

Page 236: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

49.0Expected (for preview) or actual (for submit) financialvalues for the price adjustment action. Most of the

ConnectApi.ChangeItemOutputRepresentation

changeBalances

values match the change order values. If two changeorders are returned, then these values combine them.The sign of a value in this output is the opposite ofthe corresponding value on a change order record.For example, a discount is a positive value inchangeBalances and a negative value on achange order record.

49.0ID of the OrderSummary.StringorderSummaryId

49.0ID of the change Order that holds the financialchanges applicable to order products that have been

StringpostFulfillmentChangeOrderId

fulfilled. For an adjustPreview call, this value is alwaysnull.

49.0ID of the change Order that holds the financialchanges applicable to order products that have not

StringpreFulfillmentChangeOrderId

been fulfilled. For an adjustPreview call, this value isalways null.

ConnectApi.AvailableLocationOutputRepresentationA set of inventory locations that can combine to fulfill an order.

Available VersionDescriptionTypeProperty Name

51.0A list of inventory locations.List<String>locations

ConnectApi.AverageDistanceResultOutputRepresentationWraps inventory location shipping distance calculation results.

Available VersionDescriptionTypeProperty Name

51.0Results of the shipping distance calculations.ConnectApi.DistanceCalculationOutputRepresentation

distanceCalculation

ConnectApi.BaseOutputRepresentationBase Order Management output class.

This class is abstract.

Superclass of:

• ConnectApi.AdjustOrderSummaryOutputRepresentation

226

ConnectApi.AvailableLocationOutputRepresentationSalesforce Order Management in Apex

Page 237: Salesforce Order Management Developer Guide

• 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

Available VersionDescriptionTypeProperty Name

48.0Any errors that were returned.List<ConnectApi.ErrorResponse>

errors

48.0Indicates whether the transaction was successful.Booleansuccess

ConnectApi.ChangeItemOutputRepresentationThe financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the valueson the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record. Forexample, a discount is a positive value here and a negative value on a change order record.

Available VersionDescriptionTypeProperty Name

48.0Change to the GrandTotalAmount field.DoublegrandTotalAmount

49.0Change to the TotalAdjDeliveryAmtWithTax field.DoubletotalAdjDeliveryAmtWithTax

49.0Change to the TotalAdjDistAmountWithTax field.DoubletotalAdjDistAmountWithTax

49.0Change to the TotalAdjProductAmtWithTax field.DoubletotalAdjProductAmtWithTax

227

ConnectApi.ChangeItemOutputRepresentationSalesforce Order Management in Apex

Page 238: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

48.0Change to the TotalAdjustedDeliveryAmount field.DoubletotalAdjustedDeliveryAmount

48.0Change to the TotalAdjustedDeliveryTaxAmount field.DoubletotalAdjustedDeliveryTaxAmount

48.0Change to the TotalAdjustedProductAmount field.DoubletotalAdjustedProductAmount

48.0Change to the TotalAdjustedProductTaxAmount field.DoubletotalAdjustedProductTaxAmount

48.0Change to the TotalAdjustmentDistributedAmountfield.

DoubletotalAdjustmentDistributedAmount

48.0Change to theTotalAdjustmentDistributedTaxAmount field.

DoubletotalAdjustmentDistributedTaxAmount

48.0Change to the TotalAmount field.DoubletotalAmount

48.0Amount of excess funds available on theOrderPaymentSummaries related to the

DoubletotalExcessFundsAmount

OrderSummary. It is equal to the captured amountthat is owed as a refund but is not associated withan invoice or credit memo. Excess funds normallyoccur when order items are canceled beforefulfillment but after payment has been captured. Thissituation is not common in the US, where funds arenormally authorized but not captured until thefulfillment process begins. This value includes allcurrent excess funds related to the OrderSummary,not only the funds related to the current change.

48.0Total amount available to be refunded. It is the sumof the excess funds and any outstanding change

DoubletotalRefundableAmount

order grand total amounts that apply topost-fulfillment changes. This value includes allcurrent refundable amounts related to theOrderSummary, not only the amount related to thecurrent change.

48.0Change to the TotalTaxAmount field.DoubletotalTaxAmount

SEE ALSO:

ConnectApi.PreviewCancelOutputRepresentation

ConnectApi.PreviewReturnOutputRepresentation

ConnectApi.SubmitCancelOutputRepresentation

ConnectApi.SubmitReturnOutputRepresentation

ConnectApi.AdjustOrderSummaryOutputRepresentation

228

ConnectApi.ChangeItemOutputRepresentationSalesforce Order Management in Apex

Page 239: Salesforce Order Management Developer Guide

ConnectApi.CreateCreditMemoOutputRepresentationID of a created Credit Memo.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0ID of the created Credit Memo.StringcreditMemoId

ConnectApi.CreateOrderPaymentSummaryOutputRepresentationID of the created Order Payment Summary.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0ID of the Order Payment Summary.StringorderPaymentSummaryId

ConnectApi.DistanceCalculationOutputRepresentationShipping distance data for a set of inventory locations.

Available VersionDescriptionTypeProperty Name

51.0The average distance from the locations to the orderrecipient.

DoubleaverageDistance

51.0The list of locations and their distances to the orderrecipient.

List<ConnectApi.LocationOutputRepresentation>

locations

51.0This result’s rank among all results by averagedistance to the order recipient.

Integerrank

ConnectApi.EnsureFundsAsyncOutputRepresentationID of the asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made to anexternal payment gateway. It doesn’t include any errors from the operation.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0ID of the background operation.StringbackgroundOperationId

229

ConnectApi.CreateCreditMemoOutputRepresentationSalesforce Order Management in Apex

Page 240: Salesforce Order Management Developer Guide

ConnectApi.EnsureRefundsAsyncOutputRepresentationID of the asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made to anexternal payment gateway. It doesn’t include any errors from the operation.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0ID of the background operation.StringbackgroundOperationId

ConnectApi.ErrorResponseBase error response.

Available VersionDescriptionTypeProperty Name

48.0Error code.StringerrorCode

48.0More error detail, if available.Stringmessage

SEE ALSO:

ConnectApi.BaseOutputRepresentation

ConnectApi.FindRoutesWithFewestSplitsOutputRepresentationA list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0Each element of the list is a set of inventory locationsthat together can fulfill the order being routed.

List<ConnectApi.AvailableLocationOutputRepresentation>

targetLocations

ConnectApi.FulfillmentGroupOutputRepresentationInformation about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If theFulfillmentOrder 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.

Available VersionDescriptionTypeProperty Name

50.0(Creation failed) The input FulfilledFromLocationId.StringfulfilledFromLocationId

50.0The FulfillmentOrderId from the successfully createdFulfillmentOrder.

StringfulfillmentOrderId

230

ConnectApi.EnsureRefundsAsyncOutputRepresentationSalesforce Order Management in Apex

Page 241: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

50.0(Creation failed) The input FulfillmentType.StringfulfillmentType

50.0(Creation failed) The inputOrderDeliveryGroupSummaryId.

StringorderDeliveryGroupSummaryId

50.0(Creation failed) The input list ofOrderItemSummaries.

List<ConnectApi.OrderItemSummaryOutputRepresentation>

orderItemSummaries

50.0(Creation failed) The input OrderSummaryId.StringorderSummaryId

50.0The referenceId from the FulfillmentGroup inputrepresentation. Use this value to troubleshoot afailure.

StringreferenceId

ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentationWraps the base output.

Subclass of ConnectApi.BaseOutputRepresentation.

No additional properties.

ConnectApi.FulfillmentOrderInvoiceOutputRepresentationID of the created invoice.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0ID of the created invoice.StringinvoiceId

ConnectApi.FulfillmentOrderOutputRepresentationA list of IDs of the created FulfillmentOrders.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0A list of IDs of created Fulfillment Orders.List<String>fulfillmentOrderIds

ConnectApi.LocationOutputRepresentationAn inventory location’s distance to an order recipient.

231

ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentationSalesforce Order Management in Apex

Page 242: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

51.0The distance from the location to the order recipient.Doubledistance

51.0The location identifier.StringlocationIdentifier

ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentationIDs of the created Invoices.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

52.0List of IDs of the created Invoices.List<String>invoiceIds

ConnectApi.MultipleFulfillmentOrderOutputRepresentationList of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

50.0A list of response data for created and failedFulfillmentOrders.

List<ConnectApi.FulfillmentGroupOutputRepresentation>

fulfillmentOrders

ConnectApi.OCIBaseOutputRepresentationBase Omnichannel Inventory output class.

This class is abstract.

Superclass of:

• ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation

• ConnectApi.OCIPublishLocationStructureOutputRepresentation

• ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation

• ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation

• ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation

Available VersionDescriptionTypeProperty Name

51.0Any errors that were returned.List<ConnectApi.ErrorResponse>

errors

51.0Indicates whether the request was successful.Booleansuccess

232

ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentationSalesforce Order Management in Apex

Page 243: Salesforce Order Management Developer Guide

ConnectApi.OCICreateReservationErrorOutputRepresentationError returned from an attempt to create an Omnichannel Inventory reservation.

Available VersionDescriptionTypeProperty Name

51.0The error code.StringerrorCode

51.0Details of the error, if available.Stringmessage

ConnectApi.OCICreateReservationOutputRepresentationResult of an Omnichannel Inventory reservation creation request.

Available VersionDescriptionTypeProperty Name

51.0Details for each product in the reservation.List<ConnectApi.OCICreateReservationSingleOutputRepresentation>

details

51.0Any errors returned by the reservation request.List<ConnectApi.OCICreateReservationErrorOutputRepresentation>

errors

51.0The time at which the reservation would expire.StringexpirationTime

51.0The time when the reservation was recorded.StringreservationTime

51.0Indicates whether the reservation was successfullycreated.

Booleansuccess

ConnectApi.OCICreateReservationSingleOutputRepresentationDetails of an inventory reservation for one product.

Available VersionDescriptionTypeProperty Name

51.0The error code, if any.StringerrorCode

51.0Identifier of the location group where the inventoryis reserved.

StringlocationGroupIdentifier

51.0Identifier of the location where the inventory isreserved.

StringlocationIdentifier

51.0The reserved quantity of the product.Doublequantity

51.0The SKU of the reserved product.StringstockKeepingUnit

ConnectApi.OCIFulfillReservationErrorOutputRepresentationResponse to a request to fulfill one inventory reservation.

233

ConnectApi.OCICreateReservationErrorOutputRepresentationSalesforce Order Management in Apex

Page 244: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

51.0Details of the fulfilled reservation, if successful.ConnectApi.OCIFulfillReservationSingleOutputRepresentation

details

51.0Error code, if any.StringerrorCode

51.0Details of the error, if available.Stringmessage

ConnectApi.OCIFulfillReservationOutputRepresentationResponse to a request to fulfill one or more inventory reservations.

Available VersionDescriptionTypeProperty Name

51.0Responses for the individual reservations in thefulfillment request.

List<ConnectApi.OCIFulfillReservationErrorOutputRepresentation>

errors

51.0Indicates whether the request was successful.Booleansuccess

ConnectApi.OCIFulfillReservationSingleOutputRepresentationDetails of a single fulfilled reservation.

Available VersionDescriptionTypeProperty Name

51.0The UUID that identifies the original fulfill reservationrequest.

StringactionRequestId

51.0The external reference ID of the location that fulfilledthe reservation.

StringexternalRefId

51.0The identifier of the location that fulfilled thereservation.

StringlocationIdentifier

51.0The fulfilled quantity.Doublequantity

51.0The SKU of the fulfilled product.StringstockKeepingUnit

ConnectApi.OCIFutureInventoryOutputRepresentationAn expected future inventory restock.

Available VersionDescriptionTypeProperty Name

51.0Date when the future inventory is expected.DatetimeexpectedDate

51.0Quantity of the future inventory.Doublequantity

234

ConnectApi.OCIFulfillReservationOutputRepresentationSalesforce Order Management in Apex

Page 245: Salesforce Order Management Developer Guide

ConnectApi.OCIGetInventoryAvailabilityOutputRepresentationResponse to a request for inventory availability data.

Subclass of ConnectApi.OCIBaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0A list of inventory availability data for individuallocation groups.

List<ConnectApi.OCILocationGroupAvailabilityOutputRepresentation>

locationGroups

51.0A list of inventory availability data for individuallocations.

List<ConnectApi.OCILocationAvailabilityOutputRepresentation>

locations

ConnectApi.OCIInventoryRecordOutputRepresentationInventory availability data for a product.

Available VersionDescriptionTypeProperty Name

51.0The Available To Fulfill quantity.DoubleavailableToFulfill

51.0The Available To Order quantity.DoubleavailableToOrder

51.0The effective date of the inventory.DatetimeeffectiveDate

51.0A list of any expected future inventory restocks.List<ConnectApi.OCIFutureInventoryOutputRepresentation>

futures

51.0The On Hand quantity.DoubleonHand

51.0The Reserved quantity.Doublereserved

51.0The Safety Stock Count.DoublesafetyStockCount

51.0The SKU of the product.StringstockKeepingUnit

ConnectApi.OCILocationAvailabilityOutputRepresentationA set of inventory availability data for one inventory location.

Available VersionDescriptionTypeProperty Name

51.0A list of availability data for individual products at thislocation.

List<ConnectApi.OCIInventoryRecordOutputRepresentation>

inventoryRecords

51.0The identifier of the location.StringlocationIdentifier

235

ConnectApi.OCIGetInventoryAvailabilityOutputRepresentationSalesforce Order Management in Apex

Page 246: Salesforce Order Management Developer Guide

ConnectApi.OCILocationGroupAvailabilityOutputRepresentationA set of inventory availability data for one inventory location group.

Available VersionDescriptionTypeProperty Name

51.0A list of availability data for individual products. Thedata combines the quantities for all locationsbelonging to this location group.

List<ConnectApi.OCIInventoryRecordOutputRepresentation>

inventoryRecords

51.0The identifier of the location group.StringlocationGroupIdentifier

ConnectApi.OCIPublishLocationStructureOutputRepresentationResponse to a publish location structure request.

Subclass of ConnectApi.OCIBaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0Identifier of the publish job. Use this value to retrievethe status of the job.

StringuploadId

ConnectApi.OCIPublishLocationStructureStatusOutputRepresentationDetailed status of a publish location structure job.

Subclass of ConnectApi.OCIBaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0The UTC time when the job finished. (for example:"2020-07-06T22:54:08.012Z")

StringendTimeUTC

51.0The number of records processed by the job.IntegerrecordsProcessedCount

51.0The number of records read by the job.IntegerrecordsReadCount

51.0The number of records skipped by the job.IntegerrecordsSkippedCount

51.0The UTC time when the job started. (for example:"2020-07-06T22:53:06.788Z")

StringstartTimeUTC

51.0The status of the job. (e.g., "PENDING," "COMPLETED,"etc.).

Stringstatus

51.0Identifier of the job.StringuploadId

51.0List of any validation errors returned by the job.List<String>validationErrors

51.0The validation status of the job.StringvalidationStatus

236

ConnectApi.OCILocationGroupAvailabilityOutputRepresentationSalesforce Order Management in Apex

Page 247: Salesforce Order Management Developer Guide

ConnectApi.OCIReleaseReservationErrorOutputRepresentationResponse to a request to release one inventory reservation.

Available VersionDescriptionTypeProperty Name

51.0Details of the released reservation, if successful.ConnectApi.OCIReleaseReservationSingleOutputRepresentation

details

51.0Error code, if any.StringerrorCode

51.0Details of the error, if available.Stringmessage

ConnectApi.OCIReleaseReservationOutputRepresentationResponse to a request to release one or more inventory reservations.

Available VersionDescriptionTypeProperty Name

51.0Responses for the individual reservations in therelease request.

List<ConnectApi.OCIReleaseReservationErrorOutputRepresentation>

errors

51.0Indicates whether the request was successful.Booleansuccess

ConnectApi.OCIReleaseReservationSingleOutputRepresentationDetails of a single released reservation.

Available VersionDescriptionTypeProperty Name

51.0The UUID that identifies the original releasereservation request.

StringactionRequestId

51.0The external reference ID of the location that releasedthe reservation.

StringexternalRefId

51.0The identifier of the location group that released thereservation.

StringlocationGroupIdentifier

51.0The identifier of the location that released thereservation.

StringlocationIdentifier

51.0The released quantity.Doublequantity

51.0The SKU of the released product.StringstockKeepingUnit

ConnectApi.OCITransferReservationErrorOutputRepresentationResponse to a request to fulfill one inventory reservation.

237

ConnectApi.OCIReleaseReservationErrorOutputRepresentationSalesforce Order Management in Apex

Page 248: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

51.0Details of the transferred reservation, if successful.ConnectApi.OCITransferReservationSingleOutputRepresentation

details

51.0Error code, if any.StringerrorCode

51.0Details of the error, if available.Stringmessage

ConnectApi.OCITransferReservationOutputRepresentationResponse to a request to transfer one or more inventory reservations.

Available VersionDescriptionTypeProperty Name

51.0Responses for the individual reservations in thetransfer request.

List<ConnectApi.OCITransferReservationErrorOutputRepresentation>

errors

51.0Indicates whether the request was successful.Booleansuccess

ConnectApi.OCITransferReservationSingleOutputRepresentationDetails of a single transferred reservation.

Available VersionDescriptionTypeProperty Name

51.0The UUID that identifies the original transferreservation request.

StringactionRequestId

51.0The external reference ID of the location that receivedthe reservation.

StringexternalRefId

51.0The identifier of the location group that sent thereservation.

StringfromLocationGroupIdentifier

51.0The identifier of the location that sent the reservation.StringfromLocationIdentifier

52.0Whether this call ignored availability data at thelocation that received the reservation.

BooleanignoreAvailabilityCheck

51.0The quantity of transferred inventory.Doublequantity

51.0The SKU of the transferred product.StringstockKeepingUnit

51.0The identifier of the location group that received thereservation.

StringtoLocationGroupIdentifier

51.0The identifier of the location that received thereservation.

StringtoLocationIdentifier

238

ConnectApi.OCITransferReservationOutputRepresentationSalesforce Order Management in Apex

Page 249: Salesforce Order Management Developer Guide

ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentationResponse to an upload inventory availability job.

Subclass of ConnectApi.OCIBaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0Identifier of the upload job. Use this value to retrievethe status of the job.

StringuploadId

ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentationDetailed status of an upload inventory availability job.

Subclass of ConnectApi.OCIBaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0The UTC time when the job finished. (for example:"2020-07-06T22:54:08.012Z")

StringendTimeUTC

51.0The number of records processed by the job.IntegerrecordsProcessedCount

51.0The number of records read by the job.IntegerrecordsReadCount

51.0The number of records skipped by the job.IntegerrecordsSkippedCount

51.0The UTC time when the job started. (for example:"2020-07-06T22:53:06.788Z")

StringstartTimeUTC

51.0The status of the job. (e.g., "PENDING," "COMPLETED,"etc.).

Stringstatus

51.0Identifier of the job.StringuploadId

51.0List of any validation errors returned by the job.List<String>validationErrors

51.0The validation status of the job.StringvalidationStatus

ConnectApi.OrderItemSummaryOutputRepresentationDetails of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.

Available VersionDescriptionTypeProperty Name

50.0List of errors specific to the OrderItemSummary, ifany.

List<ConnectApi.ErrorResponse>

errors

50.0ID of the OrderItemSummary.StringorderItemSummaryId

50.0Quantity of the OrderItemSummary.Doublequantity

239

ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentationSalesforce Order Management in Apex

Page 250: Salesforce Order Management Developer Guide

ConnectApi.OrderSummaryOutputRepresentationID of the created Order Summary.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0ID of the Order Summary.StringorderSummaryId

ConnectApi.PreviewCancelOutputRepresentationExpected financial values for a proposed cancel action.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0Expected financial values for the proposed cancelaction.

ConnectApi.ChangeItemOutputRepresentation

changeBalances

48.0ID of the OrderSummary.StringorderSummaryId

ConnectApi.PreviewReturnOutputRepresentationExpected financial values for a proposed return action.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0Expected financial values for the proposed returnaction.

ConnectApi.ChangeItemOutputRepresentation

changeBalances

48.0ID of the OrderSummary.StringorderSummaryId

ConnectApi.RankAverageDistanceOutputRepresentationThe results of calculating the average distances from sets of inventory locations to an order recipient.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

51.0The specified unit of distance (miles or kilometers).StringdistanceUnit

51.0The results of the shipping distance calculations.List<ConnectApi.AverageDistanceResultOutputRepresentation>

results

240

ConnectApi.OrderSummaryOutputRepresentationSalesforce Order Management in Apex

Page 251: Salesforce Order Management Developer Guide

ConnectApi.ReturnItemsOutputRepresentationOutput of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that werecreated to represent remaining return quantities.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

52.0ID of the change order representing theReturnOrderLineItem processing performed by thiscall.

StringchangeOrderId

52.0A list of properties representing any remainingquantities from partial returns processed by this call.

List<ConnectApi.ReturnOrderItem

returnLineItemSplits

Each element of the list includes the ID of a splitSplitLineOutputRepresentation> ReturnOrderLineItem and the ID of the partially

processed ReturnOrderLineItem whose remainingquantity it holds.

ConnectApi.ReturnOrderItemSplitLineOutputRepresentationAfter a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to returna partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it returns thisoutput property, which contains the IDs of the original and split ReturnOrderLineItems.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

52.0ID of the new ReturnOrderLineItem that holds theremaining return quantity.

StringnewReturnOrderItemId

52.0ID of the original ReturnOrderLineItem.StringoriginalReturnOrderItemId

ConnectApi.ReturnOrderOutputRepresentationID of the created ReturnOrder.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

50.0ID of the created ReturnOrder.StringreturnOrderId

ConnectApi.SubmitCancelOutputRepresentationID of the change order created for a cancel action, and a set of its financial values.

Subclass of ConnectApi.BaseOutputRepresentation.

241

ConnectApi.ReturnItemsOutputRepresentationSalesforce Order Management in Apex

Page 252: Salesforce Order Management Developer Guide

Available VersionDescriptionTypeProperty Name

48.0Financial values resulting from the cancel.ConnectApi.ChangeItemOutputRepresentation

changeBalances

48.0ID of the created change order.StringchangeOrderId

ConnectApi.SubmitReturnOutputRepresentationID of the change order created for a return action, and a set of its financial values.

Subclass of ConnectApi.BaseOutputRepresentation.

Available VersionDescriptionTypeProperty Name

48.0Financial values resulting from the return.ConnectApi.ChangeItemOutputRepresentation

changeBalances

48.0ID of the created change order.StringchangeOrderId

242

ConnectApi.SubmitReturnOutputRepresentationSalesforce Order Management in Apex

Page 253: Salesforce Order Management Developer Guide

CHAPTER 4 Salesforce Order Management in the ChatterConnect API

Salesforce Order Management and Omnichannel Inventory include resources in the Chatter ConnectAPI.

In this chapter ...

• SalesforceOmnichannelInventory Resources

• Salesforce OrderManagementResources

• Salesforce OrderManagementRequests

• Salesforce OrderManagementResponses

243

Page 254: Salesforce Order Management Developer Guide

Salesforce Omnichannel Inventory Resources

Manage inventory across locations. Available in Salesforce Omnichannel Inventory.

Available resources are:

DescriptionResource

Retrieve inventory availability data for one or more products at oneor more inventory locations or location groups.

/commerce/oci/availability/availability-records/actions/get-availability

Upload an inventory availability data file to Omnichannel Inventory./commerce/oci/availability-records/uploads

Retrieve the status of an inventory availability upload job./commerce/oci/availability-records/uploads/uploadId

Asynchronously publish information about your inventory locationsand location groups to Omnichannel Inventory. The publish

/commerce/oci/location-graph/uploads

includes records whose IsEnabled and ShouldSyncWithOci fieldsare both true. This method returns an ID that you can use toretrieve the status of the publish job.

Retrieve the status of a publish location structure job./commerce/oci/location-graph/uploads/uploadId

Create an inventory reservation in Omnichannel Inventory./commerce/oci/reservation/actions/reservations

Fulfill one or more inventory reservations./commerce/oci/reservation/actions/fulfillments

Release one or more existing inventory reservations to free up thatinventory.

/commerce/oci/reservation/actions/releases

Transfer one or more inventory reservations between locations orlocation groups. This API doesn’t change physical quantities, but

/commerce/oci/reservation/actions/transfers

reduces the reserved quantity at the source and increases it at thedestination.

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.

244

Salesforce Omnichannel Inventory ResourcesSalesforce Order Management in the Chatter Connect API

Page 255: Salesforce Order Management Developer Guide

Reservations, Transfer

Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, butreduces the reserved quantity at the source and increases it at the destination.

Availability Records, Get AvailabilityRetrieve 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 version51.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTOCI Get Inventory Availability Input

Root XML tag<ociGetInventoryInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0Optional; can’tcombine with

The identifier of a location group toretrieve inventory availability data for.

StringlocationGroupIdentifier

locationGroupIdentifiersSpecifying this value retrieves inventorydata for all locations belonging to thisgroup.

orlocationIdentifiers

51.0Optional; can’tcombine with

A list of up to 100 identifiers of locationgroups to retrieve inventory availabilitydata for.

String[]locationGroupIdentifiers

locationGroupIdentifierorlocationIdentifiers

51.0Optional; can’tcombine with

A list of up to 100 identifiers of locationsto retrieve inventory availability data for.

String[]locationIdentifiers

locationGroupIdentifierorlocationGroupIdentifiers

245

Availability Records, Get AvailabilitySalesforce Order Management in the Chatter Connect API

Page 256: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

51.0Optional; can’tcombine withstockKeepingUnits

The SKU of a product to retrieve inventoryavailability data for. Specifying a SKU withno locations or location groups returnsavailability data for that SKU at all

StringstockKeepingUnit

inventory locations that are not assignedto location groups.

51.0Optional; can’tcombine withstockKeepingUnit

A list of up to 100 SKUs of products toretrieve inventory availability data for.

String[]stockKeepingUnits

51.0OptionalWhether to fetch the inventory data fromthe cache. Default value is true.

BooleanuseCache

Response body for POSTOCI Get Inventory Availability Output

Availability Records, UploadAsynchronously upload inventory data to Omnichannel Inventory and check the status of upload jobs.

Available resources are:

DescriptionResource

POST - Upload an inventory availability data file to OmnichannelInventory.

/commerce/oci/availability-records/uploads

GET - Retrieve the status of an inventory availability upload job./commerce/oci/availability-records/uploads/uploadId

Resource

/commerce/oci/availability-records/uploads

Available version51.0

Requires ChatterNo

HTTP methodsPOST

Request parameters for POST

AvailableVersion

Required orOptional

DescriptionTypeParameterName

51.0RequiredJSON file containing inventory availabilitydata.

BinaryfileUpload

246

Availability Records, UploadSalesforce Order Management in the Chatter Connect API

Page 257: Salesforce Order Management Developer Guide

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 locationentry.

• 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 importingduplicate 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 10 MB, and it must be in JSON format. For larger data sets, you can use the headless Commerce APIor split the data into multiple files. The headless Commerce API accepts GZIP or JSON files up to 100 MB in size.

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 inventoryrecord 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,

247

Availability Records, UploadSalesforce Order Management in the Chatter Connect API

Page 258: Salesforce Order Management Developer Guide

"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 POSTOCI Upload Inventory Availability Output

Resource

/commerce/oci/availability-records/uploads/uploadId

Available version51.0

Requires ChatterNo

HTTP methodsGET

Response body for GETOCI Upload Inventory Availability Status Output

Location Graph, UploadAsynchonously upload inventory location and location group data to Omnichannel Inventory and check the status of upload jobs.

Available resources are:

DescriptionResource

POST - Asynchronously publish information about your inventorylocations and location groups to Omnichannel Inventory. The

/commerce/oci/location-graph/uploads

publish includes records whose IsEnabled and ShouldSyncWithOcifields are both true. This method returns an ID that you can useto retrieve the status of the publish job.

GET - Retrieve the status of a publish location structure job./commerce/oci/location-graph/uploads/uploadId

Resource

/commerce/oci/location-graph/uploads

Available version51.0

Requires ChatterNo

HTTP methodsPOST (No request payload)

248

Location Graph, UploadSalesforce Order Management in the Chatter Connect API

Page 259: Salesforce Order Management Developer Guide

Response body for POSTOCI Publish Location Structure Output

Resource

/commerce/oci/location-graph/uploads/uploadId

Available version51.0

Requires ChatterNo

HTTP methodsGET

Response body for GETOCI Publish Location Structure Status Output

Reservations, CreateCreate an inventory reservation in Omnichannel Inventory.

Resource

/commerce/oci/reservation/actions/reservations

Available version51.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTOCI Create Reservation Input

Root XML tag<ociCreateReservationInput>

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredA UUID that identifies the request. Usethe action request IDs in response data

StringactionRequestId

to identify which requests succeeded orfailed.

51.0OptionalWhen true, if the system can’t create theentire reservation, then it attempts tocreate a partial reservation.

BooleanallowPartialReservations

249

Reservations, CreateSalesforce Order Management in the Chatter Connect API

Page 260: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required

A list of product quantities and locationsor location groups.

OCI CreateReservation SingleInput[]

createRecords

51.0OptionalA length of time in seconds. If thereservation is not fulfilled within this

IntegerexpirationSeconds

amount of time after thereservationTime, then it expires.

51.0OptionalExternal reference ID.StringexternalRefId

51.0OptionalThe time at which to record thereservation. Example:2020-07-24T21:13:00Z

StringreservationTime

Response body for POSTOCI Create Reservation Output

Reservations, FulfillFulfill one or more inventory reservations.

Resource

/commerce/oci/reservation/actions/fulfillments

Available version51.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTOCI Fulfill Reservation Input

Root XML tag<ociFulfillReservationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required.

A list of inventory reservations.OCI FulfillReservation SingleInput[]

fulfillmentRecords

250

Reservations, FulfillSalesforce Order Management in the Chatter Connect API

Page 261: Salesforce Order Management Developer Guide

Response body for POSTOCI Fulfill Reservation Output

Reservations, ReleaseRelease one or more existing inventory reservations to free up that inventory.

Resource

/commerce/oci/reservation/actions/releases

Available version51.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTOCI Release Reservation Input

Root XML tag<ociReleaseReservationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required.

List of inventory reservations to release.OCI ReleaseReservation SingleInput[]

releaseRecords

Response body for POSTOCI Release Reservation Output

Reservations, TransferTransfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, butreduces the reserved quantity at the source and increases it at the destination.

Resource

/commerce/oci/reservation/actions/transfers

Available version51.0

Requires ChatterNo

251

Reservations, ReleaseSalesforce Order Management in the Chatter Connect API

Page 262: Salesforce Order Management Developer Guide

HTTP methodsPOST

Request body for POSTOCI Transfer Reservation Input

Root XML tag<ociTransferReservationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0OptionalControls whether a single failed transfercancels all other transfers in thetransferRecords list.

StringallOrNothingTransferId

• To allow some transfers in thetransferRecords list tosucceed when others fail, don’tinclude this property.

• To cancel all the transfers in thetransferRecords list whenany of them fail, set this property toa UUID. The ID must be unique, butisn’t otherwise used in this version.

51.0At least oneelement is required.

A list of inventory reservation transfers.OCI TransferReservation SingleInput[]

transferRecords

Response body for POSTOCI Transfer Reservation Output

Salesforce Order Management Resources

Manage orders and the order fulfillment process. Available in Salesforce Order Management orgs.

Available resources are:

DescriptionResource

Create one or more FulfillmentOrders andFulfillmentOrderLineItems for an OrderDeliveryGroupSummary,

/commerce/fulfillment/fulfillment-orders

which defines a delivery method and recipient for anOrderSummary. You specify the OrderItemSummaries to allocate,which can be fulfilled from different locations. Specifying multiplefulfillment groups creates one FulfillmentOrder for each location.

252

Salesforce Order Management ResourcesSalesforce Order Management in the Chatter Connect API

Page 263: Salesforce Order Management Developer Guide

DescriptionResource

For each OrderItemSummary, a FulfillmentOrderLineItem is createdand assigned to the corresponding FulfillmentOrder.

Cancel FulfillmentOrderLineItems from a FulfillmentOrder. Thisaction doesn’t cancel the associated OrderItemSummaries, soreallocate the canceled quantities to a new FulfillmentOrder.

/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/cancel-item

Create an invoice for a FulfillmentOrder that doesn’t have one./commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/create-invoice

Create FulfillmentOrders for multiple OrderDeliveryGroups in asingle request.

/commerce/fulfillment/actions/create-multiple

Create an OrderPaymentSummary for an OrderSummary. Specifya payment authorization or payments that share the same payment

/commerce/order-management/order-payment-summaries

method. In an org with the multicurrency feature enabled, theOrderPaymentSummary inherits the CurrencyIsoCode value fromthe OrderSummary.

Create an OrderSummary based on an order. That order isconsidered the original order for the OrderSummary. Subsequent

/commerce/order-management/order-summaries

change orders that apply to the OrderSummary are alsorepresented as orders. You can specify whether the order ismanaged in Salesforce Order Management or by an externalsystem. Most Salesforce Order Management APIs can run only onorders that it manages.

Create a credit memo to represent the refund for one or morechange orders associated with an OrderSummary.

/commerce/order-management/order-summaries/orderSummaryId/actions/create-credit-memo

Ensure funds for an invoice and apply them to it. If needed, captureauthorized funds by sending a request to a payment provider. This

/commerce/order-management/order-summariesorderSummaryId/async-actions/ensure-funds-async method inserts a background operation into an asynchronous job

queue and returns the ID of that operation so you can track itsstatus. Payment gateway responses appear in the payment gatewaylog and do not affect the background operation status.

Ensure refunds for a credit memo or excess funds by sending arequest to a payment provider. This method inserts a background

/commerce/order-management/order-summaries/orderSummaryId/async-actions/ensure-refunds-async operation into an asynchronous job queue and returns the ID of

that operation so you can track its status. Payment gatewayresponses appear in the payment gateway log and do not affectthe background operation status.

Retrieve the expected change order values for canceling one ormore OrderItemSummaries from an OrderSummary, withoutactually executing the cancel.

/commerce/order-management/order-summaries/orderSummaryId/actions/preview-cancel

Retrieve the expected change order values for returning one ormore OrderItemSummaries from an OrderSummary, withoutactually executing the return.

/commerce/order-management/order-summaries/orderSummaryId/actions/preview-return

253

Salesforce Order Management ResourcesSalesforce Order Management in the Chatter Connect API

Page 264: Salesforce Order Management Developer Guide

DescriptionResource

Cancel one or more OrderItemSummaries from an OrderSummary,and create a corresponding change order.

/commerce/order-management/order-summaries/orderSummaryId/actions/submit-cancel

Return one or more OrderItemSummaries from an OrderSummary,and create a corresponding change order.

/commerce/order-management/order-summaries/orderSummaryId/actions/submit-return

Create a ReturnOrder and ReturnOrderLineItems for itemsbelonging to an OrderSummary.

/commerce/returns/return-orders/

Process ReturnOrderLineItems belonging to a ReturnOrder.Processing a ReturnOrderLineItem generates a change Order and

/commerce/returns/return-orders/returnOrderId/actions/return-items

makes that ReturnOrderLineItem read-only. If a processedReturnOrderLineItem has any remaining expected quantity, thenthe API creates a separate ReturnOrderLineItem representing thatquantity.

Returns combinations of inventory locations that can fulfill an orderwithin a specified limit of shipment splits.

/commerce/order-management/routing/actions/find-routes-with-fewest-splits

Calculates the average distance from sets of inventory locationsto an order recipient, and ranks them. Use this method to compare

/commerce/order-management/routing/actions/rank-byaverage-distance

the average shipping distances for different sets of locations thatcan fulfill an order.

Fulfillment Orders

Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a deliverymethod and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from differentlocations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, aFulfillmentOrderLineItem 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 reallocatethe 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 paymentmethod. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from theOrderSummary.

Order Summaries

Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent changeorders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in SalesforceOrder 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.

254

Salesforce Order Management ResourcesSalesforce Order Management in the Chatter Connect API

Page 265: Salesforce Order Management Developer Guide

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 trackits 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 backgroundoperation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responsesappear 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 actuallyexecuting the adjustment. The response data contains the financial changes that would result from submitting the proposedadjustment.

Order Summaries, Preview Cancel

Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting the cancel.

Order Summaries, Preview Return

Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting 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 makesthat ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API createsa 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 comparethe average shipping distances for different sets of locations that can fulfill an order.

Fulfillment OrdersCreate one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a deliverymethod and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from differentlocations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, aFulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.

255

Fulfillment OrdersSalesforce Order Management in the Chatter Connect API

Page 266: Salesforce Order Management Developer Guide

Resource

/commerce/fulfillment/fulfillment-orders

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTFulfillment 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

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of fulfillment groups that specify theOrderItemSummaries and fulfillmentlocations.

Fulfillment GroupInput[]

fulfillmentGroups

48.0RequiredID of the OrderDeliveryGroupSummary.StringorderDeliveryGroupSummaryId

48.0RequiredID of the OrderSummary.StringorderSummaryId

256

Fulfillment OrdersSalesforce Order Management in the Chatter Connect API

Page 267: Salesforce Order Management Developer Guide

Response body for POST

• When the HTTP status code indicates success, the response body is a Fulfillment Order Output. The response body can stillindicate 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. Theoutput property is a Fulfillment Order Output, and the value of the enhancedErrorType property can be ignored.

Fulfillment Orders, Cancel ItemCancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocatethe canceled quantities to a new FulfillmentOrder.

Resource

/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/cancel-item

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTFulfillment Order Line Items To Cancel Input

Root XML tag<fulfillmentOrderLineItemsToCancelInput>

JSON example

{"fulfillmentOrderLineItemsToCancel" : [{"fulfillmentOrderLineItemId" : "0a4xx00000000W0001","quantity":1

},{"fulfillmentOrderLineItemId" : "0a4xx00000000W0002","quantity":2

}]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of FulfillmentOrderLineItems andquantities.

Fulfillment OrderLine Item Input[]

fulfillmentOrderLineItemsToCancel

257

Fulfillment Orders, Cancel ItemSalesforce Order Management in the Chatter Connect API

Page 268: Salesforce Order Management Developer Guide

Response body for POST

• When the HTTP status code indicates success, the response body is a Fulfillment Order Cancel Line Items Output. The responsebody 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. Theoutput property is a Fulfillment Order Cancel Line Items Output, and the value of the enhancedErrorType propertycan be ignored.

Fulfillment Orders, Create InvoiceCreate an invoice for a FulfillmentOrder that doesn’t have one.

Resource

/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/create-invoice

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTFulfillment Order Invoice Input

Root XML tag<fulfillmentOrderInvoiceInput>

JSON example

{}

PropertiesNone.

Response body for POST

• When the HTTP status code indicates success, the response body is a Fulfillment Order Invoice Output. The response body canstill 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. Theoutput property is a Fulfillment Order Invoice Output, and the value of the enhancedErrorType property can beignored.

Fulfillment Orders, Create MultipleCreate FulfillmentOrders for multiple OrderDeliveryGroups in a single request.

Resource

/commerce/fulfillment/actions/create-multiple

Available version50.0

258

Fulfillment Orders, Create InvoiceSalesforce Order Management in the Chatter Connect API

Page 269: Salesforce Order Management Developer Guide

Requires ChatterNo

HTTP methodsPOST

Request body for POSTMultiple Fulfillment Order Input

Root XML tag<multipleFulfillmentOrderInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

50.0RequiredEach element contains the data to createone fulfillment order.

Fulfillment OrderInput[]

fulfillmentOrders

Response body for POST

• When the HTTP status code indicates success, the response body is a Multiple Fulfillment Order Output. The response body canstill 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. Theoutput property is a Multiple Fulfillment Order Output, and the value of the enhancedErrorType property can beignored.

Order Payment SummariesCreate an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same paymentmethod. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from theOrderSummary.

Resource

/commerce/order-management/order-payment-summaries

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTCreate Order Payment Summary Input

Root XML tag<orderPaymentSummaryInput>

259

Order Payment SummariesSalesforce Order Management in the Chatter Connect API

Page 270: Salesforce Order Management Developer Guide

JSON examples

{"orderSummaryId":"1Osxx0000000000001","paymentAuthorizationId":"2Dgxx00000000W0001"

}

{"orderSummaryId":"1Osxx0000000000001","paymentIds":["0a3xx0000000085AAA","0a3xx0000000085BBB"

]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the OrderSummary.StringorderSummaryId

48.0Either a paymentauthorization or at

ID of the payment authorization.StringpaymentAuthorizationId

least one paymentis required.

48.0Either a paymentauthorization or at

List of IDs of the payments.String[]paymentIds

least one paymentis required.

Response body for POST

• When the HTTP status code indicates success, the response body is a Create Order Payment Summary Output. The responsebody 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. Theoutput property is a Create Order Payment Summary Output, and the value of the enhancedErrorType property canbe ignored.

Order SummariesCreate an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent changeorders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce OrderManagement 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 version48.0

260

Order SummariesSalesforce Order Management in the Chatter Connect API

Page 271: Salesforce Order Management Developer Guide

Requires ChatterNo

HTTP methodsPOST

Request body for POSTOrder Summary Input

Root XML tag<orderSummaryInput>

JSON example

{"orderId": "801xx000003GbTgAAK"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

53.0OptionalThe order’s business model. It can haveone of these values:

StringbusinessModel

• B2B

• B2C

50.0OptionalSpecifies an OrderNumber to assign tothe order summary.

Stringname

48.0RequiredID of the original order.StringorderId

49.0OptionalSpecifies whether the order is managedin Salesforce Order Management or by

StringorderLifeCycleType

an external system. It can have one ofthese values:

• MANAGED—Managed in SalesforceOrder Management.

• UNMANAGED—Managed by anexternal system.

If no value is specified, the default isMANAGED.

50.0OptionalSpecifies a status to assign to the ordersummary. The value must match one of

Stringstatus

the picklist values on the Status field ofthe 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 stillindicate processing errors.

261

Order SummariesSalesforce Order Management in the Chatter Connect API

Page 272: Salesforce Order Management Developer Guide

• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. Theoutput property is an Order Summary Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Create Credit MemoCreate 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 version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTCreate Credit Memo Input

Root XML tag<createCreditMemoInput>

JSON example

{"changeOrderIds": ["801R0000000EAAkIAO"

]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of IDs of the change orders.String[]changeOrderIds

Response body for POST

• When the HTTP status code indicates success, the response body is a Create Credit Memo Output. The response body can stillindicate 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. Theoutput property is a Create Credit Memo Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Ensure Funds AsyncEnsure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider. Thismethod 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.

262

Order Summaries, Create Credit MemoSalesforce Order Management in the Chatter Connect API

Page 273: Salesforce Order Management Developer Guide

Resource

/commerce/order-management/order-summaries/orderSummaryId/async-actions/ensure-funds-async

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTEnsure Funds Async Input

Root XML tag<ensureFundsAsyncInput>

JSON example

{"invoiceId": "50gR000000000JNIAY"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the invoice.StringinvoiceId

Response body for POST

• When the HTTP status code indicates success, the response body is an Ensure Funds Async Output. The response body can stillindicate 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. Theoutput 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 invoicebalance following this logic:

Note: If multiple OrderPaymentSummaries have equal amounts, their order of selection is random.

1. Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.

2. Look for an OrderPaymentSummary with a captured amount equal to the invoice balance. If one exists, apply those funds.

3. If no exact match was found, identify all OrderPaymentSummaries with captured amounts greater than the invoice balance. Ifany exist, select the smallest one and apply funds from it equal to the invoice balance.

4. If no captured amounts greater than the invoice balance were found, traverse the OrderPaymentSummaries in order of capturedamount, from largest to smallest. Apply each captured amount to the invoice until the invoice balance is zero or all capturedfunds are applied.

5. If the invoice still has a balance, look for an OrderPaymentSummary with an authorized amount equal to the remaining invoicebalance. If one exists, capture and apply those funds.

263

Order Summaries, Ensure Funds AsyncSalesforce Order Management in the Chatter Connect API

Page 274: Salesforce Order Management Developer Guide

6. If no exact match was found, identify all OrderPaymentSummaries with authorized amounts greater than the invoice balance.If any exist, select the smallest one and apply funds from it equal to the invoice balance.

7. If no authorized amounts greater than the invoice balance were found, traverse the OrderPaymentSummaries in order ofauthorized amount, from largest to smallest. Capture and apply funds until the invoice balance is zero.

Order Summaries, Ensure Refunds AsyncEnsure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a backgroundoperation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responsesappear 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 version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTEnsure Refunds Async Input

Root XML tag<ensureRefundsAsyncInput>

JSON example

{"creditMemoId": "50gR000000000JNIAY"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0Optional, but atleast one inputproperty is required

ID of the credit memo that represents arefund amount.

StringcreditMemoId

49.0Optional, but atleast one inputproperty is required

Amount of excess funds to refund.DoubleexcessFundsAmount

Response body for POST

• When the HTTP status code indicates success, the response body is an Ensure Refunds Async Output. The response body canstill 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. Theoutput property is an Ensure Refunds Async Output, and the value of the enhancedErrorType property can be ignored.

264

Order Summaries, Ensure Refunds AsyncSalesforce Order Management in the Chatter Connect API

Page 275: Salesforce Order Management Developer Guide

Usage

This method checks the OrderPaymentSummaries associated with the specified OrderSummary for amounts to refund followingthis logic:

Note: If multiple OrderPaymentSummaries have equal amounts, their order of selection is random.

1. If a credit memo is specified, identify OrderPaymentSummaries with captured amounts that were applied to the correspondinginvoice.

a. Examine those OrderPaymentSummaries. If one has a captured amount matching the credit memo amount, apply the refundto that payment.

b. If no exact match was found, look for captured amounts greater than the credit memo amount. If any exist, apply the refundto the smallest one.

c. If no greater amounts were found, traverse the OrderPaymentSummaries in order of captured amount, from largest tosmallest. Apply the refund to them until it’s fully applied.

2. If an excess funds amount is specified, identify OrderPaymentSummaries with captured amounts that weren’t applied to anyinvoice.

a. Examine those OrderPaymentSummaries. If one has a captured amount matching the excess funds amount, apply the refundto that payment.

b. If no exact match was found, look for captured amounts greater than the excess funds amount. If any exist, apply the refundto the smallest one.

c. If no greater amounts were found, traverse the OrderPaymentSummaries in order of captured amount, from largest tosmallest. Apply the refund to them until it’s fully applied.

Order Summaries, Preview AdjustRetrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting the adjustment. The response data contains the financial changes that would result from submitting the proposed adjustment.

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/adjust-item-preview

Available version49.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTAdjust Order Item Summary Input

Root XML tag<adjustOrderItemSummaryInput>

JSON example

{"adjustItems": [{

265

Order Summaries, Preview AdjustSalesforce Order Management in the Chatter Connect API

Page 276: Salesforce Order Management Developer Guide

"reason": "Unknown","amount": 45,"appeasementType": "AmountWithoutTax","orderItemSummaryId": "10uxx0000004EXLAA2","description": "foobar"

}]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

49.0RequiredList of price adjustments toOrderItemSummaries.

Adjust Item Input[]adjustItems

Response body for POST

• When the HTTP status code indicates success, the response body is an Adjust Order Summary Output. The response body canstill 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. Theoutput property is an Adjust Order Summary Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Preview CancelRetrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting the cancel.

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/preview-cancel

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTChange Input

Root XML tag<changeInput>

JSON example

{"changeItems": [{"orderItemSummaryId": "10uxx0000004FYDAA2","quantity": 1.0,"reason": "Wrong Item",

266

Order Summaries, Preview CancelSalesforce Order Management in the Chatter Connect API

Page 277: Salesforce Order Management Developer Guide

"shippingReductionFlag": true}

]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of changes to OrderItemSummaries.Change ItemInput[]

changeItems

Response body for POST

• When the HTTP status code indicates success, the response body is a Preview Cancel Output. The response body can still indicateprocessing 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. Theoutput property is a Preview Cancel Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Preview ReturnRetrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actuallyexecuting the return.

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/preview-return

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTChange Input

Root XML tag<changeInput>

JSON example

{"changeItems": [{"orderItemSummaryId": "10uxx0000004FYDAA2","quantity": 1.0,"reason": "Wrong Item","shippingReductionFlag": true

}

267

Order Summaries, Preview ReturnSalesforce Order Management in the Chatter Connect API

Page 278: Salesforce Order Management Developer Guide

]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of changes to OrderItemSummaries.Change ItemInput[]

changeItems

Response body for POST

• When the HTTP status code indicates success, the response body is a Preview Return Output. The response body can still indicateprocessing 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. Theoutput property is a Preview Return Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Submit AdjustAdjust 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 version49.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTAdjust Order Item Summary Input

Root XML tag<adjustOrderItemSummaryInput>

JSON example

{"adjustItems": [{"reason": "Unknown","amount": 45,"appeasementType": "AmountWithoutTax","orderItemSummaryId": "10uxx0000004EXLAA2","description": "foobar"

}]}

268

Order Summaries, Submit AdjustSalesforce Order Management in the Chatter Connect API

Page 279: Salesforce Order Management Developer Guide

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

49.0RequiredList of price adjustments toOrderItemSummaries.

Adjust Item Input[]adjustItems

Response body for POST

• When the HTTP status code indicates success, the response body is an Adjust Order Summary Output. The response body canstill 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. Theoutput property is an Adjust Order Summary Output, and the value of the enhancedErrorType property can be ignored.

UsageAfter 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, processa refund. In this case, pass the totalExcessFundsAmount from the response body to the Order Summaries, EnsureRefunds Async resource.

• If the discount applied to OrderItemSummaries that have been fulfilled, process a refund. Pass thepostFulfillmentChangeOrderId 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 bothrefunds. Pass the postFulfillmentChangeOrderId from the response body to the Order Summaries, Create CreditMemo resource, then pass the credit memo and the totalExcessFundsAmount from the response body to the OrderSummaries, Ensure Refunds Async resource.

Order Summaries, Submit CancelCancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/submit-cancel

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTChange Input

Root XML tag<changeInput>

269

Order Summaries, Submit CancelSalesforce Order Management in the Chatter Connect API

Page 280: Salesforce Order Management Developer Guide

JSON example

{"changeItems": [{"orderItemSummaryId": "10uxx0000004FYDAA2","quantity": 1.0,"reason": "Wrong Item","shippingReductionFlag": true

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of changes to OrderItemSummaries.Change ItemInput[]

changeItems

Response body for POST

• When the HTTP status code indicates success, the response body is a Submit Cancel Output. The response body can still indicateprocessing 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. Theoutput property is a Submit Cancel Output, and the value of the enhancedErrorType property can be ignored.

Order Summaries, Submit ReturnReturn one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.

Resource

/commerce/order-management/order-summaries/orderSummaryId/actions/submit-return

Available version48.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTChange Input

Root XML tag<changeInput>

JSON example

{"changeItems": [

270

Order Summaries, Submit ReturnSalesforce Order Management in the Chatter Connect API

Page 281: Salesforce Order Management Developer Guide

{"orderItemSummaryId": "10uxx0000004FYDAA2","quantity": 1.0,"reason": "Wrong Item","shippingReductionFlag": true

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of changes to OrderItemSummaries.Change ItemInput[]

changeItems

Response body for POST

• When the HTTP status code indicates success, the response body is a Submit Return Output. The response body can still indicateprocessing 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. Theoutput property is a Submit Return Output, and the value of the enhancedErrorType property can be ignored.

UsageAfter submitting a return, process a refund. Pass the changeOrderId from the response body to the Order Summaries, CreateCredit Memo resource, then pass the CreditMemo to the Order Summaries, Ensure Refunds Async resource.

Return OrdersCreate a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.

Resource

/commerce/returns/return-orders

Available version50.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTReturn Order Input

Root XML tag<returnOrderInput>

JSON example

{"orderSummaryId": "1Osxx0000004EAqCAM","status" : "Submitted",

271

Return OrdersSalesforce Order Management in the Chatter Connect API

Page 282: Salesforce Order Management Developer Guide

"returnOrderLifeCycleType" : "Unmanaged","returnOrderLineItems": [{"quantityExpected": "1","reasonForReturn": "Not Satisfied","canReduceShipping": false,"orderItemSummaryId": "10uxx0000004GKbAAM","quantityReceived": "0"

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

50.0RequiredID of the OrderSummary containing theitems to be returned. The

StringorderSummaryId

OrderSummary’s OrderLifeCycleTypemust be Managed.

51.0RequiredThe LifeCycleType of the ReturnOrder.Possible values are:

StringreturnOrderLifeCycleType

• Managed—Process the ReturnOrderusing the APIs and actions. It cangenerate change orders and affectsfinancial fields and rollup calculations.

• Unmanaged—The ReturnOrder is fortracking purposes only. It isn’tinvolved in any financial calculationsand doesn’t generate any changeorders. The system doesn’t preventthe creation of duplicateReturnOrderLineItems in anunmanaged ReturnOrder for thesame OrderItem.

50.0At least oneelement is required

List of data for creatingReturnOrderLineItems.

Return Order LineItem Input[]

returnOrderLineItems

50.0RequiredStatus to assign the ReturnOrder. Thisvalue must match an entry in theReturnOrder object’s Status picklist.

Stringstatus

Response body for POSTReturn Order Output

272

Return OrdersSalesforce Order Management in the Chatter Connect API

Page 283: Salesforce Order Management Developer Guide

Return Orders, Return ItemsProcess ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makesthat ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates aseparate ReturnOrderLineItem representing that quantity.

Resource

/commerce/returns/return-orders/returnOrderId/actions/return-items

Available version52.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTReturn Items Input

Root XML tag<returnItemsInput>

JSON example

{"returnOrderItems": [{"returnOrderLineItemId": "10uxx0000004GKbAAM","quantityReturned": "1","quantityToCancel": "0","quantityReceived": "1","quantityRejected": "0","reasonForRejection": "N/A"

}],"returnOrderItemDeliveryCharges": [{"returnOrderLineItemId": "10uxx0000004GKbAAP"

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

52.0OptionalList of ReturnOrderLineItems to returnthat represent delivery charges.

Return Order ItemDelivery ChargeInput[]

returnOrderItemDeliveryCharges

52.0RequiredList of ReturnOrderLineItems to processthat represent products, along with dataabout how to process them.

Return Order ItemInput[]

returnOrderItems

273

Return Orders, Return ItemsSalesforce Order Management in the Chatter Connect API

Page 284: Salesforce Order Management Developer Guide

Response body for POSTReturn Items Output

Routing, Find Routes with Fewest SplitsReturns 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 version51.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTFind Routes With Fewest Splits Input

Root XML tag<findRoutesWithFewestSplits>

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required

Each list element represents the availablequantity of a product at an inventorylocation.

LocationAvailability Input[]

locationAvailableInventory

51.0OptionalThe maximum allowable number ofshipment splits. Routing options that

IntegermaximumNumberOfSplits

involve more than this number of splitsare not returned.

Note: Each split represents anadditional shipment. Specifying amaximum of 0 returns onlylocations that can fulfill the entireorder in a single shipment. Amaximum of 1 returnscombinations of locations that canfulfill the order in one or twoshipments, and so on.

51.0At least oneelement is required

Each list element represents a quantityof a product to be routed for fulfillment.

Quantity With SkuInput[]

orderedQuantities

274

Routing, Find Routes with Fewest SplitsSalesforce Order Management in the Chatter Connect API

Page 285: Salesforce Order Management Developer Guide

Response body for POST

• When the HTTP status code indicates success, the response body is a Find Routes With Fewest Splits Output. The response bodycan 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. Theoutput property is a Find Routes With Fewest Splits Output, and the value of the enhancedErrorType property canbe ignored.

Routing, Rank By Average DistanceCalculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare theaverage shipping distances for different sets of locations that can fulfill an order.

Resource

/commerce/order-management/routing/actions/rank-byaverage-distance

Available version51.0

Requires ChatterNo

HTTP methodsPOST

Request body for POSTRank Average Distance Input

Root XML tag<rankAverageDistanceInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredThe country code of the order recipient.StringdeliveryCountryCode

51.0RequiredThe postal code of the order recipient.StringdeliveryPostalCode

51.0Specify mi or km to return averagedistances in miles or kilometers,respectively.

StringdistanceUnit

51.0Specify ASC or DESC to rank the resultsby average shipping distance in

StringsortResult

ascending or descending order,respectively.

51.0At least oneelement is required

Each element is a set of inventorylocations that can combine to fulfill theorder.

Target LocationInput[]

targetLocations

275

Routing, Rank By Average DistanceSalesforce Order Management in the Chatter Connect API

Page 286: Salesforce Order Management Developer Guide

Response body for POST

• When the HTTP status code indicates success, the response body is a Rank Average Distance Output. The response body canstill 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. Theoutput 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 basedon 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.

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 thevalues defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assignedto 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 toFulfillmentOrders. Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and sharethe same fulfillment location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem foreach OrderItemSummary.

Fulfillment Order Invoice Input

Use an empty request body for this input.

276

Salesforce Order Management RequestsSalesforce Order Management in the Chatter Connect API

Page 287: Salesforce Order Management Developer Guide

Fulfillment Order Line Item Input

A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate thecanceled 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.

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 canspecify 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.

277

Salesforce Order Management RequestsSalesforce Order Management in the Chatter Connect API

Page 288: Salesforce Order Management Developer Guide

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 remainingquantity 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 InputA 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","description": "foobar"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

49.0RequiredDescribes how the amount is calculated.It can have one of these values:

StringadjustmentType

• AmountWithTax—Value ofamount is the adjustment, includingtax.

• AmountWithoutTax—Value ofamount is the adjustment, notincluding tax. Tax is calculated on thevalue and added.

• Percentage—Value of amount isa percentage discount. It is divided by100, and then multiplied by theTotalPrice and TotalTaxAmount of theOrderItemSummary to determine theadjustment amount.

278

Adjust Item InputSalesforce Order Management in the Chatter Connect API

Page 289: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

49.0RequiredValue used to calculate the adjustmentamount, as described by the

Doubleamount

adjustmentType. It must be a negativevalue.

49.0OptionalDescription of the adjustment.Stringdescription

49.0RequiredID of the OrderItemSummary.StringorderItemSummaryId

49.0RequiredReason for the adjustment. The value mustmatch one of the picklist values on the

Stringreason

Reason field of theOrderItemSummaryChange object.

SEE ALSO:

Order Summaries, Preview Adjust

Order Summaries, Submit Adjust

Adjust Order Item Summary InputA list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.

Root XML tag<adjustOrderItemSummaryInput>

JSON example

{"adjustItems": [{"reason": "Unknown","amount": 45,"appeasementType": "AmountWithoutTax","orderItemSummaryId": "10uxx0000004EXLAA2","description": "foobar"

}]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

49.0RequiredList of price adjustments toOrderItemSummaries.

Adjust Item Input[]adjustItems

SEE ALSO:

Order Summaries, Preview Adjust

Order Summaries, Submit Adjust

279

Adjust Order Item Summary InputSalesforce Order Management in the Chatter Connect API

Page 290: Salesforce Order Management Developer Guide

Change InputA 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

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of changes to OrderItemSummaries.Change Item Input[]changeItems

SEE ALSO:

Order Summaries, Preview Cancel

Order Summaries, Preview Return

Order Summaries, Submit Cancel

Order Summaries, Submit Return

Change Item InputChange to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based onthe 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

}

280

Change InputSalesforce Order Management in the Chatter Connect API

Page 291: Salesforce Order Management Developer Guide

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the OrderItemSummary.StringorderItemSummaryId

48.0RequiredQuantity to change. Use a positive value.For example, a value of 2 means “cancelor return 2 units.”

Doublequantity

48.0RequiredReason for the change. The value mustmatch one of the picklist values on the

Stringreason

Reason field of theOrderItemSummaryChange object.

48.0RequiredSpecifies whether to prorate the shippingcharge.

BooleanshippingReductionFlag

SEE ALSO:

Order Summaries, Preview Cancel

Order Summaries, Preview Return

Order Summaries, Submit Cancel

Order Summaries, Submit Return

Change Input

Create Credit Memo InputA list of change orders used to create a credit memo.

Root XML tag<createCreditMemoInput>

JSON example

{"changeOrderIds": ["801R0000000EAAkIAO"

]}

281

Create Credit Memo InputSalesforce Order Management in the Chatter Connect API

Page 292: Salesforce Order Management Developer Guide

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of IDs of the change orders.String[]changeOrderIds

SEE ALSO:

Order Summaries, Create Credit Memo

Create Order Payment Summary InputAn 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","paymentAuthorizationId":"2Dgxx00000000W0001"

}

{"orderSummaryId":"1Osxx0000000000001","paymentIds":["0a3xx0000000085AAA","0a3xx0000000085BBB"

]}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the OrderSummary.StringorderSummaryId

48.0Either a paymentauthorization or at

ID of the payment authorization.StringpaymentAuthorizationId

least one paymentis required.

48.0Either a paymentauthorization or at

List of IDs of the payments.String[]paymentIds

least one paymentis required.

SEE ALSO:

Order Payment Summaries

282

Create Order Payment Summary InputSalesforce Order Management in the Chatter Connect API

Page 293: Salesforce Order Management Developer Guide

Ensure Funds Async InputID of an invoice to ensure funds for and apply them to.

Root XML tag<ensureFundsAsyncInput>

JSON example

{"invoiceId": "50gR000000000JNIAY"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the invoice.StringinvoiceId

SEE ALSO:

Order Summaries, Ensure Funds Async

Ensure Refunds Async InputID 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

AvailableVersion

Required orOptional

DescriptionTypeName

48.0Optional, but atleast one inputproperty is required

ID of the credit memo that represents arefund amount.

StringcreditMemoId

49.0Optional, but atleast one inputproperty is required

Amount of excess funds to refund.DoubleexcessFundsAmount

SEE ALSO:

Order Summaries, Ensure Refunds Async

283

Ensure Funds Async InputSalesforce Order Management in the Chatter Connect API

Page 294: Salesforce Order Management Developer Guide

Find Routes With Fewest Splits InputData used to calculate order fulfillment routes involving the fewest number of shipment splits.

Root XML tag<findRoutesWithFewestSplits>

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required

Each list element represents the availablequantity of a product at an inventorylocation.

Location AvailabilityInput[]

locationAvailableInventory

51.0OptionalThe maximum allowable number ofshipment splits. Routing options that

IntegermaximumNumberOfSplits

involve more than this number of splits arenot returned.

Note: Each split represents anadditional shipment. Specifying amaximum of 0 returns onlylocations that can fulfill the entireorder in a single shipment. Amaximum of 1 returnscombinations of locations that canfulfill the order in one or twoshipments, and so on.

51.0At least oneelement is required

Each list element represents a quantity ofa product to be routed for fulfillment.

Quantity With SkuInput[]

orderedQuantities

Fulfillment Group InputA list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the valuesdefined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned to theFulfillmentOrder for this fulfillment group.

Root XML tag<fulfillmentGroup>

JSON example

{"fulfilledFromLocationId":"131xx00000000W0001","fulfillmentType":"warehouse","orderItemSummaries":[{"orderItemSummaryId":"10uxx00000000W0001","quantity":3

},

284

Find Routes With Fewest Splits InputSalesforce Order Management in the Chatter Connect API

Page 295: Salesforce Order Management Developer Guide

{"orderItemSummaryId":"10uxx00000000W0002","quantity":1

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the fulfillment location.StringfulfilledFromLocationId

48.0RequiredFulfillment type. One of the Type fieldvalues defined for FulfillmentOrders.

StringfulfillmentType

48.0RequiredList of OrderItemSummaries.Order ItemSummary Input[]

orderItemSummaries

50.0OptionalReference to this input for use introubleshooting failures. This value is only

StringreferenceId

used by the APIs for creating fulfillmentorders for multiple order delivery groupsummaries.

SEE ALSO:

Fulfillment Orders

Fulfillment Order Input

Fulfillment Order InputAn 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 fulfillmentlocation. 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

285

Fulfillment Order InputSalesforce Order Management in the Chatter Connect API

Page 296: Salesforce Order Management Developer Guide

},{"orderItemSummaryId":"10uxx00000000W0002","quantity":1

}]

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of fulfillment groups that specify theOrderItemSummaries and fulfillmentlocations.

Fulfillment GroupInput[]

fulfillmentGroups

48.0RequiredID of the OrderDeliveryGroupSummary.StringorderDeliveryGroupSummaryId

48.0RequiredID of the OrderSummary.StringorderSummaryId

SEE ALSO:

Fulfillment Orders

Fulfillment Order Invoice InputUse an empty request body for this input.

Root XML tag<fulfillmentOrderInvoiceInput>

JSON example

{}

PropertiesNone.

SEE ALSO:

Fulfillment Orders, Create Invoice

Fulfillment Order Line Item InputA FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the canceledquantity to a different FulfillmentOrder.

Root XML tag<fulfillmentOrderLineItem>

286

Fulfillment Order Invoice InputSalesforce Order Management in the Chatter Connect API

Page 297: Salesforce Order Management Developer Guide

JSON example

{"fulfillmentOrderLineItemId" : "0a4xx00000000W0001","quantity":1

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the FulfillmentOrderLineItem.StringfulfillmentOrderLineItemId

48.0RequiredQuantity to cancel.Doublequantity

SEE ALSO:

Fulfillment Orders, Cancel Item

Fulfillment Order Line Items To Cancel Input

Fulfillment Order Line Items To Cancel InputA list of FulfillmentOrderLineItems and quantities to cancel.

Root XML tag<fulfillmentOrderLineItemsToCancelInput>

JSON example

{"fulfillmentOrderLineItemsToCancel" : [{"fulfillmentOrderLineItemId" : "0a4xx00000000W0001","quantity":1

},{"fulfillmentOrderLineItemId" : "0a4xx00000000W0002","quantity":2

}]}

287

Fulfillment Order Line Items To Cancel InputSalesforce Order Management in the Chatter Connect API

Page 298: Salesforce Order Management Developer Guide

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredList of FulfillmentOrderLineItems andquantities.

Fulfillment OrderLine Item Input[]

fulfillmentOrderLineItemsToCancel

SEE ALSO:

Fulfillment Orders, Cancel Item

Location Availability InputThe available quantity of a product at an inventory location.

Root XML tag<locationAvailabilityInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0OptionalThe external reference ID of the inventorylocation.

StringexternalReferenceId

51.0RequiredThe available quantity of the product.Doublequantity

51.0RequiredThe Stock Keeping Unit of the product.StringstockKeepingUnit

Location InputInventory location data used to calculate shipping distance.

Root XML tag<locationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredThe country code of the location.StringcountryCode

51.0RequiredThe identifier of the location.StringlocationIdentifier

51.0RequiredThe postal code of the location.StringpostalCode

288

Location Availability InputSalesforce Order Management in the Chatter Connect API

Page 299: Salesforce Order Management Developer Guide

Multiple Fulfillment Order InputList of inputs for creating fulfillment orders.

Root XML tag<multipleFulfillmentOrderInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

50.0RequiredEach element contains the data to createone fulfillment order.

Fulfillment OrderInput[]

fulfillmentOrders

OCI Create Reservation InputData to reserve inventory at one or more Omnichannel Inventory locations or location groups.

Root XML tag<ociCreateReservationInput>

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data to

StringactionRequestId

identify which requests succeeded orfailed.

51.0OptionalWhen true, if the system can’t create theentire reservation, then it attempts tocreate a partial reservation.

BooleanallowPartialReservations

51.0At least oneelement is required

A list of product quantities and locationsor location groups.

OCI CreateReservation SingleInput[]

createRecords

51.0OptionalA length of time in seconds. If thereservation is not fulfilled within this

IntegerexpirationSeconds

amount of time after thereservationTime, then it expires.

51.0OptionalExternal reference ID.StringexternalRefId

51.0OptionalThe time at which to record thereservation. Example:2020-07-24T21:13:00Z

StringreservationTime

289

Multiple Fulfillment Order InputSalesforce Order Management in the Chatter Connect API

Page 300: Salesforce Order Management Developer Guide

OCI Create Reservation Single InputA quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.

Root XML tag<ociCreateReservationSingle>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0EitherlocationGroupIdentifier

Identifier of the location group at whichto reserve inventory.

StringlocationGroupIdentifier

or locationIdentifieris required, but notboth

51.0EitherlocationGroupIdentifier

Identifier of the location at which toreserve inventory.

StringlocationIdentifier

or locationIdentifieris required, but notboth

51.0RequiredThe quantity of the product to reserve.Doublequantity

51.0RequiredThe SKU of the product to reserve.StringstockKeepingUnit

OCI Fulfill Reservation InputA list of inventory reservations to fulfill.

Root XML tag<ociFulfillReservationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required.

A list of inventory reservations.OCI FulfillReservation SingleInput[]

fulfillmentRecords

OCI Fulfill Reservation Single InputAn inventory reservation to fulfill.

290

OCI Create Reservation Single InputSalesforce Order Management in the Chatter Connect API

Page 301: Salesforce Order Management Developer Guide

Root XML tag<ociFulfillReservationSingle>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data to

StringactionRequestId

identify which requests succeeded orfailed.

51.0OptionalThe external reference ID of the locationthat’s fulfilling the reservation.

StringexternalRefId

51.0RequiredThe identifier of the location that’s fulfillingthe reservation.

StringlocationIdentifier

51.0RequiredThe quantity being fulfilled.Doublequantity

51.0RequiredThe SKU of the product being fulfilled.StringstockKeepingUnit

OCI Get Inventory Availability InputDetails of a request to retrieve inventory availability.

Root XML tag<ociGetInventoryInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0Optional; can’tcombine with

The identifier of a location group toretrieve inventory availability data for.

StringlocationGroupIdentifier

locationGroupIdentifiersSpecifying this value retrieves inventorydata for all locations belonging to thisgroup.

orlocationIdentifiers

51.0Optional; can’tcombine with

A list of up to 100 identifiers of locationgroups to retrieve inventory availabilitydata for.

String[]locationGroupIdentifiers

locationGroupIdentifierorlocationIdentifiers

51.0Optional; can’tcombine with

A list of up to 100 identifiers of locationsto retrieve inventory availability data for.

String[]locationIdentifiers

291

OCI Get Inventory Availability InputSalesforce Order Management in the Chatter Connect API

Page 302: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

locationGroupIdentifierorlocationGroupIdentifiers

51.0Optional; can’tcombine withstockKeepingUnits

The SKU of a product to retrieve inventoryavailability data for. Specifying a SKU withno locations or location groups returnsavailability data for that SKU at all inventory

StringstockKeepingUnit

locations that are not assigned to locationgroups.

51.0Optional; can’tcombine withstockKeepingUnit

A list of up to 100 SKUs of products toretrieve inventory availability data for.

String[]stockKeepingUnits

51.0OptionalWhether to fetch the inventory data fromthe cache. Default value is true.

BooleanuseCache

OCI Release Reservation InputDetails of one or more inventory reservations to release.

Root XML tag<ociReleaseReservationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0At least oneelement is required.

List of inventory reservations to release.OCI ReleaseReservation SingleInput[]

releaseRecords

OCI Release Reservation Single InputA single inventory reservation to release.

Root XML tag<ociReleaseReservationSingle>

292

OCI Release Reservation InputSalesforce Order Management in the Chatter Connect API

Page 303: Salesforce Order Management Developer Guide

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data to

StringactionRequestId

identify which requests succeeded orfailed.

51.0OptionalThe external reference ID of the locationor location group that has the reservation.

StringexternalRefId

51.0The identifier for alocation or location

The identifier of the location group thathas the reservation.

StringlocationGroupIdentifier

group, but not both,is required.

51.0The identifier for alocation or location

The identifier of the location that has thereservation.

StringlocationIdentifier

group, but not both,is required.

51.0RequiredThe quantity of reserved inventory torelease.

Doublequantity

51.0RequiredThe SKU of the product to release.StringstockKeepingUnit

OCI Transfer Reservation InputA list of inventory reservation transfers and specifies whether a single failure cancels the entire list.

Root XML tag<ociTransferReservationInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0OptionalControls whether a single failed transfercancels all other transfers in thetransferRecords list.

StringallOrNothingTransferId

• To allow some transfers in thetransferRecords list to succeedwhen others fail, don’t include thisproperty.

293

OCI Transfer Reservation InputSalesforce Order Management in the Chatter Connect API

Page 304: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

• To cancel all the transfers in thetransferRecords list when anyof them fail, set this property to aUUID. The ID must be unique, but isn’totherwise used in this version.

51.0At least oneelement is required.

A list of inventory reservation transfers.OCI TransferReservation SingleInput[]

transferRecords

OCI Transfer Reservation Single InputAn inventory reservation transfer.

Root XML tag<ociTransferReservationSingle>

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredA UUID that identifies the request. Use theaction request IDs in response data to

StringactionRequestId

identify which requests succeeded orfailed.

51.0OptionalThe external reference ID of the locationreceiving the transfer.

StringexternalRefId

51.0The identifier for asending location or

The identifier of the location groupsending the reservation.

StringfromLocationGroupIdentifier

location group, butnot both, is required

51.0The identifier for asending location or

The identifier of the location sending thereservation.

StringfromLocationIdentifier

location group, butnot both, is required

52.0OptionalIf true, force the transfer even if thereceiving location doesn’t have sufficient

BooleanignoreAvailabilityCheck

available inventory. The default value isfalse.

51.0RequiredThe quantity of inventory beingtransferred.

Doublequantity

51.0RequiredThe SKU of the product being transferred.StringstockKeepingUnit

294

OCI Transfer Reservation Single InputSalesforce Order Management in the Chatter Connect API

Page 305: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

51.0The identifier for areceiving location or

The identifier of the location groupreceiving the reservation.

StringtoLocationGroupIdentifier

location group, butnot both, is required

51.0The identifier for areceiving location or

The identifier of the location receiving thereservation.

StringtoLocationIdentifier

location group, butnot both, is required

Order Item Summary InputAn OrderItemSummary and quantity.

Root XML tag<orderItemSummary>

JSON example

{"orderItemSummaryId":"10uxx00000000W0001","quantity":3

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

48.0RequiredID of the OrderItemSummary.StringorderItemSummaryId

48.0RequiredQuantity to include.Doublequantity

SEE ALSO:

Fulfillment Orders

Fulfillment Order Input

Fulfillment Group Input

Order Summary InputAn order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you canspecify an OrderNumber or Status.

Root XML tag<orderSummaryInput>

295

Order Item Summary InputSalesforce Order Management in the Chatter Connect API

Page 306: Salesforce Order Management Developer Guide

JSON example

{"orderId": "801xx000003GbTgAAK"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

53.0OptionalThe order’s business model. It can haveone of these values:

StringbusinessModel

• B2B

• B2C

50.0OptionalSpecifies an OrderNumber to assign to theorder summary.

Stringname

48.0RequiredID of the original order.StringorderId

49.0OptionalSpecifies whether the order is managed inSalesforce Order Management or by an

StringorderLifeCycleType

external system. It can have one of thesevalues:

• MANAGED—Managed in SalesforceOrder Management.

• UNMANAGED—Managed by anexternal system.

If no value is specified, the default isMANAGED.

50.0OptionalSpecifies a status to assign to the ordersummary. The value must match one of

Stringstatus

the picklist values on the Status field of theOrderSummary object.

SEE ALSO:

Order Summaries

Quantity With Sku InputA quantity of a product.

Root XML tag<quantityWithSkuInput>

296

Quantity With Sku InputSalesforce Order Management in the Chatter Connect API

Page 307: Salesforce Order Management Developer Guide

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredQuantity of the product.Doublequantity

51.0RequiredSKU of the product.StringstockKeepingUnit

Rank Average Distance InputAn order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.

Root XML tag<rankAverageDistanceInput>

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredThe country code of the order recipient.StringdeliveryCountryCode

51.0RequiredThe postal code of the order recipient.StringdeliveryPostalCode

51.0Specify mi or km to return averagedistances in miles or kilometers,respectively.

StringdistanceUnit

51.0Specify ASC or DESC to rank the resultsby average shipping distance in ascendingor descending order, respectively.

StringsortResult

51.0At least oneelement is required

Each element is a set of inventory locationsthat can combine to fulfill the order.

Target LocationInput[]

targetLocations

Return Items InputData about products and delivery charges to return.

Root XML tag<returnItemsInput>

JSON example

{"returnOrderItems": [{"returnOrderLineItemId": "10uxx0000004GKbAAM",

297

Rank Average Distance InputSalesforce Order Management in the Chatter Connect API

Page 308: Salesforce Order Management Developer Guide

"quantityReturned": "1","quantityToCancel": "0","quantityReceived": "1","quantityRejected": "0","reasonForRejection": "N/A"

}],"returnOrderItemDeliveryCharges": [{"returnOrderLineItemId": "10uxx0000004GKbAAP"

}]

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

52.0OptionalList of ReturnOrderLineItems to return thatrepresent delivery charges.

Return Order ItemDelivery ChargeInput[]

returnOrderItemDeliveryCharges

52.0RequiredList of ReturnOrderLineItems to processthat represent products, along with dataabout how to process them.

Return Order ItemInput[]

returnOrderItems

Return Order InputData 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"

}]

}

298

Return Order InputSalesforce Order Management in the Chatter Connect API

Page 309: Salesforce Order Management Developer Guide

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

50.0RequiredID of the OrderSummary containing theitems to be returned. The OrderSummary’sOrderLifeCycleType must be Managed.

StringorderSummaryId

51.0RequiredThe LifeCycleType of the ReturnOrder.Possible values are:

StringreturnOrderLifeCycleType

• Managed—Process the ReturnOrderusing the APIs and actions. It cangenerate change orders and affectsfinancial fields and rollup calculations.

• Unmanaged—The ReturnOrder is fortracking purposes only. It isn’t involvedin any financial calculations anddoesn’t generate any change orders.The system doesn’t prevent thecreation of duplicateReturnOrderLineItems in anunmanaged ReturnOrder for the sameOrderItem.

50.0At least oneelement is required

List of data for creatingReturnOrderLineItems.

Return Order LineItem Input[]

returnOrderLineItems

50.0RequiredStatus to assign the ReturnOrder. This valuemust match an entry in the ReturnOrderobject’s Status picklist.

Stringstatus

Return Order Item Delivery Charge InputID of a ReturnOrderLineItem representing a delivery charge.

Root XML tag<returnOrderItemDeliveryCharge>

JSON example

{"returnOrderLineItemId": "10uxx0000004GKbAAP"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

52.0RequiredID of a ReturnOrderLineItem to return.StringreturnOrderLineItemId

299

Return Order Item Delivery Charge InputSalesforce Order Management in the Chatter Connect API

Page 310: Salesforce Order Management Developer Guide

Return Order Item InputID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remainingquantity 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

AvailableVersion

Required orOptional

DescriptionTypeName

52.0RequiredThe quantity of the ReturnOrderLineItemthat has been received. The value must be

DoublequantityReceived

zero or greater. This value isn’t used by anystandard features, but is provided for usein customizations.

52.0RequiredThe quantity of the ReturnOrderLineItemthat has been rejected for return. The value

DoublequantityRejected

must be zero or greater. This value isn’tused by any standard features, but isprovided for use in customizations.

52.0RequiredThe quantity of the ReturnOrderLineItemthat has been returned. The value must be

DoublequantityReturned

greater than zero. If this value plusquantityToCancel is less than the expectedreturn quantity, then the remainingquantity to be returned is added to a newReturnOrderLineItem.

52.0RequiredThe quantity of the ReturnOrderLineItemto remove because it’s not being returned.

DoublequantityToCancel

The value must be zero or greater. If thisvalue plus quantityReturned is less thanthe expected return quantity, then theremaining quantity to be returned is addedto a new ReturnOrderLineItem.

300

Return Order Item InputSalesforce Order Management in the Chatter Connect API

Page 311: Salesforce Order Management Developer Guide

AvailableVersion

Required orOptional

DescriptionTypeName

52.0OptionalThe reason why the rejected quantity, ifany, was rejected. This value isn’t used by

StringreasonForRejection

any standard features, but is provided foruse in customizations.

52.0RequiredThe ID of the ReturnOrderLineItem.StringreturnOrderLineItemId

Return Order Line Item InputData for creating a ReturnOrderLineItem.

Root XML tag<returnOrderLineItem>

JSON example

{"quantityExpected": "1","reasonForReturn": "Not Satisfied","canReduceShipping": false,"orderItemSummaryId": "10uxx0000004GKbAAM","quantityReceived": "0"

}

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

50.0RequiredWhether the associated shipping chargecan be refunded.

BooleancanReduceShipping

50.0RequiredID of the associated OrderItemSummary.StringorderItemSummaryId

50.0RequiredQuantity expected to be returned.DoublequantityExpected

50.0OptionalQuantity already physically returned.DoublequantityReceived

50.0OptionalReason for the return. The value mustmatch an entry in the ReturnOrderLineItemobject’s ReasonForReturn picklist.

StringreasonForReturn

Target Location InputA set of inventory locations that together can fulfill an order.

Root XML tag<targetLocationInput>

301

Return Order Line Item InputSalesforce Order Management in the Chatter Connect API

Page 312: Salesforce Order Management Developer Guide

JSON example

Properties

AvailableVersion

Required orOptional

DescriptionTypeName

51.0RequiredA list of locations with information abouttheir country and postal codes.

Location Input[]locations

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 thevalues 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 asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made toan external payment gateway. It doesn’t include any errors from the operation.

Ensure Refunds Async Output

ID of the asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made toan external payment gateway. It doesn’t include any errors from the 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.

302

Salesforce Order Management ResponsesSalesforce Order Management in the Chatter Connect API

Page 313: Salesforce Order Management Developer Guide

Find Routes With Fewest Splits Output

A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.

Fulfillment Group Output

Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. Ifthe 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.

303

Salesforce Order Management ResponsesSalesforce Order Management in the Chatter Connect API

Page 314: Salesforce Order Management Developer Guide

OCI Release Reservation Error Output

Response to a request to release one inventory reservation.

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 werecreated 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 toreturn a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, itreturns 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.

304

Salesforce Order Management ResponsesSalesforce Order Management in the Chatter Connect API

Page 315: Salesforce Order Management Developer Guide

Adjust Order Summary OutputOutput 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 VersionFilter Group andVersion

DescriptionTypeProperty Name

49.0Big, 49.0Expected (for preview) or actual (for submit)financial values for the price adjustment

Change Item OutputchangeBalances

action. Most of the values match the changeorder values. If two change orders arereturned, then these values combine them.The sign of a value in this output is theopposite of the corresponding value on achange order record. For example, adiscount is a positive value inchangeBalances and a negative valueon a change order record.

49.0Big, 49.0Any errors that were returned.Error ResponseOutput[]

errors

49.0Big, 49.0ID of the OrderSummary.StringorderSummaryId

49.0Big, 49.0ID of the change Order that holds thefinancial changes applicable to order

StringpostFulfillmentChangeOrderId

products that have been fulfilled. For anadjustPreview call, this value is always null.

49.0Big, 49.0ID of the change Order that holds thefinancial changes applicable to order

StringpreFulfillmentChangeOrderId

products that have not been fulfilled. For anadjustPreview call, this value is always null.

49.0Big, 49.0Indicates whether the transaction wassuccessful.

Booleansuccess

SEE ALSO:

Order Summaries, Preview Adjust

Order Summaries, Submit Adjust

Available Location OutputA set of inventory locations that can combine to fulfill an order.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0A list of inventory locations.String[]locations

305

Adjust Order Summary OutputSalesforce Order Management in the Chatter Connect API

Page 316: Salesforce Order Management Developer Guide

Average Distance Result OutputWraps inventory location shipping distance calculation results.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Results of the shipping distance calculations.Distance CalculationOutput

distanceCalculation

Change Item OutputThe financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the valueson the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record. Forexample, a discount is a positive value here and a negative value on a change order record.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Change to the GrandTotalAmount field.DoublegrandTotalAmount

49.0Change to the TotalAdjDeliveryAmtWithTaxfield.

DoubletotalAdjDeliveryAmtWithTax

49.0Change to the TotalAdjDistAmountWithTaxfield.

DoubletotalAdjDistAmountWithTax

49.0Change to the TotalAdjProductAmtWithTaxfield.

DoubletotalAdjProductAmtWithTax

48.0Big, 48.0Change to theTotalAdjustedDeliveryAmount field.

DoubletotalAdjustedDeliveryAmount

48.0Big, 48.0Change to theTotalAdjustedDeliveryTaxAmount field.

DoubletotalAdjustedDeliveryTaxAmount

48.0Big, 48.0Change to theTotalAdjustedProductAmount field.

DoubletotalAdjustedProductAmount

48.0Big, 48.0Change to theTotalAdjustedProductTaxAmount field.

DoubletotalAdjustedProductTaxAmount

48.0Big, 48.0Change to theTotalAdjustmentDistributedAmount field.

DoubletotalAdjustmentDistributedAmount

48.0Big, 48.0Change to theTotalAdjustmentDistributedTaxAmountfield.

DoubletotalAdjustmentDistributedTaxAmount

48.0Big, 48.0Change to the TotalAmount field.DoubletotalAmount

306

Average Distance Result OutputSalesforce Order Management in the Chatter Connect API

Page 317: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Amount of excess funds available on theOrderPaymentSummaries related to the

DoubletotalExcessFundsAmount

OrderSummary. It is equal to the capturedamount that is owed as a refund but is notassociated with an invoice or credit memo.Excess funds normally occur when orderitems are canceled before fulfillment butafter payment has been captured. Thissituation is not common in the US, wherefunds are normally authorized but notcaptured until the fulfillment process begins.This value includes all current excess fundsrelated to the OrderSummary, not only thefunds related to the current change.

48.0Big, 48.0Total amount available to be refunded. It isthe sum of the excess funds and any

DoubletotalRefundableAmount

outstanding change order grand totalamounts that apply to post-fulfillmentchanges. This value includes all currentrefundable amounts related to theOrderSummary, not only the amount relatedto the current change.

48.0Big, 48.0Change to the TotalTaxAmount field.DoubletotalTaxAmount

SEE ALSO:

Preview Cancel Output

Preview Return Output

Submit Cancel Output

Submit Return Output

Adjust Order Summary Output

Create Credit Memo OutputID of a created Credit Memo.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0ID of the created Credit Memo.StringcreditMemoId

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

307

Create Credit Memo OutputSalesforce Order Management in the Chatter Connect API

Page 318: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Create Order Payment Summary OutputID of the created Order Payment Summary.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0ID of the Order Payment Summary.StringorderPaymentSummaryId

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Distance Calculation OutputShipping distance data for a set of inventory locations.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The average distance from the locations tothe order recipient.

DoubleaverageDistance

51.0Big, 51.0The list of locations and their distances tothe order recipient.

Location Output[]locations

51.0Big, 51.0This result’s rank among all results byaverage distance to the order recipient.

Integerrank

Ensure Funds Async OutputID of the asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made to anexternal payment gateway. It doesn’t include any errors from the operation.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0ID of the background operation.StringbackgroundOperationId

308

Create Order Payment Summary OutputSalesforce Order Management in the Chatter Connect API

Page 319: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Ensure Refunds Async OutputID of the asynchronous background operation. This output only includes the operation ID, regardless of whether a call is made to anexternal payment gateway. It doesn’t include any errors from the operation.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

47.0Big, 47.0ID of the background operation.StringbackgroundOperationId

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Error Response OutputError response representation

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Small, 48.0Error code.StringerrorCode

48.0Small, 48.0Message stating the reason for error, if any.Stringmessage

Error with OutputContains 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.

AvailableVersion

Filter Groupand Version

DescriptionTypeProperty

39.0Small, 39.0Indicates the type of the output property. This valueis either null or:

StringenhancedErrorType

• GroupMembershipRequestError–Anested Group Membership Request.

309

Ensure Refunds Async OutputSalesforce Order Management in the Chatter Connect API

Page 320: Salesforce Order Management Developer Guide

AvailableVersion

Filter Groupand Version

DescriptionTypeProperty

27.0Small, 29.0Description of the errorStringmessage

27.0Small, 29.0The response body returned by the requested resource.For example, if a successful request returns a Like

Any response bodyoutput

response body but an error triggers the Error withOutput response body, the value of the outputproperty is a Like response body.

Find Routes With Fewest Splits OutputA list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Any errors that were returned.Error ResponseOutput[]

errors

51.0Big, 51.0Indicates whether the transaction wassuccessful.

Booleansuccess

51.0Big, 51.0Each element of the list is a set of inventorylocations that together can fulfill the orderbeing routed.

Available LocationOutput[]

targetLocations

Fulfillment Group OutputInformation about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If theFulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

50.0Big, 50.0Any errors that were returned.Error ResponseOutput[]

errors

50.0Big, 50.0(Creation failed) The inputFulfilledFromLocationId.

StringfulfilledFromLocationId

50.0Big, 50.0The FulfillmentOrderId from the successfullycreated FulfillmentOrder.

StringfulfillmentOrderId

50.0Big, 50.0(Creation failed) The input FulfillmentType.StringfulfillmentType

50.0Big, 50.0(Creation failed) The inputOrderDeliveryGroupSummaryId.

StringorderDeliveryGroupSummaryId

50.0Big, 50.0(Creation failed) The input list ofOrderItemSummaries.

Order Item SummaryOutput[]

orderItemSummaries

310

Find Routes With Fewest Splits OutputSalesforce Order Management in the Chatter Connect API

Page 321: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

50.0Big, 50.0(Creation failed) The input OrderSummaryId.StringorderSummaryId

50.0Big, 50.0The referenceId from the FulfillmentGroupinput representation. Use this value totroubleshoot a failure.

StringreferenceId

50.0Big, 50.0Indicates whether the transaction wassuccessful.

Booleansuccess

Fulfillment Order Cancel Line Items OutputWraps the base output.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Fulfillment Order Invoice OutputID of the created invoice.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0ID of the created invoice.StringinvoiceId

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Fulfillment Order OutputA list of IDs of the created FulfillmentOrders.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

311

Fulfillment Order Cancel Line Items OutputSalesforce Order Management in the Chatter Connect API

Page 322: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0A list of IDs of created Fulfillment Orders.String[]fulfillmentOrderIds

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Location OutputAn inventory location’s distance to an order recipient.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The distance from the location to the orderrecipient.

Doubledistance

51.0Big, 51.0The location identifier.StringlocationIdentifier

Multiple Fulfillment Order OutputList of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

50.0Big, 50.0Any errors that were returned.Error ResponseOutput[]

errors

50.0Big, 50.0A list of response data for created and failedFulfillmentOrders.

Fulfillment GroupOutput[]

fulfillmentOrders

50.0Big, 50.0Indicates whether the transaction wassuccessful.

Booleansuccess

OCI Create Reservation Error OutputError returned from an attempt to create an Omnichannel Inventory reservation.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0The error code.StringerrorCode

51.0Small, 51.0Details of the error, if available.Stringmessage

312

Location OutputSalesforce Order Management in the Chatter Connect API

Page 323: Salesforce Order Management Developer Guide

OCI Create Reservation OutputResult of an Omnichannel Inventory reservation creation request.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0Details for each product in the reservation.OCI CreateReservation SingleOutput[]

details

51.0Big, 51.0Any errors returned by the reservationrequest.

OCI CreateReservation ErrorOutput[]

errors

51.0Small, 51.0The time at which the reservation wouldexpire.

StringexpirationTime

51.0Small, 51.0The time when the reservation wasrecorded.

StringreservationTime

51.0Big, 51.0Indicates whether the reservation wassuccessfully created.

Booleansuccess

OCI Create Reservation Single OutputDetails of an inventory reservation for one product.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0The error code, if any.StringerrorCode

51.0Small, 51.0Identifier of the location group where theinventory is reserved.

StringlocationGroupIdentifier

51.0Small, 51.0Identifier of the location where theinventory is reserved.

StringlocationIdentifier

51.0Small, 51.0The reserved quantity of the product.Doublequantity

51.0Small, 51.0The SKU of the reserved product.StringstockKeepingUnit

OCI Fulfill Reservation Error OutputResponse to a request to fulfill one inventory reservation.

313

OCI Create Reservation OutputSalesforce Order Management in the Chatter Connect API

Page 324: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0Details of the fulfilled reservation, ifsuccessful.

OCI FulfillReservation SingleOutput

details

51.0Small, 51.0Error code, if any.StringerrorCode

51.0Small, 51.0Details of the error, if available.Stringmessage

OCI Fulfill Reservation OutputResponse to a request to fulfill one or more inventory reservations.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Responses for the individual reservations inthe fulfillment request.

OCI FulfillReservation ErrorOutput[]

errors

51.0Big, 51.0Indicates whether the request wassuccessful.

Booleansuccess

OCI Fulfill Reservation Single OutputDetails of a single fulfilled reservation.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0The UUID that identifies the original fulfillreservation request.

StringactionRequestId

51.0Small, 51.0The external reference ID of the location thatfulfilled the reservation.

StringexternalRefId

51.0Small, 51.0The identifier of the location that fulfilledthe reservation.

StringlocationIdentifier

51.0Small, 51.0The fulfilled quantity.Doublequantity

51.0Small, 51.0The SKU of the fulfilled product.StringstockKeepingUnit

OCI Future Inventory OutputAn expected future inventory restock.

314

OCI Fulfill Reservation OutputSalesforce Order Management in the Chatter Connect API

Page 325: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Date when the future inventory is expected.StringexpectedDate

51.0Big, 51.0Quantity of the future inventory.Doublequantity

OCI Get Inventory Availability OutputResponse to a request for inventory availability data.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0A list of inventory availability data forindividual location groups.

OCI Location GroupAvailability Output[]

locationGroups

51.0Big, 51.0A list of inventory availability data forindividual locations.

OCI LocationAvailability Output[]

locations

OCI Inventory Record OutputInventory availability data for a product.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The Available To Fulfill quantity.DoubleavailableToFulfill

51.0Big, 51.0The Available To Order quantity.DoubleavailableToOrder

51.0Big, 51.0The effective date of the inventory.StringeffectiveDate

51.0Big, 51.0A list of any expected future inventoryrestocks.

OCI Future InventoryOutput[]

futures

51.0Big, 51.0The On Hand quantity.DoubleonHand

51.0Big, 51.0The Reserved quantity.Doublereserved

51.0Big, 51.0The Safety Stock Count.DoublesafetyStockCount

51.0Big, 51.0The SKU of the product.StringstockKeepingUnit

OCI Location Availability OutputOutput representation of one location’s inventory availability

315

OCI Get Inventory Availability OutputSalesforce Order Management in the Chatter Connect API

Page 326: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The Inventory RecordsOCI Inventory RecordOutput[]

inventoryRecords

51.0Big, 51.0The Location IdentifierStringlocationIdentifier

OCI Location Group Availability OutputA set of inventory availability data for one inventory location group.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0A list of availability data for individualproducts. The data combines the quantities

OCI Inventory RecordOutput[]

inventoryRecords

for all locations belonging to this locationgroup.

51.0Big, 51.0The identifier of the location group.StringlocationGroupIdentifier

OCI Publish Location Structure OutputResponse to a publish location structure request.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Identifier of the publish job. Use this valueto retrieve the status of the job.

StringuploadId

OCI Publish Location Structure Status OutputDetailed status of a publish location structure job.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The UTC time when the job finished. (forexample: "2020-07-06T22:54:08.012Z")

StringendTimeUTC

51.0Big, 51.0The number of records processed by thejob.

IntegerrecordsProcessedCount

51.0Big, 51.0The number of records read by the job.IntegerrecordsReadCount

51.0Big, 51.0The number of records skipped by the job.IntegerrecordsSkippedCount

316

OCI Location Group Availability OutputSalesforce Order Management in the Chatter Connect API

Page 327: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The UTC time when the job started. (forexample: "2020-07-06T22:53:06.788Z")

StringstartTimeUTC

51.0Big, 51.0The status of the job. (e.g., "PENDING,""COMPLETED," etc.).

Stringstatus

51.0Big, 51.0Identifier of the job.StringuploadId

51.0Big, 51.0List of any validation errors returned by thejob.

String[]validationErrors

51.0Big, 51.0The validation status of the job.StringvalidationStatus

OCI Release Reservation Error OutputResponse to a request to release one inventory reservation.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0Details of the released reservation, ifsuccessful.

OCI ReleaseReservation SingleOutput

details

51.0Small, 51.0Error code, if any.StringerrorCode

51.0Small, 51.0Details of the error, if available.Stringmessage

OCI Release Reservation OutputResponse to a request to release one or more inventory reservations.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Responses for the individual reservations inthe release request.

OCI ReleaseReservation ErrorOutput[]

errors

51.0Big, 51.0Indicates whether the request wassuccessful.

Booleansuccess

OCI Release Reservation Single OutputDetails of a single released reservation.

317

OCI Release Reservation Error OutputSalesforce Order Management in the Chatter Connect API

Page 328: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0The UUID that identifies the original releasereservation request.

StringactionRequestId

51.0Small, 51.0The external reference ID of the location thatreleased the reservation.

StringexternalRefId

51.0Small, 51.0The identifier of the location group thatreleased the reservation.

StringlocationGroupIdentifier

51.0Small, 51.0The identifier of the location that releasedthe reservation.

StringlocationIdentifier

51.0Small, 51.0The released quantity.Doublequantity

51.0Small, 51.0The SKU of the released product.StringstockKeepingUnit

OCI Transfer Reservation Error OutputResponse to a request to fulfill one inventory reservation.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0Details of the transferred reservation, ifsuccessful.

OCI TransferReservation SingleOutput

details

51.0Small, 51.0Error code, if any.StringerrorCode

51.0Small, 51.0Details of the error, if available.Stringmessage

OCI Transfer Reservation OutputResponse to a request to transfer one or more inventory reservations.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Responses for the individual reservations inthe transfer request.

OCI TransferReservation ErrorOutput[]

errors

51.0Big, 51.0Indicates whether the request wassuccessful.

Booleansuccess

OCI Transfer Reservation Single OutputDetails of a single transferred reservation.

318

OCI Transfer Reservation Error OutputSalesforce Order Management in the Chatter Connect API

Page 329: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Small, 51.0The UUID that identifies the original transferreservation request.

StringactionRequestId

51.0Small, 51.0The external reference ID of the location thatreceived the reservation.

StringexternalRefId

51.0Small, 51.0The identifier of the location group that sentthe reservation.

StringfromLocationGroupIdentifier

51.0Small, 51.0The identifier of the location that sent thereservation.

StringfromLocationIdentifier

52.0Small, 52.0Whether this call ignored availability dataat the location that received the reservation.

BooleanignoreAvailabilityCheck

51.0Small, 51.0The quantity of transferred inventory.Doublequantity

51.0Small, 51.0The SKU of the transferred product.StringstockKeepingUnit

51.0Small, 51.0The identifier of the location group thatreceived the reservation.

StringtoLocationGroupIdentifier

51.0Small, 51.0The identifier of the location that receivedthe reservation.

StringtoLocationIdentifier

OCI Upload Inventory Availability OutputResponse to an upload inventory availability job.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0Identifier of the upload job. Use this valueto retrieve the status of the job.

StringuploadId

OCI Upload Inventory Availability Status OutputDetailed status of an upload inventory availability job.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The UTC time when the job finished. (forexample: "2020-07-06T22:54:08.012Z")

StringendTimeUTC

51.0Big, 51.0The number of records processed by thejob.

IntegerrecordsProcessedCount

51.0Big, 51.0The number of records read by the job.IntegerrecordsReadCount

319

OCI Upload Inventory Availability OutputSalesforce Order Management in the Chatter Connect API

Page 330: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The number of records skipped by the job.IntegerrecordsSkippedCount

51.0Big, 51.0StringstartTimeUTC

51.0Big, 51.0The status of the job. (e.g., "PENDING,""COMPLETED," etc.).

Stringstatus

51.0Big, 51.0Identifier of the job.StringuploadId

51.0Big, 51.0List of any validation errors returned by thejob.

String[]validationErrors

51.0Big, 51.0The validation status of the job.StringvalidationStatus

Order Item Summary OutputDetails of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

50.0Big, 50.0List of errors specific to theOrderItemSummary, if any.

Error ResponseOutput[]

errors

50.0Big, 50.0ID of the OrderItemSummary.StringorderItemSummaryId

50.0Big, 50.0Quantity of the OrderItemSummary.Doublequantity

Order Summary OutputID of the created Order Summary.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0ID of the Order Summary.StringorderSummaryId

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Preview Cancel OutputExpected financial values for a proposed cancel action.

320

Order Item Summary OutputSalesforce Order Management in the Chatter Connect API

Page 331: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Expected financial values for the proposedcancel action.

Change Item OutputchangeBalances

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0ID of the OrderSummary.StringorderSummaryId

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Preview Return OutputExpected financial values for a proposed return action.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Expected financial values for the proposedreturn action.

Change Item OutputchangeBalances

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0ID of the OrderSummary.StringorderSummaryId

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Rank Average Distance OutputThe results of calculating the average distances from sets of inventory locations to an order recipient.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

51.0Big, 51.0The specified unit of distance (miles orkilometers).

StringdistanceUnit

51.0Big, 51.0Any errors that were returned.Error ResponseOutput[]

errors

51.0Big, 51.0The results of the shipping distancecalculations.

ConnectApi.ResultOutputRepresentation[]results

51.0Big, 51.0Indicates whether the transaction wassuccessful.

Booleansuccess

321

Preview Return OutputSalesforce Order Management in the Chatter Connect API

Page 332: Salesforce Order Management Developer Guide

Return Items OutputOutput of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that werecreated to represent remaining return quantities.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

52.0Big, 52.0ID of the change order representing theReturnOrderLineItem processing performedby this call.

StringchangeOrderId

52.0Big, 52.0Any errors that were returned.Error ResponseOutput[]

errors

52.0Big, 52.0A list of properties representing anyremaining quantities from partial returns

Return Order ItemSplit Line Output[]

returnLineItemSplits

processed by this call. Each element of thelist includes the ID of a splitReturnOrderLineItem and the ID of thepartially processed ReturnOrderLineItemwhose remaining quantity it holds.

52.0Big, 52.0Indicates whether the transaction wassuccessful.

Booleansuccess

Return Order Item Split Line OutputAfter a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to returna partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it returns thisoutput property, which contains the IDs of the original and split ReturnOrderLineItems.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

52.0Big, 52.0Any errors that were returned.Error ResponseOutput[]

errors

52.0Big, 52.0ID of the new ReturnOrderLineItem thatholds the remaining return quantity.

StringnewReturnOrderItemId

52.0Big, 52.0ID of the original ReturnOrderLineItem.StringoriginalReturnOrderItemId

52.0Big, 52.0Indicates whether the transaction wassuccessful.

Booleansuccess

Return Order OutputOutput representation of the created Return Order.

322

Return Items OutputSalesforce Order Management in the Chatter Connect API

Page 333: Salesforce Order Management Developer Guide

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

50.0Big, 52.0Any errors that were returned.Error ResponseOutput[]

errors

50.0Big, 50.0A newly created Return Order IDStringreturnOrderId

50.0Big, 52.0Indicates whether the transaction wassuccessful.

Booleansuccess

Submit Cancel OutputID of the change order created for a cancel action, and a set of its financial values.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Financial values resulting from the cancel.Change Item OutputchangeBalances

48.0Big, 48.0ID of the created change order.StringchangeOrderId

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

Submit Return OutputID of the change order created for a return action, and a set of its financial values.

Available VersionFilter Group andVersion

DescriptionTypeProperty Name

48.0Big, 48.0Financial values resulting from the return.Change Item OutputchangeBalances

48.0Big, 48.0ID of the created change order.StringchangeOrderId

48.0Big, 48.0Any errors that were returned.Error ResponseOutput[]

errors

48.0Big, 48.0Indicates whether the transaction wassuccessful.

Booleansuccess

323

Submit Cancel OutputSalesforce Order Management in the Chatter Connect API

Page 334: Salesforce Order Management Developer Guide

CHAPTER 5 Order Management Invocable Actions

Salesforce Order Management provides standard invocable actions to support order managementfunctionality.

In this chapter ...

• Salesforce OrderManagementActions

• Flow Core Action forOrder Management:Adjust Order ItemSummaries Preview

• Flow Core Action forOrder Management:Adjust Order ItemSummaries Submit

• Flow Core Action forOrder Management:Cancel FulfillmentOrder Item

• Flow Core Action forOrder Management:Cancel Order ItemSummaries Preview

• Flow Core Action forOrder Management:Cancel Order ItemSummaries Submit

• Flow Core Action forOrder Management:Create Credit Memo

• Flow Core Action forOrder Management:Create FulfillmentOrder

• Flow Core Action forOrder Management:Create an Invoicefrom FulfillmentOrder

• Flow Core Action forOrder Management:

324

Page 335: Salesforce Order Management Developer Guide

Create OrderPayment Summary

• Flow Core Action forOrder Management:Create OrderSummary

• Flow Core Action forOrder Management:Create Return Order

• Flow Core Action forOrder Management:Ensure Funds Async

• Flow Core Action forOrder Management:Ensure RefundsAsync

• Flow Core Action forOrder Management:Return Order ItemSummaries Preview

• Flow Core Action forOrder Management:Return Order ItemSummaries Submit

• Flow Core Action forOrder Management:Return Return OrderItems

325

Order Management Invocable Actions

Page 336: Salesforce Order Management Developer Guide

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 SalesforceHelp.

These actions are available in API version 48.0 and later.

Your org must have a Salesforce Order Management license.

Supported REST HTTP MethodsURI

Get a specific Order Management action:

/services/data/vXX.X/actions/standard/om_action_name

FormatsJSON, XML

HTTP MethodsGET

AuthenticationAuthorization: Bearer token

NotesYou can also call the corresponding Connect REST API endpoints or Apex ConnectApi methods. For more information, see OrderManagement 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 theConnectApi namespace.

Flow Core Action for Order Management: Adjust Order Item SummariesPreview

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Preview the expected results of adjusting the price of one or more order product summaries on anorder 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 bysubmitting the proposed adjustment.

Drag an Action element onto the canvas. Select the Order Management category, and search forAdjust Order Item Summaries Preview.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

ID of the order summary associated with the order product summaries that you want to preview adjusting theprices of.

Order SummaryId

326

Salesforce Order Management ActionsOrder Management Invocable Actions

Page 337: Salesforce Order Management Developer Guide

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.AdjustOrderItemSummaryInputRepresentation.

The variable has one field, changeItems. This field is a list of Apex-defined variables of classConnectApi.AdjustItemInputRepresentation. Each of the variables includes these fields:

Adjust OrderProductSummariesInput

• 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 thesevalues:

– AmountWithTax—The value of discountValue is the adjustment, including tax.

– AmountWithoutTax—The value of discountValue is the adjustment, not including tax. Taxis calculated on the value and added.

– Percentage—The value of discountValue is a percentage discount. It is divided by 100, andthen multiplied by the total price and total tax amount of the order product summary to determinethe adjustment amount.

• discountValue — The value used to calculate the adjustment amount, as described by theadjustmentType. It must be a negative value.

• reason — Adjustment reason. The value must match one of the picklist values on the Reason field ofthe Order Product Summary Change object.

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.AdjustOrderSummaryOutputRepresentation, whichcontains the financial changes that would result from the proposed adjustment. Most of the values representthe deltas of the values on the associated order summary.

Adjust OrderProductSummary Output

Note: The sign of a value in the changeBalances field is the opposite of the corresponding valueon a change order record. For example, a discount is a positive value in changeBalances and anegative 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 classConnectApi.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.

327

Flow Core Action for Order Management: Adjust Order ItemSummaries Preview

Order Management Invocable Actions

Page 338: Salesforce Order Management Developer Guide

DescriptionOutput Parameter

• 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 paymentsummaries related to the order summary. It is equal to the captured amount that is owed as a refund butis not associated with an invoice or credit memo. Excess funds normally occur when order products arecanceled 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 valueincludes 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 excessfunds and any outstanding change order grand total amounts that apply to post-fulfillment changes. Thisvalue includes all refundable amounts related to the order summary, not only the amount related to thecurrent 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.

UsageTo 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 thechangeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.

3. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID inthe 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 executingthe 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 SummariesSubmit

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Adjust the price of one or more order product summaries on an order summary. You can only applya 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 forAdjust Order Item Summaries Submit.

Set Input ValuesUse values from earlier in the flow to set the inputs.

328

Flow Core Action for Order Management: Adjust Order ItemSummaries Submit

Order Management Invocable Actions

Page 339: Salesforce Order Management Developer Guide

DescriptionInput Parameter

ID of the order summary associated with the order product summaries that you want to adjust the prices of.Order SummaryId

This input is an Apex-defined variable of class ConnectApi.AdjustOrderItemSummaryInputRepresentation.

The variable has one field, changeItems. This field is a list of Apex-defined variables of classConnectApi.AdjustItemInputRepresentation. Each of the variables includes these fields:

Adjust OrderProductSummariesInput

• 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 thesevalues:

– AmountWithTax—The value of discountValue is the adjustment, including tax.

– AmountWithoutTax—The value of discountValue is the adjustment, not including tax. Taxis calculated on the value and added.

– Percentage—The value of discountValue is a percentage discount. It is divided by 100, andthen multiplied by the total price and total tax amount of the order product summary to determinethe adjustment amount.

• discountValue — The value used to calculate the adjustment amount, as described by theadjustmentType. It must be a negative value.

• reason — Adjustment reason. The value must match one of the picklist values on the Reason field ofthe Order Product Summary Change object.

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.AdjustOrderSummaryOutputRepresentation.Depending on the order product summaries included in the adjustment, one or two change orders are

Adjust OrderProductSummary 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 valueon a change order record. For example, a discount is a positive value in changeBalances and anegative 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 classConnectApi.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.

329

Flow Core Action for Order Management: Adjust Order ItemSummaries Submit

Order Management Invocable Actions

Page 340: Salesforce Order Management Developer Guide

DescriptionOutput Parameter

• 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 paymentsummaries related to the order summary. It is equal to the captured amount that is owed as a refund butis not associated with an invoice or credit memo. Excess funds normally occur when order products arecanceled 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 valueincludes 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 excessfunds and any outstanding change order grand total amounts that apply to post-fulfillment changes. Thisvalue includes all refundable amounts related to the order summary, not only the amount related to thecurrent action.

• totalTaxAmount — Change to the total tax.

The postFulfillmentChangeOrderId is the ID of the change order representing the portion of theadjustment that was applied to order product summaries that have been fulfilled.

The preFulfillmentChangeOrderId is the ID of the change order representing the portion of theadjustment that was applied to order product summaries that have not been fulfilled.

UsageTo 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 thechangeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.

3. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID inthe action input.

In a flow for adjusting the prices of order product summaries, run an Adjust Order Item Summaries Preview action before running thisaction. 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, processa 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 thepostFulfillmentChangeOrderId to the Create Credit Memo action, then pass the credit memo to the Ensure RefundsAsync action.

330

Flow Core Action for Order Management: Adjust Order ItemSummaries Submit

Order Management Invocable Actions

Page 341: Salesforce Order Management Developer Guide

• If the discount applied to both fulfilled and unfulfilled order product summaries for which payment has been captured, process bothrefunds. Pass the postFulfillmentChangeOrderId to the Create Credit Memo action, then pass the credit memo andthe 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. Thiscancellation adds another $20 of excess funds. However, because the original $20 hasn’t been refunded yet, the cancel actionreturns 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 refundamount 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

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Cancel fulfillment order products from a fulfillment order. You can cancel more than one product,and specify a quantity to cancel for each of them. This action doesn’t cancel the associated orderproduct summaries; it only reduces their allocated quantities. Usually, you reallocate the canceledquantities to a new fulfillment order.

Drag an Action element onto the canvas. Select the Order Management category, and search forCancel Fulfillment Order Item.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation.

The variable has one field, fulfillmentOrderLineItemsToCancel, which is a list of Apex-definedvariables of class ConnectApi.FulfillmentOrderLineItemInputRepresentation. Each of those variables includesthese fields:

CancelFulfillmentOrder ItemsInput

• fulfillmentOrderLineItemId — Reference to the fulfillment order product to cancel.

• quantity — Quantity to cancel.

Reference to the fulfillment order that you want to cancel fulfillment order items from.FulfillmentOrder Id

331

Flow Core Action for Order Management: Cancel FulfillmentOrder Item

Order Management Invocable Actions

Page 342: Salesforce Order Management Developer Guide

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of classConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation.

This action doesn’t return any data.

CancelFulfillmentOrder ItemsOutput

UsageTo set up the Cancel Fulfillment Order Items Input, first use Assignment elements to set the fulfillmentOrderLineItemIdand quantity field values on one or more ConnectApi.FulfillmentOrderLineItemInputRepresentationvariables. Then use an Assignment element to add those variables to the FulfillmentOrderLineItemsToCancel field ona ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation variable. Use that variable in theaction input.

Flow Core Action for Order Management: Cancel Order Item SummariesPreview

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Preview the expected results of canceling one or more order product summaries from an ordersummary without executing the cancel. The output of this action contains the values that wouldbe set on the change order created by submitting the proposed cancel.

Drag an Action element onto the canvas. Select the Order Management category, and search forCancel Order Item Summaries Preview.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.ChangeInputRepresentation.

The variable has one field, changeItems. This field is a list of Apex-defined variables of classConnectApi.ChangeItemInputRepresentation. Each of the variables includes these fields:

Cancel OrderProductSummary ItemsInput

• orderItemSummaryId — ID of an order product summary to cancel. It can’t be a shipping chargeproduct.

• quantity — Quantity to cancel.

• reason — Cancel reason. The value must match one of the picklist values on the Reason field of theOrder Product Summary Change object.

• shippingReductionFlag — Boolean flag that specifies whether to prorate any related deliverycharge based on the price change.

Reference to the order summary that you want to preview canceling order product summaries from.Order SummaryId

332

Flow Core Action for Order Management: Cancel Order ItemSummaries Preview

Order Management Invocable Actions

Page 343: Salesforce Order Management Developer Guide

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.PreviewCancelOutputRepresentation, whichcontains the values that would populate a change order record for the proposed cancel.

Cancel OrderProductSummary Output

Note: The sign of a value in the changeBalances field is the opposite of the corresponding valueon a change order record. For example, a discount is a positive value in changeBalances and anegative 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 classConnectApi.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 paymentsummaries related to the order summary. It is equal to the captured amount that is owed as a refund butis not associated with an invoice or credit memo. Excess funds normally occur when order products arecanceled before fulfillment but after payment is captured. This situation is not common in the US, wherefunds are normally authorized but not captured until the fulfillment process begins. This value includes allexcess 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 excessfunds and any outstanding change order grand total amounts that apply to post-fulfillment changes. Thisvalue includes all refundable amounts related to the order summary, not only the amount related to thecurrent action.

• totalTaxAmount — Change to the total tax.

UsageTo set up the Cancel Order Product Summary Items Input:

1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlagfield values on one or more ConnectApi.ChangeItemInputRepresentation variables.

2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to thechangeItems field on a ConnectApi.ChangeInputRepresentation variable.

333

Flow Core Action for Order Management: Cancel Order ItemSummaries Preview

Order Management Invocable Actions

Page 344: Salesforce Order Management Developer Guide

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 SummariesSubmit

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Cancel one or more order product summaries from an order summary. This action creates a changeorder record.

Drag an Action element onto the canvas. Select the Order Management category, and search forCancel Order Item Summaries Submit.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInputParameter

This input is an Apex-defined variable of classConnectApi.ChangeInputRepresentation.

The variable has one field, changeItems. This field is a list of Apex-definedvariables of class ConnectApi.ChangeItemInputRepresentation. Each of thevariables includes these fields:

CancelOrderProductSummaryItemsInput

• 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 valueson the Reason field of the Order Product Summary Change object.

• shippingReductionFlag — Boolean flag that specifies whether toprorate any related delivery charge based on the price change.

Reference to the order summary that you want to cancel order product summariesfrom.

OrderSummaryId

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.SubmitCancelOutputRepresentation.Cancel OrderProductSummary Output

Note: The sign of a value in the changeBalances field is the opposite of the corresponding valueon a change order record. For example, a discount is a positive value in changeBalances and anegative value on a change order record.

334

Flow Core Action for Order Management: Cancel Order ItemSummaries Submit

Order Management Invocable Actions

Page 345: Salesforce Order Management Developer Guide

DescriptionOutput Parameter

The changeOrderId field is the ID of the change order record created for the cancel.

The changeBalances field is an Apex-defined variable of classConnectApi.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 paymentsummaries related to the order summary. It is equal to the captured amount that is owed as a refund butis not associated with an invoice or credit memo. Excess funds normally occur when order products arecanceled before fulfillment but after payment is captured. This situation is not common in the US, wherefunds are normally authorized but not captured until the fulfillment process begins. This value includes allexcess 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 excessfunds and any outstanding change order grand total amounts that apply to post-fulfillment changes. Thisvalue includes all refundable amounts related to the order summary, not only the amount related to thecurrent action.

• totalTaxAmount — Change to the total tax.

UsageTo set up the Cancel Order Product Summary Items Input:

1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlagfield values on one or more ConnectApi.ChangeItemInputRepresentation variables.

2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to thechangeItems 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. Thendisplay its output for the user to review. When the user verifies the expected results, pass the same input to this action.

335

Flow Core Action for Order Management: Cancel Order ItemSummaries Submit

Order Management Invocable Actions

Page 346: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Create Credit Memo

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Create a credit memo to represent the refund for one or more change orders associated with anorder summary.

Drag an Action element onto the canvas. Select the Order Management category, and search forCreate Credit Memo.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInputParameter

This input is an Apex-defined variable of classConnectApi.CreateCreditMemoInputRepresentation.

The variable has one field, changeOrderIds, which is a list of IDs of thechange orders to create a credit memo for.

CreditMemoInput

Reference to the order summary associated with the change orders.OrderSummaryId

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class ConnectApi.CreateCreditMemoOutputRepresentation.

The creditMemoId field contains the ID of the created credit memo.

Credit MemoOutput

UsageTo set up the Credit Memo Input, first use Assignment elements to add the change order IDs to a list of strings variable. Then use thatvariable in the action input.

336

Flow Core Action for Order Management: Create Credit MemoOrder Management Invocable Actions

Page 347: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Create Fulfillment Order

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Create one or more fulfillment orders and fulfillment order products for an order delivery groupsummary, which defines a recipient and delivery method. You specify the order product summariesto fulfill and the fulfillment locations to handle them. If you specify multiple fulfillment locations, afulfillment order is created for each one.

Drag an Action element onto the canvas. Select the Order Management category, and search forCreate Fulfillment Order.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.FulfillmentOrderInputRepresentation.

The variable has three fields:

FulfillmentOrder Input

• fulfillmentGroups — A list of Apex-defined variables of classConnectApi.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 fulfillmenttype. 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 Typefield picklist on the Fulfillment Order object.

– orderItemSummaries — A list of Apex-defined variables of classConnectApi.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 associatedwith the order product summaries.

• orderSummaryId — Reference to the order summary associated with the order product summaries.

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class ConnectApi.FulfillmentOrderOutputRepresentation.

The fulfillmentOrderIds field is a list of IDs of the created fulfillment orders.

FulfillmentOrder Output

337

Flow Core Action for Order Management: Create FulfillmentOrder

Order Management Invocable Actions

Page 348: Salesforce Order Management Developer Guide

UsageTo set up the Fulfillment Order Input:

1. Use Assignment elements to set the orderItemSummaryId and quantity field values on one or moreConnectApi.OrderItemSummaryInputRepresentation variables for each fulfillment group.

2. Use Assignment elements to add the ConnectApi.OrderItemSummaryInputRepresentation variables to theorderItemSummaries 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 fulfillmentgroup variables.

4. Use Assignment elements to add the fulfillment group variables to the fulfillmentGroups field on aConnectApi.FulfillmentOrderInputRepresentation variable.

5. Use Assignment elements to set the orderDeliveryGroupSummaryId and orderSummaryId field values on theConnectApi.FulfillmentOrderInputRepresentation variable.

6. Use the ConnectApi.FulfillmentOrderInputRepresentation variable in the action input.

Flow Core Action for Order Management: Create an Invoice fromFulfillment Order

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Create an invoice for a fulfillment order that doesn’t have one.

Drag an Action element onto the canvas. Select the Order Management category, and search forCreate an Invoice from Fulfillment Order.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInputParameter

Reference to the fulfillment order that needs an invoice.FulfillmentOrder Id

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class ConnectApi.FulfillmentOrderInvoiceOutputRepresentation.

The invoiceId field contains the ID of the created invoice.

Invoicecreationoutput

338

Flow Core Action for Order Management: Create an Invoicefrom Fulfillment Order

Order Management Invocable Actions

Page 349: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Create Order PaymentSummary

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Create an order payment summary for a payment authorization or payments that use the samepayment method and are attached to the same order summary.

Drag an Action element onto the canvas. Select the Order Management category, and search forCreate Order Payment Summary.

Set Input ValuesUse values from earlier in the flow to set the inputs. Include at least one payment authorization orlist of payments; you don’t need both.

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.CreateOrderPaymentSummaryInputRepresentation.

The variable includes these fields:

Order PaymentSummaryCreate Input

• orderSummaryId — Reference to the order summary associated with the payments. In orgs with themulticurrency feature enabled, the order payment summary inherits the ISO Currency value fromthe order summary.

• paymentAuthorizationId — Reference to the payment authorization to associate with thesummary.

• paymentIds — List of IDs of the payments to associate with the summary.

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class ConnectApi.CreateOrderPaymentSummaryOutputRepresentation.

The orderPaymentSummaryId field contains the ID of the created order payment summary.

Order PaymentSummary Output

UsageTo set up the Order Payment Summary Create Input for payments, first use Assignment elements to add the payment IDs to a list ofstrings variable. Then use that variable in the action input.

339

Flow Core Action for Order Management: Create OrderPayment Summary

Order Management Invocable Actions

Page 350: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Create Order Summary

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Create an order summary based on an order. That order is considered the original order for theorder summary. Subsequent change orders that apply to the order summary are also representedas order records.

Drag an Action element onto the canvas. Select the Order Management category, and search forCreate Order Summary.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.OrderSummaryInputRepresentation.

The variable has four fields:

Order SummaryCreate Input

• 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 OrderManagement 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 defaultis 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 valueson the Status field of the Order Summary object.

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class OrderSummaryOutputRepresentation.

The orderSummaryId field contains the ID of the created order summary.

Order SummaryOutput

340

Flow Core Action for Order Management: Create OrderSummary

Order Management Invocable Actions

Page 351: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Create Return Order

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management andReturns

Create a return order and return order items for order items belonging to an order summary.

Drag an Action element onto the canvas. Select the Order Management category, and search forCreate Return Order.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInputParameter

This input is an Apex-defined variable of classConnectApi.ReturnOrderInputRepresentation.

The variable has four fields:

ReturnOrderInput

• orderSummaryId—ID of the order summary containing the items tobe returned. The order summary’s order life cycle type must be Managed.

• returnOrderLifeCycleType—The LifeCycleType of the returnorder. Possible values are:

– Managed—Process the return order using the actions and APIs. It cangenerate change orders and affects financial fields and rollup calculations.

– Unmanaged—The return order is for tracking purposes only. It isn’tinvolved in any financial calculations and doesn’t generate any changeorders. The system doesn’t prevent the creation of duplicate return orderline items in an unmanaged return order for the same order item.

• returnOrderLineItems—A list of Apex-defined variables of classConnectApi.ReturnOrderLineItemInputRepresentation. Each variable hasthese fields:

– canReduceShipping—Whether the associated shipping chargecan be refunded.

– orderItemSummaryId—ID of the associated OrderItemSummary.

– quantityExpected—Quantity expected to be returned.

– quantityReceived—(Optional) Quantity already physicallyreturned. This value isn’t used by any standard features, but is providedfor use in customizations.

– reasonForReturn—(Optional) Reason for the return. The valuemust match an entry in the ReturnOrderLineItem object’sReasonForReturn picklist.

• status—Status to assign to the return order. The value must match oneof the picklist values on the Status field of the Return Order object.

341

Flow Core Action for Order Management: Create Return OrderOrder Management Invocable Actions

Page 352: Salesforce Order Management Developer Guide

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class ConnectApi.ReturnOrderOutputRepresentation.

The returnOrderId field contains the ID of the created return order.

Return OrderOutput

UsageTo 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 moreConnectApi.ReturnOrderLineItemInputRepresentation variables.

2. Use an Assignment element to add the ConnectApi.ReturnOrderLineItemInputRepresentation variables tothe returnOrderLineItems field on a ConnectApi.ReturnOrderInputRepresentation variable.

3. Use Assignment elements to set the orderSummaryId, returnOrderLifeCycleType, and status field values onthe ConnectApi.ReturnOrderInputRepresentation variable.

4. Use the ConnectApi.ReturnOrderInputRepresentation variable in the action input.

Flow Core Action for Order Management: Ensure Funds Async

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sendinga request to a payment provider. This action inserts a background operation into an asynchronousjob queue and returns the ID of that operation so you can track its status. Payment gateway responsesappear in the payment gateway log and do not affect the background operation status.

Drag an Action element onto the canvas. Select the Order Management category, and search forEnsure Funds Async.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.EnsureFundsAsyncInputRepresentation.

The variable has one field, invoiceId, which is the ID of the invoice to ensure funds for and apply them to.

Ensure FundsAsync Input

Reference to the order summary associated with the invoice.Order SummaryId

342

Flow Core Action for Order Management: Ensure Funds AsyncOrder Management Invocable Actions

Page 353: Salesforce Order Management Developer Guide

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class EnsureFundsAsyncOutputRepresentation. It only returns the IDof the asynchronous background operation, regardless of whether a call is made to an external paymentgateway. It doesn’t include any errors from the operation.

The backgroundOperationId field contains the ID of the background operation.

Ensure FundsAsync Output

UsageThis action checks the order payment summaries associated with the specified order summary for funds to pay the invoice balance asfollows:

Note: If multiple order payment summaries have equal amounts, 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. Look for an order payment summary with a captured amount equal to the invoice balance. If one exists, apply those funds.

3. If no exact match was found, identify all order payment summaries with captured amounts greater than the invoice balance. If anyexist, select the smallest one and apply funds from it equal to the invoice balance.

4. If no captured amounts greater than the invoice balance were found, traverse the order payment summaries in order of capturedamount, from largest to smallest. Apply each captured amount to the invoice until the invoice balance is zero or all captured fundsare applied.

5. If the invoice still has a balance, look for an order payment summary with an authorized amount equal to the remaining invoicebalance. If one exists, capture and apply those funds.

6. If no exact match was found, identify all order payment summaries with authorized amounts greater than the invoice balance. Ifany exist, select the smallest one and apply funds from it equal to the invoice balance.

7. If no authorized amounts greater than the invoice balance were found, traverse the order payment summaries in order of authorizedamount, from largest to smallest. Capture and apply funds until the invoice balance is zero.

Flow Core Action for Order Management: Ensure Refunds Async

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. Thisaction inserts a background operation into an asynchronous job queue and returns the ID of thatoperation so you can track its status. Payment gateway responses appear in the payment gatewaylog and do not affect the background operation status.

Drag an Action element onto the canvas. Select the Order Management category, and search forEnsure Refunds Async.

Set Input ValuesUse values from earlier in the flow to set the inputs.

343

Flow Core Action for Order Management: Ensure RefundsAsync

Order Management Invocable Actions

Page 354: Salesforce Order Management Developer Guide

DescriptionInput Parameter

This input is an Apex-defined variable of class ConnectApi.EnsureReundsAsyncInputRepresentation.

The variable has two fields. You must specify at least one of them.

EnsureRefunds AsyncInput

• creditMemoId — The ID of the credit memo to ensure refunds for.

• excessFundsAmount — The amount of excess funds to apply the refunds against.

Reference to the order summary associated with the credit memo.Order SummaryId

Store Output Values

DescriptionOutput Parameter

This value is an Apex-defined variable of class EnsureRefundsAsyncOutputRepresentation It only returns theID of the asynchronous background operation, regardless of whether a call is made to an external paymentgateway. It doesn’t include any errors from the operation.

The backgroundOperationId field contains the ID of the background operation.

Ensure RefundsAsync Output

UsageThis action checks the order payment summaries associated with the specified order summary for amounts to refund following thislogic:

Note: If multiple order payment summaries have equal amounts, their order of selection is random.

1. If a credit memo is specified, identify order payment summaries with captured amounts that were applied to the correspondinginvoice.

a. Examine those order payment summaries. If one has a captured amount matching the credit memo amount, apply the refundto that payment.

b. If no exact match was found, look for captured amounts greater than the credit memo amount. If any exist, apply the refund tothe smallest one.

c. If no greater amounts were found, traverse the order payment summaries in order of captured amount, from largest to smallest.Apply the refund to them until it’s fully applied.

2. If an excess funds amount is specified, identify order payment summaries with captured amounts that weren’t applied to any invoice.

a. Examine those order payment summaries. If one has a captured amount matching the excess funds amount, apply the refundto that payment.

b. If no exact match was found, look for captured amounts greater than the excess funds amount. If any exist, apply the refund tothe smallest one.

c. If no greater amounts were found, traverse the order payment summaries in order of captured amount, from largest to smallest.Apply the refund to them until it’s fully applied.

344

Flow Core Action for Order Management: Ensure RefundsAsync

Order Management Invocable Actions

Page 355: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Return Order Item SummariesPreview

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Preview the expected results of returning one or more order product summaries from an ordersummary without executing the return. The output of this action contains the values that wouldbe set on the change order created by submitting the proposed return.

Drag an Action element onto the canvas. Select the Order Management category, and search forReturn Order Item Summaries Preview.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

Reference to the order summary that you want to preview returning order product summaries from.Order SummaryId

This input is an Apex-defined variable of class ConnectApi.ChangeInputRepresentation.

The variable has one field, changeItems. This field is a list of Apex-defined variables of classConnectApi.ChangeItemInputRepresentation. Each of the variables includes these fields:

Return OrderProductSummary ItemsInput

• orderItemSummaryId — ID of an order product summary to return. It can’t be a shipping chargeproduct.

• quantity — Quantity to return.

• reason — Return reason. The value must match one of the picklist values on the Reason field of theOrder Product Summary Change object.

• shippingReductionFlag — Boolean flag that specifies whether to prorate any related deliverycharge based on the price change.

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.PreviewCancelOutputRepresentation, whichcontains the values that would populate a change order record for the proposed return.

Return OrderProductSummary ItemsOutput

Note: The sign of a value in the changeBalances field is the opposite of the corresponding valueon a change order record. For example, a discount is a positive value in changeBalances and anegative 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 classConnectApi.ChangeItemOutputRepresentation, which includes these fields:

• grandTotalAmount — Change to the total with tax.

• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.

345

Flow Core Action for Order Management: Return Order ItemSummaries Preview

Order Management Invocable Actions

Page 356: Salesforce Order Management Developer Guide

DescriptionOutput Parameter

• 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 paymentsummaries related to the order summary. It is equal to the captured amount that is owed as a refund butis not associated with an invoice or credit memo. Excess funds normally occur when order products arecanceled before fulfillment but after payment is captured. This situation is not common in the US, wherefunds are normally authorized but not captured until the fulfillment process begins. This value includes allexcess 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 excessfunds and any outstanding change order grand total amounts that apply to post-fulfillment changes. Thisvalue includes all refundable amounts related to the order summary, not only the amount related to thecurrent action.

• totalTaxAmount — Change to the total tax.

UsageTo set up the Return Order Product Summary Items Input:

1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlagfield values on one or more ConnectApi.ChangeItemInputRepresentation variables.

2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to thechangeItems 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, 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.

346

Flow Core Action for Order Management: Return Order ItemSummaries Preview

Order Management Invocable Actions

Page 357: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Return Order Item SummariesSubmit

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management

Return one or more order product summaries from an order summary. This action creates a changeorder record.

Drag an Action element onto the canvas. Select the Order Management category, and search forReturn Order Item Summaries Submit.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInputParameter

Reference to the order summary that you want to return order product summariesfrom.

OrderSummaryId

This input is an Apex-defined variable of classConnectApi.ChangeInputRepresentation.

The variable has one field, changeItems. This field is a list of Apex-definedvariables of class ConnectApi.ChangeItemInputRepresentation. Each of thevariables includes these fields:

ReturnOrderProductSummaryItemsInput

• 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 valueson the Reason field of the Order Product Summary Change object.

• shippingReductionFlag — Boolean flag that specifies whether toprorate any related delivery charge based on the price change.

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.SubmitReturnOutputRepresentation.Return OrderProduct

Note: The sign of a value in the changeBalances field is the opposite of the corresponding valueon a change order record. For example, a discount is a positive value in changeBalances and anegative value on a change order record.

Summary ItemsOutput

The changeOrderId field is the ID of the change order record created for the return.

The changeBalances field is an Apex-defined variable of classConnectApi.ChangeItemOutputRepresentation, which includes these fields:

347

Flow Core Action for Order Management: Return Order ItemSummaries Submit

Order Management Invocable Actions

Page 358: Salesforce Order Management Developer Guide

DescriptionOutput Parameter

• 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 paymentsummaries related to the order summary. It is equal to the captured amount that is owed as a refund butis not associated with an invoice or credit memo. Excess funds normally occur when order products arecanceled before fulfillment but after payment is captured. This situation is not common in the US, wherefunds are normally authorized but not captured until the fulfillment process begins. This value includes allexcess 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 excessfunds and any outstanding change order grand total amounts that apply to post-fulfillment changes. Thisvalue includes all refundable amounts related to the order summary, not only the amount related to thecurrent action.

• totalTaxAmount — Change to the total tax.

UsageTo set up the Return Order Product Summary Items Input:

1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlagfield values on one or more ConnectApi.ChangeItemInputRepresentation variables.

2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to thechangeItems 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. Thendisplay its output for the user to review. When the user verifies the expected results, pass the same input to this action.

348

Flow Core Action for Order Management: Return Order ItemSummaries Submit

Order Management Invocable Actions

Page 359: Salesforce Order Management Developer Guide

Flow Core Action for Order Management: Return Return Order Items

EDITIONS

Available in: LightningExperience

Available in: Enterprise,Unlimited, and DeveloperEditions with SalesforceOrder Management andReturns

Process one or more return order line items belonging to a return order. This action creates a changeorder record and makes the processed return order line items read-only. If a processed return orderline item has any remaining expected quantity, then the action creates a separate return order lineitem representing that quantity.

Drag an Action element onto the canvas. Select the Order Management category, and search forReturn Return Order Items.

Set Input ValuesUse values from earlier in the flow to set the inputs.

DescriptionInput Parameter

Reference to the return order that you want to process return order line items from.Return OrderId

This input is an Apex-defined variable of class ConnectApi.ReturnItemsInputRepresentation. It has two fields.

The returnOrderItemDeliveryCharges field is an optional list of Apex-defined variables of classConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation. Each of the variables includes one field:

Return ItemsInput

• 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 classConnectApi.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 incustomizations.

• quantityRejected—(Optional) The quantity of the return order line item that has been rejected forreturn. The value must be zero or greater. This value isn’t used by any standard features, but is provided foruse in customizations.

• quantityReturned—The quantity of the return order line item that has been returned. The valuemust 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 notbeing returned. The value must be zero or greater. If this value plus quantityReturned is less than theexpected return quantity, then the remaining quantity to be returned is added to a new return order lineitem.

• reasonForRejection—(Optional) The reason why the rejected quantity, if any, was rejected. Thisvalue isn’t used by any standard features, but is provided for use in customizations.

• returnOrderLineItemId—The return order line item ID.

349

Flow Core Action for Order Management: Return Return OrderItems

Order Management Invocable Actions

Page 360: Salesforce Order Management Developer Guide

Store Output Values

DescriptionOutput Parameter

This output is an Apex-defined variable of class ConnectApi.ReturnItemsOutputRepresentation. It has twofields.

The changeOrderId field is the ID of the change order record created for the return.

Return ItemsOutput

The returnLineItemSplits field is a list of Apex-defined variables of classConnectApi.ReturnOrderItemSplitLineOutputRepresentation, which includes these fields:

• newReturnOrderItemId—ID of the new return order line item that holds the remaining returnquantity.

• 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 theremaining quantity to be returned. In that case, it returns the IDs of the original and split return orderline items in an element of the returnLineItemSplits output list property.

UsageTo 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 moreConnectApi.ReturnOrderItemInputRepresentation variables.

2. Use Assignment elements to set the returnOrderLineItemId field value on one or moreConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation variables.

3. Use an Assignment element to add the ConnectApi.ReturnOrderItemInputRepresentation variables to thereturnOrderItems field on a ConnectApi.ReturnItemsInputRepresentation variable.

4. Use an Assignment element to add the ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentationvariables to the returnOrderItemDeliveryCharges field on aConnectApi.ReturnItemsInputRepresentation variable.

5. Use the ConnectApi.ReturnItemsInputRepresentation variable and the return order ID in the action input.

350

Flow Core Action for Order Management: Return Return OrderItems

Order Management Invocable Actions

Page 361: Salesforce Order Management Developer Guide

CHAPTER 6 Salesforce Order Management Platform Events

Salesforce Order Management includes standard platform events. Processes, flows, and the StreamingAPI can subscribe to them.

In this chapter ...

• FOStatusChangedEvent

• OrderSummaryCreatedEvent

• OrderSumStatusChangedEvent

351

Page 362: Salesforce Order Management Developer Guide

FOStatusChangedEvent

Notifies subscribers of changes to the status of a fulfillment order record. Use this event to trigger flows and processes in your orderworkflow. This object is available in API version 48.0 and later.

Supported CallsdescribeSObjects()

Supported Subscribers

Supported?Subscriber

Apex Triggers

Flows

Processes

Streaming API (CometD)

Streaming API Subscription Channel/event/FOStatusChangedEvent

Special Access RulesFOStatusChangedEvent is available as part of Salesforce Order Management.

Fields

DetailsField

Typestring

EventUuid

PropertiesNillable

DescriptionA universally unique identifier (UUID) that identifies a platform event message. This field isavailable in API version 52.0 and later.

Typereference

FulfillmentOrderId

PropertiesNillable

352

FOStatusChangedEventSalesforce Order Management Platform Events

Page 363: Salesforce Order Management Developer Guide

DetailsField

DescriptionID of the FulfillmentOrder whose status changed.

This value is functionally required, but is nillable because fulfillment order records can bedeleted to comply with data protection and privacy requirements.

Typepicklist

NewStatus

PropertiesNone

DescriptionRequired. The new value of the Status field on the FulfillmentOrder.

Possible values are defined by the Status field picklist on the FulfillmentOrder object.

Typepicklist

NewStatusCategory

PropertiesRestricted picklist

DescriptionRequired. The new value of the StatusCategory field on the FulfillmentOrder.

Possible values are:

• Activated

• Cancelled

• Closed

• Draft

• Fulfilling

Typepicklist

OldStatus

PropertiesNillable

DescriptionThe previous value of the Status field on the FulfillmentOrder.

Possible values are defined by the Status field picklist on the FulfillmentOrder object.

Typepicklist

OldStatusCategory

PropertiesNillable, Restricted picklist

DescriptionThe previous value of the StatusCategory field on the FulfillmentOrder.

353

FOStatusChangedEventSalesforce Order Management Platform Events

Page 364: Salesforce Order Management Developer Guide

DetailsField

Possible values are:

• Activated

• Cancelled

• Closed

• Draft

• Fulfilling

Typereference

OrderSummaryId

PropertiesNillable

DescriptionID of the OrderSummary associated with the FulfillmentOrder.

Typestring

ReplayId

PropertiesNillable

DescriptionRepresents an ID value that is populated by the system and refers to the position of the eventin the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutiveevents. A subscriber can store a replay ID value and use it on resubscription to retrieve missedevents 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 CallsdescribeSObjects()

Supported Subscribers

Supported?Subscriber

Apex Triggers

Flows

Processes

354

OrderSummaryCreatedEventSalesforce Order Management Platform Events

Page 365: Salesforce Order Management Developer Guide

Supported?Subscriber

Streaming API (CometD)

Streaming API Subscription Channel/event/OrderSummaryCreatedEvent

Special Access RulesOrderSummaryCreatedEvent is available as part of Salesforce Order Management.

Fields

DetailsField

Typestring

EventUuid

PropertiesNillable

DescriptionA universally unique identifier (UUID) that identifies a platform event message. This field isavailable in API version 52.0 and later.

Typereference

OrderId

PropertiesNillable

DescriptionID of the original order associated with the created OrderSummary.

Typereference

OrderSummaryId

PropertiesNillable

DescriptionID of the created OrderSummary

Typestring

ReplayId

PropertiesNillable

355

OrderSummaryCreatedEventSalesforce Order Management Platform Events

Page 366: Salesforce Order Management Developer Guide

DetailsField

DescriptionRepresents an ID value that is populated by the system and refers to the position of the eventin the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutiveevents. A subscriber can store a replay ID value and use it on resubscription to retrieve missedevents 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 orderworkflow. This object is available in API version 48.0 and later.

Supported CallsdescribeSObjects()

Supported Subscribers

Supported?Subscriber

Apex Triggers

Flows

Processes

Streaming API (CometD)

Streaming API Subscription Channel/event/OrderSumStatusChangedEvent

Special Access RulesOrderSumStatusChangedEvent is available as part of Salesforce Order Management.

Fields

DetailsField

Typestring

EventUuid

356

OrderSumStatusChangedEventSalesforce Order Management Platform Events

Page 367: Salesforce Order Management Developer Guide

DetailsField

PropertiesNillable

DescriptionA universally unique identifier (UUID) that identifies a platform event message. This field isavailable in API version 52.0 and later.

Typepicklist

NewStatus

PropertiesDefaulted on create

DescriptionRequired. The new value of the Status field on the OrderSummary.

Possible values are based on the OrderSummary statuses defined in your org.

Typepicklist

OldStatus

PropertiesDefaulted on create

DescriptionRequired. The previous value of the Status field on the OrderSummary.

Possible values are based on the OrderSummary statuses defined in your org.

Typereference

OrderId

PropertiesNillable

DescriptionID of the original order associated with the OrderSummary.

Typereference

OrderSummaryId

PropertiesNillable

DescriptionThe ID of the OrderSummary that changed.

This value is functionally required, but is nillable because order summary records can bedeleted to comply with data protection and privacy requirements.

Typestring

ReplayId

357

OrderSumStatusChangedEventSalesforce Order Management Platform Events

Page 368: Salesforce Order Management Developer Guide

DetailsField

PropertiesNillable

DescriptionRepresents an ID value that is populated by the system and refers to the position of the eventin the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutiveevents. A subscriber can store a replay ID value and use it on resubscription to retrieve missedevents that are within the retention window.

358

OrderSumStatusChangedEventSalesforce Order Management Platform Events

Page 369: Salesforce Order Management Developer Guide

CHAPTER 7 Salesforce Order Management LightningComponents

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 OrderSummary record page. This component is available in Salesforce Order Management.

The Order Product Summaries by Recipient component displays information about the order deliverygroup summaries associated with the order summary, including the order product summaries associatedwith them.

The displayed order product summary fields are defined by the Order Product Summaries related list onthe OrderDeliveryGroup object page layout. To modify the columns in this component on the ordersummary details page, edit the related list on the Order Delivery Group page layout, not the OrderSummary 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 recordpage. This component is available in Salesforce Order Management.

You can customize the panel title and which values to display.

359

Page 370: Salesforce Order Management Developer Guide

CHAPTER 8 API End-of-Life

Salesforce is committed to supporting each API version for a minimum of three years from the date offirst release. In order to mature and improve the quality and performance of the API, versions that aremore than three years old might cease to be supported.

When an API version is to be deprecated, advance notice is given at least one year before support ends.Salesforce will directly notify customers using API versions planned for deprecation.

360