---
schema_version: "1"
id: 8ef2630c0098c37ec6e36fa25d49cc8255ef3610714fe575cb54588cb71c6d1e
title: Add Order Item Summary 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_add_ois.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_om_actions_add_ois.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e95fafb653518340e489ba5b7e26b3cd1762c343c4b733e07cd1ba88fedd67f3
description: In Salesforce Order Management, add up to 100 order product summaries to an order summary. This action creates a change order record, an order product record, and an order product summary record. It also creates any supporting adjustment, tax, and summary records.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Add Order Item Summary Action

In Salesforce Order Management, add up to 100 order product summaries to an order summary. This action creates a change order record, an order product record, and an order product summary record. It also creates any supporting adjustment, tax, and summary 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 **Add Order Item Summary**.

![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 Don’t call this action via REST API. Use it only in flows.

Set Input Values

Create record variables to use in the input. Use values from earlier in the flow to set their values. The action generates records based on those values. Remember to include all required values for each object type. For example, the order item summary record variable needs to include an order delivery group summary ID.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note For this action’s input values, use record variables, not existing records or record IDs.

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d341797e99 ">
              <p>This input is an Apex-defined variable of class
                runtime_commerce_oms.AddOrderItemSummaries. </p>
              <p>For information on setting up the
                input data, see the Usage section of this topic.</p>
              <p>The variable has one field:
                <strong class="uicontrol">newItems</strong>. This field is a list of one or more Apex-defined
                variables of class runtime_commerce_oms.AddItem. Each of the variables includes
                these fields.
              </p>
              <ul>
                <li><strong class="uicontrol">orderItemSummary</strong> — An order product summary record
                  variable representing the order product to add.</li>
                <li><strong class="uicontrol">reasonCode</strong> — Reason for the addition. The value is required to match one
                  of the picklist values on the Reason field of the Order Product Summary Change
                  object.</li>
                <li><strong class="uicontrol">orderItemTaxLineItemSummaries</strong> — A list of zero or
                  more order product tax line item summary record variables associated with the
                  order product summary.</li>
                <li><strong class="uicontrol">orderItemAdjustmentLineSummaries</strong> — A list of zero
                  or more Apex-defined variables of class runtime_commerce_oms.AddItemAdjustment
                  that has these fields.<ul>
                    <li><strong class="uicontrol">orderItemAdjustmentLineSummary</strong> — An order
                      product adjustment line summary record variable associated with the order
                      product being added.</li>
                    <li><strong class="uicontrol">orderItemTaxLineItemSummaries</strong> — A list of zero
                      or more order product tax line item summary record variables associated with
                      the order product adjustment line summary.</li>
                  </ul>
                </li>
              </ul>
            </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="d341797e169">Output Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d341797e172">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Output Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d341797e169 ">
              <strong class="uicontrol">Order Item Summary Output</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d341797e172 ">
              <p>This output is an Apex-defined variable of class
                ConnectApi.AddOrderItemSummaryOutputRepresentation. It includes these fields. </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>
              <ul>
                <li><strong class="uicontrol">changeBalances</strong> — 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> that has these fields.<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">totalRequiredFundsAmount</strong> — The total amount associated with the order
                      products added in the current action. <p>This amount isn’t necessarily the
                        amount that needs to be captured. For example, in an even exchange flow,
                        the order amount reduction from canceling the exchanged products offsets
                        the required funds amount of the replacement products.</p>
                    </li>
                    <li><strong class="uicontrol">totalTaxAmount</strong> — Change to the total tax.</li>
                  </ul>
                </li>
                <li><strong class="uicontrol">changeOrderId</strong> — ID of the change order generated
                  by the action.</li>
                <li><strong class="uicontrol">newItems</strong> — A list of one or more Apex-defined
                  variables of class ConnectApi.AddItemOutputRepresentation, each of which
                  represents an added order product, and has these fields.<ul>
                    <li><strong class="uicontrol">id</strong> — ID of the order product summary.</li>
                    <li><strong class="uicontrol">name</strong> — Name of the order product summary.</li>
                    <li><strong class="uicontrol">orderItemAdjustmentLineSummaries</strong> — A list of
                      zero or more Apex-defined variables of class
                      ConnectApi.AddItemAdjustmentOutputRepresentation, each of which represents
                      an order product adjustment line summary associated with the added order
                      product summary, and has these fields.<ul>
                        <li><strong class="uicontrol">id</strong> — ID of the order product adjustment
                          line summary.</li>
                        <li><strong class="uicontrol">name</strong> — Name of the order product
                          adjustment line summary.</li>
                        <li><strong class="uicontrol">orderItemTaxLineItemSummaries</strong> — A list of
                          zero or more Apex-defined variables of class
                          ConnectApi.AddItemTaxOutputRepresentation, each of which represents an
                          order product tax line item summary associated with the order product
                          adjustment line summary, and has these fields.<ul>
                            <li><strong class="uicontrol">id</strong> — ID of the order product tax line
                              item summary.</li>
                            <li><strong class="uicontrol">name</strong> — Name of the order product tax
                              line item summary.</li>
                          </ul>
                        </li>
                      </ul>
                    </li>
                    <li><strong class="uicontrol">orderItemTaxLineItemSummaries</strong> — A list of zero
                      or more Apex-defined variables of class
                      ConnectApi.AddItemTaxOutputRepresentation, each of which represents an order
                      product tax line item summary associated with the added order product
                      summary, and has these fields.<ul>
                        <li><strong class="uicontrol">id</strong> — ID of the order product tax line item
                          summary.</li>
                        <li><strong class="uicontrol">name</strong> — Name of the order product tax line
                          item summary.</li>
                      </ul>
                    </li>
                  </ul>
                </li>
                <li><strong class="uicontrol">orderSummaryId</strong> — ID of the order summary specified
                  in the input.</li>
              </ul>
            </td>

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

To set up the Order Item Summary Input:

- Use record variables to define the order product summaries, order product adjustment line summaries, and order product tax line item summaries. Sending an Id isn’t required.
    - Required fields for an order product summary:
        - ListPrice (Only if Order Summary Pricebook2Id is NULL or empty)
        - Name
        - OrderDeliveryGroupSummaryId
        - OrderSummaryId
        - PricebookEntryId (Only if Order Summary Pricebook2Id is set)
        - Product2Id
        - Quantity
        - TotalLineAmount
        - UnitPrice
        - TypeCode
        - Type
    - Required fields for an order product adjustment line summary:
        - Amount
        - Name
        - OrderSummaryId
    - Required fields for an order product tax line item summary:
        - Amount
        - Name
        - OrderSummaryId
        - TaxEffectiveDate
        - Type
- Use an assignment element to set the **orderItemSummary** field on a runtime\_commerce\_oms.AddItem variable to the order product summary record variable.
- For each adjustment to the product being added, use an assignment element to set the **orderItemAdjustmentLineSummary** field on a runtime\_commerce\_oms.AddItemAdjustment variable to the corresponding order product adjustment line summary record variable. Use assignment elements to add the order product tax line summary record variables associated with it to the **orderItemTaxLineItemSummaries** field on the same runtime\_commerce\_oms.AddItemAdjustment variable.
- Use an assignment element to add the runtime\_commerce\_oms.AddItemAdjustment variables to the **orderItemAdjustmentLineSummaries** field on the runtime\_commerce\_oms.AddItem variable.
- For each tax on the product being added, use an assignment element to add the corresponding order product tax line summary record variable to the **orderItemTaxLineItemSummaries** field on the runtime\_commerce\_oms.AddItem variable.
- Use an assignment element to set the **reasonCode** field on the runtime\_commerce\_oms.AddItem variable to a valid reason.
- Use an assignment element to add the runtime\_commerce\_oms.AddItem variable to the **newItems** field on a runtime\_commerce\_oms.AddOrderItemSummaries variable.
- Repeat steps 1 through 6 for each order product that you want to include in the action, adding the inputs to the same runtime\_commerce\_oms.AddOrderItemSummaries variable. You can add up to five order products at a time.
- Use the runtime\_commerce\_oms.AddOrderItemSummaries variable in the action input.