---
schema_version: "1"
id: f6eb29f7030e08210b6e8dae54426c180c80a165a876aae5fec4f856fe8e8b2a
title: Adjust Order Item Summaries Submit Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_om_actions_adjust_ois_submit.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_om_actions_adjust_ois_submit.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 05bfc5caeff032cf0dccd4abaf0438f96f76e70ef81b1a93e4cceea9f062a39f
description: In Salesforce Order Management, adjust the price of one or more order product summaries on an order summary. You can only apply a discount, not an increase. This action creates one or more change order records.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Adjust Order Item Summaries Submit Action

In Salesforce Order Management, adjust the price of one or more order product summaries on an order summary. You can only apply a discount, not an increase. This action creates one or more change order records.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">This feature requires the Salesforce Order Management add-on. To purchase, contact your Salesforce account executive.</td></tr></tbody></table>

In Flow Builder, add an Action element to your flow. Select the **Order Management** category, and search for **Adjust Order Item Summaries Submit**.

## Set Input Values

Use values from earlier in the flow to set the inputs.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:17.006802721088434%">
          <col style="width:82.99319727891157%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64520e92">Input Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64520e95">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d64520e92 ">
              <strong class="uicontrol">Order Summary Id</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64520e95 ">ID of the order summary associated with the order product summaries that you
              want to adjust the prices of.</td>

          </tr>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d64520e92 ">
              <strong class="uicontrol">Adjust Order Product Summaries Input</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64520e95 ">
              <p>This input is an Apex-defined variable of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_input_adjust_order_item_summary.htm" target="_blank">ConnectApi.AdjustOrderItemSummaryInputRepresentation</a>, which includes these fields:</p>
              <ul>
                <li><strong class="uicontrol">adjustItems</strong> —This field is a list of Apex-defined
                  variables of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_input_adjust_item.htm" target="_blank">ConnectApi.AdjustItemInputRepresentation</a>. Each of the variables includes
                  these fields:<ul>
                    <li><strong class="uicontrol">orderItemSummaryId</strong> —ID of an order product summary
                      to adjust the price of.</li>

                    <li><strong class="uicontrol">description</strong> —Optional description of the
                      adjustment.</li>

                    <li><strong class="uicontrol">adjustmentType</strong> —Specifies how to calculate the
                      adjustment amount from the <strong class="uicontrol">discountValue</strong> field. It
                      can have one of these values:<a name="flow_ref_elements_om_actions_adjust_ois_submit__adjustmenttypevalues"><!-- --></a>
                      <ul id="flow_ref_elements_om_actions_adjust_ois_submit__adjustmenttypevalues">
                        <li><kbd>AmountTaxOnly</kbd>—The value of
                          <strong class="uicontrol">discountValue</strong> is the tax-only adjustment
                          only.
                        </li>

                        <li><kbd>AmountWithTax</kbd>—The value of
                          <strong class="uicontrol">discountValue</strong> is the adjustment, including
                          tax.
                        </li>

                        <li><kbd>AmountWithoutTax</kbd>—The value of
                          <strong class="uicontrol">discountValue</strong> is the adjustment, not including
                          tax. Tax is calculated on the value and added.
                        </li>

                        <li><kbd>Percentage</kbd>—The value of
                          <strong class="uicontrol">discountValue</strong> is a percentage discount. It’s
                          divided by 100, and then multiplied by the total price and total tax
                          amount of the order product summary to determine the adjustment
                          amount.
                        </li>

                        <li><kbd>ProductOnly</kbd>—The value of
                          <strong class="uicontrol">discountValue</strong> is the product-only adjustment
                          only.
                        </li>

                      </ul>
                    </li>

                    <li><strong class="uicontrol">amount</strong> —The value used to calculate the adjustment
                      amount, as specified by the <strong class="uicontrol">adjustmentType</strong>. It must
                      be a negative value.</li>

                    <li><strong class="uicontrol">reason</strong> — Adjustment reason.The value must match one
                      of the picklist values on the Reason field of the Order Product Summary
                      Change object.</li>

                  </ul>
                </li>

                <li><strong class="uicontrol">allocatedItemsChangeOrderType</strong> —Specifies how to create
                  change orders for order product summary quantities that are currently being
                  fulfilled, defined as QuantityAllocated - QuantityFulfilled. It can have one of
                  these values:<a name="flow_ref_elements_om_actions_adjust_ois_submit__allocatedItemsChangeOrderTypevalues"><!-- --></a>
                  <ul id="flow_ref_elements_om_actions_adjust_ois_submit__allocatedItemsChangeOrderTypevalues">
                    <li><kbd>Disallowed</kbd>—When distributing the adjustment, ignore
                      any quantities being fulfilled. If an order product summary’s entire
                      quantity is being fulfilled, return an error. This value is the
                      default.</li>

                    <li><kbd>InFulfillment</kbd>—When distributing the adjustment,
                      include quantities being fulfilled. Create a separate change order for the
                      adjustments made to those quantities.</li>

                    <li><kbd>PreFulfillment</kbd>—When distributing the adjustment,
                      include quantities being fulfilled. Include the adjustments made to those
                      quantities in the change order for pre-fulfillment quantity
                      adjustments.</li>

                  </ul>
                </li>

                <li><strong class="uicontrol">individualLineItemTaxAdjustments</strong>—Specifies
                  whether to create multiple lines for each tax adjustment or one line with all
                  tax adjustments. The default value is false.</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Store Output Values

Use output values later in the flow. The values are assigned when the change orders are created.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:17.513134851138354%">
          <col style="width:82.48686514886164%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64520e267">Output Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64520e270">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Output Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d64520e267 ">
              <strong class="uicontrol">Adjust Order Product Summary Output</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64520e270 ">
              <p>This output is an Apex-defined variable of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_output_preview_adjust_output.htm" target="_blank">ConnectApi.AdjustOrderSummaryOutputRepresentation</a>. Depending on the order
                product summaries included in the adjustment, one or more change orders are
                generated. If multiple change orders are generated, then the
                <strong class="uicontrol">changeBalances</strong> values combine the values from both of them.
              </p>
              <p>The sign of a value in the <strong class="uicontrol">changeBalances</strong> field is the
                opposite of the corresponding value on a change order record. For example, a
                discount is a positive value in <strong class="uicontrol">changeBalances</strong> and a
                negative value on a change order record.</p>
              <p>The <strong class="uicontrol">orderSummaryId</strong> field is the ID of the order summary
                specified in the input.</p>
              <p>The <strong class="uicontrol">changeBalances</strong> field is an Apex-defined variable of
                class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_output_change_item_output.htm" target="_blank">ConnectApi.ChangeItemOutputRepresentation</a>,
                which includes these fields.</p>
              <ul>
                <li><strong class="uicontrol">grandTotalAmount</strong> —Change to the total with tax.</li>

                <li><strong class="uicontrol">totalAdjDeliveryAmtWithTax</strong> —Change to the adjusted
                  delivery subtotal, including tax.</li>

                <li><strong class="uicontrol">totalAdjDistAmountWithTax</strong> —Change to the total order
                  adjustments, including tax.</li>

                <li><strong class="uicontrol">totalAdjProductAmtWithTax</strong> —Change to the adjusted
                  product subtotal, including tax.</li>

                <li><strong class="uicontrol">totalAdjustedDeliveryAmount</strong> —Change to the adjusted
                  delivery subtotal.</li>

                <li><strong class="uicontrol">totalAdjustedDeliveryTaxAmount</strong> —Change to the adjusted
                  delivery subtotal tax.</li>

                <li><strong class="uicontrol">totalAdjustedProductAmount</strong> —Change to the adjusted
                  product subtotal.</li>

                <li><strong class="uicontrol">totalAdjustedProductTaxAmount</strong> —Change to the adjusted
                  product subtotal tax.</li>

                <li><strong class="uicontrol">totalAdjustmentDistributedAmount</strong> —Change to the total
                  order adjustments.</li>

                <li><strong class="uicontrol">totalAdjustmentDistributedTaxAmount</strong> —Change to the
                  total order adjustments tax.</li>

                <li><strong class="uicontrol">totalAmount</strong> —Change to the pretax total.</li>

                <li><strong class="uicontrol">totalExcessFundsAmount</strong> —The amount of excess funds
                  available on the order payment summaries related to the order summary. It’s
                  equal to the captured amount that is owed as a refund but isn’t associated with
                  an invoice or credit memo. Excess funds normally occur when order products are
                  canceled before fulfillment but after payment has been captured. This situation
                  isn’t common in the US, where funds are normally authorized but not captured
                  until the fulfillment process begins. This value includes all excess funds
                  related to the order summary, not only the funds related to the current
                  action.</li>

                <li><strong class="uicontrol">totalRefundableAmount</strong> —The total amount available to be
                  refunded. It’s the sum of the excess funds and any outstanding change order
                  grand total amounts that apply to post-fulfillment changes. This value includes
                  all refundable amounts related to the order summary, not only the amount related
                  to the current action.</li>

                <li><strong class="uicontrol">totalTaxAmount</strong> —Change to the total tax.</li>

              </ul>
              <p>The <strong class="uicontrol">postFulfillmentChangeOrderId</strong> is the ID of the change
                order representing the portion of the adjustment that was applied to order product
                summary quantities that have been fulfilled.</p>
              <p>The
                <strong class="uicontrol">preFulfillmentChangeOrderId</strong> is the ID of the change order
                representing the portion of the adjustment that was applied to order product
                summary quantities that haven’t been fulfilled. If the input specified an
                <strong class="uicontrol">allocatedItemsChangeOrderType</strong> of
                <kbd>PreFulfillment</kbd>, this change order also includes the
                changes applicable to order product summary quantities that are in the process of
                being fulfilled.
              </p>
              <p style="margin-bottom:0;">The <strong class="uicontrol">inFulfillmentChangeOrderId</strong> is
                the ID of the change order representing the portion of the adjustment that was
                applied to order product summary quantities that are in the process of being
                fulfilled. This change order is only created for an input that specified an
                <strong class="uicontrol">allocatedItemsChangeOrderType</strong> of
                <kbd>InFulfillment</kbd>.
              </p>
            </td>

          </tr>
        </tbody>
      </table>

## Usage

When a price adjustment is applied to an order product summary, 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.

To set up the Adjust Order Product Summaries Input:

- Use Assignment elements to set the **orderItemSummaryId**, **description**, **adjustmentType**, **discountValue**, and **reason** field values on one or more **ConnectApi.AdjustItemInputRepresentation** variables.
- Use an Assignment element to add the **ConnectApi.AdjustItemInputRepresentation** variables to the **changeItems** field on a **ConnectApi.AdjustOrderItemSummaryInputRepresentation** variable.
- Use an Assignment element to set the **allocatedItemsChangeOrderType** field on the **ConnectApi.AdjustOrderItemSummaryInputRepresentation** variable.
- 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 hasn’t been captured, it doesn’t require a refund. This situation normally applies to order products in the US that haven’t been fulfilled.
- If the discount applied to order product summaries that haven’t 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.
- 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_important.png)

Important Excess funds aren’t reduced until the payment processor issues a refund. If you don’t process refunds promptly, subsequent refunds can be inaccurate. Consider this example.

- An order with a total amount of $100 is placed, and the amount is captured immediately.
- A product is canceled from the order, resulting in $20 of excess funds.
- 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.
- The first excess funds amount ($20) is sent to the payment provider in an ensure refunds request.
- The second excess funds amount ($40) is sent to the payment provider in an ensure refunds request.
- 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.

#### See Also

- [Adjust Order Item Summaries Preview Action](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_om_actions_adjust_ois_preview.htm&release=264.0.0&type=5 "In Salesforce Order Management, preview the expected results of adjusting the price of one or more order product summaries on an order summary, without running 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 submitting the proposed adjustment.")
- [Add and Edit Elements](https://help.salesforce.com/s/articleView?id=platform.flow_build_elements.htm&release=264.0.0&type=5 "Use elements to define actions that the flow can run. When they’re on the canvas, connect them to create the order in which they run.")