Newer Version Available
Order Summaries, Submit Adjust
Adjust the price of one or more OrderItemSummaries from an
OrderSummary, and create corresponding change orders.
- Resource
-
1/commerce/order-management/order-summaries/orderSummaryId/actions/adjust-item-submit - Available version
- 49.0
- HTTP methods
- POST
- Request body for POST
-
Adjust Order Item Summary Input
- Root XML tag
- <adjustOrderItemSummaryInput>
- JSON example
-
1{ 2 "adjustItems": [{ 3 "reason": "Unknown", 4 "amount": -45, 5 "adjustmentType": "AmountWithoutTax", 6 "orderItemSummaryId": "10uxx0000004EXLAA2", 7 "description": "foobar" 8 }], 9 "allocatedItemsChangeOrderType": "Disallowed" 10} - Properties
-
Name Type Description Required or Optional Available Version adjustItems Adjust Item Input[] List of price adjustments to order item summaries. Required 49.0 allocatedItemsChangeOrderType String Process to use for order item summary quantities that are currently being fulfilled, defined as QuantityAllocated - QuantityFulfilled. Values are: - Disallowed—When distributing the adjustment, ignore any quantities being fulfilled. If an order item summary’s entire quantity is being fulfilled, return an error. This is the default value.
- InFulfillment—When distributing the adjustment, include quantities being fulfilled. Create a separate change order for the adjustments made to those quantities.
- PreFulfillment—When distributing the adjustment, include quantities being fulfilled. Include the adjustments made to those quantities in the change order for pre-fulfillment quantity adjustments.
Optional 55.0 individualLineItemTaxAdjustments Boolean Specifies whether to create multiple lines for each tax adjustment or one line with all tax adjustments. The default value is false. Optional 59.0
- Response body for POST
-
- When the HTTP status code indicates success, the response body is an Adjust Order Summary 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 an Adjust Order Summary Output, and the value of the enhancedErrorType property can be ignored.
- Usage
- When a price adjustment is applied to an OrderItemSummary, its quantities are
considered in three groups:
- Pre-fulfillment
- QuantityAvailableToFulfill, which is equal to QuantityOrdered - QuantityCanceled - QuantityAllocated
- In-fulfillment
- QuantityAllocated - QuantityFulfilled
- Post-fulfillment
- QuantityAvailableToReturn, which is equal to QuantityFulfilled - QuantityReturnInitiated
- You can apply adjustments to these groups in three different ways, controlled by the
allocatedItemsChangeOrderType input property:
- Distribute the adjustment evenly between pre-fulfillment and post-fulfillment quantities. Ignore in-fulfillment quantities. Create one change order for the adjustments to pre-fulfillment quantities and one change order for the adjustments to post-fulfillment quantities.
- Distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. Create one change order for the adjustments to both pre-fulfillment and in-fulfillment quantities, and one change order for the adjustments to post-fulfillment quantities.
- Distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. Create one change order for the adjustments to pre-fulfillment quantities, one change order for the adjustments to in-fulfillment quantities, and one change order for the adjustments to post-fulfillment quantities.
- 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 response body to the Order Summaries, Ensure Refunds Async resource.
- If the discount applied to OrderItemSummaries that have been fulfilled, process a refund. Pass the postFulfillmentChangeOrderId from the response body to the Order Summaries, Create Credit Memo resource, then pass the CreditMemo to the Order Summaries, Ensure Refunds Async resource.
- If the discount applied to both fulfilled and unfulfilled OrderItemSummaries for which payment has been captured, process both refunds. Pass the postFulfillmentChangeOrderId from the response body to the Order Summaries, Create Credit Memo resource, then pass the credit memo and the totalExcessFundsAmount from the response body to the Order Summaries, Ensure Refunds Async resource.