Submit Exchange Order

Submits an exchange order based on the specified information.

To access, you need the following permissions: Salesforce Order Management License or Salesforce B2B Commerce License.

This object is available in API version 60.0 and later.

Supported REST HTTP Methods 

URI: /services/data/v59.0/actions/standard/previewCartToExchangeOrder

Formats: JSON, XML

HTTP Methods: GET, HEAD, POST

Authentication: Authorization: Bearer token

Inputs 

InputTypeDescription
exchangeCartIdIDRequired. The ID of the cart record containing the items in the exchange order.
orderNumberIDOptional. Order number for the created exchange order summary.
orderSummaryIdIDRequired. The ID of the order summary record associated with the list of exchanges.
paymentInfoInputsCollectionOptional. A collection of Apex ConnectApi.PaymentInfoInputRepresentation records, each containing payment details when the exchange order amount is greater than the original order amount.
referenceIdIDRequired. The ID of the record that’s related to the specified order summary. Only IDs from a return order record are supported.
sequenceListCollectionOptional. A collection of Apex ConnectApi.SequenceOrderPaymentSummaryInputRepresentation records to reserve a balance from. Each record contains an order summary payment ID and an amount.

Outputs 

OutputTypeDescription
changeBalancesstringA string that contains the calculated amounts resulting from the exchange order.
errorsstringFollowing a 400 error response, the error objects show information about the error that occurred. Contains a status code, message, and list of fields.
exchangeOrderSummaryIdIDThe ID of the order summary record associated with the list of exchanges.
isSuccessbooleanThe ID of the order summary record created for the exchanges.
orderSummaryIDIDThe ID of the order summary record associated with the list of exchanges.