Order Management Developer Guide
Order Management Developer Guide
Developer Guide
Version 52.0, Summer ’21
@salesforcedocs
Last updated: July 29, 2021
© Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,
as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
ConnectApi.ChangeItemOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
ConnectApi.CreateCreditMemoOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 217
ConnectApi.CreateOrderPaymentSummaryOutputRepresentation . . . . . . . . . . . . . . . . 217
ConnectApi.DistanceCalculationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 217
ConnectApi.EnsureFundsAsyncOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 218
ConnectApi.EnsureRefundsAsyncOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 218
ConnectApi.ErrorResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation . . . . . . . . . . . . . . . . . . 218
ConnectApi.FulfillmentGroupOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 219
ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation . . . . . . . . . . . . . . . 219
ConnectApi.FulfillmentOrderInvoiceOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 219
ConnectApi.FulfillmentOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 219
ConnectApi.LocationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation . . . . . . . . . . . . . . . 220
ConnectApi.MultipleFulfillmentOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . 220
ConnectApi.OCIBaseOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
ConnectApi.OCICreateReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . . 221
ConnectApi.OCICreateReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . 221
ConnectApi.OCICreateReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . . 221
ConnectApi.OCIFulfillReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . . . 222
ConnectApi.OCIFulfillReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 222
ConnectApi.OCIFulfillReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . . . 222
ConnectApi.OCIFutureInventoryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . 223
ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . . 223
ConnectApi.OCIInventoryRecordOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 223
ConnectApi.OCILocationAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 224
ConnectApi.OCILocationGroupAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . . 224
ConnectApi.OCIPublishLocationStructureOutputRepresentation . . . . . . . . . . . . . . . . . 224
ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation . . . . . . . . . . . . . 224
ConnectApi.OCIReleaseReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . . 225
ConnectApi.OCIReleaseReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 225
ConnectApi.OCIReleaseReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . . 225
ConnectApi.OCITransferReservationErrorOutputRepresentation . . . . . . . . . . . . . . . . . 226
ConnectApi.OCITransferReservationOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 226
ConnectApi.OCITransferReservationSingleOutputRepresentation . . . . . . . . . . . . . . . . 226
ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation . . . . . . . . . . . . . . . . 227
ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation . . . . . . . . . . . 227
ConnectApi.OrderItemSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.OrderSummaryOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.PreviewCancelOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.PreviewReturnOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
ConnectApi.RankAverageDistanceOutputRepresentation . . . . . . . . . . . . . . . . . . . . . 229
ConnectApi.ReturnItemsOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
ConnectApi.ReturnOrderItemSplitLineOutputRepresentation . . . . . . . . . . . . . . . . . . . . 229
Contents
ConnectApi.ReturnOrderOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
ConnectApi.SubmitCancelOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
ConnectApi.SubmitReturnOutputRepresentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Flow Core Action for Order Management: Create Order Summary . . . . . . . . . . . . . . . . . . . 328
Flow Core Action for Order Management: Create Return Order . . . . . . . . . . . . . . . . . . . . . 329
Flow Core Action for Order Management: Ensure Funds Async . . . . . . . . . . . . . . . . . . . . . 330
Flow Core Action for Order Management: Ensure Refunds Async . . . . . . . . . . . . . . . . . . . . 331
Flow Core Action for Order Management: Return Order Item Summaries Preview . . . . . . . . . 332
Flow Core Action for Order Management: Return Order Item Summaries Submit . . . . . . . . . 334
Flow Core Action for Order Management: Return Return Order Items . . . . . . . . . . . . . . . . . 336
1
CHAPTER 2 Order Management Standard Objects
In this chapter ... Salesforce Order Management and Omnichannel Inventory include these standard objects.
• FulfillmentOrder
• FulfilmentOrderItemAdjustment
• FulfillmentOrderItemTax
• FulfillmentOrderLineItem
• Location
• LocationGroup
• LocationGroupAssignment
• OrderAdjustmentGroupSummary
• OrderDeliveryGroupSummary
• OrderItemAdjustmentLineSummary
• OrderItemSummary
• OrderItemSummaryChange
• OrderItemTaxLineItemSummary
• OrderPaymentSummary
• OrderSummary
• OrderSummaryRoutingSchedule
• ProcessException
• ReturnOrder
• ReturnOrderItemAdjustment
• ReturnOrderItemTax
• ReturnOrderLineItem
• SalesChannel
• Shipment
• ShipmentItem
• Order Summary
Entity Relationship
Diagram
• Salesforce B2C
Commerce Storefront
Order Data Map
• Import Existing Data
2
Order Management Standard Objects FulfillmentOrder
FulfillmentOrder
Represents a group of products and delivery charges on a single order that share the same fulfillment location, delivery method, and
recipient. The FulfillmentOrderLineItems belonging to a FulfillmentOrder are associated with OrderItemSummary objects belonging to
a single OrderSummary. This object is available in API version 48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Details
AccountId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the Account or Person Account associated with the FulfillmentOrder. It represents the
shopper in the storefront.
BillToContactId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the Contact associated with the FulfillmentOrder. It represents the shopper in the
storefront when not using person accounts.
This field is available in API version 49.0 and later.
CurrencyIsoCode Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
ISO code for the currency of the OrderSummary associated with the FulfillmentOrder. The
default value is USD.
Possible values are:
3
Order Management Standard Objects FulfillmentOrder
Field Details
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
DeliveryMethodId Type
reference
Properties
Create, Filter, Group, Sort, Update
Description
ID of the DeliveryMethod used for this FulfillmentOrder.
FulfilledFromLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the Location handling this FulfillmentOrder.
FulfilledToAddress Type
address
Properties
Filter, Nillable
Description
Address of the recipient.
FulfilledToCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address city.
FulfilledToCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address country.
4
Order Management Standard Objects FulfillmentOrder
Field Details
FulfilledToEmailAddress Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address of the recipient.
FulfilledTo Type
GeocodeAccuracy picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy of the geocode for the recipient address.
Possible values are:
• Address
• Block
• City
• County
• ExtendedZip
• NearAddress
• Neighborhood
• State
• Street
• Unknown
• Zip
FulfilledToLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with FulfilledToLongitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.
FulfilledToLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
5
Order Management Standard Objects FulfillmentOrder
Field Details
Description
Used with FulfilledToLatitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.
FulfilledToName Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Name on the recipient address.
FulfilledToPhone Type
phone
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Phone number of the recipient.
FulfilledToPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address postal code.
FulfilledToState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address state.
FulfilledToStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address street.
FulfillmentOrderNumber Type
string
6
Order Management Standard Objects FulfillmentOrder
Field Details
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrder.
GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the products and delivery charges on the
FulfillmentOrder. This amount includes all FulfillmentOrderLineItems associated with the
FulfillmentOrder. This amount is equal to TotalAmount + TotalTaxAmount.
InvoiceId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the Invoice associated with the FulfillmentOrder.
IsSuspended Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the FulfillmentOrder is suspended. The default value is false.
ItemCount Type
double
Properties
Filter, Nillable, Sort
Description
Sum of the quantities of the FulfillmentOrderLineItems included in the FulfillmentOrder.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed a record related to this record.
7
Order Management Standard Objects FulfillmentOrder
Field Details
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed this record. A null value can mean that this
record has only been referenced (LastReferencedDate) and not viewed.
OrderId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the original Order that generated the FulfillmentOrder.
OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderSummary associated with the FulfillmentOrder.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the User who currently owns this FulfillmentOrder. Default value is the User logged in
to the API to perform the create.
Status Type
picklist
Properties
Create, Filter, Group, Sort, Update
Description
Status of the FulfillmentOrder. Each status corresponds to one status category, shown here
in parentheses. You can customize the status picklist to represent your business processes,
but the status category picklist is fixed because processing is based on those values. If you
customize the status picklist, include at least one status value for each status category.
Default values are:
• Allocated (Activated)
8
Order Management Standard Objects FulfillmentOrder
Field Details
• Assigned (Fulfilling)
• Cancelled (Cancelled)
• Draft (Draft)
• Fulfilled (Closed)
• Pickpack (Fulfilling)
StatusCategory Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Status category of the FulfillmentOrder. Processing of the FulfillmentOrder depends on this
value. Each status category corresponds to one or more statuses.
Possible values are:
• ACTIVATED—Activated
• CANCELLED—Cancelled
• CLOSED—Closed
• DRAFT—Draft
• FULFILLING—Fulfilling
TaxLocaleType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The system used to handle tax on the original Order associated with the FulfillmentOrder.
Gross usually applies to taxes like value-added tax (VAT), and Net usually applies to taxes like
sales tax.
Possible values are:
• Gross (displays most prices and taxes as combined values)
• Net (displays most prices and taxes as separate values)
This field is available in API version 49.0 and later.
TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the FulfillmentOrder. This
value only includes adjustments to FulfillmentOrderLineItems of type code Product.
9
Order Management Standard Objects FulfillmentOrder
Field Details
TotalAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the FulfillmentOrder,
inclusive of tax. This value only includes adjustments to FulfillmentOrderLineItems of type
code Product. This amount is equal to TotalAdjustmentAmount +
TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjustmentTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Adjusted total, not including tax, of the FulfillmentOrderLineItems, including products and
delivery charges, on the FulfillmentOrder.
TotalDelivery Type
AdjustAmount currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the FulfillmentOrder.
This value only includes adjustments to FulfillmentOrderLineItems of type code Charge.
TotalDeliveryAdjust Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the FulfillmentOrder,
inclusive of tax. This value only includes adjustments to FulfillmentOrderLineItems of type
10
Order Management Standard Objects FulfillmentOrder
Field Details
code Charge. This amount is equal to TotalDeliveryAdjustAmount +
TotalDeliveryAdjustTaxAmount.
This field is available in API version 49.0 and later.
TotalDelivery Type
AdjustTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAdjustAmount.
TotalDeliveryAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the delivery charges on the FulfillmentOrder. This value only includes
FulfillmentOrderLineItems of type code Charge.
TotalDeliveryAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the delivery charges on the FulfillmentOrder, inclusive of tax. This value only
includes FulfillmentOrderLineItems of type code Charge. This amount is equal to
TotalDeliveryAmount + TotalDeliveryTaxAmount.
This field is available in API version 49.0 and later.
TotalDeliveryTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAmount.
TotalProductAmount Type
currency
Properties
Filter, Nillable, Sort
11
Order Management Standard Objects FulfillmentOrder
Field Details
Description
Total price of the products on the FulfillmentOrder. This value only includes
FulfillmentOrderLineItems of type code Product.
TotalProductAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the products on the FulfillmentOrder, inclusive of tax. This value only includes
FulfillmentOrderLineItems of type code Product. This amount is equal to TotalProductAmount
+ TotalProductTaxAmount.
This field is available in API version 49.0 and later.
TotalProductTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAmount.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.
Type Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Type of the FulfillmentOrder. Each type corresponds to one type category, shown here in
parentheses. You can customize the type picklist to represent your business processes, but
the type category picklist is fixed because processing is based on those values. If you customize
the type picklist, include at least one type value for each type category.
Default values are:
• Download (Digital)
• Email (Digital)
• In Store Pickup (Physical)
12
Order Management Standard Objects FulfillmentOrderItemAdjustment
Field Details
• Retail Store (Physical)
• Supplier (Drop Ship)
• Warehouse (Physical)
TypeCategory Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type category of the FulfillmentOrder. Processing of the FulfillmentOrder depends on this
value. Each type category corresponds to one or more types.
Possible values are:
• DIGITAL—Digital
• DROPSHIP—Drop Ship
• PHYSICAL—Physical
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
FulfillmentOrderFeed
Feed tracking is available for the object.
FulfillmentOrderOwnerSharingRule
Sharing rules are available for the object.
FulfillmentOrderShare
Sharing is available for the object.
SEE ALSO:
FulfillmentOrderLineItem
OrderSummary
FulfillmentOrderItemAdjustment
Represents a price adjustment on a FulfillmentOrderLineItem. Corresponds to an OrderItemAdjustmentLineSummary associated with
the corresponding OrderItemSummary. This object is available in API version 48.0 and later.
This object is used for calculations and doesn’t have a default record page.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()
13
Order Management Standard Objects FulfillmentOrderItemAdjustment
Fields
Field Details
Amount Type
currency
Properties
Create, Filter, Sort
Description
Amount, not including tax, of the adjustment.
CampaignName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Campaign associated with the adjustment.
CouponName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Coupon associated with the adjustment.
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the FulfillmentOrderLineItem to which the adjustment applies.
The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
14
Order Management Standard Objects FulfillmentOrderItemAdjustment
Field Details
Description Type
textarea
Properties
Create, Nillable, Update
Description
Text description of the adjustment.
FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the FulfillmentOrder associated with the FulfillmentOrderLineItem to which the
adjustment applies.
FulfillmentOrderItem Type
AdjustmentNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrderLineItemAdjustment.
FulfillmentOrder Type
LineItemId reference
Properties
Create, Filter, Group, Sort
Description
ID of the FulfillmentOrderLineItem to which this adjustment applies.
OrderItemAdjust Type
LineSummaryId reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderItemAdjustmentLineSummary associated with the adjustment.
PromotionName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
15
Order Management Standard Objects FulfillmentOrderItemTax
Field Details
Description
Promotion associated with the adjustment.
TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +
TotalTaxAmount.
This field is available in API version 49.0 and later.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the Amount.
SEE ALSO:
FulfillmentOrder
FulfillmentOrderItemTax
FulfillmentOrderLineItem
OrderItemAdjustmentLineSummary
FulfillmentOrderItemTax
Represents the tax on a FulfillmentOrderLineItem or FulfillmentOrderItemAdjustment. Corresponds to an OrderItemTaxLineItemSummary.
This object is available in API version 48.0 and later.
This object is used for calculations and doesn’t have a default record page.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()
16
Order Management Standard Objects FulfillmentOrderItemTax
Fields
Field Details
Amount Type
currency
Properties
Create, Filter, Sort
Description
Amount of tax represented by the FulfillmentOrderItemTax.
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the FulfillmentOrderLineItem to which the tax applies. The
default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the FulfillmentOrderItemTax.
FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the associated FulfillmentOrder.
FulfillmentOrder Type
ItemAdjustId reference
Properties
Create, Filter, Group, Nillable, Sort
17
Order Management Standard Objects FulfillmentOrderItemTax
Field Details
Description
If this object represents tax on an adjustment, this value is the ID of the
FulfillmentOrderItemAdjustment to which the tax applies. If this value is null, the adjustment
applies to a FulfillmentOrderLineItem.
FulfillmentOrderItem Type
TaxNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrderItemTax.
FulfillmentOrder Type
LineItemId reference
Properties
Create, Filter, Group, Sort
Description
If this object represents tax on a FulfillmentOrderLineItem, this value is the ID of that
FulfillmentOrderLineItem. If this object represents tax on an adjustment, this value is the ID
of the FulfillmentOrderLineItem to which the adjustment applies.
OrderItemTaxLineItem Type
SummaryId reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderItemTaxLineItemSummary associated with the OrderItemSummary that
corresponds to the FulfillmentOrderLineItem to which the tax applies.
Rate Type
percent
Properties
Create, Filter, Nillable, Sort, Update
Description
Tax rate used to calculate the Amount.
TaxEffectiveDate Type
date
Properties
Create, Filter, Group, Sort, Update
Description
Date on which the Amount was calculated. Important due to tax rate changes over time.
18
Order Management Standard Objects FulfillmentOrderLineItem
Field Details
Type Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Indicates whether the Amount is actual or estimated.
Possible values are:
• Actual
• Estimated
SEE ALSO:
FulfillmentOrder
FulfillmentOrderItemAdjustment
FulfillmentOrderLineItem
OrderItemTaxLineItemSummary
FulfillmentOrderLineItem
Represents a product or delivery charge belonging to a FulfillmentOrder. Corresponds to an OrderItemSummary. This object is available
in API version 48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()
Fields
Field Details
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
19
Order Management Standard Objects FulfillmentOrderLineItem
Field Details
Description
ISO code for the currency of the FulfillmentOrder associated with the FulfillmentOrderLineItem.
The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the FulfillmentOrderLineItem.
EndDate Type
dateTime
Properties
Create, Filter, Nillable, Sort
Description
End date of the FulfillmentOrderLineItem.
FulfillmentOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the FulfillmentOrder associated with the FulfillmentOrderLineItem.
FulfillmentOrder Type
LineItemNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the FulfillmentOrderLineItem.
GrossUnitPrice Type
currency
20
Order Management Standard Objects FulfillmentOrderLineItem
Field Details
Properties
Create, Filter, Nillable, Sort
Description
Unit price, including tax, of the FulfillmentOrderLineItem. This value is equal to TotalPrice +
TotalTaxAmount.
This field is available in API version 49.0 and later.
OrderItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the original OrderItem for the OrderItemSummary associated with the
FulfillmentOrderLineItem.
OrderItemSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the OrderItemSummary associated with the FulfillmentOrderLineItem.
OriginalQuantity Type
double
Properties
Create, Filter, Sort
Description
Original quantity of the FulfillmentOrderLineItem.
Product2Id Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the product represented by the FulfillmentOrderLineItem.
Quantity Type
double
Properties
Create, Filter, Sort, Update
21
Order Management Standard Objects FulfillmentOrderLineItem
Field Details
Description
Current quantity of the FulfillmentOrderLineItem. Equal to the original quantity minus any
canceled quantity.
QuantityUnitOfMeasure Type
string
Properties
Create, Filter, Group, Nillable, Sort
Description
Unit of measure of the quantity, for example: unit, gallon, ton, or case.
ServiceDate Type
dateTime
Properties
Create, Filter, Nillable, Sort
Description
Service or start date of the FulfillmentOrderLineItem.
TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of any price adjustments applied to the FulfillmentOrderLineItem.
TotalAdjustment Type
AmountWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the FulfillmentOrderLineItem, inclusive of
tax. This amount is equal to TotalAdjustmentAmount + TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjustment Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.
22
Order Management Standard Objects FulfillmentOrderLineItem
Field Details
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the FulfillmentOrderLineItem.
TotalLineAmount Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort
Description
Total, not including adjustments or tax, of the FulfillmentOrderLineItem.
TotalLineAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the FulfillmentOrderLineItem, inclusive of tax. This amount is equal to
TotalLineAmount + TotalLineTaxAmount.
This field is available in API version 49.0 and later.
TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.
TotalPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the FulfillmentOrderLineItem. Equal to UnitPrice
times Quantity.
TotalTaxAmount Type
currency
23
Order Management Standard Objects FulfillmentOrderLineItem
Field Details
Properties
Filter, Nillable, Sort
Description
Tax on the TotalPrice.
Type Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
Type of the FulfillmentOrderLineItem. Matches the type of the associated OrderItemSummary.
Delivery Charge indicates that the FulfillmentOrderLineItem represents a delivery charge.
Order Product indicates that it represents any other type of product, service, or charge. Each
type corresponds to one type code, shown here in parentheses.
Possible values are:
• Delivery Charge
• Order Product
TypeCode Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
Type code of the FulfillmentOrderLineItem. Matches the type code of the associated
OrderItemSummary. Processing depends on this value. Charge indicates that the
FulfillmentOrderLineItem represents a delivery charge. Product indicates that it represents
any other type of product, service, or charge. Each type category corresponds to one or more
types.
Possible values are:
• Charge
• Product
UnitPrice Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort
24
Order Management Standard Objects Location
Field Details
Description
Unit price of the FulfillmentOrderLineItem.
SEE ALSO:
FulfillmentOrder
FulfillmentOrderItemAdjustment
FulfillmentOrderItemTax
OrderItemSummary
Location
Represents a warehouse, service vehicle, work site, or other element of the region where your team performs field service work. In API
version 49.0 and later, you can associate activities with specific locations. Activities, such as the tasks and events related to a location,
appear in the activities timeline when you view the location detail page. Also in API version 49.0 and later, Work.com users can view
Employees as a related list on Location records.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Name Details
CloseDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date the location closed or went out of service.
ConstructionEndDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
25
Order Management Standard Objects Location
Description
Date construction ended at the location.
ConstructionStartDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date construction began at the location.
Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A brief description of the location.
DrivingDirections Type
string
Properties
Create, Filter, Nillable, Sort, Update
Description
Directions to the location.
ExternalReference Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Identifier of a location.
IsInventoryLocation Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location stores parts.
Note: This field must be selected if you want to associate the location
with product items.
26
Order Management Standard Objects Location
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the location was last modified. Its label in the user interface is
Last Modified Date.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date the location was last viewed.
Latitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The latitude of the location.
Location Type
location
Properties
Nillable
Description
The geographic location.
LocationLevel Type
int
Properties
Filter, Group, Nillable, Sort
27
Order Management Standard Objects Location
Description
The location’s position in a location hierarchy. If the location has no parent or
child locations, its level is 1. Locations that belong to a hierarchy have a level of
1 for the root location, 2 for the child locations of the root location, 3 for their
children, and so forth.
LocationType Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Picklist of location types. It has no default values, so you must populate it before
creating any location records.
LogoId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A ContentAsset representing a logo for the location.
This field is available in API version 50.0 and later.
This is a relationship field.
Relationship Name
Logo
Relationship Type
Lookup
Refers To
ContentAsset
Longitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The longitude of the location.
Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
28
Order Management Standard Objects Location
Description
The name of the location. For example, Service Van #4.
OpenDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date the location opened or came into service.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The location’s owner or driver.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User
ParentLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The location’s parent location. For example, if vans are stored at a warehouse
when not in service, the warehouse is the parent location.
This is a relationship field.
Relationship Name
ParentLocation
Relationship Type
Lookup
Refers To
Location
PossessionDate Type
date
29
Order Management Standard Objects Location
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The date the location was purchased.
RemodelEndDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date when remodel construction ended at the location.
RemodelStartDate Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Date when remodel construction started at the location.
RootLocationId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
(Read Only) The top-level location in the location’s hierarchy.
This is a relationship field.
Relationship Name
RootLocation
Relationship Type
Lookup
Refers To
Location
ShouldSyncWithOci Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location should sync its data with Omnichannel Inventory.
The default value is false.
This field is available in API version 51.0 and later.
30
Order Management Standard Objects Location
VisitorAddressId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Lookup to an account’s or client’s address.
This is a relationship field.
Relationship Name
VisitorAddress
Relationship Type
Lookup
Refers To
Address
Usage
Before creating any location records, add at least one value to the Location Type picklist. LocationType is a required field.
To track your inventory in Salesforce, create product items, which represent the stock of a particular product a particular location. For
example, create a product item that represents the 500 bolts you have in stock at your Warehouse A location. Each product item must
be associated with a location.
To get a more granular picture of your field service operation, associate locations with service territories. For example, if a warehouse is
located in a particular service territory, add it as a service territory location.
Important: “Location” in Salesforce can also refer to the geolocation compound field found on many standard objects. When
referencing the Location object in your Apex code, always use Schema.Location instead of Location to prevent confusion
with the standard Location compound field. If referencing both the Location object and the Location field in the same snippet,
you can differentiate between the two by using System.Location for the field and Schema.Location for the object.
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
LocationChangeEvent (API version 48.0)
Change events are available for the object.
31
Order Management Standard Objects LocationGroup
LocationFeed
Feed tracking is available for the object.
LocationHistory
History is available for tracked fields of the object.
LocationOwnerSharingRule
Sharing rules are available for the object.
LocationShare
Sharing is available for the object.
LocationGroup
Represents a group of Omnichannel Inventory locations, providing an aggregate view of inventory availability across those locations.
Omnichannel Inventory can create an inventory reservation for an order at the location group level, then assign the reservation to one
or more locations in the group as needed. This object is available in API version 51.0 and later.
You can define location groups according to the logic of your business needs. For example, a location group can represent the warehouses
in a geographic region, or it can include the fulfillment centers associated with a particular online storefront.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Details
Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the location group.
ExternalReference Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
32
Order Management Standard Objects LocationGroup
Field Details
Description
Used when OCI is integrated with B2C Commerce to associate the location group with an
inventory list in B2C Commerce. This value must match the inventory list ID in B2C Commerce.
IsEnabled Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the location group is in use. If set to false, then inventory functions
ignore this location group and its data isn’t synchronized with OCI. The default value is true.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.
LocationGroupName Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the location group.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this location group. Default value is the API user that
created the record.
33
Order Management Standard Objects LocationGroupAssignment
Field Details
ShouldSyncWithOci Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Specifies whether to synchronize inventory data for this location group with Omnichannel
Inventory. The default value is true.
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
LocationGroupFeed
Feed tracking is available for the object.
LocationGroupHistory
History is available for tracked fields of the object.
LocationGroupOwnerSharingRule
Sharing rules are available for the object.
LocationGroupShare
Sharing is available for the object.
LocationGroupAssignment
Represents the assignment of a location to a location group. This object is available in API version 51.0 and later.
You can assign a location to multiple location groups, which associates it with one location group assignment for each location group
that it’s assigned to. Each location group assignment represents the relationship between one location and one location group, so a
location or location group can be associated with multiple location group assignments.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
34
Order Management Standard Objects LocationGroupAssignment
Fields
Field Details
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.
LocationExternalReference Type
string
Properties
Filter, Group, Nillable, Sort
Description
The external reference of the associated location.
LocationGroupAssignment Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
The name of the location group assignment.
LocationGroupExternalReference Type
string
Properties
Filter, Group, Nillable, Sort
Description
The external reference of the associated location group.
LocationGroupId Type
reference
Properties
Create, Filter, Group, Sort
35
Order Management Standard Objects OrderAdjustmentGroupSummary
Field Details
Description
(Master-Detail) The associated location group.
LocationGroupName Type
string
Properties
Filter, Group, Nillable, Sort
Description
The location group name of the associated location group.
LocationId Type
reference
Properties
Create, Filter, Group, Sort
Description
(Master-Detail) The associated location.
LocationName Type
string
Properties
Filter, Group, Nillable, Sort
Description
The name of the associated location.
OrderAdjustmentGroupSummary
Represents the current properties and state of a group of related price adjustments. Associated with a set of
OrderItemAdjustmentLineSummaries that apply to OrderItemSummaries belonging to one OrderSummary. Corresponds to one or more
order adjustment group objects, consisting of an original object and any change objects applicable to it. This object is available in API
version 48.0 and later.
An OrderAdjustmentGroupSummary can represent an adjustment to an entire order as a group of adjustments to each of its products.
For example, representing “10% off the order” as a set of 10% off adjustments to each product on the order. It can also represent an
adjustment that applies to a subset of the products on an order. For example, representing “buy one, get one 50% off” as a 25% off
adjustment to each of two products.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
36
Order Management Standard Objects OrderAdjustmentGroupSummary
Fields
Field Details
AdjustmentCauseId Type
reference
Properties
Filter, Group, Nillable, Sort, Update
Description
References the specific promotions applied.
This is a polymorphic relationship field.
Relationship Name
AdjustmentCause
Relationship Type
Lookup
Refers To
Promotion
This field is available in API version 52.0 and later.
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the adjustments in the
group. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
textarea
Properties
Create, Nillable, Update
37
Order Management Standard Objects OrderAdjustmentGroupSummary
Field Details
Description
Description of the OrderAdjustmentGroupSummary.
This field can be edited.
GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including tax, of the associated OrderItemAdjustmentLineSummaries.
Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderAdjustmentGroupSummary.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderAdjustmentGroupSummary.
OriginalOrderAdjGroupId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original OrderAdjustmentGroup associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, not including tax, of the associated OrderItemAdjustmentIineSummaries.
38
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.
Type Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Type of the OrderAdjustmentGroupSummary. Header represents an order-level adjustment
with an OrderItemAdjustmentLineSummary for each OrderItemSummary on the
OrderSummary. SplitLine represents any other related set of
OrderItemAdjustmentLineSummaries.
Possible values are:
• Header
• SplitLine
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
SEE ALSO:
OrderItemAdjustmentLineSummary
OrderDeliveryGroupSummary
Represents the current properties and state of a group of OrderItemSummaries, belonging to one OrderSummary, to be fulfilled using
the same delivery method and delivered to the same address. A single shipment can include them all, but that is not guaranteed.
Corresponds to one or more order delivery group objects, consisting of an original object and any change objects applicable to it. This
object is available in API version 48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
39
Order Management Standard Objects OrderDeliveryGroupSummary
Fields
Field Details
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the
OrderDeliveryGroupSummary. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
DeliverToAddress Type
address
Properties
Filter, Nillable
Description
Address of the recipient.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
DeliverToCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address city.
DeliverToCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address country.
40
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
DeliverTo Type
GeocodeAccuracy picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy of the geocode for the recipient address.
Possible values are:
• Address
• Block
• City
• County
• ExtendedZip
• NearAddress
• Neighborhood
• State
• Street
• Unknown
• Zip
DeliverToLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with FulfilledToLongitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.
DeliverToLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with FulfilledToLatitude to specify the precise geolocation of the recipient address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.
DeliverToName Type
string
Properties
Create, Filter, Group, Sort, Update
41
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
Description
Name on the recipient address.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
DeliverToPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address postal code.
DeliverToState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address state.
DeliverToStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Recipient address street.
DeliveryInstructions Type
textarea
Properties
Create, Nillable, Update
Description
Special instructions for the delivery.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
Description Type
textarea
Properties
Create, Nillable, Update
42
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
Description
Description of the OrderDeliveryGroupSummary.
This field can be edited.
DesiredDeliveryDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Desired date for delivery. This field is informational, available for customizations.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
EmailAddress Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address of the recipient.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
GiftMessage Type
textarea
Properties
Create, Nillable, Update
Description
Gift message to include.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the delivery charges associated with the
OrderDeliveryGroupSummary. This value only includes OrderItemSummaries of type code
Charge.
43
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
IsGift Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the OrderDeliveryGroupSummary represents a gift.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
OrderDeliveryGroup Type
SummaryNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the OrderDeliveryGroupSummary.
OrderDeliveryMethodId Type
reference
Properties
Filter, Group, Sort
Description
ID of the order delivery method specified for the OrderDeliveryGroupSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderDeliveryGroupSummary.
OriginalOrderDelivery Type
GroupId reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original order delivery group associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.
44
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
PhoneNumber Type
phone
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Phone number of the recipient.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
PromisedDeliveryDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Promised date for delivery. This field is informational, available for customizations.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total price adjustments applied to delivery charges associated with the
OrderDeliveryGroupSummary. This value only includes adjustments to OrderItemSummaries
of type code Charge.
TotalAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges associated with the
OrderDeliveryGroupSummary, inclusive of tax. This amount is equal to
TotalAdjustmentAmount + TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjustment Type
TaxAmount currency
45
Order Management Standard Objects OrderDeliveryGroupSummary
Field Details
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the delivery charges associated with the
OrderDeliveryGroupSummary. This value only includes adjustments to OrderItemSummaries
of type code Charge.
TotalLineAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, not including adjustments or tax, of the delivery charges associated with the
OrderDeliveryGroupSummary.
TotalLineAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the delivery charges associated with the OrderDeliveryGroupSummary, inclusive of
tax. This amount is equal to TotalLineAmount + TotalLineTaxAmount.
This field is available in API version 49.0 and later.
TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
46
Order Management Standard Objects OrderItemAdjustmentLineSummary
Field Details
Description
Tax on the TotalAmount.
SEE ALSO:
OrderItemSummary
OrderItemAdjustmentLineSummary
Represents the current properties and state of price adjustments on an OrderItemSummary. Corresponds to one or more order item
adjustment line item objects, consisting of an original object and any change objects applicable to it. This object is available in API version
48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
Fields
Field Details
AdjustmentCauseId Type
reference
Properties
Filter, Group, Nillable, Sort, Update
Description
References the specific promotions applied.
This is a polymorphic relationship field.
Relationship Name
AdjustmentCause
Relationship Type
Lookup
Refers To
Promotion
This field is available in API version 52.0 and later.
47
Order Management Standard Objects OrderItemAdjustmentLineSummary
Field Details
Amount Type
currency
Properties
Filter, Sort
Description
Amount, not including tax, of the OrderItemAdjustmentLineSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderItemSummary to which the adjustment applies. The
default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the OrderItemAdjustmentLineSummary.
This field can be edited.
Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderItemAdjustmentLineSummary.
OrderAdjustmentGroup Type
SummaryId reference
48
Order Management Standard Objects OrderItemAdjustmentLineSummary
Field Details
Properties
Filter, Group, Nillable, Sort
Description
If this object belongs to an OrderAdjustmentGroupSummary, this value is the ID of that
OrderAdjustmentGroupSummary.
OrderItemSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderItemSummary to which the OrderItemAdjustmentLineSummary applies.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderItemSummary to which this
OrderItemAdjustmentLineSummary applies.
OriginalOrderItem Type
AdjustmentLineItemId reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original OrderItemAdjustmentLine associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.
Priority Type
integer
Properties
Create, Nillable
Description
Numerical rank used to apply promotions in the correct order.
This field is available in API version 52.0 and later.
TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
49
Order Management Standard Objects OrderItemSummary
Field Details
Description
Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +
TotalTaxAmount.
This field is available in API version 49.0 and later.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the Amount.
SEE ALSO:
OrderItemSummary
OrderItemTaxLineItemSummary
OrderItemSummary
Represents the current properties and state of a product or charge on an OrderSummary. Corresponds to one or more order item objects,
consisting of an original object and any change objects applicable to it. This object is available in API version 48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
Fields
Field Details
AdjustedLineAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the OrderItemSummary.
50
Order Management Standard Objects OrderItemSummary
Field Details
AdjustedLineAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the OrderItemSummary, inclusive of adjustments and tax. This amount is equal
to AdjustedLineAmount + TotalAdjustedLineTaxAmount.
This field is available in API version 49.0 and later.
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the OrderItemSummary.
The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the OrderItemSummary.
This field can be edited.
EndDate Type
date
Properties
Filter, Group, Nillable, Sort
Description
End date of the OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
51
Order Management Standard Objects OrderItemSummary
Field Details
GrossUnitPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Unit price, including tax, of the OrderItemSummary. This value is equal to UnitPrice + the
amount of tax on the UnitPrice.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is available in API version 49.0 and later.
LineNumber Type
int
Properties
Filter, Group, Nillable, Sort
Description
The order line number assigned to this OrderItemSummary. For example, if this object is the
third in the displayed list of OrderItemSummaries belonging to the OrderSummary, this value
is 3.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
ListPrice Type
currency
Properties
Filter, Nillable, Sort
Description
List price of the product represented by this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderItemSummary.
52
Order Management Standard Objects OrderItemSummary
Field Details
OrderDeliveryGroup Type
SummaryId reference
Properties
Filter, Group, Sort
Description
ID of the OrderDeliveryGroupSummary to which this object belongs.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary to which this object belongs.
OriginalOrderItemId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original order item associated with this summary object. Nillable=true only if the
associated order summary is unmanaged. For managed order summaries, nillable=false.
Product2Id Type
reference
Properties
Filter, Group, Sort
Description
ID of the product represented by this OrderItemSummary.
ProductCode Type
string
Properties
Filter, Group, Nillable, Sort
Description
Product code of the product represented by this OrderItemSummary.
Quantity Type
double
Properties
Filter, Sort
53
Order Management Standard Objects OrderItemSummary
Field Details
Description
Current total quantity of products represented by this order item summary. Equal to
QuantityOrdered minus (QuantityCanceled and QuantityReturned).
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityAllocated Type
double
Properties
Filter, Sort
Description
Allocated quantity on this order item summary. This quantity is associated with one or more
FulfillmentOrderLineItems.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityAvailable Type
ToCancel double
Properties
Filter, Nillable, Sort
Description
Quantity that can still be canceled on this OrderItemSummary. Equal to QuantityOrdered
minus (QuantityCanceled and QuantityAllocated). This value duplicates
QuantityAvailableToFulfill.
QuantityAvailable Type
ToFulfill double
Properties
Filter, Nillable, Sort
Description
Quantity available to be fulfilled on this OrderItemSummary. Equal to QuantityOrdered minus
(QuantityCanceled and QuantityAllocated). This value duplicates QuantityAvailableToCancel.
QuantityAvailable Type
ToReturn double
Properties
Filter, Nillable, Sort
Description
Quantity available to be returned on this OrderItemSummary. Equal to QuantityFulfilled
minus QuantityReturnInitiated.
54
Order Management Standard Objects OrderItemSummary
Field Details
QuantityCanceled Type
double
Properties
Filter, Sort
Description
Canceled quantity on this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityFulfilled Type
double
Properties
Filter, Sort
Description
Fulfilled quantity on this OrderItemSummary. This quantity can no longer be canceled.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityNetOrdered Type
double
Properties
Filter, Nillable, Sort
Description
Quantity available to be allocated on this OrderItemSummary. Equal to QuantityOrdered
minus QuantityCanceled.
QuantityOrdered Type
double
Properties
Filter, Sort
Description
Ordered quantity on this OrderItemSummary. It includes the originally ordered quantity plus
any quantity added to the order later.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityReturned Type
double
55
Order Management Standard Objects OrderItemSummary
Field Details
Properties
Filter, Sort
Description
Returned quantity on this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityReturnInitiated Type
double
Properties
Filter, Sort
Description
Quantity returned or pending return on this OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
QuantityShipped Type
double
Properties
Filter, Nillable, Sort, Update
Description
Quantity shipped on this OrderItemSummary.
This field is available in API version 52.0 and later.
ReservedAtLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Reserved for future use.
ServiceDate Type
date
Properties
Filter, Group, Nillable, Sort
Description
Service or start date of the OrderItemSummary.
56
Order Management Standard Objects OrderItemSummary
Field Details
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
Status Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
Status of the OrderItemSummary. The default value is ORDERED.
Possible values are:
• ALLOCATED—Allocated
• CANCELED—Canceled
• FULFILLED—Fulfilled
• ORDERED—Ordered
• PAID—Paid
• PARTIALLYALLOCATED—Partially Allocated
• PARTIALLYFULFILLED—Partially Fulfilled
• RESHIPPED—Reshipped
• RETURNED—Returned
• RETURNINITIATED—Return Initiated
StockKeepingUnit Type
string
Properties
Filter, Group, Nillable, Sort
Description
The stock keeping unit (SKU) of the Product2 associated with the OrderItemSummary..
This field is available in API version 49.0 and later.
TotalAdjusted Type
LineTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the AdjustedLineAmount.
TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
57
Order Management Standard Objects OrderItemSummary
Field Details
Description
Total of all price adjustments applied to this OrderItemSummary.
TotalAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of all price adjustments applied to this OrderItemSummary, inclusive of tax.
This amount is equal to TotalAdjustmentAmount + TotalAdjustmentTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjustmentDistAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to this OrderItemSummary. This value
includes OrderItemAdjustmentLineSummaries that belong to
OrderAdjustmentGroupSummaries of type Header.
TotalAdjustmentDist Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of the order-level price adjustments applied to this OrderItemSummary,
inclusive of tax. This amount is equal to TotalAdjustmentDistAmount +
TotalAdjustmentDistTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjustmentDist Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentDistAmount.
TotalAdjustmentTaxAmount Type
currency
Properties
Filter, Nillable, Sort
58
Order Management Standard Objects OrderItemSummary
Field Details
Description
Tax on the TotalAdjustmentAmount.
TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the OrderItemSummary, inclusive of tax. This amount is equal to TotalPrice +
TotalTaxAmount.
This field is available in API version 49.0 and later.
TotalLineAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of all non-order-level price adjustments applied to this OrderItemSummary. This value
includes OrderItemAdjustmentLineSummaries that don’t belong to an
OrderAdjustmentGroupSummary, or that belong to an OrderAdjustmentGroupSummary of
type SplitLine.
TotalLineAdjustment Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total of all non-order-level price adjustments applied to this OrderItemSummary, inclusive
of tax. This amount is equal to TotalLineAdjustmentAmount +
TotalLineAdjustmentTaxAmount.
This field is available in API version 49.0 and later.
TotalLineAdjustment Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAdjustmentAmount.
TotalLineAmount Type
currency
59
Order Management Standard Objects OrderItemSummary
Field Details
Properties
Filter, Nillable, Sort
Description
Total, not including adjustments or tax, of the OrderItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
TotalLineAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total unadjusted amount of the OrderItemSummary, inclusive of tax. This amount is equal
to TotalLineAmount + TotalLineTaxAmount.
This field is available in API version 49.0 and later.
TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.
TotalPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of the OrderItemSummary.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalPrice.
Type Type
picklist
60
Order Management Standard Objects OrderItemSummary
Field Details
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type of the OrderItemSummary. Delivery Charge indicates that the OrderItemSummary
represents a delivery charge. Order Product indicates that it represents any other type of
product, service, or charge. Each type corresponds to one type code, shown here in
parentheses.
Possible values are:
• Delivery Charge (Charge)
• Order Product (Product)
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
TypeCode Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type code of the OrderItemSummary. Charge indicates that the OrderItemSummary represents
a delivery charge. Product indicates that it represents any other type of product, service, or
charge.
Possible values are:
• Charge
• Product
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
UnitPrice Type
currency
Properties
Filter, Nillable, Sort
Description
Unit price of the product represented by the OrderItemSummary.
61
Order Management Standard Objects OrderItemSummaryChange
Field Details
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
SEE ALSO:
FulfillmentOrderLineItem
OrderItemAdjustmentLineSummary
OrderItemTaxLineItemSummary
OrderSummary
OrderItemSummaryChange
Represents a change to an OrderItemSummary, usually a reduction in quantity due to a cancel or return. Corresponds to a change order
item. This object is available in API version 48.0 and later.
This object is used for calculations and doesn’t have a default record page.
Supported Calls
delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()
Fields
Field Details
ChangeOrderItemId Type
reference
Properties
Filter, Group, Sort
Description
ID of the associated change order item.
ChangeType Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
62
Order Management Standard Objects OrderItemSummaryChange
Field Details
Description
Type of change represented by the OrderItemSummaryChange.
Possible values are:
• Cancel
• DeliveryChargeAdjustment
• ProductAdjustment
• Return
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the
OrderItemSummaryChange. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
IsPreFulfillment Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the change occurs before the OrderItemSummary has been fulfilled.
OrderItemSummary Type
ChangeNumber string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the OrderItemSummaryChange.
OrderItemSummaryId Type
reference
Properties
Filter, Group, Sort
63
Order Management Standard Objects OrderItemTaxLineItemSummary
Field Details
Description
ID of the OrderItemSummary to which the change applies.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary to which the associated OrderItemSummary belongs.
Reason Type
picklist
Properties
Defaulted on create, Filter, Group, Sort
Description
Reason for the change. You can customize this list.
The list has one default value:
• Unknown
SEE ALSO:
OrderItemSummary
OrderItemTaxLineItemSummary
Represents the current tax on an OrderItemSummary or OrderItemAdjustmentLineSummary. Corresponds to one or more order item
tax line items, consisting of an original object and any change objects applicable to it. This object is available in API version 48.0 and
later.
Supported Calls
delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(),
undelete(), update()
64
Order Management Standard Objects OrderItemTaxLineItemSummary
Fields
Field Details
Amount Type
currency
Properties
Filter, Sort
Description
Amount of tax represented by the OrderItemTaxLineItemSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
CurrencyIsoCode Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort
Description
ISO code for the currency of the OrderSummary associated with the
OrderItemTaxLineItemSummary. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
textarea
Properties
Nillable, Update
Description
Description of the OrderItemTaxLineItemSummary.
This field can be edited.
Name Type
string
Properties
Filter, Group, idLookup, Sort, Update
Description
Name of the OrderItemTaxLineItemSummary.
65
Order Management Standard Objects OrderItemTaxLineItemSummary
Field Details
OrderItemAdjustmentLine Type
SummaryId reference
Properties
Filter, Group, Nillable, Sort
Description
If this object represents tax on an adjustment, this value is the ID of the
OrderItemAdjustmentLineSummary to which the tax applies. If this value is null, the
adjustment applies to an OrderItemSummary.
OrderItemSummaryId Type
reference
Properties
Filter, Group, Sort
Description
If this object represents tax on an OrderItemSummary, this value is the ID of that
OrderItemSummary. If this object represents tax on an adjustment, this value is the ID of the
OrderItemSummary to which the adjustment applies.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary that the associated OrderItemSummary or
OrderItemAdjustmentLineSummary belongs to.
OriginalOrderItemTax Type
LineItemId reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the original order item tax line item associated with this summary object. Nillable=true
only if the associated order summary is unmanaged. For managed order summaries,
nillable=false.
Rate Type
percent
Properties
Filter, Nillable, Sort
Description
Tax rate used to calculate the Amount.
66
Order Management Standard Objects OrderPaymentSummary
Field Details
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
TaxEffectiveDate Type
date
Properties
Filter, Group, Sort
Description
Date on which the Amount was calculated. Important due to tax rate changes over time.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
Type Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Indicates whether the Amount is actual or estimated.
Possible values are:
• Actual
• Estimated
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
SEE ALSO:
FulfillmentOrderItemTax
OrderItemAdjustmentLineSummary
OrderItemSummary
OrderPaymentSummary
Represents the current properties and state of payments using a single payment method that are applied to one OrderSummary. This
object is available in API version 48.0 and later.
Unlike most summary objects, an OrderPaymentSummary is not related to a similarly named order payment object. Instead, it combines
values from multiple payment objects that use the same payment method and apply to the same OrderSummary.
67
Order Management Standard Objects OrderPaymentSummary
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Details
AuthorizationAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that has been authorized.
AuthorizationReversal Type
Amount currency
Properties
Filter, Nillable, Sort
Description
Amount of the AuthorizationAmount that has been reversed.
AvailableToCaptureAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is available to be captured. Equal to
AuthorizationAmount minus (CapturedAmount and PendingCaptureAmount and
PendingReverseAuthAmount).
AvailableToRefundAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is available to be refunded. Equal to
CapturedAmount minus (RefundedAmount and PendingCaptureAmount and
PendingRefundAmount).
68
Order Management Standard Objects OrderPaymentSummary
Field Details
BalanceAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total balance of all payments associated with this summary object.
CapturedAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that has been captured.
CurrencyIsoCode Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Available only for orgs with the multicurrency feature enabled. Contains the ISO code for
the currency of the OrderSummary associated with the OrderPaymentSummary. Order
Management APIs and actions that create an OrderPaymentSummary for an OrderSummary
set this value. The default value is USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
FullName Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The full name of the payment method user.
LastPaymentGatewayLogId Type
reference
Properties
Filter, Group, Nillable, Sort
69
Order Management Standard Objects OrderPaymentSummary
Field Details
Description
ID of the most recent payment gateway log associated with the OrderPaymentSummary.
LastPaymentGateway Type
Message string
Properties
Create, Filter, Nillable, Sort, Update
Description
The most recent message received from the payment gateway associated with the
OrderPaymentSummary.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed a record related to this record.
This field is available in API version 49.0 and later.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed this record. A null value can mean that this
record has only been referenced (LastReferencedDate) and not viewed.
This field is available in API version 49.0 and later.
Method Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderPaymentSummary.
OrderSummaryId Type
reference
Properties
Filter, Group, Sort
Description
ID of the OrderSummary associated with the OrderPaymentSummary.
70
Order Management Standard Objects OrderPaymentSummary
Field Details
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this OrderPaymentSummary. Default value is the user
logged in to the API to perform the create.
PaymentMethodId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the payment method associated with this OrderPaymentSummary.
PendingAuthorization Type
Amount currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is pending authorization.
PendingCaptureAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is pending capture.
PendingRefundAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that is pending refund.
PendingReverseAuth Type
Amount currency
Properties
Filter, Nillable, Sort
71
Order Management Standard Objects OrderSummary
Field Details
Description
Amount of the AuthorizationAmount that is pending reversal.
RefundedAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Amount of the OrderPaymentSummary that has been refunded.
Type Type
string
Properties
Filter, Group, Sort
Description
The payment method type associated with the OrderPaymentSummary. For example, visa,
mastercard, check, or giftcard.
SEE ALSO:
OrderSummary
OrderSummary
Represents the current properties and state of an order. Corresponds to one or more order objects, consisting of an original object and
any change objects applicable to it. This object is available in API version 48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Details
AccountId Type
reference
72
Order Management Standard Objects OrderSummary
Field Details
Properties
Filter, Group, Nillable, Sort
Description
ID of the account or person account associated with the OrderSummary. It represents the
shopper in the storefront.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
ActiveProcessExceptionCount Type
int
Properties
Filter, Group, Nillable, Sort
Description
Total number of active process exceptions on the OrderSummary.
This field is available in API version 50.0 and later.
BillingAddress Type
address
Properties
Filter, Nillable
Description
Billing address associated with the OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
BillingCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address city.
BillingCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address country.
73
Order Management Standard Objects OrderSummary
Field Details
BillingEmailAddress Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address on the billing address.
BillingGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The accuracy of the geocode for the billing address.
Possible values are:
• Address
• Block
• City
• County
• ExtendedZip
• NearAddress
• Neighborhood
• State
• Street
• Unknown
• Zip
BillingLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with BillingLongitude to specify the precise geolocation of the billing address.
Acceptable values are numbers between –90 and 90 with up to 15 decimal places.
BillingLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
74
Order Management Standard Objects OrderSummary
Field Details
Description
Used with BillingLatitude to specify the precise geolocation of the billing address. Acceptable
values are numbers between –90 and 90 with up to 15 decimal places.
BillingPhoneNumber Type
phone
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Phone number of the billing address.
BillingPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address postal code.
BillingState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address state.
BillingStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Billing address street.
BillToContactId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the Contact associated with the OrderSummary. It represents the shopper in the
storefront when not using person accounts.
If the OrderLifeCycleType field is set to UNMANAGED, then users with the Edit
Unmanaged Order Summaries or B2B Commerce Integrator user permission can modify this
field.
75
Order Management Standard Objects OrderSummary
Field Details
This field is available in API version 49.0 and later.
ChangeOrderId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
Reserved for future use.
CurrencyIsoCode Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Available only for orgs with the multicurrency feature enabled. Contains the ISO code for
the currency of the original Order associated with the OrderSummary. The default value is
USD.
Possible values are:
• DKK—Danish Krone
• EUR—Euro
• GBP—British Pound
• USD—U.S. Dollar
This field is available in API version 49.0 and later.
Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the OrderSummary.
This field can be edited.
GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount, including adjustments and tax, of the OrderSummary.
IsSuspended Type
boolean
76
Order Management Standard Objects OrderSummary
Field Details
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the OrderSummary is suspended. The default value is false.
This field is available in API version 50.0 and later.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.
OrderedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Date of the original order associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
OrderLifeCycleType Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Specifies whether the OrderSummary is managed by Salesforce Order Management
(MANAGED) or by an external system (UNMANAGED). An unmanaged OrderSummary is
stored in Salesforce for reference purposes.
• Some Order Management APIs reject input records that are associated with unmanaged
OrderSummaries.
77
Order Management Standard Objects OrderSummary
Field Details
• Order Management does not update financial bucket fields on some records that are
associated with unmanaged OrderSummaries.
• A user with the EditUnmanagedOrderSummaries or B2BCommerceIntegrator permission
can edit certain fields on objects related to unmanaged OrderSummaries that are normally
only accessible via APIs.
Possible values are:
• MANAGED—Managed
• UNMANAGED—Unmanaged
This field is available in API version 49.0 and later.
OrderNumber Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Name of the OrderSummary.
OrderProductLineCount Type
integer
Properties
Filter, Group, Nillable, Sort
Description
Total number of unique products ordered on this Order Summary.
This field is available in API version 52.0 and later.
OriginalOrderId Type
reference
Properties
Filter, Group, Sort
Description
ID of the original order associated with this OrderSummary.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this OrderSummary. Default value is the user logged
in to the API to perform the create.
78
Order Management Standard Objects OrderSummary
Field Details
PoDate Type
dateTime
Properties
Filter, Nillable, Sort, Update
Description
Purchase order date associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is available in API version 52.0 and later.
PoNumber Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Purchase order number associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
RoutingAttempts Type
int
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The number of attempts that have been made to route the order summary to inventory
locations.
This field is available in API version 51.0 and later.
SalesChannelId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the SalesChannel associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
79
Order Management Standard Objects OrderSummary
Field Details
SalesStoreId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the RetailStore or WebStore associated with this OrderSummary.
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is only available in Salesforce B2B Commerce orgs.
Status Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Status of the order summary. Unlike the Status and Status Category fields on the order and
FulfillmentOrder objects, this field is optional.
We recommend that you use the same values in this picklist that you use in the Status picklist
for the order object.
TaxLocaleType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The system used to handle tax on the original Order associated with the OrderSummary.
Gross usually applies to taxes like value-added tax (VAT), and Net usually applies to taxes like
sales tax.
Possible values are:
• Gross (displays most prices and taxes as combined values)
• Net (displays most prices and taxes as separate values)
If the OrderLifeCycleType field on the associated OrderSummary is set to
UNMANAGED, then users with the Edit Unmanaged Order Summaries or B2B Commerce
Integrator user permission can modify this field.
This field is available in API version 49.0 and later.
TotalAdjDelivery Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
80
Order Management Standard Objects OrderSummary
Field Details
Description
Total amount of all OrderItemSummaries of type code Charge belonging to this
OrderSummary, inclusive of adjustments and tax. This amount is equal to
TotalAdjustedDeliveryAmount + TotalAdjustedDeliveryTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjDistAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of distributed adjustments applied to OrderItemSummaries belonging to this
OrderSummary. This amount is equal to TotalProductAdjDistAmount plus
TotalDeliveryAdjDistAmount.
TotalAdjDistAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total of distributed adjustments applied to OrderItemSummaries belonging to this
OrderSummary, inclusive of tax. This amount is equal to TotalAdjDistAmount plus
TotalAdjDistTaxAmount.
This field is available in API version 49.0 and later.
TotalAdjDistTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjDistAmount.
TotalAdjProduct Type
AmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total amount of all OrderItemSummaries of type code Product belonging to this
OrderSummary, inclusive of adjustments and tax. This amount is equal to
TotalAdjustedProductAmount plus TotalAdjustedProductTaxAmount.
This field is available in API version 49.0 and later.
81
Order Management Standard Objects OrderSummary
Field Details
TotalAdjusted Type
DeliveryAmount currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of all OrderItemSummaries of type code Charge
belonging to this OrderSummary.
TotalAdjusted Type
DeliveryTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustedDeliveryAmount.
TotalAdjustedProduct Type
Amount currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of all OrderItemSummaries of type code Product
belonging to this OrderSummary.
TotalAdjustedProduct Type
TaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustedProductAmount.
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments but not tax, of all OrderItemSummaries belonging to this
OrderSummary. Equal to TotalAdjustedProductAmount plus TotalAdjustedDeliveryAmount.
TotalDeliveryAdj Type
DistAmount currency
Properties
Filter, Nillable, Sort
82
Order Management Standard Objects OrderSummary
Field Details
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code Charge
belonging to this OrderSummary. This value includes OrderItemAdjustmentLineSummaries
that belong to OrderAdjustmentGroupSummaries of type Header.
TotalDeliveryAdj Type
DistAmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code Charge
belonging to this OrderSummary, inclusive of tax. This value includes
OrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries of
type Header. It is equal to TotalDeliveryAdjDistAmount + TotalDeliveryAdjDistTaxAmount.
This field is available in API version 49.0 and later.
TotalDeliveryAdj Type
DistTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAdjDistAmount.
TotalProductAdj Type
DistAmount currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code
Product belonging to this OrderSummary. This value includes
OrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries of
type Header.
TotalProductAdj Type
DistAmtWithTax currency
Properties
Filter, Nillable, Sort
Description
Total of all order-level price adjustments applied to OrderItemSummaries of type code
Product belonging to this OrderSummary, inclusive of tax. This value includes
OrderItemAdjustmentLineSummaries that belong to OrderAdjustmentGroupSummaries of
type Header. It is equal to TotalProductAdjDistAmount + TotalProductAdjDistTaxAmount.
83
Order Management Standard Objects OrderSummaryRoutingSchedule
Field Details
This field is available in API version 49.0 and later.
TotalProductAdj Type
DistTaxAmount currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAdjDistAmount.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total tax on all OrderItemSummaries belonging to this OrderSummary. Equal to
TotalAdjustedDeliveryTaxAmount plus TotalAdjustedProductTaxAmount.
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
OrderSummaryFeed
Feed tracking is available for the object.
OrderSummaryOwnerSharingRule
Sharing rules are available for the object.
OrderSummaryShare
Sharing is available for the object.
SEE ALSO:
FulfillmentOrder
OrderItemSummary
OrderPaymentSummary
SalesChannel
OrderSummaryRoutingSchedule
Represents an attempt to route an order summary to one or more inventory locations for fulfillment. You can use it to schedule future
attempts and to record completed attempts. This object is available in API version 51.0 and later.
84
Order Management Standard Objects OrderSummaryRoutingSchedule
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
Fields
Field Details
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. If this value is null, it’s
possible that this record was referenced (LastReferencedDate) and not viewed.
Name Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the order summary routing schedule.
OrderSummaryId Type
reference
Properties
Create, Filter, Group, Sort
Description
(Master-Detail) The order summary associated with the routing schedule.
OwnerId Type
reference
85
Order Management Standard Objects OrderSummaryRoutingSchedule
Field Details
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the User who currently owns this order summary routing schedule. Default value is the
User logged in to the API to perform the create.
Reason Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Reason for the routing attempt. You can customize this list.
The list has one default value:
• Unknown
ScheduleStatus Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
Description
Identifies whether this routing attempt has already run or is scheduled to run.
Possible values are:
• ABANDONED
• COMPLETED
• SCHEDULED
ScheduledDatetime Type
dateTime
Properties
Create, Filter, Sort, Update
Description
Identifies when this routing attempt was run or is scheduled to run. If the
ScheduleStatus is ABANDONED or COMPLETED, then you can’t modify this value.
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
OrderSummaryRoutingScheduleOwnerSharingRule
Sharing rules are available for the object.
86
Order Management Standard Objects ProcessException
OrderSummaryRoutingScheduleShare
Sharing is available for the object.
ProcessException
Represents a processing failure on an order summary. A separate process is required to resolve the failure that caused the process
exception before order summary processing can continue. This object is available in API version 50.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Details
AttachedToId Type
reference
Properties
Create, Filter, Group, Sort, Update
Description
ID of the object associated with the ProcessException.
This is a polymorphic relationship field.
Relationship Name
AttachedTo
Relationship Type
Lookup
Refers To
CreditMemo, Invoice, Order, OrderItem, Payment, PaymentAuthorization, Refund, ReturnOrder
CaseId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the case associated with the ProcessException.
This is a relationship field.
Relationship Name
Case
Relationship Type
Lookup
87
Order Management Standard Objects ProcessException
Field Details
Refers To
Case
Category Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
ProcessingException type. You can customize the category picklist to represent your business
processes.
Possible values are:
• Fulfillment
• Invoicing
• Order Activation
• Order Approval
• Payment
Description Type
textarea
Properties
Create, Nillable, Update
Description
Detailed description of the ProcessException.
ExternalReference Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of external entities associated with the ProcessException.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed a record related to this record.
LastViewedDate Type
dateTime
88
Order Management Standard Objects ProcessException
Field Details
Properties
Filter, Nillable, Sort
Description
Timestamp for when the current user last viewed this record. A null value can mean that this
record has only been referenced (LastReferencedDate) and not viewed.
Message Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Short description of the ProcessException
OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the OrderSummary associated with the ProcessException. The ProcessException
component is displayed on this OrderSummary.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
ID of the User who currently owns this ProcessException. Default value is the User logged in
to the API to perform the create.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User
Priority Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
89
Order Management Standard Objects ProcessException
Field Details
Description
Resolution priority for the ProcessException. You can customize the priority picklist to
represent your business processes.
Possible values are:
• High
• Low
ProcessExceptionNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
The unique name of the ProcessException, formatted as PE-(00000000).
Severity Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Severity of the ProcessException. Each severity value corresponds to one severity category.
You can customize the severity picklist to represent your business processes. If you customize
the severity picklist, include at least one severity value for each severity category.
Possible values are:
• High
• Low
SeverityCategory Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Severity category of the ProcessException. Each severity category corresponds to one or
more severity values. The severity category is used to show the severity icon in the
ProcessException list view.
Possible values are:
• High
• Low
Status Type
picklist
90
Order Management Standard Objects ReturnOrder
Field Details
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Status of the ProcessException. Each status corresponds to one status category, shown here
in parentheses. You can customize the status picklist to represent your business processes.
If you customize the status picklist, include at least one status value for each status category.
Possible values are:
• Ignored (Inactive)
• New (Active)
• Paused (Inactive)
• Resolved (Resolved)
• Triaged (Active)
• Voided (Inactive)
StatusCategory Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
Status category of the ProcessException. Each status category corresponds to one or more
statuses.
Possible values are:
• ACTIVE
• INACTIVE
• RESOLVED
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
ProcessExceptionOwnerSharingRule
Sharing rules are available for the object.
ProcessExceptionShare
Sharing is available for the object.
ReturnOrder
Represents the return or repair of inventory or products in Field Service, or the return of order products in Order Management. This object
is available in API version 42.0 and later.
91
Order Management Standard Objects ReturnOrder
Return orders are available in Lightning Experience, Salesforce Classic, the Salesforce mobile app, the Field Service mobile app for Android
and iOS, and communities built using Salesforce Tabs + Visualforce.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Name Details
AccountId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The account associated with the return order.
This is a relationship field.
Relationship Name
Account
Relationship Type
Lookup
Refers To
Account
CaseId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The case associated with the return order.
This is a relationship field.
Relationship Name
Case
Relationship Type
Lookup
Refers To
Case
92
Order Management Standard Objects ReturnOrder
Description Type
textarea
Properties
Create, Nillable, Update
Description
Notes or context about the return order.
DestinationLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The location where the items are being returned to. For example, if the return
order tracks the return of products from a technician’s van to a warehouse, the
warehouse is the destination location.
This is a relationship field.
Relationship Name
DestinationLocation
Relationship Type
Lookup
Refers To
Location
ExpectedArrivalDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
93
Order Management Standard Objects ReturnOrder
Description
The date when the items are expected to arrive at the destination location.
ExpirationDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
Authorizations can’t be captured after their expiration dates.
This field is available in API version 50.0 and later.
GrandTotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total, including adjustments and tax, of the products and delivery charges on
the return order. This includes all return order line items associated with the
return order. This amount is equal to TotalAmount + TotalTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order was last modified. Its label in the user interface
is Last Modified Date.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order was last viewed.
LifeCycleType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
94
Order Management Standard Objects ReturnOrder
Description
Specifies whether the order summary is managed by Salesforce Order
Management (MANAGED) or by an external system (UNMANAGED). An
unmanaged order summary is stored in Salesforce for reference purposes.
• Some Order Management APIs reject input records that are associated with
unmanaged order summaries.
• Order Management does not update financial bucket fields on some records
that are associated with unmanaged order summaries.
• A user with the EditUnmanagedOrderSummaries or B2BCommerceIntegrator
permission can edit certain fields on objects related to unmanaged order
summaries that are normally only accessible via APIs.
Possible values are:
• MANAGED—Managed
• UNMANAGED—Unmanaged
This field is available in API version 50.0 and later.
OrderId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The order associated with the return order. When you associated a return order
with an order, you can associate the return order’s line items with order products.
This is a relationship field.
Relationship Name
Order
Relationship Type
Lookup
Refers To
Order
OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order summary associated with the return order.
This field is available in API version 50.0 and later.
OwnerId Type
reference
95
Order Management Standard Objects ReturnOrder
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The owner of the return order.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User
ProductRequestId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product request associated with the return order. When you associated a
return order with a product request, you can associate the return order’s line
items with the product request’s line items.
A return order might be related to a product request if the return order tracks
the return of unused products or products to be repaired or replaced. For example,
a technician creates a product request for three motors to prepare for a field visit.
If the technician finds that only two motors are needed, they can create a return
order to return the third to the original location, and list the product request in
this field.
This is a relationship field.
Relationship Name
ProductRequest
Relationship Type
Lookup
Refers To
ProductRequest
ProductServiceCampaignId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product service campaign associated with the return order
96
Order Management Standard Objects ReturnOrder
ReturnedById Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the user returning the items.
This is a relationship field.
Relationship Name
ReturnedBy
Relationship Type
Lookup
Refers To
User
ShipFromAddress Type
address
Properties
Filter, Nillable
Description
The return shipping address. This address tracks the location of the items at the
start of the return or repair. For example, if a customer is returning an item, the
Ship From address is the customer’s address.
ShipFromCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the return shipping address. This address tracks the location of the
items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.
ShipFromCountry Type
string
97
Order Management Standard Objects ReturnOrder
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the return shipping address. This address tracks the location of
the items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.
ShipFromGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy level of the geocode for the return shipping address. See Compound
Field Considerations and Limitations for details on geolocation compound fields.
ShipFromLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Longitude to specify the precise geolocation of the return shipping
address. Acceptable values are numbers between –90 and 90 with up to 15
decimal places. See Compound Field Considerations and Limitations for details
on geolocation compound fields.
ShipFromLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the return shipping
address. Acceptable values are numbers between –180 and 180 with up to 15
decimal places. See Compound Field Considerations and Limitations for details
on geolocation compound fields.
ShipFromPostalCode Type
string
98
Order Management Standard Objects ReturnOrder
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the return shipping address. This address tracks the location
of the items at the start of the return or repair. For example, if a customer is
returning an item, the Ship From address is the customer’s address.
ShipFromState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The state of the return shipping address. This address tracks the location of the
items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.
ShipFromStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the return shipping address. This address tracks the location of the
items at the start of the return or repair. For example, if a customer is returning
an item, the Ship From address is the customer’s address.
ShipmentType Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The type of shipment associated with the return order. Available values are:
• Standard (default value)
• Rush
• Overnight
• Next Business Day
• Pickup
SourceLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
99
Order Management Standard Objects ReturnOrder
Description
The items’ location at the start of the return or repair. For example, if the return
order tracks the return of products from a technician’s service vehicle to a
warehouse, the service vehicle is the source location.
This is a relationship field.
Relationship Name
SourceLocation
Relationship Type
Lookup
Refers To
Location
Status Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The status of the return order. Available values are:
• Draft
• Submitted
• Approved
• Canceled
• Closed
StatusCategory Type
picklist
Properties
Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
Description
Status category of the return order. Processing of the return order depends on
this value. Each status category corresponds to one or more statuses.
Possible values are:
• Activated
• Canceled
• Closed
• Draft
This field is available in API version 50.0 and later.
TaxLocaleType Type
picklist
100
Order Management Standard Objects ReturnOrder
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The system used to handle tax on the original order associated with the return
order. Gross usually applies to taxes like value-added tax (VAT), and Net usually
applies to taxes like sales tax.
Possible values are:
• Gross (displays most prices and taxes as combined values)
• Net (displays most prices and taxes as separate values)
This field is available in API version 50.0 and later.
TotalAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Adjusted total, not including tax, of the return order line items, including products
and delivery charges, on the ReturnOrder.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalDeliveryAdjustAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the
return order. This value only includes adjustments to return order line items of
type code Charge.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalDeliveryAdjustAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the delivery charges on the
return order, inclusive of tax. This value only includes adjustments to return order
line items of type code Charge. This amount is equal to
TotalDeliveryAdjustAmount + TotalDeliveryAdjustTaxAmount.
101
Order Management Standard Objects ReturnOrder
TotalDeliveryAdjustTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAdjustmentAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalDeliveryAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the delivery charges on the return order. This value only includes return
order line items of type code Charge.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalDeliveryAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the delivery charges on the return order, inclusive of tax. This
value only includes return order line items of type code Charge. This amount is
equal to TotalDeliveryAmount + TotalDeliveryTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalDeliveryTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalDeliveryAmount.
This is a calculated field.
102
Order Management Standard Objects ReturnOrder
TotalProductAdjustAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the return
order. This value only includes adjustments to return order line items of type
code Product.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalProductAdjustAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the products on the return
order, inclusive of tax. This value only includes adjustments to return order line
items of type code Product. This amount is equal to TotalProductAdjustAmount
+ TotalProductAdjustTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalProductAdjustTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAdjustmentAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalProductAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of the product charges on the return order. This value only includes return
order line items of type code Product.
103
Order Management Standard Objects ReturnOrder
TotalProductAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the product charges on the return order, inclusive of tax. This
value only includes return order line items of type code Product. This amount is
equal to TotalProductAmount + TotalProductTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalProductTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalProductAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
Usage
You can use return orders to track customer returns, customer repairs, or the return of inventory from a technician’s van stock to a
warehouse or supplier. Customers can initiate a return from a community, or agents can create return orders in response to a customer
call or technician request.
Return orders are composed of return order line items, which allow you to add details about the items being returned. To represent the
returned items, each line item must list one or more of the following: product, product item, asset, product request line item, and order
product. Return orders can be associated with a product request, case, account, contact, and order if needed. This versatility lets you use
return orders to track a wide range of return scenarios.
104
Order Management Standard Objects ReturnOrderItemAdjustment
Associated Objects
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object.
Otherwise, they’re available in the specified API version and later.
ReturnOrderChangeEvent (API version 48.0)
Change events are available for the object.
ReturnOrderFeed
Feed tracking is available for the object.
ReturnOrderHistory
History is available for tracked fields of the object.
ReturnOrderOwnerSharingRule
Sharing rules are available for the object.
ReturnOrderShare
Sharing is available for the object.
ReturnOrderItemAdjustment
Represents a price adjustment on a return order line item. This object is available in API version 50.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()
Fields
Field Details
Amount Type
currency
Properties
Create, Filter, Sort
Description
Amount, not including tax, of the adjustment.
Description Type
textarea
Properties
Create, Nillable, Update
105
Order Management Standard Objects ReturnOrderItemAdjustment
Field Details
Description
Description of the adjustment.
OrderItemAdjustLineSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order item adjustment line summary associated with the adjustment.
ReturnOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the return order associated with the return order line item to which the adjustment
applies.
This is a relationship field.
Relationship Name
ReturnOrder
Relationship Type
Lookup
Refers To
ReturnOrder
ReturnOrderItemAdjustmentNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the return order item adjustment.
ReturnOrderLineItemId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the return order line item to which this adjustment applies.
This is a relationship field.
Relationship Name
ReturnOrderLineItem
106
Order Management Standard Objects ReturnOrderItemTax
Field Details
Relationship Type
Lookup
Refers To
ReturnOrderLineItem
TotalAmtWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the adjustment, inclusive of tax. This amount is equal to Amount +
TotalTaxAmount.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the Amount.
ReturnOrderItemTax
Represents the tax on a return order line item or return order item adjustment. This object is available in API version 50.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), update(), upsert()
Fields
Field Details
Amount Type
currency
107
Order Management Standard Objects ReturnOrderItemTax
Field Details
Properties
Create, Filter, Sort
Description
Amount of tax represented by the return order item tax.
Description Type
textarea
Properties
Create, Nillable, Update
Description
Description of the return order item tax.
OrderItemTaxLineItemSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order item tax line item summary associated with the order item summary that
corresponds to the return order line item to which the tax applies.
Rate Type
percent
Properties
Filter, Nillable, Sort
Description
Tax rate used to calculate the Amount.
ReturnOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
ID of the associated return order.
This is a relationship field.
Relationship Name
ReturnOrder
Relationship Type
Lookup
Refers To
ReturnOrder
108
Order Management Standard Objects ReturnOrderItemTax
Field Details
ReturnOrderItemAdjustmentId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
If this object represents a tax on an adjustment, this value is the ID of the return order item
adjustment to which the tax applies. If this value is null, the adjustment applies to a return
order line item.
This is a relationship field.
Relationship Name
ReturnOrderItemAdjustment
Relationship Type
Lookup
Refers To
ReturnOrderItemAdjustment
ReturnOrderItemTaxNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
ID of the return order item tax.
ReturnOrderLineItemId Type
reference
Properties
Create, Filter, Group, Sort
Description
If this object represents a tax on a return order line item, this value is the ID of that return
order line item. If this object represents a tax on an adjustment, this value is the ID of the
return order line item to which the adjustment applies.
This is a relationship field.
Relationship Name
ReturnOrderLineItem
Relationship Type
Lookup
Refers To
ReturnOrderLineItem
TaxEffectiveDate Type
date
109
Order Management Standard Objects ReturnOrderLineItem
Field Details
Properties
Filter, Group, Nillable, Sort
Description
Date on which the Amount was calculated. Important due to tax rate changes over time.
Type Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Shows whether the amount on the tax line is an estimate or the final calculated amount.
Doesn’t set a value by default. Users can define automation to set and change the value as
needed.
Possible values are:
• Actual
• Estimated
ReturnOrderLineItem
Represents a specific product that is returned or repaired as part of a return order in Field service, or a specific order item that is returned
as part of a return order in Order Management. This object is available in API version 42.0 and later.
Return orders are available in Lightning Experience, Salesforce Classic, the Salesforce mobile app, the Field Service mobile app for Android
and iOS, and communities built using Salesforce Tabs + Visualforce.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Name Details
AssetId Type
reference
110
Order Management Standard Objects ReturnOrderLineItem
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The asset associated with the return order line item. One or more of the following
fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId, and
ProductRequestLineItemId.
This is a relationship field.
Relationship Name
Asset
Relationship Type
Lookup
Refers To
Asset
ChangeOrderItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the change order item associated with the return order line item.
This field is available in API version 50.0 and later.
This is a relationship field.
Relationship Name
ChangeOrderItem
Relationship Type
Lookup
Refers To
OrderItem
Description Type
textarea
Properties
Create, Nillable, Update
Description
Notes or context about the return order line item.
DestinationLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
111
Order Management Standard Objects ReturnOrderLineItem
Description
The location where the items are being returned to. For example, if the return
order tracks the return of products from a technician’s van to a warehouse, the
warehouse is the destination location.
This is a relationship field.
Relationship Name
DestinationLocation
Relationship Type
Lookup
Refers To
Location
GrossUnitPrice Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
Unit price, including tax, of the product represented by the associated order item
summary.
This field is available in API version 50.0 and later.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order line item was last modified. Its label in the user
interface is Last Modified Date.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the return order line item was last viewed.
OrderItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
112
Order Management Standard Objects ReturnOrderLineItem
Description
The order product associated with the return order line item. One or more of the
following fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId,
and ProductRequestLineItemId.
This is a relationship field.
Relationship Name
OrderItem
Relationship Type
Lookup
Refers To
OrderItem
OrderItemSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
ID of the order item summary associated with the return order line item.
This field is available in API version 50.0 and later.
ProcessingPlan Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Indicates the preferred fate of the items following their return. Available values
are:
• Repair—Repair the items and return them to the owner
• Discard—Discard the items
• Salvage—Salvage the items’ working parts
• Restock—Return the items to your inventory
Product2Id Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product associated with the return order line item. One or more of the
following fields must be filled out: AssetId, OrderItemId, Product2Id, ProductItemId,
and ProductRequestLineItemId.
This is a relationship field.
113
Order Management Standard Objects ReturnOrderLineItem
Relationship Name
Product2
Relationship Type
Lookup
Refers To
Product2
ProductItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product item representing the location of the product at the start of the
return. One or more of the following fields must be filled out: AssetId, OrderItemId,
Product2Id, ProductItemId, and ProductRequestLineItemId.
This is a relationship field.
Relationship Name
ProductItem
Relationship Type
Lookup
Refers To
ProductItem
ProductRequestLineItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product request line item associated with the return order line item. One or
more of the following fields must be filled out: AssetId, OrderItemId, Product2Id,
ProductItemId, and ProductRequestLineItemId.
This is a relationship field.
Relationship Name
ProductRequestLineItem
Relationship Type
Lookup
Refers To
ProductRequestLineItem
ProductServiceCampaignId Type
reference
114
Order Management Standard Objects ReturnOrderLineItem
Properties
Filter, Group, Nillable, Sort
Description
The product service campaign associated with the return order line item.
ProductServiceCampaignItemId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product service campaign item associated with the return order line item.
QuantityExpected Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The quantity of items expected to be returned.
This field is available in API version 50.0 and later.
QuantityReceived Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The actual quantity of items received for return.
This field is available in API version 50.0 and later.
QuantityRejected Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
The quantity of items rejected for return.
This field is available in API version 50.0 and later.
QuantityReturned Type
double
Properties
Create, Filter, Sort, Update
115
Order Management Standard Objects ReturnOrderLineItem
Description
The quantity of items being returned. If multiple types of products are being
returned, track each product in a different return order line item.
QuantityUnitOfMeasure Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Units of the returned items; for example, kilograms or liters. Quantity Unit of
Measure picklist values are inherited from the Quantity Unit of Measure field on
products.
ReasonForRejection Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Reason for rejecting returned items on this return order line item.
Possible values are:
• Damaged Item
• Expired Warranty
• Missing Item or Part
• Wrong Item
This field is available in API version 50.0 and later.
ReasonForReturn Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The reason the items are being returned. Available values are:
• Damaged
• Defective
• Duplicate Order
• Wrong Item
• Wrong Quantity
• Not Satisfied
• Outdated
• Other
116
Order Management Standard Objects ReturnOrderLineItem
ReturnOrderId Type
reference
Properties
Create, Filter, Group, Sort
Description
The return order that the return order line item belongs to.
This is a relationship field.
Relationship Name
ReturnOrder
Relationship Type
Lookup
Refers To
ReturnOrder
ReturnOrderLineItemNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
(Read only) Auto-generated number that identifies the return order line item.
SourceLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
117
Order Management Standard Objects ReturnOrderLineItem
Description
The items’ location at the start of the return or repair. For example, if the return
order tracks the return of products from a technician’s service vehicle to a
warehouse, the service vehicle is the source location.
This is a relationship field.
Relationship Name
SourceLocation
Relationship Type
Lookup
Refers To
Location
TotalAdjustmentAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Total of all price adjustments applied to the return order line item.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalAdjustmentAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total amount of the price adjustments applied to the return order line item,
inclusive of tax. This amount is equal to TotalAdjustmentAmount +
TotalAdjustmentTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalAdjustmentTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAdjustmentAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
118
Order Management Standard Objects ReturnOrderLineItem
TotalLineAmount Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort, Update
Description
Total, not including adjustments or tax, of the return order line item.
This field is available in API version 50.0 and later.
TotalLineAmountWithTax Type
currency
Properties
Filter, Nillable, Sort
Description
Total price of the return order line item, inclusive of tax. This amount is equal to
TotalLineAmount + TotalLineTaxAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalLineTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalLineAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
TotalPrice Type
currency
Properties
Filter, Nillable, Sort
119
Order Management Standard Objects ReturnOrderLineItem
Description
Total, including adjustments but not tax, of the return order line item. Equal to
UnitPrice times Quantity.
This is a calculated field.
TotalTaxAmount Type
currency
Properties
Filter, Nillable, Sort
Description
Tax on the TotalAmount.
This is a calculated field.
This field is available in API version 50.0 and later.
Type Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Type of the return order line item. Matches the type of the associated order item
summary. Delivery Charge indicates that the return order line item represents a
delivery charge. Order Product indicates that it represents any other type of
product, service, or charge. Each type corresponds to one type code.
Possible values are:
• Delivery Charge
• Order Product
This field is available in API version 50.0 and later.
TypeCode Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Type code of the return order line item. Matches the type code of the associated
order item summary. Processing depends on this value. Charge indicates that
the return order line item represents a delivery charge. Product indicates that it
represents an other type of product, service, or charge. Each type category
corresponds to one or more types.
Possible values are:
• Charge
• Product
120
Order Management Standard Objects SalesChannel
UnitPrice Type
currency
Properties
Create, Defaulted on create, Filter, Nillable, Sort, Update
Description
Unit price of the return order line item.
This field is available in API version 50.0 and later.
Associated Objects
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object.
Otherwise, they’re available in the specified API version and later.
ReturnOrderLineItemChangeEvent (API version 48.0)
Change events are available for the object.
ReturnOrderLineItemFeed
Feed tracking is available for the object.
ReturnOrderLineItemHistory
History is available for tracked fields of the object.
SalesChannel
Represents the origin of an order. For example, a web storefront, physical store, marketplace, or mobile app. Usually you will set up a
SalesChannel for each Site in your B2C Commerce implementation. This object is available in API version 48.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Details
Description Type
textarea
121
Order Management Standard Objects SalesChannel
Field Details
Properties
Create, Nillable, Update
Description
Description of the SalesChannel.
ExternalChannelNumber Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
External system identifier for the SalesChannel.
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. A null value can mean that
this record has only been referenced (LastReferencedDate) and not viewed.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who currently owns this SalesChannel. Default value is the user logged in
to the API to perform the create.
SalesChannelName Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
122
Order Management Standard Objects Shipment
Field Details
Description
Name of the SalesChannel.
SEE ALSO:
OrderSummary
Shipment
Represents the transport of inventory in field service or a shipment of order items in Order Management.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), search(), undelete(), update(), upsert()
Fields
Field Name Details
ActualDeliveryDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
Date the product was delivered.
DeliveredToId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The person or entity the product was delivered to.
This is a polymorphic relationship field.
Relationship Name
DeliveredTo
123
Order Management Standard Objects Shipment
Relationship Type
Lookup
Refers To
Group, User
DeliveryMethodId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The delivery method used for the shipment.
This field is available in API version 51.0 and later.
Description Type
textarea
Properties
Create, Nillable, Update
Description
Details not recorded in the provided fields
DestinationLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The place the product is to be delivered.
This is a relationship field.
Relationship Name
DestinationLocation
Relationship Type
Lookup
Refers To
Location
ExpectedDeliveryDate Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
Date the product is expected to be delivered.
124
Order Management Standard Objects Shipment
LastReferencedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp when the current user last accessed this record, a record related
to this record, or a list view.
LastViewedDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp when the current user last viewed this record or list view. If this
value is null, the user might have only accessed this record or list view
(LastReferencedDate) but not viewed it.
OrderSummaryId Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
The order summary associated with the shipment.
This field is available in API version 51.0 and later.
OwnerId Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The owner of the shipment.
This is a polymorphic relationship field.
125
Order Management Standard Objects Shipment
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User
Provider Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
The company or person making the transfer.
ShipFromAddress Type
address
Properties
Filter, Nillable
Description
The place the product is coming from.
ShipFromCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the address where the shipment originates.
ShipFromCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the address where the shipment originates.
ShipFromGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
126
Order Management Standard Objects Shipment
Description
Accuracy level of the geocode for the address where the shipment originates.
See Compound Field Considerations and Limitations for details on geolocation
compound fields.
ShipFromLatitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Longitude to specify the precise geolocation of the address where the
shipment originates. Acceptable values are numbers between –90 and 90 with
up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.
ShipFromLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the address where the
shipment originates. Acceptable values are numbers between –180 and 180 with
up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.
ShipFromPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the address where the shipment originates.
ShipFromState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
127
Order Management Standard Objects Shipment
Description
The state of the address where the shipment originates.
ShipFromStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the address where the shipment originates.
ShipToAddress Type
address
Properties
Filter, Nillable
Description
The physical address where the shipment is delivered.
ShipToCity Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The city of the address where the shipment is delivered.
ShipToCountry Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The country of the address where the shipment is delivered.
ShipToGeocodeAccuracy Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Accuracy level of the geocode for the address where the shipment is delivered.
See Compound Field Considerations and Limitations for details on geolocation
compound fields.
128
Order Management Standard Objects Shipment
ShipToLongitude Type
double
Properties
Create, Filter, Nillable, Sort, Update
Description
Used with Latitude to specify the precise geolocation of the address where the
shipment is delivered. Acceptable values are numbers between –180 and 180
with up to 15 decimal places. See Compound Field Considerations and Limitations
for details on geolocation compound fields.
ShipToName Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The shipment recipient.
ShipToPostalCode Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The postal code of the address where the shipment is delivered.
ShipToState Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
129
Order Management Standard Objects Shipment
Description
The state of the address where the shipment is delivered.
ShipToStreet Type
textarea
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The street of the address where the shipment is delivered.
ShipmentNumber Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
An auto-generated number identifying the shipment.
SourceLocationId Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The field service location where the shipment originates.
This is a relationship field.
Relationship Name
SourceLocation
Relationship Type
Lookup
Refers To
Location
Status Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The status of the shipment. The picklist includes the following values, which can
be customized:
• Shipped—The product is in transit.
• Delivered—The product is at the source location.
130
Order Management Standard Objects Shipment
TrackingNumber Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Tracking number for the shipment.
TrackingUrl Type
url
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
URL of website used for tracking the shipment.
Associated Objects
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object.
Otherwise, they’re available in the specified API version and later.
ShipmentChangeEvent (API version 48.0)
Change events are available for the object.
ShipmentFeed
Feed tracking is available for the object.
ShipmentHistory
History is available for tracked fields of the object.
ShipmentOwnerSharingRule
Sharing rules are available for the object.
ShipmentShare
Sharing is available for the object.
131
Order Management Standard Objects ShipmentItem
ShipmentItem
Represents an order item included in a shipment. This object is available in API version 51.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(),
retrieve(), undelete(), update(), upsert()
Fields
Field Details
Description Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the shipment item.
ExpectedDeliveryDate Type
dateTime
Properties
Filter, Nillable, Sort
Description
Expected delivery date of the shipment that contains the shipment item.
FulfillmentOrderLineItemId Type
reference
Properties
Filter, Nillable, Sort
Description
The FulfillmentOrderLineItem (fulfillment order product) corresponding to the shipment
item.
OrderItemSummaryId Type
reference
Properties
Filter, Nillable, Sort
132
Order Management Standard Objects ShipmentItem
Field Details
Description
The OrderItemSummary (order product summary) corresponding to the shipment item.
Product2Id Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product represented by the shipment item.
This is a relationship field.
Relationship Name
Product2
Relationship Type
Lookup
Refers To
Product2
Quantity Type
double
Properties
Create, Filter, Sort, Update
Description
The quantity of products represented by the shipment item.
ShipmentId Type
reference
Properties
Create, Filter, Group, Sort
Description
(Master-Detail) The shipment that contains the shipment item.
This is a relationship field.
Relationship Name
Shipment
Relationship Type
Lookup
Refers To
Shipment
ShipmentItemNumber Type
string
133
Order Management Standard Objects Order Summary Entity Relationship Diagram
Field Details
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
An auto-generated number identifying the shipment item.
TrackingNumber Type
string
Properties
Filter, Group, Nillable, Sort
Description
The tracking number of the shipment that contains the shipment item.
TrackingUrl Type
url
Properties
Filter, Group, Nillable, Sort
Description
The tracking URL of the shipment that contains the shipment item.
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
ShipmentItemFeed
Feed tracking is available for the object.
ShipmentItemHistory
History is available for tracked fields of the object.
134
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
Integration Notes
General:
• B2C Commerce sends orders in New or Open status to Salesforce Order Management. To delay sending an order, for example, to
perform a fraud check, keep it in Created status.
• B2C Commerce sends order data to Salesforce Order Management according to a set frequency and when the packet of pending
orders reaches a certain size. The process is similar to the one used for Commerce Cloud Order Management. In addition, the
integration contacts B2C Commerce every 5 minutes to request any pending order data.
• The integration associates catalogs in B2C Commerce with SalesChannels in Order Management. It identifies the SalesChannel for
an order by searching for a SalesChannelName value that matches the catalog/catalog-id value in the order data.
135
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
• If the Salesforce org ID or login URL changes, or if you run DBInit on your B2C Commerce storefront, the integration requires updating.
Open a case with Salesforce Customer Support to reprovision the integration as described in the Order Management Implementation
Guide.
• If you refresh a sandbox org, or change the Tenant ID of a B2C Commerce instance, repeat the implementation process as described
in the Order Management Implementation Guide. For information on sandbox orgs, see the sandbox topics in Salesforce Help.
Shopper Accounts:
• When the order/billing-address/company-name value in the order data is not null, Order Management always uses
a standard account and contact to represent the shopper.
• If you enable Person Accounts, don’t change the names or API names of the two default Account record types. The B2C Integration
uses those types to represent shopper accounts.
• For detailed information on the storage and identification of shopper accounts, see Order Management Shopper Records in Salesforce
Order Management in Salesforce Help.
International Considerations
• If the order/taxation value for an order is net, then the integration creates an OrderItemTaxLineItem record for each
OrderItem and OrderItemAdjustmentLineItem record.
• If Salesforce state and country/territory picklists aren’t enabled:
– The state-code values in order data must match a standard 2-character ISO state or province code. The integration copies
them to State fields on Salesforce records.
– The country-code values in order data must match a standard 2-character ISO country/territory code. The integration
copies them to Country fields on Salesforce records.
Payments
• Order data includes a paired payment instrument and payment transaction for each payment associated with the order.
• If an order/payments/payment/transaction-type value in the order data starts with auth, then the integration
creates a PaymentAuthorization record for that transaction. If the value is sale or capture, then it creates a Payment record.
These checks aren’t case-sensitive.
• For a credit or debit card payment type, the payments/payment/credit-card/card-type value in the order data
must match a value in the CardType picklist on the CardPaymentMethod object.
• To handle a payment method that doesn’t match a CardPaymentMethod CardType or DigitalWallet Type, create a custom payment
method as described later in this section.
• The integration recognizes certain custom attributes on order/payments/payment and copies them to standard fields on
the PaymentGatewayLog record in Salesforce. To take advantage of this feature, create and populate custom attributes with the
following exact names on the Order Payment Transaction object in B2C Commerce:
– authCode (value copied to PaymentGatewayLog.GatewayAuthCode)
– avsResultCode (value copied to PaymentGatewayLog.GatewayAvsCode)
– approvalStatus (value copied to PaymentGatewayLog.GatewayResultCode)
136
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
Promotions
• The integration creates an OrderAdjustmentGroup record for each order-level
price-adjustments/price-adjustment/promotion-id included in the order data. For each OrderAdjustmentGroup,
it creates an OrderItemAdjustmentLineItem record for each OrderItem in the order.
• If the order/taxation value for an order is net, then the integration creates an OrderItemTaxLineItem record for each
OrderItemAdjustmentLineItem record.
For information on the Salesforce state and country/territory picklists, see Let Users Select State and Country from Picklists in Salesforce
Help.
2. Does the payment method ID in the order data match the Gateway Provider Payment Method Type of a GtwyProvPaymentMethodType
record in Salesforce? If so, then create a record in Salesforce according to the GtwyProvPaymentMethodType’s Payment Method
Type.
3. Does the card type in the order data match an entry in the Card Type picklist on the CardPaymentMethod object in Salesforce? If so,
then create a CardPaymentMethod record in Salesforce.
137
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
Define a custom payment method by creating a GtwyProvPaymentMethodType (Gateway Provider Payment Method Type) record. The
gateway provider payment method type associates the custom payment method with a payment gateway and defines it as an
AlternativePaymentMethod, CardPaymentMethod, or DigitalWallet.
Note: You can’t create or access a GtwyProvPaymentMethodType record in the Salesforce UI. To create one, insert a record
using Workbench. The API name of the object is GtwyProvPaymentMethodType, at the URL
/services/data/v51.0/sobjects/GtwyProvPaymentMethodType.
Set the GtwyProvPaymentMethodType fields as described here.
Comments
Optional description.
Developer Name
The unique API name of the record.
Master Label
A human-readable name for the record.
Gateway Provider Payment Method Type
The name of the payment method in the storefront. This value must exactly match the payment method ID used in B2C Commerce.
Payment Gateway Provider Id
Reference to the Payment Gateway Provider record associated with the payment processor for the payment method.
Payment Method Type
AlternativePaymentMethod CardPaymentMethod, or DigitalWallet. To use AlternativePaymentMethod, first
create a corresponding RecordType record.
Record Type Id
If using an AlternativePaymentMethod, this value is a reference to the RecordType record.
Here’s an example of a gateway provider payment method definition:
{
"DeveloperName" : "BankTransfer"
"MasterLabel" : "Bank Transfer",
"GtwyProviderPaymentMethodType" : "directBanking",
"PaymentGatewayProviderId" : "0cJaa0000000001E67",
"PaymentMethodType" : "AlternativePaymentMethod",
“RecordTypeId” : "012aa000000008A34F"
}
Important: A change order is an Order record. If you add a required custom field to the Order object, update the service flows
to set that field when they create a change order. Otherwise, the flow will fail.
138
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
If order data includes a custom attribute value, but the corresponding Salesforce object has no matching custom field, the integration
ignores that attribute. If a custom field exists in Salesforce, and order data doesn’t include a matching custom attribute value, the
integration ignores it.
Important: If a custom field in Salesforce is required, and it corresponds to a custom storefront attribute, then order data must
include a value for that attribute. Without that value, the integration can’t create the corresponding Salesforce record. In that case,
the integration fails with an error.
Note: At the API level, custom field names in Salesforce always end in __c. Don’t include it in the names of the matching attributes
on your storefront objects. However, if you include a custom namespace in a custom field name, also include it in the name of the
matching storefront object attribute. For example, if the API name of your custom field in Salesforce is
mynamespace_FieldName__c, name your matching storefront object attribute mynamespace_FieldName. Limit
your custom field names to 40 characters (37 plus __c).
You can support product bundles by passing that information as custom data. To set up product bundle associations, define a custom
guid attribute for the line item object in your storefront. In Salesforce, define a matching field on OrderItem and OrderItemSummary.
When creating an order, assign the same value to the custom attribute on line items that belong together. You can define another
custom attribute to identify a line item as part of a bundle. Then build logic into your fulfillment process to handle them accordingly.
Note: When using custom attributes to support bundles, customize your return and cancel flows to handle them according to
your business rules. For example, design your cancel process so that when you cancel a bundle product, any associated bundle
products are also canceled. Likewise, you can design your return process to disallow the return of only some of the products in a
bundle.
Note: The integration doesn’t currently support custom attributes on B2C product options.
You can use matching custom attributes and fields on these sets of objects:
Order payment instrument and order payment transaction CardPaymentMethod, DigitalWallet, Payment,
PaymentAuthorization, and PaymentGatewayLog
The integration supports the following data types for matching custom attributes and fields:
• Boolean
• Currency
• Datetime (Date isn’t supported)
• Double
• Multipicklist
• Phone
• Picklist
• Reference
• String
• TextArea
139
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
• URL
The Order Management B2C Service permission set provides the integration with access to Salesforce records. When you add a custom
field to a Salesforce object, update that permission set by adding read and edit access to the new field. You also must add edit access
to the permission set that provides access for your Order Management users.
1. From Setup, in the Quick Find box, enter Permission Sets, and then select Permission Sets.
2. Select Order Management B2C Service.
3. In the Apps section, click Object Settings.
4. Select the object that has the custom field.
5. Click Edit.
6. In the Field Permissions section, select the Edit Access checkbox for the custom field.
7. Click Save.
8. Return to the list of permission sets by selecting Permission Sets in the Setup navigation menu.
9. Select the permission set that controls access for your Order Management users. Normally, it’s called OM Console.
10. In the Apps section, click Object Settings.
11. Select the object that has the custom field.
12. Click Edit.
13. In the Field Permissions section, select the Edit Access checkbox for the custom field.
14. Click Save.
140
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/billing-address/first-name and FirstName This value is only set for person accounts.
order/billing-address/second-name It’s set to
order/billing-address/first-name
+" "+
order/billing-address/second-name.
141
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
AlternativePaymentMethod Object
The integration checks the payment_method value of each payment instrument in an order. If it matches the Gateway Provider
Payment Method Type of a GtwyProvPaymentMethodType record, then the integration creates a record according to the
GtwyProvPaymentMethodType’s Payment Method Type value. If the Payment Method Type is AlternativePaymentMethod, then the
integration creates an AlternativePaymentMethod record using the associated RecordType.
Note: To use AlternativePaymentMethod, first create a RecordType and GtwyProvPaymentMethodType for your custom payment
type as described in the Create Custom Payment Methods section.
order/payments/payment/credit-card/card-token GatewayToken
order/customer/customer-email Email
order/billing-address/company-name CompanyName
142
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/billing-address/city PaymentMethodCity
order/billing-address/postal-code PaymentMethodPostalCode
143
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/billing-address/phone Phone
orderremoteHost IpAddress
CardPaymentMethod Object
The integration checks the payment_method value of each payment instrument in an order against the following regex. If it matches,
then the integration creates a DigitalWallet record for the instrument. If it doesn’t match, then the integration checks the
payment/credit-card/card-type value against the CardType picklist on the CardPaymentMethod object. If the picklist
contains a match, then the integration creates a CardPaymentMethod record for the instrument. Otherwise, to support the payment
method, you must set up a custom payment method for it.
paypal|visa_checkout|pay_by_check|.*(apple|google|android|amazon|ali).*(pay)*
144
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/payments/payment/credit-card/card-number InputCardNumber
order/payments/payment/credit-card/card-holder CardHolderName
order/payments/payment/credit-card/expiration-year ExpiryYear
order/payments/payment/credit-card/expiration-month ExpiryMonth
order/payments/payment/credit-card/card-token GatewayToken
order/billing-address/city PaymentMethodCity
145
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
146
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
Contact Object
When using person accounts, access shopper contact data using person account records, not contact records. When using standard
accounts and contacts, the BillToContactId field on these objects points to the associated contact record:
• Credit Memo
• Fulfillment Order
• Invoice
• Order
• Order Summary
order/customer/customer-email Email
order/billing-address/first-name FirstName
order/billing-address/last-name LastName
order/billing-address/phone Phone
DigitalWallet Object
The integration checks the payment_method value of each payment instrument in an order. If it matches the following regex, then
the integration creates a DigitalWallet record for the instrument. If it doesn’t match, then the integration tries to create an
AlternativePaymentMethod or a CardPaymentMethod record for the instrument.
paypal|visa_checkout|pay_by_check|.(apple|google|android|amazon|ali).(pay)*
order/payments/payment/credit-card/card-token GatewayToken
order/billing-address/city PaymentMethodCity
147
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/billing-address/postal-code PaymentMethodPostalCode
148
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
Order Object
The integration uses both the order/order-no and catalog/catalog-id values to check for duplicate orders. It looks for
an existing order record with an OrderReferenceNumber matching the order-no and a SalesChannelId pointing to a SalesChannel
that matches the catalog-id. If it finds one, it doesn’t create a duplicate order.
Note: If the catalog ID for a sales channel changes, and an existing order is received with a different catalog ID, the integration
considers it a new order and creates a duplicate record.
order/customer/customer-name Name
order/order-no OrderReferenceNumber
149
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/billing-address/city BillingCity
order/billing-address/postal-code BillingPostalCode
150
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/billing-address/phone BillingPhoneNumber
order/order-date OrderedDate
order/customer/customer-email BillingEmailAddress
151
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
OrderAdjustmentGroup Object
The integration creates one OrderAdjustmentGroup record for each promotion that applies to an entire order or to multiple items in an
order. For an order-level promotion, it assigns the OrderAdjustmentGroup to one OrderItemAdjustmentLineItem record for each OrderItem
record in the order. It creates the OrderAdjustmentGroup even if the order only contains one OrderItem. For an item-level promotion
that applies to multiple OrderItems, it assigns the OrderAdjustmentGroup to one OrderItemAdjustmentLineItem record for each OrderItem
record in the Order that the promotion applies to. If an item-level promotion only applies to one OrderItem, the integration doesn’t
create an OrderAdjustmentGroup for it.
Note: Shipping adjustments that aren’t part of an order-level promotion are treated as item-level promotions. An example of an
order-level promotion is “20% off and free shipping.”
order/price-adjustments/price-adjustment/promotion-id Description
OrderDeliveryGroup Object
The integration creates an OrderDeliveryGroup record for each shipment (also called a LineItemGroup in B2C Commerce) in the order
data.
For order changes such as returns and cancellations that include prorated delivery amounts, the proration considers the
OrderDeliveryGroups containing OrderItems that are part of the change. For example, consider an order that has three OrderDeliveryGroups,
each with multiple OrderItems. A return of two OrderItems, each from a different OrderDeliveryGroup, uses the total delivery charges
associated with those two OrderDeliveryGroups. It prorates that amount across the OrderItems in those OrderDeliveryGroups by OrderItem
price. The shipping refund equals the prorated delivery amounts for the two returned OrderItems. The return doesn’t consider any
delivery charges associated with the third OrderDeliveryGroup.
order/shipments/shipment/shipping-address/city DeliverToCity
152
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/shipments/shipment/shipping-address/postal-code DeliverToPostalCode
153
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/shipments/shipment/shipping-address/phone PhoneNumber
OrderItem Object
If an order has a TaxLocaleType of Net, then the integration also creates an OrderItemTaxLineItem record for each OrderItem record.
154
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
order/product-lineitems/product-lineitem/quantity Quantity
order/product-lineitems/product-lineitem/net-price TotalLineAmount
155
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
OrderItemAdjustmentLineItem Object
An OrderItemAdjustmentLineItem record represents the application of a promotion to an OrderItem record. Thus, an OrderItem record
has one associated OrderItemAdjustmentLineItem record for each promotion that applies to it.
If an order has a TaxLocaleType of Net, then the integration also creates an OrderItemTaxLineItem record for each
OrderItemAdjustmentLineItem record.
price-adjustments/price-adjustment/net-price Amount
price-adjustments/price-adjustment/tax TotalTaxAmount
order/price-adjustments/price-adjustment/lineitem-text PromotionText
156
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
OrderItemTaxLineItem Object
If an order has a TaxLocaleType of Net, then the integration creates an OrderItemTaxLineItem record for each OrderItem and
OrderItemAdjustmentLineItem record in the order. If an order has a TaxLocaleType of Gross, then the integration doesn’t create any
OrderItemTaxLineItem records for it.
• OrderItemAdjustmentLineItem:
– Product- StockKeepingUnit
+ " - Adjustment Tax"
– Shipping- "Delivery Charge
- Adjustment Tax"
order/product-lineitems/product-lineitem/tax Amount
order/product-lineitems/product-lineitem/tax-rate Rate
order/order-date TaxEffectiveDate
157
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
Payment Object
If an order/payments/payment/transaction-type value in the order data is sale or capture, then the integration
creates a Payment record for that transaction. If the value starts with auth, then it creates a PaymentAuthorization record. These checks
aren’t case-sensitive .
order/payments/payment/amount Amount
order/customer/customer-email Email
order/order-date Date
order/payments/payment/transaction-type Type
order/billing-address/phone Phone
158
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
PaymentAuthorization Object
If an order/payments/payment/transaction-type value in the order data starts with auth, then the integration creates
a PaymentAuthorization record for that transaction. If the value is sale or capture, then it creates a Payment record. These checks
aren’t case-sensitive .
order/payments/payment/amount Amount
159
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
PaymentGatewayLog Object
B2C Commerce XSD Value Salesforce Object Field Notes
N/A PaymentGatewayId This value is set to the ID of the
PaymentGateway record whose
ExternalReference value matches the
processor ID value of the order payment
instrument associated with the order
payment transaction.
160
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
PaymentGroup Object
B2C Commerce XSD Value Salesforce Object Field Notes
N/A SourceObjectId This value is set to the ID of the original
Order record that the payments in the group
apply to.
161
Order Management Standard Objects Salesforce B2C Commerce Storefront Order Data Map
PricebookEntry Object
Salesforce Order Management doesn’t use the PricebookEntry object. It creates a PriceBookEntry record for each Product2 because the
OrderItem object requires a PricebookEntryId value.
Note: If you turn on the Optional Price Books feature, then Order Management doesn’t create price book entries for product
records that it creates from order data. If you turn off the feature, then you must add price book entries manually.
Product2 Object
The integration identifies products by first searching for a Product2 with a StockKeepingUnit value that matches the product-id
value in the order data. If it doesn’t find one, it looks for a Product2 with a ProductCode value that matches the product-id value.
If it still doesn’t find one, then it creates a Product2 record.
order/product-lineitem/product-name Name
Promotion Object
For information on the Promotion object, see the Loyalty Management Developer Guide.
162
Order Management Standard Objects Import Existing Data
order/price-adjustments/price-adjustment/lineitem-text Description
SalesChannel Object
The integration associates B2C Commerce catalog IDs with Salesforce SalesChannels.
catalog/catalog-id SalesChannelName
Note: Examples of orders that use the unmanaged lifecycle type include historical orders and orders managed by an external
system.
When importing order data, consider Order Management’s complex object dependencies. To maintain data integrity, use a composite
REST API request to import order data that lives in multiple related Salesforce records. For example, you can make one composite request
to import order data in this sequence, which ensures that a record is created after other records that it references.
Note: This list is a simple example. Real order data usually involves more objects.
1. Shopper account
2. Products
163
Order Management Standard Objects Import Existing Data
Important: When importing data using API calls, remember that they count toward your API limits. You can request a temporary
increase for importing historical orders by opening a case with Salesforce Customer Support. Allow at least two weeks for Support
to arrange the increase.
Customer Email Address • When using person accounts for the shopper: Account
object—Person Email field
• When using a standard account and contact for the shopper:
Contact object—Email field
Customer Billing Address First Name and Last Name (concatenated) Account object—Name field (individual shoppers when not using
person accounts)
Customer Billing Address Company Name Account object—Name field (business shoppers)
164
CHAPTER 3 Salesforce Order Management in Apex
In this chapter ... Salesforce Order Management and Omnichannel Inventory include Apex classes in the ConnectApi
namespace.
• Salesforce Order
Management Apex
Classes
• Salesforce Order
Management Apex
Inputs
• Salesforce Order
Management Apex
Outputs
165
Salesforce Order Management in Apex Salesforce Order Management Apex Classes
FulfillmentOrder Class
Fulfill orders in Order Management.
OmnichannelInventoryService Class
Route orders to inventory locations in Order Management.
OrderPaymentSummary Class
Work with payments in Order Management.
OrderSummary Class
Work with orders in Order Management.
OrderSummaryCreation Class
Create Order Summaries in Order Management.
ReturnOrder Class
Process ReturnOrders in Order Management.
Routing Class
Route orders to inventory locations in Order Management.
FulfillmentOrder Class
Fulfill orders in Order Management.
Namespace
ConnectApi
FulfillmentOrder Methods
The following are methods for FulfillmentOrder. All methods are static.
cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)
Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.
createFulfillmentOrders(fulfillmentOrderInput)
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.
createInvoice(fulfillmentOrderId, invoiceInput)
Create an invoice for a FulfillmentOrder that doesn’t have one.
createMultipleFulfillmentOrder(multipleFulfillmentOrderInput)
Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.
166
Salesforce Order Management in Apex FulfillmentOrder Class
createMultipleInvoices(invoicesInput)
Create Invoices for multiple FulfillmentOrders.
cancelFulfillmentOrderLineItems(fulfillmentOrderId,
cancelFulfillmentOrderLineItemsInput)
Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
cancelFulfillmentOrderLineItems(String fulfillmentOrderId,
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
cancelFulfillmentOrderLineItemsInput)
Parameters
fulfillmentOrderId
Type: String
ID of the FulfilllmentOrder.
cancelFulfillmentOrderLineItemsInput
Type: ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
List of FulfillmentOrderLineItems to cancel.
Return Value
Type: ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
Example
String fulfillmentOrderId = '0a3xx0000000085AAA';
List<ConnectApi.FulfillmentOrderLineItemInputRepresentation> itemToCancelList = new
List<ConnectApi.FulfillmentOrderLineItemInputRepresentation>();
for(FulfillmentOrderLineItem fulfillmentOrderLineItem :
fulfillmentOrder.FulfillmentOrderLineItems){
ConnectApi.FulfillmentOrderLineItemInputRepresentation itemToCancel = new
ConnectApi.FulfillmentOrderLineItemInputRepresentation();
itemToCancel.fulfillmentOrderLineItemId = fulfillmentOrderLineItem.Id;
itemToCancel.quantity = 1;
167
Salesforce Order Management in Apex FulfillmentOrder Class
itemToCancelList.add(itemToCancel);
}
ConnectAPI.FulfillmentOrderCancelLineItemsOutputRepresentation result =
ConnectAPI.FulfillmentOrder.cancelFulfillmentOrderLineItems(fulfillmentOrderId, input);
createFulfillmentOrders(fulfillmentOrderInput)
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.FulfillmentOrderOutputRepresentation
createFulfillmentOrders(ConnectApi.FulfillmentOrderInputRepresentation
fulfillmentOrderInput)
Parameters
fulfillmentOrderInput
Type: ConnectApi.FulfillmentOrderInputRepresentation
OrderItemSummaries to allocate, with location and delivery information.
Return Value
Type: ConnectApi.FulfillmentOrderOutputRepresentation
Example
String orderSummaryId = '1Osxx0000004CCG';
String fulfillmentType = 'warehouse';
168
Salesforce Order Management in Apex FulfillmentOrder Class
fulfillmentOrderInput.orderSummaryId = orderSummaryId;
fulfillmentOrderInput.orderDeliveryGroupSummaryId = orderDeliveryGroupSummary.Id;
List<ConnectApi.FulfillmentGroupInputRepresentation> fulfillmentGroups = new
List<ConnectApi.FulfillmentGroupInputRepresentation>();
ConnectApi.FulfillmentGroupInputRepresentation fulfillmentGroup = new
ConnectApi.FulfillmentGroupInputRepresentation();
fulfillmentGroup.fulfilledFromLocationId = warehouseFromLocationId;
fulfillmentGroup.fulfillmentType = fulfillmentType;
fulfillmentGroup.orderItemSummaries = orderItemSummaries;
fulfillmentGroups.add(fulfillmentGroup);
fulfillmentOrderInput.fulfillmentGroups = fulfillmentGroups;
ConnectApi.FulfillmentOrderOutputRepresentation result =
ConnectAPI.FulfillmentOrder.createFulfillmentOrders(fulfillmentOrderInput);
createInvoice(fulfillmentOrderId, invoiceInput)
Create an invoice for a FulfillmentOrder that doesn’t have one.
API Version
48.0
Requires Chatter
No
169
Salesforce Order Management in Apex FulfillmentOrder Class
Signature
public static ConnectApi.FulfillmentOrderInvoiceOutputRepresentation createInvoice(String
fulfillmentOrderId, ConnectApi.FulfillmentOrderInvoiceInputRepresentation invoiceInput)
Parameters
fulfillmentOrderId
Type: String
ID of the FulfillmentOrder.
invoiceInput
Type: ConnectApi.FulfillmentOrderInvoiceInputRepresentation
Required input with no data.
Return Value
Type: ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
Example
String fulfillmentOrderId = '0a3xx0000000085AAA';
createMultipleFulfillmentOrder(multipleFulfillmentOrderInput)
Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.
API Version
50.0
Requires Chatter
No
Signature
public static ConnectApi.MultipleFulfillmentOrderOutputRepresentation
createMultipleFulfillmentOrder(ConnectApi.MultipleFulfillmentOrderInputRepresentation
multipleFulfillmentOrderInput)
Parameters
multipleFulfillmentOrderInput
Type: ConnectApi.MultipleFulfillmentOrderInputRepresentation
Wraps a list of inputs for creating fulfillment orders.
170
Salesforce Order Management in Apex OmnichannelInventoryService Class
Return Value
Type: ConnectApi.MultipleFulfillmentOrderOutputRepresentation
createMultipleInvoices(invoicesInput)
Create Invoices for multiple FulfillmentOrders.
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
createMultipleInvoices(ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
invoicesInput)
Parameters
invoicesInput
Type: ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
The FulfillmentOrders to create Invoices for.
Return Value
Type: ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
OmnichannelInventoryService Class
Route orders to inventory locations in Order Management.
Namespace
ConnectApi
OmnichannelInventoryService Methods
The following are methods for OmnichannelInventoryService. All methods are static.
createReservation(createReservationInputRepresentation)
Create an inventory reservation in Omnichannel Inventory.
fulfillReservation(fulfillReservationInputRepresentation)
Fulfill one or more inventory reservations.
171
Salesforce Order Management in Apex OmnichannelInventoryService Class
getInventoryAvailability(inventoryAvailabilityInputRepresentation)
Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
getInventoryAvailabilityUploadStatus(uploadId)
Retrieve the status of an inventory availability upload job.
getPublishLocationStructureStatus(uploadId)
Retrieve the status of a publish location structure job.
publishLocationStructure()
Asynchronously publish information about your inventory locations and location groups to Omnichannel Inventory. The publish
includes records whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use to
retrieve the status of the publish job.
releaseReservation(releaseReservationInputRepresentation)
Release one or more existing inventory reservations to free up that inventory.
submitInventoryAvailabilityUpload(fileUpload)
Upload an inventory availability data file to Omnichannel Inventory.
transferReservation(transferReservationInputRepresentation)
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.
createReservation(createReservationInputRepresentation)
Create an inventory reservation in Omnichannel Inventory.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCICreateReservationOutputRepresentation
createReservation(ConnectApi.OCICreateReservationInputRepresentation
createReservationInputRepresentation)
Parameters
createReservationInputRepresentation
Type: ConnectApi.OCICreateReservationInputRepresentation
Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.
Return Value
Type: ConnectApi.OCICreateReservationOutputRepresentation
172
Salesforce Order Management in Apex OmnichannelInventoryService Class
fulfillReservation(fulfillReservationInputRepresentation)
Fulfill one or more inventory reservations.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIFulfillReservationOutputRepresentation
fulfillReservation(ConnectApi.OCIFulfillReservationInputRepresentation
fulfillReservationInputRepresentation)
Parameters
fulfillReservationInputRepresentation
Type: ConnectApi.OCIFulfillReservationInputRepresentation
Wraps a list of inventory reservations to fulfill.
Return Value
Type: ConnectApi.OCIFulfillReservationOutputRepresentation
getInventoryAvailability(inventoryAvailabilityInputRepresentation)
Retrieve inventory availability data for one or more products at one or more inventory locations or location groups.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
getInventoryAvailability(ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
inventoryAvailabilityInputRepresentation)
Parameters
inventoryAvailabilityInputRepresentation
Type: ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
Details of a request to retrieve inventory availability.
173
Salesforce Order Management in Apex OmnichannelInventoryService Class
Return Value
Type: ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
getInventoryAvailabilityUploadStatus(uploadId)
Retrieve the status of an inventory availability upload job.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
getInventoryAvailabilityUploadStatus(String uploadId)
Parameters
uploadId
Type: String
The upload ID of the upload job.
Return Value
Type: ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
getPublishLocationStructureStatus(uploadId)
Retrieve the status of a publish location structure job.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
getPublishLocationStructureStatus(String uploadId)
174
Salesforce Order Management in Apex OmnichannelInventoryService Class
Parameters
uploadId
Type: String
The upload ID of the publish job.
Return Value
Type: ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
publishLocationStructure()
Asynchronously publish information about your inventory locations and location groups to Omnichannel Inventory. The publish includes
records whose IsEnabled and ShouldSyncWithOci fields are both true. This method returns an ID that you can use to retrieve the status
of the publish job.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIPublishLocationStructureOutputRepresentation
publishLocationStructure()
Return Value
Type: ConnectApi.OCIPublishLocationStructureOutputRepresentation
releaseReservation(releaseReservationInputRepresentation)
Release one or more existing inventory reservations to free up that inventory.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIReleaseReservationOutputRepresentation
releaseReservation(ConnectApi.OCIReleaseReservationInputRepresentation
releaseReservationInputRepresentation)
175
Salesforce Order Management in Apex OmnichannelInventoryService Class
Parameters
releaseReservationInputRepresentation
Type: ConnectApi.OCIReleaseReservationInputRepresentation
Details of one or more inventory reservations to release.
Return Value
Type: ConnectApi.OCIReleaseReservationOutputRepresentation
submitInventoryAvailabilityUpload(fileUpload)
Upload an inventory availability data file to Omnichannel Inventory.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
submitInventoryAvailabilityUpload(ConnectApi.BinaryInput fileUpload)
Parameters
fileUpload
Type: ConnectApi.BinaryInput
JSON file containing inventory availability data.
Return Value
Type: ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
Usage
To create an inventory data file, format the data as a series of JSON entries representing locations and individual inventory records.
Inventory Import Data Considerations:
• Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
• When the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location
entry.
• For each location entry, specify "mode":"UPDATE".
• Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The record Id protects against importing
duplicate data.
• Each inventory record entry requires an effectiveDate.
176
Salesforce Order Management in Apex OmnichannelInventoryService Class
Note: The file size limit is 100 MB. For larger data sets, you can compress the file using GZIP or split the data into multiple files.
Note: For readability, this example shows the first few entries on multiple lines. In the import file, each location and inventory
record entry must be on a single line.
{
"location":"Warehouse-A", // location identifier
"mode":"UPDATE" // must be UPDATE (other operations might be available in future releases)
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0", // unique identifier for the inventory
record
"onHand":10,
"sku":"12389156",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[ // list of future restocks
{
"quantity":1,
"expectedDate":"2021-04-18T14:05:22.781-07:00"
},
{
"quantity":5,
"expectedDate":"2021-05-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e312345",
"onHand":10,
"sku":"9485728",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[
{
"quantity":10,
"expectedDate":"2021-04-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{"location":"Warehouse-B","mode":"UPDATE"}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc123de","onHand":10,"sku":"12389156","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":1,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc98765","onHand":10,"sku":"93867201","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":5,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
transferReservation(transferReservationInputRepresentation)
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.
177
Salesforce Order Management in Apex OrderPaymentSummary Class
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.OCITransferReservationOutputRepresentation
transferReservation(ConnectApi.OCITransferReservationInputRepresentation
transferReservationInputRepresentation)
Parameters
transferReservationInputRepresentation
Type: ConnectApi.OCITransferReservationInputRepresentation
Wraps a list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
Return Value
Type: ConnectApi.OCITransferReservationOutputRepresentation
OrderPaymentSummary Class
Work with payments in Order Management.
Namespace
ConnectApi
OrderPaymentSummary Methods
The following are methods for OrderPaymentSummary. All methods are static.
createOrderPaymentSummary(orderPaymentSummaryInput)
Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.
createOrderPaymentSummary(orderPaymentSummaryInput)
Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.
178
Salesforce Order Management in Apex OrderSummary Class
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
createOrderPaymentSummary(ConnectApi.CreateOrderPaymentSummaryInputRepresentation
orderPaymentSummaryInput)
Parameters
orderPaymentSummaryInput
Type: ConnectApi.CreateOrderPaymentSummaryInputRepresentation
The OrderSummary and payment authorization or payments.
Return Value
Type: ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
Example
String orderSummaryId = '1Osxx0000004CCG';
String paymentId1 = '0a3xx0000000085AAA';
String paymentId2 = '0a3xx0000000085BBB';
ConnectApi.CreateOrderPaymentSummaryOutputRepresentation result =
ConnectAPI.OrderPaymentSummary.createOrderPaymentSummary(orderPaymentSummaryInput);
OrderSummary Class
Work with orders in Order Management.
Namespace
ConnectApi
179
Salesforce Order Management in Apex OrderSummary Class
OrderSummary Methods
The following are methods for OrderSummary. All methods are static.
adjustPreview(orderSummaryId, adjustInput)
Retrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actually
executing the adjustment. The response data contains the financial changes that would result from submitting the proposed
adjustment.
adjustSubmit(orderSummaryId, adjustInput)
Adjust the price of one or more OrderItemSummaries from an OrderSummary, and create one or two corresponding change orders.
createCreditMemo(orderSummaryId, creditMemoInput)
Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.
ensureFundsAsync(orderSummaryId, ensureFundsInput)
Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider.
This method inserts a background operation into an asynchronous job queue and returns the ID of that operation so you can track
its status. Payment gateway responses appear in the payment gateway log and do not affect the background operation status.
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a background
operation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responses
appear in the payment gateway log and do not affect the background operation status.
previewCancel(orderSummaryId, changeInput)
Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actually
executing the cancel.
previewReturn(orderSummaryId, changeInput)
Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actually
executing the return.
submitCancel(orderSummaryId, changeInput)
Cancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
submitReturn(orderSummaryId, changeInput)
Return one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
adjustPreview(orderSummaryId, adjustInput)
Retrieve the expected results of adjusting the price of one or more OrderItemSummaries from an OrderSummary, without actually
executing the adjustment. The response data contains the financial changes that would result from submitting the proposed adjustment.
API Version
49.0
Requires Chatter
No
180
Salesforce Order Management in Apex OrderSummary Class
Signature
public static ConnectApi.AdjustOrderSummaryOutputRepresentation adjustPreview(String
orderSummaryId, ConnectApi.AdjustOrderItemSummaryInputRepresentation adjustInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
adjustInput
Type: ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
Return Value
Type: ConnectApi.AdjustOrderSummaryOutputRepresentation
SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
adjustSubmit(orderSummaryId, adjustInput)
adjustSubmit(orderSummaryId, adjustInput)
Adjust the price of one or more OrderItemSummaries from an OrderSummary, and create one or two corresponding change orders.
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.AdjustOrderSummaryOutputRepresentation adjustSubmit(String
orderSummaryId, ConnectApi.AdjustOrderItemSummaryInputRepresentation adjustInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
adjustInput
Type: ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
181
Salesforce Order Management in Apex OrderSummary Class
Return Value
Type: ConnectApi.AdjustOrderSummaryOutputRepresentation
Usage
After submitting a price adjustment, process refunds as appropriate:
• If the discount only applied to OrderItemSummaries for which payment has not been captured, it does not require a refund. This
situation normally applies to OrderItemSummaries in the US that have not been fulfilled.
• If the discount applied to OrderItemSummaries that have not been fulfilled and for which payment has been captured, process a
refund. In this case, pass the totalExcessFundsAmount from the output representation to the ensureRefundsAsync()
method.
• If the discount applied to OrderItemSummaries that have been fulfilled, process a refund. Pass the
postFulfillmentChangeOrderId from the output representation to the createCreditMemo() method, then pass
the CreditMemo to the ensureRefundsAsync() method.
• If the discount applied to both fulfilled and unfulfilled OrderItemSummaries for which payment has been captured, process both
refunds. Pass the postFulfillmentChangeOrderId from the output representation to the createCreditMemo()
method, then pass the credit memo and the totalExcessFundsAmount from the output representation to the
ensureRefundsAsync() method.
SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
createCreditMemo(orderSummaryId, creditMemoInput)
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
adjustPreview(orderSummaryId, adjustInput)
createCreditMemo(orderSummaryId, creditMemoInput)
Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.CreateCreditMemoOutputRepresentation createCreditMemo(String
orderSummaryId, ConnectApi.CreateCreditMemoInputRepresentation creditMemoInput)
Parameters
orderSummaryId
Type: String
182
Salesforce Order Management in Apex OrderSummary Class
ID of the OrderSummary.
creditMemoInput
Type: ConnectApi.CreateCreditMemoInputRepresentation
The list of change order IDs.
Return Value
Type: ConnectApi.CreateCreditMemoOutputRepresentation
ensureFundsAsync(orderSummaryId, ensureFundsInput)
Ensure funds for an invoice and apply them to it. If needed, capture authorized funds by sending a request to a payment provider. This
method inserts a background operation into an asynchronous job queue and returns the ID of that operation so you can track its status.
Payment gateway responses appear in the payment gateway log and do not affect the background operation status.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.EnsureFundsAsyncOutputRepresentation ensureFundsAsync(String
orderSummaryId, ConnectApi.EnsureFundsAsyncInputRepresentation ensureFundsInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
ensureFundsInput
Type: ConnectApi.EnsureFundsAsyncInputRepresentation
The ID of the invoice.
Return Value
Type: ConnectApi.EnsureFundsAsyncOutputRepresentation
Usage
This method checks the OrderPaymentSummaries associated with the specified OrderSummary for funds to apply to the invoice balance
as follows:
Note: If multiple OrderPaymentSummaries have the same amount, their order of selection is random.
1. Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.
183
Salesforce Order Management in Apex OrderSummary Class
2. If an OrderPaymentSummary exists with an amount that matches the invoice balance, use it.
3. Otherwise, if any OrderPaymentSummaries exist with an amount greater than the invoice balance, use the one with the smallest
amount greater than the invoice balance.
4. Otherwise, select OrderPaymentSummaries in order from largest amount to smallest until their amounts meet or exceed the invoice
balance.
5. If any selected funds are authorized, capture them.
6. Apply the selected funds to the invoice.
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
Ensure refunds for a credit memo or excess funds by sending a request to a payment provider. This method inserts a background
operation into an asynchronous job queue and returns the ID of that operation so you can track its status. Payment gateway responses
appear in the payment gateway log and do not affect the background operation status.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.EnsureRefundsAsyncOutputRepresentation ensureRefundsAsync(String
orderSummaryId, ConnectApi.EnsureRefundsAsyncInputRepresentation ensureRefundsInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
ensureRefundsInput
Type: ConnectApi.EnsureRefundsAsyncInputRepresentation
Object that wraps the ID of the credit memo and the excess funds amount.
Return Value
Type: ConnectApi.EnsureRefundsAsyncOutputRepresentation
previewCancel(orderSummaryId, changeInput)
Retrieve the expected change order values for canceling one or more OrderItemSummaries from an OrderSummary, without actually
executing the cancel.
API Version
48.0
184
Salesforce Order Management in Apex OrderSummary Class
Requires Chatter
No
Signature
public static ConnectApi.PreviewCancelOutputRepresentation previewCancel(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
Type: ConnectApi.PreviewCancelOutputRepresentation
SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
submitCancel(orderSummaryId, changeInput)
previewReturn(orderSummaryId, changeInput)
Retrieve the expected change order values for returning one or more OrderItemSummaries from an OrderSummary, without actually
executing the return.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.PreviewReturnOutputRepresentation previewReturn(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
orderSummaryId
Type: String
185
Salesforce Order Management in Apex OrderSummary Class
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
Type: ConnectApi.PreviewReturnOutputRepresentation
SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
submitReturn(orderSummaryId, changeInput)
submitCancel(orderSummaryId, changeInput)
Cancel one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.SubmitCancelOutputRepresentation submitCancel(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
186
Salesforce Order Management in Apex OrderSummary Class
Return Value
Type: ConnectApi.SubmitCancelOutputRepresentation
SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
createCreditMemo(orderSummaryId, creditMemoInput)
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
previewCancel(orderSummaryId, changeInput)
submitReturn(orderSummaryId, changeInput)
Return one or more OrderItemSummaries from an OrderSummary, and create a corresponding change order.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.SubmitReturnOutputRepresentation submitReturn(String
orderSummaryId, ConnectApi.ChangeInputRepresentation changeInput)
Parameters
orderSummaryId
Type: String
ID of the OrderSummary.
changeInput
Type: ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Return Value
Type: ConnectApi.SubmitReturnOutputRepresentation
187
Salesforce Order Management in Apex OrderSummaryCreation Class
Usage
After submitting a return, process a refund. Pass the changeOrderId from the output representation to the createCreditMemo()
method, then pass the credit memo to the ensureRefundsAsync() method.
SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
createCreditMemo(orderSummaryId, creditMemoInput)
createCreditMemo(orderSummaryId, creditMemoInput)
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
previewReturn(orderSummaryId, changeInput)
OrderSummaryCreation Class
Create Order Summaries in Order Management.
Namespace
ConnectApi
OrderSummaryCreation Methods
The following are methods for OrderSummaryCreation. All methods are static.
createOrderSummary(orderSummaryInput)
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce
Order Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.
createOrderSummary(orderSummaryInput)
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce Order
Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.
API Version
48.0
Requires Chatter
No
Signature
public static ConnectApi.OrderSummaryOutputRepresentation
createOrderSummary(ConnectApi.OrderSummaryInputRepresentation orderSummaryInput)
188
Salesforce Order Management in Apex ReturnOrder Class
Parameters
orderSummaryInput
Type: ConnectApi.OrderSummaryInputRepresentation
Input object that wraps the ID of the source order.
Return Value
Type: ConnectApi.OrderSummaryOutputRepresentation
ReturnOrder Class
Process ReturnOrders in Order Management.
Namespace
ConnectApi
ReturnOrder Methods
The following are methods for ReturnOrder. All methods are static.
createReturnOrder(returnOrderInput)
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.
returnItems(returnOrderId, returnItemsInput)
Process ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makes
that ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates
a separate ReturnOrderLineItem representing that quantity.
createReturnOrder(returnOrderInput)
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.
API Version
50.0
Requires Chatter
No
Signature
public static ConnectApi.ReturnOrderOutputRepresentation
createReturnOrder(ConnectApi.ReturnOrderInputRepresentation returnOrderInput)
189
Salesforce Order Management in Apex Routing Class
Parameters
returnOrderInput
Type: ConnectApi.ReturnOrderInputRepresentation
Data for creating a ReturnOrder and ReturnOrderLineItems.
Return Value
Type: ConnectApi.ReturnOrderOutputRepresentation
returnItems(returnOrderId, returnItemsInput)
Process ReturnOrderLineItems belonging to a ReturnOrder. Processing a ReturnOrderLineItem generates a change Order and makes
that ReturnOrderLineItem read-only. If a processed ReturnOrderLineItem has any remaining expected quantity, then the API creates a
separate ReturnOrderLineItem representing that quantity.
API Version
52.0
Requires Chatter
No
Signature
public static ConnectApi.ReturnItemsOutputRepresentation returnItems(String
returnOrderId, ConnectApi.ReturnItemsInputRepresentation returnItemsInput)
Parameters
returnOrderId
Type: String
ID of the ReturnOrder.
returnItemsInput
Type: ConnectApi.ReturnItemsInputRepresentation
Data about products and delivery charges to return.
Return Value
Type: ConnectApi.ReturnItemsOutputRepresentation
Routing Class
Route orders to inventory locations in Order Management.
Namespace
ConnectApi
190
Salesforce Order Management in Apex Routing Class
Routing Methods
The following are methods for Routing. All methods are static.
findRoutesWithFewestSplits(findRoutesWithFewestSplitsInputRepresentation)
Returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits.
rankAverageDistance(rankAverageDistanceInputRepresentation)
Calculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare
the average shipping distances for different sets of locations that can fulfill an order.
findRoutesWithFewestSplits(findRoutesWithFewestSplitsInputRepresentation)
Returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits.
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
findRoutesWithFewestSplits(ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
findRoutesWithFewestSplitsInputRepresentation)
Parameters
findRoutesWithFewestSplitsInputRepresentation
Type: ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
The input includes the ordered item quantities, data about available inventory, and, optionally, a maximum allowable number of
shipment splits.
Return Value
Type: ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
rankAverageDistance(rankAverageDistanceInputRepresentation)
Calculates the average distance from sets of inventory locations to an order recipient, and ranks them. Use this method to compare the
average shipping distances for different sets of locations that can fulfill an order.
API Version
51.0
191
Salesforce Order Management in Apex Salesforce Order Management Apex Inputs
Requires Chatter
No
Signature
public static ConnectApi.RankAverageDistanceOutputRepresentation
rankAverageDistance(ConnectApi.RankAverageDistanceInputRepresentation
rankAverageDistanceInputRepresentation)
Parameters
rankAverageDistanceInputRepresentation
Type: ConnectApi.RankAverageDistanceInputRepresentation
An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.
Return Value
Type: ConnectApi.RankAverageDistanceOutputRepresentation
ConnectApi.AdjustItemInputRepresentation
A price adjustment to an OrderItemSummary. It only supports discounts, not increases.
ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
ConnectApi.ChangeItemInputRepresentation
Change to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based
on the price change. The OrderItemSummary can’t be a shipping charge.
ConnectApi.CreateCreditMemoInputRepresentation
A list of change orders used to create a credit memo.
ConnectApi.CreateOrderPaymentSummaryInputRepresentation
An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.
ConnectApi.EnsureFundsAsyncInputRepresentation
ID of an invoice to ensure funds for and apply them to.
ConnectApi.EnsureRefundsAsyncInputRepresentation
ID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.
ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
Data used to calculate order fulfillment routes involving the fewest number of shipment splits.
192
Salesforce Order Management in Apex Salesforce Order Management Apex Inputs
ConnectApi.FulfillmentGroupInputRepresentation
A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the
values defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned
to the FulfillmentOrder for this fulfillment group.
ConnectApi.FulfillmentOrderInputRepresentation
An OrderDeliveryGroupSummary that defines a delivery method and recipient, and a list of fulfillment groups to assign to
FulfillmentOrders. Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and share
the same fulfillment location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for
each OrderItemSummary.
ConnectApi.FulfillmentOrderInvoiceInputRepresentation
Instantiate and include this object with no properties when creating an invoice.
ConnectApi.FulfillmentOrderLineItemInputRepresentation
A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the
canceled quantity to a different FulfillmentOrder.
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
A list of FulfillmentOrderLineItems and quantities to cancel.
ConnectApi.LocationInputRepresentation
Inventory location data used to calculate shipping distance.
ConnectApi.LocationAvailabilityInputRepresentation
The available quantity of a product at an inventory location.
ConnectApi.MultipleFulfillmentOrderInputRepresentation
List of inputs for creating fulfillment orders.
ConnectApi.MultipleFulfillmentOrderInvoicesInputRepresentation
The FulfillmentOrders to create Invoices for.
ConnectApi.OCICreateReservationInputRepresentation
Data to reserve inventory at one or more Omnichannel Inventory locations or location groups.
ConnectApi.OCICreateReservationSingleInputRepresentation
A quantity of a product and an Omnichannel Inventory location or location group at which to reserve it.
ConnectApi.OCIFulfillReservationInputRepresentation
A list of inventory reservations to fulfill.
ConnectApi.OCIFulfillReservationSingleInputRepresentation
An inventory reservation to fulfill.
ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
Details of a request to retrieve inventory availability.
ConnectApi.OCIReleaseReservationInputRepresentation
Details of one or more inventory reservations to release.
ConnectApi.OCIReleaseReservationSingleInputRepresentation
A single inventory reservation to release.
ConnectApi.OCITransferReservationInputRepresentation
A list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
193
Salesforce Order Management in Apex ConnectApi.AdjustItemInputRepresentation
ConnectApi.OCITransferReservationSingleInputRepresentation
An inventory reservation transfer.
ConnectApi.OrderItemSummaryInputRepresentation
An OrderItemSummary and quantity.
ConnectApi.OrderSummaryInputRepresentation
An order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you can
specify an OrderNumber or Status.
ConnectApi.QuantityWithSkuInputRepresentation
A quantity of a product.
ConnectApi.RankAverageDistanceInputRepresentation
An order recipient’s geographic location and information about sets of inventory locations that can fulfill the order.
ConnectApi.ReturnItemsInputRepresentation
Data about products and delivery charges to return.
ConnectApi.ReturnOrderInputRepresentation
Data for creating a ReturnOrder and ReturnOrderLineItems.
ConnectApi.ReturnOrderItemInputRepresentation
ID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remaining
quantity to be returned is added to a new ReturnOrderLineItem.
ConnectApi.ReturnOrderLineItemInputRepresentation
Data for creating a ReturnOrderLineItem.
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
ID of a ReturnOrderLineItem representing a delivery charge.
ConnectApi.TargetLocationInputRepresentation
A set of inventory locations that together can fulfill an order.
ConnectApi.AdjustItemInputRepresentation
A price adjustment to an OrderItemSummary. It only supports discounts, not increases.
194
Salesforce Order Management in Apex ConnectApi.AdjustOrderItemSummaryInputRepresentation
reason String Reason for the adjustment. The value must Required 49.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.
SEE ALSO:
ConnectApi.AdjustOrderItemSummaryInputRepresentation
adjustPreview(orderSummaryId, adjustInput)
adjustSubmit(orderSummaryId, adjustInput)
ConnectApi.AdjustOrderItemSummaryInputRepresentation
A list of price adjustments to OrderItemSummaries that make up a price adjustment to an order.
SEE ALSO:
adjustPreview(orderSummaryId, adjustInput)
adjustSubmit(orderSummaryId, adjustInput)
ConnectApi.ChangeInputRepresentation
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
195
Salesforce Order Management in Apex ConnectApi.ChangeItemInputRepresentation
SEE ALSO:
previewCancel(orderSummaryId, changeInput)
previewReturn(orderSummaryId, changeInput)
submitCancel(orderSummaryId, changeInput)
submitReturn(orderSummaryId, changeInput)
ConnectApi.ChangeItemInputRepresentation
Change to an OrderItemSummary, such as a return or cancel. You specify whether to prorate the associated shipping charge based on
the price change. The OrderItemSummary can’t be a shipping charge.
reason String Reason for the change. The value must Required 48.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.
SEE ALSO:
ConnectApi.ChangeInputRepresentation
previewCancel(orderSummaryId, changeInput)
previewReturn(orderSummaryId, changeInput)
submitCancel(orderSummaryId, changeInput)
submitReturn(orderSummaryId, changeInput)
ConnectApi.CreateCreditMemoInputRepresentation
A list of change orders used to create a credit memo.
196
Salesforce Order Management in Apex ConnectApi.CreateOrderPaymentSummaryInputRepresentation
SEE ALSO:
createCreditMemo(orderSummaryId, creditMemoInput)
ConnectApi.CreateOrderPaymentSummaryInputRepresentation
An OrderSummary for which to create an OrderPaymentSummary, with the payment authorization or payments to include in it.
SEE ALSO:
createOrderPaymentSummary(orderPaymentSummaryInput)
ConnectApi.EnsureFundsAsyncInputRepresentation
ID of an invoice to ensure funds for and apply them to.
SEE ALSO:
ensureFundsAsync(orderSummaryId, ensureFundsInput)
ConnectApi.EnsureRefundsAsyncInputRepresentation
ID of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. At least one is required.
197
Salesforce Order Management in Apex ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
excessFundsAmount Double Amount of excess funds to refund. Optional, but at least 49.0
one input property is
required
SEE ALSO:
ensureRefundsAsync(orderSummaryId, ensureRefundsInput)
ConnectApi.FindRoutesWithFewestSplitsInputRepresentation
Data used to calculate order fulfillment routes involving the fewest number of shipment splits.
orderedQuantities List<ConnectApi. Each list element represents a quantity of a At least one element 51.0
QuantityWithSku product to be routed for fulfillment. is required
InputRepresentation>
ConnectApi.FulfillmentGroupInputRepresentation
A list of OrderItemSummaries to be fulfilled together, and the fulfillment location to handle them. The fulfillment type is one of the values
defined for the Type field on the FulfillmentOrder object, such as “Warehouse” or “Retail Store.” The specified type is assigned to the
FulfillmentOrder for this fulfillment group.
198
Salesforce Order Management in Apex ConnectApi.FulfillmentOrderInputRepresentation
fulfillmentType String Fulfillment type. One of the Type field values Required 48.0
defined for FulfillmentOrders.
SEE ALSO:
ConnectApi.FulfillmentOrderInputRepresentation
createFulfillmentOrders(fulfillmentOrderInput)
ConnectApi.FulfillmentOrderInputRepresentation
An OrderDeliveryGroupSummary that defines a delivery method and recipient, and a list of fulfillment groups to assign to FulfillmentOrders.
Each fulfillment group is a set of OrderItemSummaries that match the OrderDeliveryGroupSummary and share the same fulfillment
location. The method creates a FulfillmentOrder for each fulfillment group and a FulfillmentOrderLineItem for each OrderItemSummary.
SEE ALSO:
createFulfillmentOrders(fulfillmentOrderInput)
ConnectApi.FulfillmentOrderInvoiceInputRepresentation
Instantiate and include this object with no properties when creating an invoice.
199
Salesforce Order Management in Apex ConnectApi.FulfillmentOrderLineItemInputRepresentation
SEE ALSO:
createInvoice(fulfillmentOrderId, invoiceInput)
ConnectApi.FulfillmentOrderLineItemInputRepresentation
A FulfillmentOrderLineItem and quantity to cancel. You can cancel less than the full quantity, in which case you reallocate the canceled
quantity to a different FulfillmentOrder.
SEE ALSO:
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)
ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation
A list of FulfillmentOrderLineItems and quantities to cancel.
SEE ALSO:
cancelFulfillmentOrderLineItems(fulfillmentOrderId, cancelFulfillmentOrderLineItemsInput)
ConnectApi.LocationInputRepresentation
Inventory location data used to calculate shipping distance.
200
Salesforce Order Management in Apex ConnectApi.LocationAvailabilityInputRepresentation
ConnectApi.LocationAvailabilityInputRepresentation
The available quantity of a product at an inventory location.
stockKeepingUnit String The Stock Keeping Unit of the product. Required 51.0
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.
201
Salesforce Order Management in Apex ConnectApi.OCICreateReservationSingleInputRepresentation
allowPartial Boolean When true, if the system can’t create the 51.0
Reservations entire reservation, then it attempts to create
a partial reservation.
createRecords List<ConnectApi. A list of product quantities and locations or At least one element 51.0
OCICreateReservation location groups. is required
SingleInputRepresentation>
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.
202
Salesforce Order Management in Apex ConnectApi.OCIFulfillReservationSingleInputRepresentation
ConnectApi.OCIFulfillReservationSingleInputRepresentation
An inventory reservation to fulfill.
locationIdentifier String The identifier of the location that’s fulfilling Required 51.0
the reservation.
stockKeepingUnit String The SKU of the product being fulfilled. Required 51.0
ConnectApi.OCIGetInventoryAvailabilityInputRepresentation
Details of a request to retrieve inventory availability.
203
Salesforce Order Management in Apex ConnectApi.OCIReleaseReservationInputRepresentation
stockKeepingUnit String The SKU of a product to retrieve inventory Optional; can’t 51.0
availability data for. Specifying a SKU with combine with
no locations or location groups returns stockKeepingUnits
availability data for that SKU at all inventory
locations that are not assigned to location
groups.
useCache Boolean Whether to fetch the inventory data from Optional 51.0
the cache. Default value is true.
ConnectApi.OCIReleaseReservationInputRepresentation
Details of one or more inventory reservations to release.
ConnectApi.OCIReleaseReservationSingleInputRepresentation
A single inventory reservation to release.
locationGroupIdentifier String The identifier of the location group that has The identifier for a 51.0
the reservation. location or location
group, but not both,
is required.
204
Salesforce Order Management in Apex ConnectApi.OCITransferReservationInputRepresentation
ConnectApi.OCITransferReservationInputRepresentation
A list of inventory reservation transfers and specifies whether a single failure cancels the entire list.
transferRecords List<ConnectApi. A list of inventory reservation transfers. At least one element 51.0
OCITransferReservation is required.
SingleInputRepresentation>
ConnectApi.OCITransferReservationSingleInputRepresentation
An inventory reservation transfer.
205
Salesforce Order Management in Apex ConnectApi.OrderItemSummaryInputRepresentation
fromLocationGroupIdentifier String The identifier of the location group sending The identifier for a 51.0
the reservation. sending location or
location group, but
not both, is required
fromLocationIdentifier String The identifier of the location sending the The identifier for a 51.0
reservation. sending location or
location group, but
not both, is required
ignoreAvailabilityCheck Boolean If true, force the transfer even if the receiving Optional 52.0
location doesn’t have sufficient available
inventory. The default value is false.
stockKeepingUnit String The SKU of the product being transferred. Required 51.0
toLocationGroupIdentifier String The identifier of the location group receiving The identifier for a 51.0
the reservation. receiving location or
location group, but
not both, is required
toLocationIdentifier String The identifier of the location receiving the The identifier for a 51.0
reservation. receiving location or
location group, but
not both, is required
ConnectApi.OrderItemSummaryInputRepresentation
An OrderItemSummary and quantity.
SEE ALSO:
ConnectApi.FulfillmentGroupInputRepresentation
ConnectApi.FulfillmentOrderInputRepresentation
createFulfillmentOrders(fulfillmentOrderInput)
206
Salesforce Order Management in Apex ConnectApi.OrderSummaryInputRepresentation
ConnectApi.OrderSummaryInputRepresentation
An order from which to create an OrderSummary, and whether it is managed in Salesforce Order Management. Optionally, you can
specify an OrderNumber or Status.
SEE ALSO:
createOrderSummary(orderSummaryInput)
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.
207
Salesforce Order Management in Apex ConnectApi.ReturnItemsInputRepresentation
deliveryPostalCode String The postal code of the order recipient. Required 51.0
targetLocations List<ConnectApi. Each element is a set of inventory locations At least one element 51.0
TargetLocation that can combine to fulfill the order. is required
InputRepresentation>
ConnectApi.ReturnItemsInputRepresentation
Data about products and delivery charges to return.
ConnectApi.ReturnOrderInputRepresentation
Data for creating a ReturnOrder and ReturnOrderLineItems.
208
Salesforce Order Management in Apex ConnectApi.ReturnOrderItemInputRepresentation
returnOrderLineItems List<ConnectApi. List of data for creating At least one element 50.0
ReturnOrderLineItem ReturnOrderLineItems. is required
InputRepresentation>
status String Status to assign the ReturnOrder. This value Required 51.0
must match an entry in the ReturnOrder
object’s Status picklist.
ConnectApi.ReturnOrderItemInputRepresentation
ID of a ReturnOrderLineItem and instructions for updating it. After the update, the ReturnOrderLineItem is read-only. Any remaining
quantity to be returned is added to a new ReturnOrderLineItem.
209
Salesforce Order Management in Apex ConnectApi.ReturnOrderLineItemInputRepresentation
reasonForRejection String The reason why the rejected quantity, if any, Optional 52.0
was rejected. This value isn’t used by any
standard features, but is provided for use in
customizations.
ConnectApi.ReturnOrderLineItemInputRepresentation
Data for creating a ReturnOrderLineItem.
reasonForReturn String Reason for the return. The value must match Optional 50.0
an entry in the ReturnOrderLineItem object’s
ReasonForReturn picklist.
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
ID of a ReturnOrderLineItem representing a delivery charge.
210
Salesforce Order Management in Apex ConnectApi.TargetLocationInputRepresentation
ConnectApi.TargetLocationInputRepresentation
A set of inventory locations that together can fulfill an order.
ConnectApi.AdjustOrderSummaryOutputRepresentation
Output representation of the financial changes for an adjust items action. For a preview action, these values are the expected output.
For a submit action, these values are the actual output.
ConnectApi.AvailableLocationOutputRepresentation
A set of inventory locations that can combine to fulfill an order.
ConnectApi.AverageDistanceResultOutputRepresentation
Wraps inventory location shipping distance calculation results.
ConnectApi.BaseOutputRepresentation
Base Order Management output class.
ConnectApi.ChangeItemOutputRepresentation
The financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the
values on the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record.
For example, a discount is a positive value here and a negative value on a change order record.
ConnectApi.CreateCreditMemoOutputRepresentation
ID of a created Credit Memo.
ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
ID of the created Order Payment Summary.
ConnectApi.DistanceCalculationOutputRepresentation
Shipping distance data for a set of inventory locations.
ConnectApi.EnsureFundsAsyncOutputRepresentation
ID of the background operation.
ConnectApi.EnsureRefundsAsyncOutputRepresentation
ID of the background operation.
ConnectApi.ErrorResponse
Base error response.
ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.
211
Salesforce Order Management in Apex Salesforce Order Management Apex Outputs
ConnectApi.FulfillmentGroupOutputRepresentation
Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If
the FulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.
ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
Wraps the base output.
ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
ID of the created invoice.
ConnectApi.FulfillmentOrderOutputRepresentation
A list of IDs of the created FulfillmentOrders.
ConnectApi.LocationOutputRepresentation
An inventory location’s distance to an order recipient.
ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
IDs of the created Invoices.
ConnectApi.MultipleFulfillmentOrderOutputRepresentation
List of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.
ConnectApi.OCIBaseOutputRepresentation
Base Omnichannel Inventory output class.
ConnectApi.OCICreateReservationErrorOutputRepresentation
Error returned from an attempt to create an Omnichannel Inventory reservation.
ConnectApi.OCICreateReservationOutputRepresentation
Result of an Omnichannel Inventory reservation creation request.
ConnectApi.OCICreateReservationSingleOutputRepresentation
Details of an inventory reservation for one product.
ConnectApi.OCIFulfillReservationErrorOutputRepresentation
Response to a request to fulfill one inventory reservation.
ConnectApi.OCIFulfillReservationOutputRepresentation
Response to a request to fulfill one or more inventory reservations.
ConnectApi.OCIFulfillReservationSingleOutputRepresentation
Details of a single fulfilled reservation.
ConnectApi.OCIFutureInventoryOutputRepresentation
An expected future inventory restock.
ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
Response to a request for inventory availability data.
ConnectApi.OCIInventoryRecordOutputRepresentation
Inventory availability data for a product.
ConnectApi.OCILocationAvailabilityOutputRepresentation
A set of inventory availability data for one inventory location.
ConnectApi.OCILocationGroupAvailabilityOutputRepresentation
A set of inventory availability data for one inventory location group.
ConnectApi.OCIPublishLocationStructureOutputRepresentation
Response to a publish location structure request.
212
Salesforce Order Management in Apex Salesforce Order Management Apex Outputs
ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
Detailed status of a publish location structure job.
ConnectApi.OCIReleaseReservationErrorOutputRepresentation
Response to a request to release one inventory reservation.
ConnectApi.OCIReleaseReservationOutputRepresentation
Response to a request to release one or more inventory reservations.
ConnectApi.OCIReleaseReservationSingleOutputRepresentation
Details of a single released reservation.
ConnectApi.OCITransferReservationErrorOutputRepresentation
Response to a request to fulfill one inventory reservation.
ConnectApi.OCITransferReservationOutputRepresentation
Response to a request to transfer one or more inventory reservations.
ConnectApi.OCITransferReservationSingleOutputRepresentation
Details of a single transferred reservation.
ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
Response to an upload inventory availability job.
ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
Detailed status of an upload inventory availability job.
ConnectApi.OrderItemSummaryOutputRepresentation
Details of an OrderItemSummary from a failed FulfillmentOrder in a create multiple fulfillment orders request.
ConnectApi.OrderSummaryOutputRepresentation
ID of the created Order Summary.
ConnectApi.PreviewCancelOutputRepresentation
Expected financial values for a proposed cancel action.
ConnectApi.PreviewReturnOutputRepresentation
Expected financial values for a proposed return action.
ConnectApi.RankAverageDistanceOutputRepresentation
The results of calculating the average distances from sets of inventory locations to an order recipient.
ConnectApi.ReturnItemsOutputRepresentation
Output of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that were
created to represent remaining return quantities.
ConnectApi.ReturnOrderItemSplitLineOutputRepresentation
After a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to
return a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it
returns this output property, which contains the IDs of the original and split ReturnOrderLineItems.
ConnectApi.ReturnOrderOutputRepresentation
ID of the created ReturnOrder.
ConnectApi.SubmitCancelOutputRepresentation
ID of the change order created for a cancel action, and a set of its financial values.
ConnectApi.SubmitReturnOutputRepresentation
ID of the change order created for a return action, and a set of its financial values.
213
Salesforce Order Management in Apex ConnectApi.AdjustOrderSummaryOutputRepresentation
ConnectApi.AdjustOrderSummaryOutputRepresentation
Output representation of the financial changes for an adjust items action. For a preview action, these values are the expected output.
For a submit action, these values are the actual output.
Subclass of ConnectApi.BaseOutputRepresentation.
postFulfillment String ID of the change Order that holds the financial 49.0
ChangeOrderId changes applicable to order products that have been
fulfilled. For an adjustPreview call, this value is always
null.
preFulfillment String ID of the change Order that holds the financial 49.0
ChangeOrderId changes applicable to order products that have not
been fulfilled. For an adjustPreview call, this value is
always null.
ConnectApi.AvailableLocationOutputRepresentation
A set of inventory locations that can combine to fulfill an order.
ConnectApi.AverageDistanceResultOutputRepresentation
Wraps inventory location shipping distance calculation results.
214
Salesforce Order Management in Apex ConnectApi.BaseOutputRepresentation
ConnectApi.BaseOutputRepresentation
Base Order Management output class.
This class is abstract.
Superclass of:
• ConnectApi.AdjustOrderSummaryOutputRepresentation
• ConnectApi.CreateCreditMemoOutputRepresentation
• ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
• ConnectApi.EnsureFundsAsyncOutputRepresentation
• ConnectApi.EnsureRefundsAsyncOutputRepresentation
• ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
• ConnectApi.FulfillmentGroupOutputRepresentation
• ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
• ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
• ConnectApi.FulfillmentOrderOutputRepresentation
• ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
• ConnectApi.MultipleFulfillmentOrderOutputRepresentation
• ConnectApi.OrderSummaryOutputRepresentation
• ConnectApi.PreviewCancelOutputRepresentation
• ConnectApi.PreviewReturnOutputRepresentation
• ConnectApi.RankAverageDistanceOutputRepresentation
• ConnectApi.ReturnItemsOutputRepresentation
• ConnectApi.ReturnOrderItemSplitLineOutputRepresentation
• ConnectApi.ReturnOrderOutputRepresentation
• ConnectApi.SubmitCancelOutputRepresentation
• ConnectApi.SubmitReturnOutputRepresentation
ConnectApi.ChangeItemOutputRepresentation
The financial changes resulting from a change to one or more OrderItemSummaries. Most of the values represent the deltas of the values
on the associated OrderSummary. The sign of each value is the opposite of the corresponding value on a change order record. For
example, a discount is a positive value here and a negative value on a change order record.
215
Salesforce Order Management in Apex ConnectApi.ChangeItemOutputRepresentation
216
Salesforce Order Management in Apex ConnectApi.CreateCreditMemoOutputRepresentation
SEE ALSO:
ConnectApi.PreviewCancelOutputRepresentation
ConnectApi.PreviewReturnOutputRepresentation
ConnectApi.SubmitCancelOutputRepresentation
ConnectApi.SubmitReturnOutputRepresentation
ConnectApi.AdjustOrderSummaryOutputRepresentation
ConnectApi.CreateCreditMemoOutputRepresentation
ID of a created Credit Memo.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.CreateOrderPaymentSummaryOutputRepresentation
ID of the created Order Payment Summary.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.DistanceCalculationOutputRepresentation
Shipping distance data for a set of inventory locations.
locations List<ConnectApi. The list of locations and their distances to the order 51.0
LocationOutput recipient.
Representation>
rank Integer This result’s rank among all results by average 51.0
distance to the order recipient.
217
Salesforce Order Management in Apex ConnectApi.EnsureFundsAsyncOutputRepresentation
ConnectApi.EnsureFundsAsyncOutputRepresentation
ID of the background operation.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.EnsureRefundsAsyncOutputRepresentation
ID of the background operation.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.ErrorResponse
Base error response.
SEE ALSO:
ConnectApi.BaseOutputRepresentation
ConnectApi.FindRoutesWithFewestSplitsOutputRepresentation
A list of inventory location combinations that can fulfill an order without exceeding the maximum number of shipments.
Subclass of ConnectApi.BaseOutputRepresentation.
218
Salesforce Order Management in Apex ConnectApi.FulfillmentGroupOutputRepresentation
ConnectApi.FulfillmentGroupOutputRepresentation
Information about one FulfillmentOrder from a request to create fulfillment orders from multiple OrderDeliveryGroupSummaries. If the
FulfillmentOrder was created, then its ID is returned. If it failed, then data from the input is returned so you can resubmit it.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation
Wraps the base output.
Subclass of ConnectApi.BaseOutputRepresentation.
No additional properties.
ConnectApi.FulfillmentOrderInvoiceOutputRepresentation
ID of the created invoice.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.FulfillmentOrderOutputRepresentation
A list of IDs of the created FulfillmentOrders.
Subclass of ConnectApi.BaseOutputRepresentation.
219
Salesforce Order Management in Apex ConnectApi.LocationOutputRepresentation
ConnectApi.LocationOutputRepresentation
An inventory location’s distance to an order recipient.
ConnectApi.MultipleFulfillmentOrderInvoicesOutputRepresentation
IDs of the created Invoices.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.MultipleFulfillmentOrderOutputRepresentation
List of responses for the individual FulfillmentOrder creation attempts from a create multiple fulfillment orders request.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.OCIBaseOutputRepresentation
Base Omnichannel Inventory output class.
This class is abstract.
Superclass of:
• ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
• ConnectApi.OCIPublishLocationStructureOutputRepresentation
• ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
• ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
• ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
220
Salesforce Order Management in Apex ConnectApi.OCICreateReservationErrorOutputRepresentation
ConnectApi.OCICreateReservationErrorOutputRepresentation
Error returned from an attempt to create an Omnichannel Inventory reservation.
ConnectApi.OCICreateReservationOutputRepresentation
Result of an Omnichannel Inventory reservation creation request.
expirationTime String The time at which the reservation would expire. 51.0
reservationTime String The time when the reservation was recorded. 51.0
ConnectApi.OCICreateReservationSingleOutputRepresentation
Details of an inventory reservation for one product.
locationGroupIdentifier String Identifier of the location group where the inventory 51.0
is reserved.
221
Salesforce Order Management in Apex ConnectApi.OCIFulfillReservationErrorOutputRepresentation
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.
externalRefId String The external reference ID of the location that fulfilled 51.0
the reservation.
locationIdentifier String The identifier of the location that fulfilled the 51.0
reservation.
222
Salesforce Order Management in Apex ConnectApi.OCIFutureInventoryOutputRepresentation
ConnectApi.OCIFutureInventoryOutputRepresentation
An expected future inventory restock.
ConnectApi.OCIGetInventoryAvailabilityOutputRepresentation
Response to a request for inventory availability data.
Subclass of ConnectApi.OCIBaseOutputRepresentation.
ConnectApi.OCIInventoryRecordOutputRepresentation
Inventory availability data for a product.
223
Salesforce Order Management in Apex ConnectApi.OCILocationAvailabilityOutputRepresentation
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.
Subclass of ConnectApi.OCIBaseOutputRepresentation.
ConnectApi.OCIPublishLocationStructureStatusOutputRepresentation
Detailed status of a publish location structure job.
Subclass of ConnectApi.OCIBaseOutputRepresentation.
224
Salesforce Order Management in Apex ConnectApi.OCIReleaseReservationErrorOutputRepresentation
startTimeUTC String The UTC time when the job started. (for example: 51.0
"2020-07-06T22:53:06.788Z")
status String The status of the job. (e.g., "PENDING," "COMPLETED," 51.0
etc.).
validationErrors List<String> List of any validation errors returned by the job. 51.0
ConnectApi.OCIReleaseReservationErrorOutputRepresentation
Response to a request to release one inventory reservation.
ConnectApi.OCIReleaseReservationOutputRepresentation
Response to a request to release one or more inventory reservations.
ConnectApi.OCIReleaseReservationSingleOutputRepresentation
Details of a single released reservation.
225
Salesforce Order Management in Apex ConnectApi.OCITransferReservationErrorOutputRepresentation
locationGroupIdentifier String The identifier of the location group that released the 51.0
reservation.
locationIdentifier String The identifier of the location that released the 51.0
reservation.
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.
226
Salesforce Order Management in Apex ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
fromLocationGroupIdentifier String The identifier of the location group that sent the 51.0
reservation.
fromLocationIdentifier String The identifier of the location that sent the reservation. 51.0
ignoreAvailabilityCheck Boolean Whether this call ignored availability data at the 52.0
location that received the reservation.
toLocationGroupIdentifier String The identifier of the location group that received the 51.0
reservation.
toLocationIdentifier String The identifier of the location that received the 51.0
reservation.
ConnectApi.OCIUploadInventoryAvailabilityOutputRepresentation
Response to an upload inventory availability job.
Subclass of ConnectApi.OCIBaseOutputRepresentation.
ConnectApi.OCIUploadInventoryAvailabilityStatusOutputRepresentation
Detailed status of an upload inventory availability job.
Subclass of ConnectApi.OCIBaseOutputRepresentation.
startTimeUTC String The UTC time when the job started. (for example: 51.0
"2020-07-06T22:53:06.788Z")
227
Salesforce Order Management in Apex ConnectApi.OrderItemSummaryOutputRepresentation
validationErrors List<String> List of any validation errors returned by the job. 51.0
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.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.PreviewCancelOutputRepresentation
Expected financial values for a proposed cancel action.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.PreviewReturnOutputRepresentation
Expected financial values for a proposed return action.
228
Salesforce Order Management in Apex ConnectApi.RankAverageDistanceOutputRepresentation
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.RankAverageDistanceOutputRepresentation
The results of calculating the average distances from sets of inventory locations to an order recipient.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.ReturnItemsOutputRepresentation
Output of Return Items. Includes the ID of the generated change order, plus information about any ReturnOrderLineItems that were
created to represent remaining return quantities.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.ReturnOrderItemSplitLineOutputRepresentation
After a change order is created for a ReturnOrderLineItem, that ReturnOrderLineItem is read-only. If the Return Items API is used to return
a partial quantity, it creates a new “split” ReturnOrderLineItem to hold the remaining quantity to be returned. In that case, it returns this
output property, which contains the IDs of the original and split ReturnOrderLineItems.
Subclass of ConnectApi.BaseOutputRepresentation.
229
Salesforce Order Management in Apex ConnectApi.ReturnOrderOutputRepresentation
ConnectApi.ReturnOrderOutputRepresentation
ID of the created ReturnOrder.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.SubmitCancelOutputRepresentation
ID of the change order created for a cancel action, and a set of its financial values.
Subclass of ConnectApi.BaseOutputRepresentation.
ConnectApi.SubmitReturnOutputRepresentation
ID of the change order created for a return action, and a set of its financial values.
Subclass of ConnectApi.BaseOutputRepresentation.
230
CHAPTER 4 Salesforce Order Management in the Chatter
Connect API
In this chapter ... Salesforce Order Management and Omnichannel Inventory include resources in the Chatter Connect
API.
• Salesforce
Omnichannel
Inventory Resources
• Salesforce Order
Management
Resources
• Salesforce Order
Management
Requests
• Salesforce Order
Management
Responses
231
Salesforce Order Management in the Chatter Connect API Salesforce Omnichannel Inventory Resources
Resource Description
/commerce/oci/availability/availability-records/actions/get-availability Retrieve inventory availability data for one or more products at one
or more inventory locations or location groups.
232
Salesforce Order Management in the Chatter Connect API Availability Records, Get Availability
Reservations, Transfer
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Get Inventory Availability Input
Root XML tag
<ociGetInventoryInput>
JSON example
Properties
233
Salesforce Order Management in the Chatter Connect API Availability Records, Upload
useCache Boolean Whether to fetch the inventory data from Optional 51.0
the cache. Default value is true.
Resource Description
/commerce/oci/availability-records/uploads POST - Upload an inventory availability data file to Omnichannel
Inventory.
Resource
/commerce/oci/availability-records/uploads
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request parameters for POST
234
Salesforce Order Management in the Chatter Connect API Availability Records, Upload
To create an inventory data file, format the data as a series of JSON entries representing locations and individual inventory records.
Inventory Import Data Considerations:
• Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
• When the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location
entry.
• For each location entry, specify "mode":"UPDATE".
• Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The record Id protects against importing
duplicate data.
• Each inventory record entry requires an effectiveDate.
• Each futures entry requires a nonzero quantity and a future expectedDate.
• The system only creates or updates entries that are included in the data. It doesn’t delete entries that aren’t included. However,
if an included entry has an empty value, that value is deleted.
Note: The file size limit is 100 MB. For larger data sets, you can compress the file using GZIP or split the data into multiple
files.
This example illustrates the data format:
Note: For readability, this example shows the first few entries on multiple lines. In the import file, each location and inventory
record entry must be on a single line.
{
"location":"Warehouse-A", // location identifier
"mode":"UPDATE" // must be UPDATE (other operations might be available in future
releases)
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0", // unique identifier for the
inventory record
"onHand":10,
"sku":"12389156",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[ // list of future restocks
{
"quantity":1,
"expectedDate":"2021-04-18T14:05:22.781-07:00"
},
{
"quantity":5,
"expectedDate":"2021-05-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{
"recordId":"0a87539d-f3dd-47bc-91c7-9c752e312345",
"onHand":10,
"sku":"9485728",
"effectiveDate":"2020-12-08T14:05:22.790896-07:00",
"futures":[
{
"quantity":10,
235
Salesforce Order Management in the Chatter Connect API Location Graph, Upload
"expectedDate":"2021-04-18T14:05:22.781-07:00"
}
],
"safetyStockCount":0
}
{"location":"Warehouse-B","mode":"UPDATE"}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc123de","onHand":10,"sku":"12389156","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":1,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
{"recordId":"0a87539d-f3dd-47bc-91c7-9c75abc98765","onHand":10,"sku":"93867201","effectiveDate":"2020-12-08T14:05:22.790896-07:00","futures":[{"quantity":5,"expectedDate":"2021-04-18T14:05:22.781-07:00"}],"safetyStockCount":0}
/commerce/oci/availability-records/uploads/uploadId
Available version
51.0
Requires Chatter
No
HTTP methods
GET
Response body for GET
OCI Upload Inventory Availability Status Output
Resource Description
/commerce/oci/location-graph/uploads POST - Asynchronously publish information about your inventory
locations and location groups to Omnichannel Inventory. The
publish includes records whose IsEnabled and ShouldSyncWithOci
fields are both true. This method returns an ID that you can use
to retrieve the status of the publish job.
Resource
/commerce/oci/location-graph/uploads
Available version
51.0
Requires Chatter
No
HTTP methods
POST (No request payload)
236
Salesforce Order Management in the Chatter Connect API Reservations, Create
/commerce/oci/location-graph/uploads/uploadId
Available version
51.0
Requires Chatter
No
HTTP methods
GET
Response body for GET
OCI Publish Location Structure Status Output
Reservations, Create
Create an inventory reservation in Omnichannel Inventory.
Resource
/commerce/oci/reservation/actions/reservations
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Create Reservation Input
Root XML tag
<ociCreateReservationInput>
Properties
allowPartial Boolean When true, if the system can’t create the Optional 51.0
Reservations entire reservation, then it attempts to
create a partial reservation.
237
Salesforce Order Management in the Chatter Connect API Reservations, Fulfill
Reservations, Fulfill
Fulfill one or more inventory reservations.
Resource
/commerce/oci/reservation/actions/fulfillments
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Fulfill Reservation Input
Root XML tag
<ociFulfillReservationInput>
JSON example
Properties
238
Salesforce Order Management in the Chatter Connect API Reservations, Release
Reservations, Release
Release one or more existing inventory reservations to free up that inventory.
Resource
/commerce/oci/reservation/actions/releases
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
OCI Release Reservation Input
Root XML tag
<ociReleaseReservationInput>
JSON example
Properties
Reservations, Transfer
Transfer one or more inventory reservations between locations or location groups. This API doesn’t change physical quantities, but
reduces the reserved quantity at the source and increases it at the destination.
Resource
/commerce/oci/reservation/actions/transfers
Available version
51.0
Requires Chatter
No
239
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Resources
HTTP methods
POST
Request body for POST
OCI Transfer Reservation Input
Root XML tag
<ociTransferReservationInput>
JSON example
Properties
transferRecords OCI Transfer A list of inventory reservation transfers. At least one 51.0
Reservation Single element is required.
Input[]
Resource Description
/commerce/fulfillment/fulfillment-orders Create one or more FulfillmentOrders and
FulfillmentOrderLineItems for an OrderDeliveryGroupSummary,
which defines a delivery method and recipient for an
OrderSummary. You specify the OrderItemSummaries to allocate,
which can be fulfilled from different locations. Specifying multiple
fulfillment groups creates one FulfillmentOrder for each location.
240
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Resources
Resource Description
For each OrderItemSummary, a FulfillmentOrderLineItem is created
and assigned to the corresponding FulfillmentOrder.
/commerce/order-management/order-summaries/ Create a credit memo to represent the refund for one or more
orderSummaryId/actions/create-credit-memo change orders associated with an OrderSummary.
/commerce/order-management/order-summaries Ensure funds for an invoice and apply them to it. If needed, capture
orderSummaryId/async-actions/ authorized funds by sending a request to a payment provider. This
ensure-funds-async method inserts a background operation into an asynchronous job
queue and returns the ID of that operation so you can track its
status. Payment gateway responses appear in the payment gateway
log and do not affect the background operation status.
/commerce/order-management/order-summaries/ Retrieve the expected change order values for canceling one or
orderSummaryId/actions/preview-cancel more OrderItemSummaries from an OrderSummary, without
actually executing the cancel.
/commerce/order-management/order-summaries/ Retrieve the expected change order values for returning one or
orderSummaryId/actions/preview-return more OrderItemSummaries from an OrderSummary, without
actually executing the return.
241
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Resources
Resource Description
/commerce/order-management/order-summaries/ Cancel one or more OrderItemSummaries from an OrderSummary,
orderSummaryId/actions/submit-cancel and create a corresponding change order.
Fulfillment Orders
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.
Fulfillment Orders, Cancel Item
Cancel FulfillmentOrderLineItems from a FulfillmentOrder. This action doesn’t cancel the associated OrderItemSummaries, so reallocate
the canceled quantities to a new FulfillmentOrder.
Fulfillment Orders, Create Invoice
Create an invoice for a FulfillmentOrder that doesn’t have one.
Fulfillment Orders, Create Multiple
Create FulfillmentOrders for multiple OrderDeliveryGroups in a single request.
Order Payment Summaries
Create an OrderPaymentSummary for an OrderSummary. Specify a payment authorization or payments that share the same payment
method. In an org with the multicurrency feature enabled, the OrderPaymentSummary inherits the CurrencyIsoCode value from the
OrderSummary.
Order Summaries
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce
Order Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.
Order Summaries, Create Credit Memo
Create a credit memo to represent the refund for one or more change orders associated with an OrderSummary.
242
Salesforce Order Management in the Chatter Connect API Fulfillment Orders
Fulfillment Orders
Create one or more FulfillmentOrders and FulfillmentOrderLineItems for an OrderDeliveryGroupSummary, which defines a delivery
method and recipient for an OrderSummary. You specify the OrderItemSummaries to allocate, which can be fulfilled from different
locations. Specifying multiple fulfillment groups creates one FulfillmentOrder for each location. For each OrderItemSummary, a
FulfillmentOrderLineItem is created and assigned to the corresponding FulfillmentOrder.
243
Salesforce Order Management in the Chatter Connect API Fulfillment Orders
Resource
/commerce/fulfillment/fulfillment-orders
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Fulfillment Order Input
Root XML tag
<fulfillmentOrderInput>
JSON example
{
"orderSummaryId":"1Osxx0000000000001",
"orderDeliveryGroupSummaryId":"2Dgxx00000000W0001",
"fulfillmentGroups":[
{
"fulfilledFromLocationId":"131xx00000000W0001",
"fulfillmentType":"warehouse",
"orderItemSummaries":[
{
"orderItemSummaryId":"10uxx00000000W0001",
"quantity":3
},
{
"orderItemSummaryId":"10uxx00000000W0002",
"quantity":1
}
]
}
]
}
Properties
244
Salesforce Order Management in the Chatter Connect API Fulfillment Orders, Cancel Item
/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/cancel-item
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Fulfillment Order Line Items To Cancel Input
Root XML tag
<fulfillmentOrderLineItemsToCancelInput>
JSON example
{
"fulfillmentOrderLineItemsToCancel" : [
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0001",
"quantity":1
},
{
"fulfillmentOrderLineItemId" : "0a4xx00000000W0002",
"quantity":2
}
]
}
Properties
245
Salesforce Order Management in the Chatter Connect API Fulfillment Orders, Create Invoice
/commerce/fulfillment/fulfillment-orders/fulfillmentOrderId/actions/create-invoice
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Fulfillment Order Invoice Input
Root XML tag
<fulfillmentOrderInvoiceInput>
JSON example
{
}
Properties
None.
Response body for POST
• When the HTTP status code indicates success, the response body is a Fulfillment Order Invoice Output. The response body can
still indicate processing errors.
• When the HTTP status code is in the 400 (client error) or 500 (server error) range, the response body is an Error with Output. The
output property is a Fulfillment Order Invoice Output, and the value of the enhancedErrorType property can be
ignored.
Available version
50.0
246
Salesforce Order Management in the Chatter Connect API Order Payment Summaries
Requires Chatter
No
HTTP methods
POST
Request body for POST
Multiple Fulfillment Order Input
Root XML tag
<multipleFulfillmentOrderInput>
JSON example
Properties
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Create Order Payment Summary Input
Root XML tag
<orderPaymentSummaryInput>
247
Salesforce Order Management in the Chatter Connect API Order Summaries
JSON examples
{
"orderSummaryId":"1Osxx0000000000001",
"paymentAuthorizationId":"2Dgxx00000000W0001"
}
{
"orderSummaryId":"1Osxx0000000000001",
"paymentIds":[
"0a3xx0000000085AAA",
"0a3xx0000000085BBB"
]
}
Properties
Order Summaries
Create an OrderSummary based on an order. That order is considered the original order for the OrderSummary. Subsequent change
orders that apply to the OrderSummary are also represented as orders. You can specify whether the order is managed in Salesforce Order
Management or by an external system. Most Salesforce Order Management APIs can run only on orders that it manages.
Resource
/commerce/order-management/order-summaries
Available version
48.0
248
Salesforce Order Management in the Chatter Connect API Order Summaries
Requires Chatter
No
HTTP methods
POST
Request body for POST
Order Summary Input
Root XML tag
<orderSummaryInput>
JSON example
{
"orderId": "801xx000003GbTgAAK"
}
Properties
249
Salesforce Order Management in the Chatter Connect API Order Summaries, Create Credit Memo
/commerce/order-management/order-summaries/orderSummaryId/actions/create-credit-memo
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Create Credit Memo Input
Root XML tag
<createCreditMemoInput>
JSON example
{
"changeOrderIds": [
"801R0000000EAAkIAO"
]
}
Properties
/commerce/order-management/order-summaries/orderSummaryId/async-actions/ensure-funds-async
250
Salesforce Order Management in the Chatter Connect API Order Summaries, Ensure Funds Async
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Ensure Funds Async Input
Root XML tag
<ensureFundsAsyncInput>
JSON example
{
"invoiceId": "50gR000000000JNIAY"
}
Properties
Note: If multiple OrderPaymentSummaries have the same amount, their order of selection is random.
1. Verify that the invoice balance doesn’t exceed the total amount of all the OrderPaymentSummaries.
2. If an OrderPaymentSummary exists with an amount that matches the invoice balance, use it.
3. Otherwise, if any OrderPaymentSummaries exist with an amount greater than the invoice balance, use the one with the smallest
amount greater than the invoice balance.
4. Otherwise, select OrderPaymentSummaries in order from largest amount to smallest until their amounts meet or exceed the
invoice balance.
5. If any selected funds are authorized, capture them.
6. Apply the selected funds to the invoice.
251
Salesforce Order Management in the Chatter Connect API Order Summaries, Ensure Refunds Async
/commerce/order-management/order-summaries/orderSummaryId/async-actions/ensure-refunds-async
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Ensure Refunds Async Input
Root XML tag
<ensureRefundsAsyncInput>
JSON example
{
"creditMemoId": "50gR000000000JNIAY"
}
Properties
252
Salesforce Order Management in the Chatter Connect API Order Summaries, Preview Cancel
Resource
/commerce/order-management/order-summaries/orderSummaryId/actions/adjust-item-preview
Available version
49.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Adjust Order Item Summary Input
Root XML tag
<adjustOrderItemSummaryInput>
JSON example
{
"adjustItems": [{
"reason": "Unknown",
"amount": 45,
"appeasementType": "AmountWithoutTax",
"orderItemSummaryId": "10uxx0000004EXLAA2",
"description": "foobar"
}]
}
Properties
/commerce/order-management/order-summaries/orderSummaryId/actions/preview-cancel
253
Salesforce Order Management in the Chatter Connect API Order Summaries, Preview Return
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}
Properties
/commerce/order-management/order-summaries/orderSummaryId/actions/preview-return
Available version
48.0
254
Salesforce Order Management in the Chatter Connect API Order Summaries, Submit Adjust
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}
Properties
/commerce/order-management/order-summaries/orderSummaryId/actions/adjust-item-submit
Available version
49.0
Requires Chatter
No
HTTP methods
POST
255
Salesforce Order Management in the Chatter Connect API Order Summaries, Submit Cancel
Properties
256
Salesforce Order Management in the Chatter Connect API Order Summaries, Submit Return
Resource
/commerce/order-management/order-summaries/orderSummaryId/actions/submit-cancel
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}
Properties
/commerce/order-management/order-summaries/orderSummaryId/actions/submit-return
257
Salesforce Order Management in the Chatter Connect API Return Orders
Available version
48.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Change Input
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}
Properties
Return Orders
Create a ReturnOrder and ReturnOrderLineItems for items belonging to an OrderSummary.
Resource
/commerce/returns/return-orders
258
Salesforce Order Management in the Chatter Connect API Return Orders
Available version
50.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Return Order Input
Root XML tag
<returnOrderInput>
JSON example
{
"orderSummaryId": "1Osxx0000004EAqCAM",
"status" : "Submitted",
"returnOrderLifeCycleType" : "Unmanaged",
"returnOrderLineItems": [
{
"quantityExpected": "1",
"reasonForReturn": "Not Satisfied",
"canReduceShipping": false,
"orderItemSummaryId": "10uxx0000004GKbAAM",
"quantityReceived": "0"
}
]
}
Properties
259
Salesforce Order Management in the Chatter Connect API Return Orders, Return Items
returnOrder Return Order Line List of data for creating At least one 50.0
LineItems Item Input[] ReturnOrderLineItems. element is required
/commerce/returns/return-orders/returnOrderId/actions/return-items
Available version
52.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Return Items Input
Root XML tag
<returnItemsInput>
JSON example
{
"returnOrderItems": [
{
"returnOrderLineItemId": "10uxx0000004GKbAAM",
"quantityReturned": "1",
"quantityToCancel": "0",
"quantityReceived": "1",
"quantityRejected": "0",
"reasonForRejection": "N/A"
}
],
"returnOrderItemDeliveryCharges": [
260
Salesforce Order Management in the Chatter Connect API Routing, Find Routes with Fewest Splits
{
"returnOrderLineItemId": "10uxx0000004GKbAAP"
}
]
}
Properties
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Find Routes With Fewest Splits Input
Root XML tag
<findRoutesWithFewestSplits>
Properties
261
Salesforce Order Management in the Chatter Connect API Routing, Rank By Average Distance
ordered Quantity With Sku Each list element represents a quantity At least one 51.0
Quantities Input[] of a product to be routed for fulfillment. element is required
Available version
51.0
Requires Chatter
No
HTTP methods
POST
Request body for POST
Rank Average Distance Input
Root XML tag
<rankAverageDistanceInput>
262
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Requests
JSON example
Properties
deliveryPostalCode String The postal code of the order recipient. Required 51.0
targetLocations Target Location Each element is a set of inventory At least one 51.0
Input[] locations that can combine to fulfill the element is required
order.
263
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Requests
264
Salesforce Order Management in the Chatter Connect API Adjust Item Input
265
Salesforce Order Management in the Chatter Connect API Adjust Order Item Summary Input
"description": "foobar"
}
Properties
reason String Reason for the adjustment. The value must Required 49.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.
SEE ALSO:
Order Summaries, Preview Adjust
Order Summaries, Submit Adjust
266
Salesforce Order Management in the Chatter Connect API Change Input
JSON example
{
"adjustItems": [{
"reason": "Unknown",
"amount": 45,
"appeasementType": "AmountWithoutTax",
"orderItemSummaryId": "10uxx0000004EXLAA2",
"description": "foobar"
}]
}
Properties
SEE ALSO:
Order Summaries, Preview Adjust
Order Summaries, Submit Adjust
Change Input
A list of changes to OrderItemSummaries that make up an order change, such as a cancel or return.
Root XML tag
<changeInput>
JSON example
{
"changeItems": [
{
"orderItemSummaryId": "10uxx0000004FYDAA2",
"quantity": 1.0,
"reason": "Wrong Item",
"shippingReductionFlag": true
}
]
}
267
Salesforce Order Management in the Chatter Connect API Change Item Input
Properties
SEE ALSO:
Order Summaries, Preview Cancel
Order Summaries, Preview Return
Order Summaries, Submit Cancel
Order Summaries, Submit Return
Properties
reason String Reason for the change. The value must Required 48.0
match one of the picklist values on the
Reason field of the
OrderItemSummaryChange object.
268
Salesforce Order Management in the Chatter Connect API Create Credit Memo Input
SEE ALSO:
Order Summaries, Preview Cancel
Order Summaries, Preview Return
Order Summaries, Submit Cancel
Order Summaries, Submit Return
Change Input
Properties
SEE ALSO:
Order Summaries, Create Credit Memo
269
Salesforce Order Management in the Chatter Connect API Ensure Funds Async Input
"paymentAuthorizationId":"2Dgxx00000000W0001"
}
{
"orderSummaryId":"1Osxx0000000000001",
"paymentIds":[
"0a3xx0000000085AAA",
"0a3xx0000000085BBB"
]
}
Properties
SEE ALSO:
Order Payment Summaries
270
Salesforce Order Management in the Chatter Connect API Ensure Refunds Async Input
Properties
SEE ALSO:
Order Summaries, Ensure Funds Async
Properties
SEE ALSO:
Order Summaries, Ensure Refunds Async
271
Salesforce Order Management in the Chatter Connect API Fulfillment Group Input
Properties
ordered Quantity With Sku Each list element represents a quantity of At least one 51.0
Quantities Input[] a product to be routed for fulfillment. element is required
272
Salesforce Order Management in the Chatter Connect API Fulfillment Order Input
Properties
fulfillmentType String Fulfillment type. One of the Type field Required 48.0
values defined for FulfillmentOrders.
SEE ALSO:
Fulfillment Orders
Fulfillment Order Input
273
Salesforce Order Management in the Chatter Connect API Fulfillment Order Invoice Input
}
]
}
Properties
SEE ALSO:
Fulfillment Orders
Properties
None.
SEE ALSO:
Fulfillment Orders, Create Invoice
274
Salesforce Order Management in the Chatter Connect API Fulfillment Order Line Items To Cancel Input
Properties
SEE ALSO:
Fulfillment Orders, Cancel Item
Fulfillment Order Line Items To Cancel Input
Properties
SEE ALSO:
Fulfillment Orders, Cancel Item
275
Salesforce Order Management in the Chatter Connect API Location Availability Input
Properties
stockKeepingUnit String The Stock Keeping Unit of the product. Required 51.0
Location Input
Inventory location data used to calculate shipping distance.
Root XML tag
<locationInput>
JSON example
Properties
276
Salesforce Order Management in the Chatter Connect API OCI Create Reservation Input
JSON example
Properties
allowPartial Boolean When true, if the system can’t create the Optional 51.0
Reservations entire reservation, then it attempts to
create a partial reservation.
createRecords OCI Create A list of product quantities and locations At least one 51.0
Reservation Single or location groups. element is required
Input[]
277
Salesforce Order Management in the Chatter Connect API OCI Fulfill Reservation Input
JSON example
Properties
Properties
278
Salesforce Order Management in the Chatter Connect API OCI Get Inventory Availability Input
JSON example
Properties
locationIdentifier String The identifier of the location that’s fulfilling Required 51.0
the reservation.
stockKeepingUnit String The SKU of the product being fulfilled. Required 51.0
Properties
279
Salesforce Order Management in the Chatter Connect API OCI Release Reservation Input
stockKeepingUnit String The SKU of a product to retrieve inventory Optional; can’t 51.0
availability data for. Specifying a SKU with combine with
no locations or location groups returns stockKeepingUnits
availability data for that SKU at all inventory
locations that are not assigned to location
groups.
useCache Boolean Whether to fetch the inventory data from Optional 51.0
the cache. Default value is true.
Properties
280
Salesforce Order Management in the Chatter Connect API OCI Transfer Reservation Input
JSON example
Properties
locationGroupIdentifier String The identifier of the location group that The identifier for a 51.0
has the reservation. location or location
group, but not both,
is required.
locationIdentifier String The identifier of the location that has the The identifier for a 51.0
reservation. location or location
group, but not both,
is required.
Properties
281
Salesforce Order Management in the Chatter Connect API OCI Transfer Reservation Single Input
transferRecords OCI Transfer A list of inventory reservation transfers. At least one 51.0
Reservation Single element is required.
Input[]
fromLocationGroupIdentifier String The identifier of the location group The identifier for a 51.0
sending the reservation. sending location or
location group, but
not both, is required
fromLocationIdentifier String The identifier of the location sending the The identifier for a 51.0
reservation. sending location or
location group, but
not both, is required
ignoreAvailabilityCheck Boolean If true, force the transfer even if the Optional 52.0
receiving location doesn’t have sufficient
available inventory. The default value is
false.
stockKeepingUnit String The SKU of the product being transferred. Required 51.0
282
Salesforce Order Management in the Chatter Connect API Order Item Summary Input
toLocationIdentifier String The identifier of the location receiving the The identifier for a 51.0
reservation. receiving location or
location group, but
not both, is required
Properties
SEE ALSO:
Fulfillment Orders
Fulfillment Order Input
Fulfillment Group Input
283
Salesforce Order Management in the Chatter Connect API Quantity With Sku Input
JSON example
{
"orderId": "801xx000003GbTgAAK"
}
Properties
SEE ALSO:
Order Summaries
Properties
284
Salesforce Order Management in the Chatter Connect API Rank Average Distance Input
Properties
deliveryPostalCode String The postal code of the order recipient. Required 51.0
targetLocations Target Location Each element is a set of inventory locations At least one 51.0
Input[] that can combine to fulfill the order. element is required
285
Salesforce Order Management in the Chatter Connect API Return Order Input
],
"returnOrderItemDeliveryCharges": [
{
"returnOrderLineItemId": "10uxx0000004GKbAAP"
}
]
}
Properties
Properties
286
Salesforce Order Management in the Chatter Connect API Return Order Item Delivery Charge Input
returnOrder Return Order Line List of data for creating At least one 50.0
LineItems Item Input[] ReturnOrderLineItems. element is required
status String Status to assign the ReturnOrder. This value Required 50.0
must match an entry in the ReturnOrder
object’s Status picklist.
{
"returnOrderLineItemId": "10uxx0000004GKbAAP"
}
Properties
287
Salesforce Order Management in the Chatter Connect API Return Order Item Input
{
"returnOrderLineItemId": "10uxx0000004GKbAAM",
"quantityReturned": "1",
"quantityToCancel": "0",
"quantityReceived": "1",
"quantityRejected": "0",
"reasonForRejection": "N/A"
}
Properties
288
Salesforce Order Management in the Chatter Connect API Return Order Line Item Input
Properties
reasonForReturn String Reason for the return. The value must Optional 50.0
match an entry in the ReturnOrderLineItem
object’s ReasonForReturn picklist.
289
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Responses
JSON example
Properties
290
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Responses
291
Salesforce Order Management in the Chatter Connect API Salesforce Order Management Responses
292
Salesforce Order Management in the Chatter Connect API Adjust Order Summary Output
errors Error Response Any errors that were returned. Big, 49.0 49.0
Output[]
postFulfillment String ID of the change Order that holds the Big, 49.0 49.0
ChangeOrderId financial changes applicable to order
products that have been fulfilled. For an
adjustPreview call, this value is always null.
preFulfillment String ID of the change Order that holds the Big, 49.0 49.0
ChangeOrderId financial changes applicable to order
products that have not been fulfilled. For an
adjustPreview call, this value is always null.
success Boolean Indicates whether the transaction was Big, 49.0 49.0
successful.
SEE ALSO:
Order Summaries, Preview Adjust
Order Summaries, Submit Adjust
293
Salesforce Order Management in the Chatter Connect API Average Distance Result Output
294
Salesforce Order Management in the Chatter Connect API Create Credit Memo Output
SEE ALSO:
Preview Cancel Output
Preview Return Output
Submit Cancel Output
Submit Return Output
Adjust Order Summary Output
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
295
Salesforce Order Management in the Chatter Connect API Create Order Payment Summary Output
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
locations Location Output[] The list of locations and their distances to Big, 51.0 51.0
the order recipient.
rank Integer This result’s rank among all results by Big, 51.0 51.0
average distance to the order recipient.
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
296
Salesforce Order Management in the Chatter Connect API Ensure Refunds Async Output
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
message String Message stating the reason for error, if any. Small, 48.0 48.0
297
Salesforce Order Management in the Chatter Connect API Find Routes With Fewest Splits Output
success Boolean Indicates whether the transaction was Big, 51.0 51.0
successful.
targetLocations Available Location Each element of the list is a set of inventory Big, 51.0 51.0
Output[] locations that together can fulfill the order
being routed.
fulfillmentOrderId String The FulfillmentOrderId from the successfully Big, 50.0 50.0
created FulfillmentOrder.
fulfillmentType String (Creation failed) The input FulfillmentType. Big, 50.0 50.0
orderItemSummaries Order Item Summary (Creation failed) The input list of Big, 50.0 50.0
Output[] OrderItemSummaries.
orderSummaryId String (Creation failed) The input OrderSummaryId. Big, 50.0 50.0
298
Salesforce Order Management in the Chatter Connect API Fulfillment Order Cancel Line Items Output
success Boolean Indicates whether the transaction was Big, 50.0 50.0
successful.
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
fulfillmentOrder String[] A list of IDs of created Fulfillment Orders. Big, 48.0 48.0
Ids
299
Salesforce Order Management in the Chatter Connect API Location Output
Location Output
An inventory location’s distance to an order recipient.
fulfillmentOrders Fulfillment Group A list of response data for created and failed Big, 50.0 50.0
Output[] FulfillmentOrders.
success Boolean Indicates whether the transaction was Big, 50.0 50.0
successful.
300
Salesforce Order Management in the Chatter Connect API OCI Create Reservation Single Output
errors OCI Create Any errors returned by the reservation Big, 51.0 51.0
Reservation Error request.
Output[]
expirationTime String The time at which the reservation would Small, 51.0 51.0
expire.
reservationTime String The time when the reservation was Small, 51.0 51.0
recorded.
success Boolean Indicates whether the reservation was Big, 51.0 51.0
successfully created.
locationGroupIdentifier String Identifier of the location group where the Small, 51.0 51.0
inventory is reserved.
locationIdentifier String Identifier of the location where the Small, 51.0 51.0
inventory is reserved.
quantity Double The reserved quantity of the product. Small, 51.0 51.0
stockKeepingUnit String The SKU of the reserved product. Small, 51.0 51.0
301
Salesforce Order Management in the Chatter Connect API OCI Fulfill Reservation Output
success Boolean Indicates whether the request was Big, 51.0 51.0
successful.
externalRefId String The external reference ID of the location that Small, 51.0 51.0
fulfilled the reservation.
locationIdentifier String The identifier of the location that fulfilled Small, 51.0 51.0
the reservation.
stockKeepingUnit String The SKU of the fulfilled product. Small, 51.0 51.0
302
Salesforce Order Management in the Chatter Connect API OCI Inventory Record Output
locations OCI Location A list of inventory availability data for Big, 51.0 51.0
Availability Output[] individual locations.
effectiveDate String The effective date of the inventory. Big, 51.0 51.0
futures OCI Future Inventory A list of any expected future inventory Big, 51.0 51.0
Output[] restocks.
303
Salesforce Order Management in the Chatter Connect API OCI Publish Location Structure Output
locationGroupIdentifier String The identifier of the location group. Big, 51.0 51.0
recordsProcessedCount Integer The number of records processed by the Big, 51.0 51.0
job.
recordsReadCount Integer The number of records read by the job. Big, 51.0 51.0
recordsSkippedCount Integer The number of records skipped by the job. Big, 51.0 51.0
startTimeUTC String The UTC time when the job started. (for Big, 51.0 51.0
example: "2020-07-06T22:53:06.788Z")
status String The status of the job. (e.g., "PENDING," Big, 51.0 51.0
"COMPLETED," etc.).
validationErrors String[] List of any validation errors returned by the Big, 51.0 51.0
job.
validationStatus String The validation status of the job. Big, 51.0 51.0
304
Salesforce Order Management in the Chatter Connect API OCI Release Reservation Error Output
success Boolean Indicates whether the request was Big, 51.0 51.0
successful.
externalRefId String The external reference ID of the location that Small, 51.0 51.0
released the reservation.
locationGroupIdentifier String The identifier of the location group that Small, 51.0 51.0
released the reservation.
locationIdentifier String The identifier of the location that released Small, 51.0 51.0
the reservation.
stockKeepingUnit String The SKU of the released product. Small, 51.0 51.0
305
Salesforce Order Management in the Chatter Connect API OCI Transfer Reservation Error Output
success Boolean Indicates whether the request was Big, 51.0 51.0
successful.
externalRefId String The external reference ID of the location that Small, 51.0 51.0
received the reservation.
fromLocationGroupIdentifier String The identifier of the location group that sent Small, 51.0 51.0
the reservation.
fromLocationIdentifier String The identifier of the location that sent the Small, 51.0 51.0
reservation.
ignoreAvailabilityCheck Boolean Whether this call ignored availability data Small, 52.0 52.0
at the location that received the reservation.
306
Salesforce Order Management in the Chatter Connect API OCI Upload Inventory Availability Output
toLocationGroupIdentifier String The identifier of the location group that Small, 51.0 51.0
received the reservation.
toLocationIdentifier String The identifier of the location that received Small, 51.0 51.0
the reservation.
recordsProcessedCount Integer The number of records processed by the Big, 51.0 51.0
job.
recordsReadCount Integer The number of records read by the job. Big, 51.0 51.0
recordsSkippedCount Integer The number of records skipped by the job. Big, 51.0 51.0
status String The status of the job. (e.g., "PENDING," Big, 51.0 51.0
"COMPLETED," etc.).
validationErrors String[] List of any validation errors returned by the Big, 51.0 51.0
job.
validationStatus String The validation status of the job. Big, 51.0 51.0
307
Salesforce Order Management in the Chatter Connect API Order Item Summary Output
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
308
Salesforce Order Management in the Chatter Connect API Rank Average Distance Output
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
errors Error Response Any errors that were returned. Big, 51.0 51.0
Output[]
results ConnectApR.iesutlOutputRepresentatoi n[] The results of the shipping distance Big, 51.0 51.0
calculations.
success Boolean Indicates whether the transaction was Big, 51.0 51.0
successful.
errors Error Response Any errors that were returned. Big, 52.0 52.0
Output[]
returnLineItem Return Order Item A list of properties representing any Big, 52.0 52.0
Splits Split Line Output[] remaining quantities from partial returns
processed by this call. Each element of the
list includes the ID of a split
309
Salesforce Order Management in the Chatter Connect API Return Order Item Split Line Output
success Boolean Indicates whether the transaction was Big, 52.0 52.0
successful.
success Boolean Indicates whether the transaction was Big, 52.0 52.0
successful.
success Boolean Indicates whether the transaction was Big, 52.0 50.0
successful.
310
Salesforce Order Management in the Chatter Connect API Submit Return Output
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
errors Error Response Any errors that were returned. Big, 48.0 48.0
Output[]
success Boolean Indicates whether the transaction was Big, 48.0 48.0
successful.
311
CHAPTER 5 Order Management Invocable Actions
In this chapter ... Salesforce Order Management provides standard invocable actions to support order management
functionality.
• Salesforce Order
Management
Actions
• Flow Core Action for
Order Management:
Adjust Order Item
Summaries Preview
• Flow Core Action for
Order Management:
Adjust Order Item
Summaries Submit
• Flow Core Action for
Order Management:
Cancel Fulfillment
Order Item
• Flow Core Action for
Order Management:
Cancel Order Item
Summaries Preview
• Flow Core Action for
Order Management:
Cancel Order Item
Summaries Submit
• Flow Core Action for
Order Management:
Create Credit Memo
• Flow Core Action for
Order Management:
Create Fulfillment
Order
• Flow Core Action for
Order Management:
Create an Invoice
from Fulfillment
Order
• Flow Core Action for
Order Management:
312
Order Management Invocable Actions
Create Order
Payment Summary
• Flow Core Action for
Order Management:
Create Order
Summary
• Flow Core Action for
Order Management:
Create Return Order
• Flow Core Action for
Order Management:
Ensure Funds Async
• Flow Core Action for
Order Management:
Ensure Refunds
Async
• Flow Core Action for
Order Management:
Return Order Item
Summaries Preview
• Flow Core Action for
Order Management:
Return Order Item
Summaries Submit
• Flow Core Action for
Order Management:
Return Return Order
Items
313
Order Management Invocable Actions Salesforce Order Management Actions
Flow Core Action for Order Management: Adjust Order Item Summaries
Preview
Preview the expected results of adjusting the price of one or more order product summaries on an
EDITIONS
order summary, without executing the adjustment. You can only apply a discount, not an increase.
The output of this action contains the values that would be set on the change orders created by Available in: Lightning
submitting the proposed adjustment. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Adjust Order Item Summaries Preview.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.
314
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Preview
• discountValue — The value used to calculate the adjustment amount, as described by the
adjustmentType. It must be a negative value.
• reason — Adjustment reason. The value must match one of the picklist values on the Reason field of
the Order Product Summary Change object.
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
• totalAdjustedDeliveryTaxAmount — Change to the adjusted delivery subtotal tax.
• totalAdjustedProductAmount — Change to the adjusted product subtotal.
• totalAdjustedProductTaxAmount — Change to the adjusted product subtotal tax.
315
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Submit
Usage
To set up the Adjust Order Product Summaries Input:
1. Use Assignment elements to set the orderItemSummaryId, description, adjustmentType, discountValue,
and reason field values on one or more ConnectApi.AdjustItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.AdjustItemInputRepresentation variables to the
changeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.
3. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID in
the action input.
In a flow for adjusting the prices of order product summaries, display the output of this action for the user to review before executing
the adjustment. When the user verifies the expected results, pass the same input to an Adjust Order Item Summaries Submit action.
Flow Core Action for Order Management: Adjust Order Item Summaries
Submit
Adjust the price of one or more order product summaries on an order summary. You can only apply
EDITIONS
a discount, not an increase. This action creates one or two change order records.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Adjust Order Item Summaries Submit. Experience
316
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Submit
• discountValue — The value used to calculate the adjustment amount, as described by the
adjustmentType. It must be a negative value.
• reason — Adjustment reason. The value must match one of the picklist values on the Reason field of
the Order Product Summary Change object.
Note: The sign of a value in the changeBalances field is the opposite of the corresponding value
on a change order record. For example, a discount is a positive value in changeBalances and a
negative value on a change order record.
The orderSummaryId field is the ID of the order summary specified in the input.
The changeBalances field is an Apex-defined variable of class
ConnectApi.ChangeItemOutputRepresentation, which includes these fields:
• grandTotalAmount — Change to the total with tax.
• totalAdjDeliveryAmtWithTax — Change to the adjusted delivery subtotal, including tax.
• totalAdjDistAmountWithTax — Change to the total order adjustments, including tax.
• totalAdjProductAmtWithTax — Change to the adjusted product subtotal, including tax.
• totalAdjustedDeliveryAmount — Change to the adjusted delivery subtotal.
317
Order Management Invocable Actions Flow Core Action for Order Management: Adjust Order Item
Summaries Submit
Usage
To set up the Adjust Order Product Summaries Input:
1. Use Assignment elements to set the orderItemSummaryId, description, adjustmentType, discountValue,
and reason field values on one or more ConnectApi.AdjustItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.AdjustItemInputRepresentation variables to the
changeItems field on a ConnectApi.AdjustOrderItemSummaryInputRepresentation variable.
3. Use the ConnectApi.AdjustOrderItemSummaryInputRepresentation variable and the order summary ID in
the action input.
In a flow for adjusting the prices of order product summaries, run an Adjust Order Item Summaries Preview action before running this
action. Then display its output for the user to review. When the user verifies the expected results, pass the same input to this action.
After submitting a price adjustment, process refunds as appropriate:
• If the discount only applied to order product summaries for which payment has not been captured, it does not require a refund.
This situation normally applies to order products in the US that have not been fulfilled.
• If the discount applied to order product summaries that have not been fulfilled and for which payment has been captured, process
a refund. In this case, pass the totalExcessFundsAmount from changeBalances to the Ensure Refunds Async action.
• If the discount applied to order product summaries that have been fulfilled, process a refund. Pass the
postFulfillmentChangeOrderId to the Create Credit Memo action, then pass the credit memo to the Ensure Refunds
Async action.
318
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Fulfillment
Order Item
• If the discount applied to both fulfilled and unfulfilled order product summaries for which payment has been captured, process both
refunds. Pass the postFulfillmentChangeOrderId to the Create Credit Memo action, then pass the credit memo and
the totalExcessFundsAmount from changeBalances to the Ensure Refunds Async action.
Important: Excess funds are not reduced until the payment processor issues a refund. If you don’t process refunds promptly,
subsequent refunds can be inaccurate. Consider the following example.
1. An order with a total amount of $100 is placed, and the amount is captured immediately.
2. A product is canceled from the order, resulting in $20 of excess funds.
3. Before the excess funds are sent to the payment provider in an ensure refunds action, another product is canceled. This
cancellation adds another $20 of excess funds. However, because the original $20 hasn’t been refunded yet, the cancel action
returns a total excess funds amount of $40.
4. The first excess funds amount ($20) is sent to the payment provider in an ensure refunds request.
5. The second excess funds amount ($40) is sent to the payment provider in an ensure refunds request.
6. The payment provider receives requests for $60 of refunds, when the correct refund total is $40. Because the total refund
amount is less than the total captured amount of $100, the payment provider issues $60 in refunds.
Flow Core Action for Order Management: Cancel Fulfillment Order Item
Cancel fulfillment order products from a fulfillment order. You can cancel more than one product,
EDITIONS
and specify a quantity to cancel for each of them. This action doesn’t cancel the associated order
product summaries; it only reduces their allocated quantities. Usually, you reallocate the canceled Available in: Lightning
quantities to a new fulfillment order. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Cancel Fulfillment Order Item.
Unlimited, and Developer
Editions with Salesforce
Order Management
Set Input Values
Use values from earlier in the flow to set the inputs.
Fulfillment Reference to the fulfillment order that you want to cancel fulfillment order items from.
Order Id
319
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Preview
Usage
To set up the Cancel Fulfillment Order Items Input, first use Assignment elements to set the fulfillmentOrderLineItemId
and quantity field values on one or more ConnectApi.FulfillmentOrderLineItemInputRepresentation
variables. Then use an Assignment element to add those variables to the FulfillmentOrderLineItemsToCancel field on
a ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation variable. Use that variable in the
action input.
Flow Core Action for Order Management: Cancel Order Item Summaries
Preview
Preview the expected results of canceling one or more order product summaries from an order
EDITIONS
summary without executing the cancel. The output of this action contains the values that would
be set on the change order created by submitting the proposed cancel. Available in: Lightning
Drag an Action element onto the canvas. Select the Order Management category, and search for Experience
Cancel Order Item Summaries Preview.
Available in: Enterprise,
Unlimited, and Developer
Editions with Salesforce
Set Input Values Order Management
Use values from earlier in the flow to set the inputs.
Order Summary Reference to the order summary that you want to preview canceling order product summaries from.
Id
320
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Preview
Usage
To set up the Cancel Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
321
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Submit
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for canceling order product summaries, display the output of this action for the user to review before executing the cancel.
When the user verifies the expected results, pass the same input to a Cancel Order Item Summaries Submit action.
Flow Core Action for Order Management: Cancel Order Item Summaries
Submit
Cancel one or more order product summaries from an order summary. This action creates a change
EDITIONS
order record.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Cancel Order Item Summaries Submit. Experience
Input Description
Parameter
Cancel This input is an Apex-defined variable of class
Order ConnectApi.ChangeInputRepresentation.
Product The variable has one field, changeItems. This field is a list of Apex-defined
Summary variables of class ConnectApi.ChangeItemInputRepresentation. Each of the
Items variables includes these fields:
Input
• orderItemSummaryId — ID of an order product summary to cancel.
It can’t be a shipping charge product.
• quantity — Quantity to cancel.
• reason — Cancel reason. The value must match one of the picklist values
on the Reason field of the Order Product Summary Change object.
• shippingReductionFlag — Boolean flag that specifies whether to
prorate any related delivery charge based on the price change.
Order Reference to the order summary that you want to cancel order product summaries
Summary from.
Id
322
Order Management Invocable Actions Flow Core Action for Order Management: Cancel Order Item
Summaries Submit
Usage
To set up the Cancel Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for canceling order product summaries, run a Cancel Order Item Summaries Preview action before running this action. Then
display its output for the user to review. When the user verifies the expected results, pass the same input to this action.
323
Order Management Invocable Actions Flow Core Action for Order Management: Create Credit Memo
Input Description
Parameter
Credit This input is an Apex-defined variable of class
Memo ConnectApi.CreateCreditMemoInputRepresentation.
Input The variable has one field, changeOrderIds, which is a list of IDs of the
change orders to create a credit memo for.
Order Reference to the order summary associated with the change orders.
Summary
Id
Usage
To set up the Credit Memo Input, first use Assignment elements to add the change order IDs to a list of strings variable. Then use that
variable in the action input.
324
Order Management Invocable Actions Flow Core Action for Order Management: Create Fulfillment
Order
– referenceId — Reference to the fulfillment group input. This action doesn’t use this value.
325
Order Management Invocable Actions Flow Core Action for Order Management: Create an Invoice
from Fulfillment Order
Usage
To set up the Fulfillment Order Input:
1. Use Assignment elements to set the orderItemSummaryId and quantity field values on one or more
ConnectApi.OrderItemSummaryInputRepresentation variables for each fulfillment group.
2. Use Assignment elements to add the ConnectApi.OrderItemSummaryInputRepresentation variables to the
orderItemSummaries fields on one or more ConnectApi.FulfillmentGroupInputRepresentation variables,
one for each fulfillment group.
3. Use Assignment elements to set the fulfilledFromLocationId and fulfillmentType field values on the fulfillment
group variables.
4. Use Assignment elements to add the fulfillment group variables to the fulfillmentGroups field on a
ConnectApi.FulfillmentOrderInputRepresentation variable.
5. Use Assignment elements to set the orderDeliveryGroupSummaryId and orderSummaryId field values on the
ConnectApi.FulfillmentOrderInputRepresentation variable.
6. Use the ConnectApi.FulfillmentOrderInputRepresentation variable in the action input.
326
Order Management Invocable Actions Flow Core Action for Order Management: Create Order
Payment Summary
Usage
To set up the Order Payment Summary Create Input for payments, first use Assignment elements to add the payment IDs to a list of
strings variable. Then use that variable in the action input.
327
Order Management Invocable Actions Flow Core Action for Order Management: Create Order
Summary
• status—Optional. Status to assign to the order summary. The value must match one of the picklist values
on the Status field of the Order Summary object.
328
Order Management Invocable Actions Flow Core Action for Order Management: Create Return Order
• status—Status to assign to the return order. The value must match one
of the picklist values on the Status field of the Return Order object.
329
Order Management Invocable Actions Flow Core Action for Order Management: Ensure Funds Async
Usage
To set up the Create Return Order Input:
1. Use Assignment elements to set the canReduceShipping, orderItemSummaryId, quantityExpected,
quantityReceived, and reasonForReturn field values on one or more
ConnectApi.ReturnOrderLineItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ReturnOrderLineItemInputRepresentation variables to
the returnOrderLineItems field on a ConnectApi.ReturnOrderInputRepresentation variable.
3. Use Assignment elements to set the orderSummaryId, returnOrderLifeCycleType, and status field values on
the ConnectApi.ReturnOrderInputRepresentation variable.
4. Use the ConnectApi.ReturnOrderInputRepresentation variable in the action input.
Order Summary Reference to the order summary associated with the invoice.
Id
330
Order Management Invocable Actions Flow Core Action for Order Management: Ensure Refunds
Async
Usage
This action checks the order payment summaries associated with the specified order summary for funds to pay the invoice balance as
follows:
Note: If multiple order payment summaries have the same amount, their order of selection is random.
1. Verify that the invoice balance doesn’t exceed the total amount of all the order payment summaries.
2. If an order payment summary exists with an amount that matches the invoice balance, use it.
3. Otherwise, if any order payment summaries exist with an amount greater than the invoice balance, use the one with the smallest
amount greater than the invoice balance.
4. Otherwise, select order payment summaries in order from largest amount to smallest until their amounts meet or exceed the invoice
balance.
5. If any selected funds are authorized, capture them.
6. Apply the selected funds to the invoice.
331
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Preview
Flow Core Action for Order Management: Return Order Item Summaries
Preview
Preview the expected results of returning one or more order product summaries from an order
EDITIONS
summary without executing the return. The output of this action contains the values that would
be set on the change order created by submitting the proposed return. Available in: Lightning
Drag an Action element onto the canvas. Select the Order Management category, and search for Experience
Return Order Item Summaries Preview.
Available in: Enterprise,
Unlimited, and Developer
Editions with Salesforce
Set Input Values Order Management
Use values from earlier in the flow to set the inputs.
332
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Preview
Usage
To set up the Return Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
333
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Submit
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for returning order product summaries, display the output of this action for the user to review before executing the return.
When the user verifies the expected results, pass the same input to a Return Order Item Summaries Submit action.
Flow Core Action for Order Management: Return Order Item Summaries
Submit
Return one or more order product summaries from an order summary. This action creates a change
EDITIONS
order record.
Drag an Action element onto the canvas. Select the Order Management category, and search for Available in: Lightning
Return Order Item Summaries Submit. Experience
Input Description
Parameter
Order Reference to the order summary that you want to return order product summaries
Summary from.
Id
334
Order Management Invocable Actions Flow Core Action for Order Management: Return Order Item
Summaries Submit
Usage
To set up the Return Order Product Summary Items Input:
1. Use Assignment elements to set the orderItemSummaryId, quantity, reason, and shippingReductionFlag
field values on one or more ConnectApi.ChangeItemInputRepresentation variables.
2. Use an Assignment element to add the ConnectApi.ChangeItemInputRepresentation variables to the
changeItems field on a ConnectApi.ChangeInputRepresentation variable.
3. Use the ConnectApi.ChangeInputRepresentation variable and the order summary ID in the action input.
In a flow for returning order product summaries, run a Return Order Item Summaries Preview action before running this action. Then
display its output for the user to review. When the user verifies the expected results, pass the same input to this action.
335
Order Management Invocable Actions Flow Core Action for Order Management: Return Return Order
Items
Flow Core Action for Order Management: Return Return Order Items
Process one or more return order line items belonging to a return order. This action creates a change
EDITIONS
order record and makes the processed return order line items read-only. If a processed return order
line item has any remaining expected quantity, then the action creates a separate return order line Available in: Lightning
item representing that quantity. Experience
Drag an Action element onto the canvas. Select the Order Management category, and search for
Available in: Enterprise,
Return Return Order Items.
Unlimited, and Developer
Editions with Salesforce
Order Management and
Set Input Values Returns
Use values from earlier in the flow to set the inputs.
Return Items This input is an Apex-defined variable of class ConnectApi.ReturnItemsInputRepresentation. It has two fields.
Input The returnOrderItemDeliveryCharges field is an optional list of Apex-defined variables of class
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation. Each of the variables includes one field:
• returnOrderLineItemId—ID of a return order line item representing a shipping charge to return.
The returnOrderItems field is a list of Apex-defined variables of class
ConnectApi.ReturnOrderItemInputRepresentation. Each of the variables includes these fields:
• quantityReceived—(Optional) The quantity of the return order line item that has been received.
The value must be zero or greater. This value isn’t used by any standard features, but is provided for use in
customizations.
• quantityRejected—(Optional) The quantity of the return order line item that has been rejected for
return. The value must be zero or greater. This value isn’t used by any standard features, but is provided for
use in customizations.
• quantityReturned—The quantity of the return order line item that has been returned. The value
must be greater than zero. If this value plus quantityToCancel is less than the expected return quantity,
then the remaining quantity to be returned is added to a new return order line item.
• quantityToCancel—(Optional) The quantity of the return order line item to remove because it’s not
being returned. The value must be zero or greater. If this value plus quantityReturned is less than the
expected return quantity, then the remaining quantity to be returned is added to a new return order line
item.
• reasonForRejection—(Optional) The reason why the rejected quantity, if any, was rejected. This
value isn’t used by any standard features, but is provided for use in customizations.
• returnOrderLineItemId—The return order line item ID.
336
Order Management Invocable Actions Flow Core Action for Order Management: Return Return Order
Items
Note: After a change order is created for a return order line item, that return order line item is read-only.
If this action is used to return a partial quantity, it creates a new “split” return order line item to hold the
remaining quantity to be returned. In that case, it returns the IDs of the original and split return order
line items in an element of the returnLineItemSplits output list property.
Usage
To set up the Return Return Order Items Input:
1. Use Assignment elements to set the quantityReceived, quantityRejected, quantityReturned,
quantityToCancel, reasonForRejection, and returnOrderLineItemId field values on one or more
ConnectApi.ReturnOrderItemInputRepresentation variables.
2. Use Assignment elements to set the returnOrderLineItemId field value on one or more
ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation variables.
3. Use an Assignment element to add the ConnectApi.ReturnOrderItemInputRepresentation variables to the
returnOrderItems field on a ConnectApi.ReturnItemsInputRepresentation variable.
4. Use an Assignment element to add the ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation
variables to the returnOrderItemDeliveryCharges field on a
ConnectApi.ReturnItemsInputRepresentation variable.
5. Use the ConnectApi.ReturnItemsInputRepresentation variable and the return order ID in the action input.
337
CHAPTER 6 Salesforce Order Management Platform Events
In this chapter ... Salesforce Order Management includes standard platform events. Processes, flows, and the Streaming
API can subscribe to them.
• FOStatusChangedEvent
• OrderSummaryCreatedEvent
• OrderSumStatusChangedEvent
338
Salesforce Order Management Platform Events FOStatusChangedEvent
FOStatusChangedEvent
Notifies subscribers of changes to the status of a fulfillment order record. Use this event to trigger flows and processes in your order
workflow. This object is available in API version 48.0 and later.
Supported Calls
describeSObjects()
Supported Subscribers
Subscriber Supported?
Apex Triggers
Flows
Processes
Fields
Field Details
EventUuid Type
string
Properties
Nillable
Description
A universally unique identifier (UUID) that identifies a platform event message. This field is
available in API version 52.0 and later.
FulfillmentOrderId Type
reference
Properties
Nillable
339
Salesforce Order Management Platform Events FOStatusChangedEvent
Field Details
Description
ID of the FulfillmentOrder whose status changed.
This value is functionally required, but is nillable because fulfillment order records can be
deleted to comply with data protection and privacy requirements.
NewStatus Type
picklist
Properties
None
Description
Required. The new value of the Status field on the FulfillmentOrder.
Possible values are defined by the Status field picklist on the FulfillmentOrder object.
NewStatusCategory Type
picklist
Properties
Restricted picklist
Description
Required. The new value of the StatusCategory field on the FulfillmentOrder.
Possible values are:
• Activated
• Cancelled
• Closed
• Draft
• Fulfilling
OldStatus Type
picklist
Properties
Nillable
Description
The previous value of the Status field on the FulfillmentOrder.
Possible values are defined by the Status field picklist on the FulfillmentOrder object.
OldStatusCategory Type
picklist
Properties
Nillable, Restricted picklist
Description
The previous value of the StatusCategory field on the FulfillmentOrder.
340
Salesforce Order Management Platform Events OrderSummaryCreatedEvent
Field Details
Possible values are:
• Activated
• Cancelled
• Closed
• Draft
• Fulfilling
OrderSummaryId Type
reference
Properties
Nillable
Description
ID of the OrderSummary associated with the FulfillmentOrder.
ReplayId Type
string
Properties
Nillable
Description
Represents an ID value that is populated by the system and refers to the position of the event
in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive
events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed
events that are within the retention window.
OrderSummaryCreatedEvent
Notifies subscribers of the creation of an order summary record. Use this event to trigger flows and processes in your order workflow.
This object is available in API version 48.0 and later.
Supported Calls
describeSObjects()
Supported Subscribers
Subscriber Supported?
Apex Triggers
Flows
Processes
341
Salesforce Order Management Platform Events OrderSummaryCreatedEvent
Subscriber Supported?
Streaming API (CometD)
Fields
Field Details
EventUuid Type
string
Properties
Nillable
Description
A universally unique identifier (UUID) that identifies a platform event message. This field is
available in API version 52.0 and later.
OrderId Type
reference
Properties
Nillable
Description
ID of the original order associated with the created OrderSummary.
OrderSummaryId Type
reference
Properties
Nillable
Description
ID of the created OrderSummary
ReplayId Type
string
Properties
Nillable
342
Salesforce Order Management Platform Events OrderSumStatusChangedEvent
Field Details
Description
Represents an ID value that is populated by the system and refers to the position of the event
in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive
events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed
events that are within the retention window.
OrderSumStatusChangedEvent
Notifies subscribers of changes to the status of an order summary record. Use this event to trigger flows and processes in your order
workflow. This object is available in API version 48.0 and later.
Supported Calls
describeSObjects()
Supported Subscribers
Subscriber Supported?
Apex Triggers
Flows
Processes
Fields
Field Details
EventUuid Type
string
343
Salesforce Order Management Platform Events OrderSumStatusChangedEvent
Field Details
Properties
Nillable
Description
A universally unique identifier (UUID) that identifies a platform event message. This field is
available in API version 52.0 and later.
NewStatus Type
picklist
Properties
Defaulted on create
Description
Required. The new value of the Status field on the OrderSummary.
Possible values are based on the OrderSummary statuses defined in your org.
OldStatus Type
picklist
Properties
Defaulted on create
Description
Required. The previous value of the Status field on the OrderSummary.
Possible values are based on the OrderSummary statuses defined in your org.
OrderId Type
reference
Properties
Nillable
Description
ID of the original order associated with the OrderSummary.
OrderSummaryId Type
reference
Properties
Nillable
Description
The ID of the OrderSummary that changed.
This value is functionally required, but is nillable because order summary records can be
deleted to comply with data protection and privacy requirements.
ReplayId Type
string
344
Salesforce Order Management Platform Events OrderSumStatusChangedEvent
Field Details
Properties
Nillable
Description
Represents an ID value that is populated by the system and refers to the position of the event
in the event stream. Replay ID values aren’t guaranteed to be contiguous for consecutive
events. A subscriber can store a replay ID value and use it on resubscription to retrieve missed
events that are within the retention window.
345
CHAPTER 7 Salesforce Order Management Lightning
Components
Salesforce Order Management includes standard Lightning components .
346