Submit Cart for an Exchange Order
After you’ve previewed the cart, it’s almost time to submit the exchange. There are a few considerations to keep in mind while creating the submit for the exchange.
| Required Editions |
|---|
| Available in: Enterprise, Unlimited, and Developer Editions |
Before creating your submit order, validate that orderSummaryId (MainOrderSummaryId), exchangeCartId, and referenceId:
- Aren’t null or empty
- Are valid Salesforce IDs
- Represent a valid entity
The referenceId must be type ReturnOrder. Make sure the ReturnOrder’s StatusCategory is Activated or Pending.
Make sure the ReturnOrderId belongs to the MainOrderSummaryId.
The cart for an exchange needs at least one product and at least one delivery group. The cart must belong to the same account as the OrderSummary. Make sure the OrderSummary.Account equals the cart.Account.
| Name | Type | Description | Required or Optional |
|---|---|---|---|
mainOrderSummaryId | String | ID of the main Order Summary. | Required |
exchangeCartId | String | ID of the cart used for adding items to the exchange order. | Required |
referenceId | String | Polymorphic Reference ID, which must be related to the main Order Summary. Only Return Order ID is supported. | Required |
paymentInfoList | PaymentInfoInputRepresentationList | List of payment information if additional funds are needed for the new exchange order.
| Optional |
paymentInfoItems | Array[PaymentInfoInputRepresentation] | List of payment information if additional funds are needed for the new exchange order. | Optional |
SequenceOrderPaymentSummaryInputList | Sequence | Ordered list of OrderPaymentSummaries and the reserved balance amounts to apply them to.
| Optional |
The submit response might look like this example.
See Also