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
| Input | Type | Description |
|---|---|---|
| exchangeCartId | ID | Required. The ID of the cart record containing the items in the exchange order. |
| orderNumber | ID | Optional. Order number for the created exchange order summary. |
| orderSummaryId | ID | Required. The ID of the order summary record associated with the list of exchanges. |
| paymentInfoInputs | Collection | Optional. A collection of Apex ConnectApi.PaymentInfoInputRepresentation records, each containing payment details when the exchange order amount is greater than the original order amount. |
| referenceId | ID | Required. The ID of the record that's related to the specified order summary. Only IDs from a return order record are supported. |
| sequenceList | Collection | Optional. A collection of Apex ConnectApi.SequenceOrderPaymentSummaryInputRepresentation records to reserve a balance from. Each record contains an order summary payment ID and an amount. |
Outputs
| Output | Type | Description |
|---|---|---|
| changeBalances | string | A string that contains the calculated amounts resulting from the exchange order. |
| errors | string | Following a 400 error response, the error objects show information about the error that occurred. Contains a status code, message, and list of fields. |
| exchangeOrderSummaryId | ID | The ID of the order summary record associated with the list of exchanges. |
| isSuccess | boolean | The ID of the order summary record created for the exchanges. |
| orderSummaryID | ID | The ID of the order summary record associated with the list of exchanges. |