---
schema_version: "1"
id: 23abd5721ee1a0d87a50950ca70fa48e711839b6e0eda974f1086ae2d48a7ef3
title: Cancel Fulfillment Order Item 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_fo_item.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_om_actions_cancel_fo_item.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 522185f8f3ecc351ff3ce3277fb0beae74b57e101f14ccc28eba10ae382063ce
description: In Salesforce Order Management, cancel fulfillment order products from a fulfillment order. You can cancel more than one product and specify a quantity to cancel for each of them. This action doesn’t cancel the associated order product summaries, it only reduces their allocated quantities. Usually, you reallocate the canceled quantities to a new fulfillment order.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Cancel Fulfillment Order Item Action

In Salesforce Order Management, cancel fulfillment order products from a fulfillment order. You can cancel more than one product and specify a quantity to cancel for each of them. This action doesn’t cancel the associated order product summaries, it only reduces their allocated quantities. Usually, you reallocate the canceled quantities to a new fulfillment order.

### 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 Fulfillment Order Item**.

## 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="d352765e82">Input Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d352765e84">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d352765e82 "><strong class="uicontrol">Cancel Fulfillment Order Items Input</strong></td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d352765e84 ">
              <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_fulfillment_order_line_items_to_cancel.htm" target="_blank">ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation</a>.</p>
              <p>The
                variable has one field, <strong class="uicontrol">fulfillmentOrderLineItemsToCancel</strong>,
                which 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_fulfillment_order_line_item.htm" target="_blank">ConnectApi.FulfillmentOrderLineItemInputRepresentation</a>. Each of those
                variables includes these fields:</p>
              <ul>
                <li><strong class="uicontrol">fulfillmentOrderLineItemId</strong> — Reference to the
                  fulfillment order product to cancel.</li>
                <li><strong class="uicontrol">quantity</strong> — Quantity to cancel.</li>
              </ul>
            </td>
          </tr>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d352765e82 "><strong class="uicontrol">Fulfillment Order Id</strong></td>
            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d352765e84 ">Reference to the fulfillment order that you want to cancel fulfillment order
              items 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="d352765e139">Output Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d352765e142">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Output Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d352765e139 ">
              <strong class="uicontrol">Cancel Fulfillment Order Items Output</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d352765e142 ">
              <p>This value is an Apex-defined variable of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_output_fulfillment_order_cancel_line_items_output.htm" target="_blank">ConnectApi.FulfillmentOrderCancelLineItemsOutputRepresentation</a>.</p>
              <p style="margin-bottom:0;">This
                action doesn’t return any data.</p>
            </td>

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

## Usage

To set up the Cancel Fulfillment Order Items Input, first use Assignment elements to set the **fulfillmentOrderLineItemId** and **quantity** field values on one or more **ConnectApi.FulfillmentOrderLineItemInputRepresentation** variables. Then use an Assignment element to add those variables to the **FulfillmentOrderLineItemsToCancel** field on a **ConnectApi.FulfillmentOrderLineItemsToCancelInputRepresentation** variable. Use that variable in the action input.

#### See Also

- [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.")