---
schema_version: "1"
id: 537e51c37f8a95d0523dc454d6d85d5d3bf89a84ebf83392b043517bbbc5a6b8
title: Cancel 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_cancel_ois_submit.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_om_actions_cancel_ois_submit.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e93ca2dae2142c0abce9c6b89fd34df9e5835de241096a8d5a1a0e1318fd8a26
description: In Salesforce Order Management, cancel one or more order product summaries from an order summary. This action creates a change order record.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Cancel Order Item Summaries Submit Action

In Salesforce Order Management, cancel one or more order product summaries from an order summary. This action creates a change order record.

### 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 **Cancel 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="d211875e89">Input Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d211875e92">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d211875e89 ">
              <strong class="uicontrol">Cancel Order Product Summary Items Input</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d211875e92 ">
              <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_change.htm" target="_blank">ConnectApi.ChangeInputRepresentation</a>.</p>
              <p>The
                variable has one field: <strong class="uicontrol">changeItems</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_change_item.htm" target="_blank">ConnectApi.ChangeItemInputRepresentation</a>. Each variable
                includes these fields:</p>
              <ul>
                <li><strong class="uicontrol">changeItemFees</strong>—A list of Apex-defined variables of
                  class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_input_change_item_fee.htm" target="_blank">ConnectApi.ChangeItemFeeInputRepresentation</a>. Each
                  variable has these fields:<ul>
                    <li><strong class="uicontrol">amount</strong>—Required. Value used to calculate the fee
                      amount, as described by the amountType. It must be a positive value.</li>

                    <li><strong class="uicontrol">amountType</strong>—Required. Describes how the fee amount
                      is calculated. It can have one of these values:<a name="flow_ref_elements_om_actions_cancel_ois_submit__amountTypeValues"><!-- --></a>
                      <ul id="flow_ref_elements_om_actions_cancel_ois_submit__amountTypeValues">
                        <li><kbd>AmountWithTax</kbd>—<strong class="uicontrol">amount</strong> is
                          the fee amount, including tax.</li>

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

                        <li><kbd>Percentage</kbd>—<strong class="uicontrol">amount</strong> is a
                          percentage. The fee amount is <strong class="uicontrol">amount</strong> divided by
                          100 and then multiplied by the <strong class="uicontrol">TotalPrice</strong> and
                          <strong class="uicontrol">TotalTaxAmount</strong> of the associated order product
                          summary, prorated for the quantity being returned.
                        </li>

                        <li><kbd>PercentageGross</kbd>—<strong class="uicontrol">amount</strong>
                          is a percentage. The fee amount is <strong class="uicontrol">amount</strong> divided
                          by 100 and then multiplied by the
                          <strong class="uicontrol">TotalLineAmountWithTax</strong> of the associated order
                          product summary, prorated for the quantity being returned.
                        </li>

                      </ul>
                    </li>

                    <li><strong class="uicontrol">description</strong>—Description of the fee.</li>

                    <li><strong class="uicontrol">priceBookEntryId</strong>—Required unless price books are
                      optional in the org. ID of the price book entry associated with the fee
                      product.</li>

                    <li><strong class="uicontrol">product2Id</strong>—Required. ID of the product representing
                      the fee.</li>

                    <li><strong class="uicontrol">reason</strong>—Required. Reason for the fee. The value must
                      match an entry in the Order Product Summary Change object’s
                      <strong class="uicontrol">Reason</strong> picklist.
                    </li>

                  </ul>
                </li>

                <li><strong class="uicontrol">orderItemSummaryId</strong>—Required. ID of an order product
                  summary to cancel. It can’t be a shipping charge product.</li>

                <li><strong class="uicontrol">quantity</strong>—Required. Quantity to cancel.</li>

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

                <li><strong class="uicontrol">shippingReductionFlag</strong>—Required. Boolean flag that
                  specifies whether to prorate any related delivery charge based on the price
                  change.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d211875e89 ">
              <strong class="uicontrol">Order Summary Id</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d211875e92 ">Reference to the order summary that you want to cancel order product summaries
              from.</td>

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

Store Output Values

<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="d211875e271">Output Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d211875e274">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Output Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d211875e271 ">
              <strong class="uicontrol">Cancel Order Product Summary Output</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d211875e274 ">
              <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_submit_cancel_output.htm" target="_blank">ConnectApi.SubmitCancelOutputRepresentation</a>.
              </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">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 is 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">totalFeeAmount</strong>—The total amount of the fees charged for
                  the cancellation.</li>

                <li><strong class="uicontrol">totalFeeTaxAmount</strong>—The total amount of tax on the fees
                  charged for the cancellation.</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">changeOrderId</strong> field is the ID of the change order
                record created for the canceled items. Use this change order to create a credit
                memo.</p>
              <p style="margin-bottom:0;">The <strong class="uicontrol">feeChangeOrderId</strong> field is the ID of the
                change order record created for any cancel fees. Use this change order to create
                an invoice.</p>
            </td>

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

Usage

To set up the Cancel Order Product Summary Items Input:

- If you want to charge fees, use Assignment elements to set the **amount**, **amountType**, **description**, **priceBookEntryId**, **product2Id**, and **reason** field values on one or more **ConnectApi.ChangeItemFeeInputRepresentation** variables.
- Use Assignment elements to set the **orderItemSummaryId**, **quantity**, **reason**, and **shippingReductionFlag** field values on one or more **ConnectApi.ChangeItemInputRepresentation** variables.
- If you’re charging fees, use Assignment elements to add the **ConnectApi.ChangeItemFeeInputRepresentation** variables to the **changeItemFees** fields on the associated **ConnectApi.ChangeItemInputRepresentation** variables.
- Use an Assignment element to add the **ConnectApi.ChangeItemInputRepresentation** variables to the **changeItems** field on a **ConnectApi.ChangeInputRepresentation** variable.
- Use the **ConnectApi.ChangeInputRepresentation** variable and the order summary ID in the action input.

In a flow for canceling order product summaries, run a Cancel Order Item Summaries Preview action before running the action. Then display its output for the user to review. When the user verifies the expected results, pass the same input to this action.

#### See Also

- [Cancel Order Item Summaries Preview Action](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_om_actions_cancel_ois_preview.htm&release=264.0.0&type=5 "In Salesforce Order Management, preview the expected results of canceling one or more order product summaries from an order summary without running the cancel. The output of this action contains the values that would be set on the change order created by submitting the proposed cancel.")
- [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.")