---
schema_version: "1"
id: 881366d44146685c8a486fc3618714118978042491e3d0ee2b402b508064d7bb
title: Create Reservation 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_oci_actions_create_reservation.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_oci_actions_create_reservation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b7c42880119716ed38b83bf5c5d331c0d2949d5beee12c8c27ae2289e21ac2ef
description: In Omnichannel Inventory, create one or more inventory reservations at a location or location group.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Create Reservation Action

In Omnichannel Inventory, create one or more inventory reservations at a location or location group.

### 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 Omnichannel Inventory 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 **Omnichannel Inventory Service** category, and search for **Omnichannel Inventory Service Create Reservation**.

![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 Set the flow’s runtime API version to 52.0 or later.

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="d304382e94">Input Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d304382e97">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Input Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d304382e94 ">
              <strong class="uicontrol">Omnichannel Inventory Create Service Reservation
                Input</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d304382e97 ">
              <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_o_c_i_create_reservation.htm" target="_blank">ConnectApi.OCICreateReservationInputRepresentation</a>.</p>
              <p>The variable has
                these fields.</p>
              <ul>
                <li><strong class="uicontrol">actionRequestId</strong>—A UUID that identifies the request. To
                  identify which actions succeeded or failed, use the action request IDs in the
                  output variables.</li>
                <li><strong class="uicontrol">allowPartialReservations</strong>—Optional. When
                  <kbd>true</kbd>, if the system can’t create the entire
                  reservation, then it attempts to create a partial reservation.
                </li>
                <li><strong class="uicontrol">createRecords</strong>—A list of up to 100 Apex-defined variables
                  of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_input_o_c_i_create_reservation_single.htm" target="_blank">ConnectApi.OCICreateReservationSingleInputRepresentation</a>. Each
                  variable has these fields.<ul>
                    <li><strong class="uicontrol">locationGroupIdentifier</strong>—Identifier of the location
                      group at which to reserve inventory. Either
                      <strong class="uicontrol">locationGroupIdentifier</strong> or
                      <strong class="uicontrol">locationIdentifier</strong> is required, but not both.
                    </li>
                    <li><strong class="uicontrol">locationIdentifier</strong>—Identifier of the location at
                      which to reserve inventory. Either <strong class="uicontrol">locationIdentifier</strong>
                      or <strong class="uicontrol">locationGroupIdentifier</strong> is required, but not
                      both.</li>
                    <li><strong class="uicontrol">quantity</strong>—The quantity of the product to reserve.</li>
                    <li><strong class="uicontrol">stockKeepingUnit</strong>—The Stock Keeping Unit (SKU) of the
                      product to reserve.</li>
                  </ul>
                </li>
                <li><strong class="uicontrol">expirationSeconds</strong>—Optional. A length of time in seconds.
                  If the reservation isn’t fulfilled within this amount of time after the
                  reservationTime, then it expires. The maximum value is 14400.</li>
                <li><strong class="uicontrol">externalRefId</strong>—Optional The external reference ID.</li>
                <li><strong class="uicontrol">reservationTime</strong>—Optional The time at which to record the
                  reservation. Example: 2020-07-24T21:13:00Z </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="d304382e201">Output Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d304382e204">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Output Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d304382e201 ">
              <strong class="uicontrol">Omnichannel Inventory Service Create Reservation
                Output</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d304382e204 ">
              <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_o_c_i_create_reservation_output.htm" target="_blank">ConnectApi.OCICreateReservationOutputRepresentation</a>.</p>
              <p>The variable has
                these fields.</p>
              <ul>
                <li><strong class="uicontrol">details</strong>—A list of Apex-defined variables of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_output_o_c_i_create_reservation_single_output.htm" target="_blank">ConnectApi.OCICreateReservationSingleOutputRepresentation</a>. Each
                  variable represents one product being reserved and has these fields.<ul>
                    <li><strong class="uicontrol">errorCode</strong>—The error code, if any.</li>
                    <li><strong class="uicontrol">locationGroupIdentifier</strong>—Identifier of the location
                      group where the inventory is reserved.</li>
                    <li><strong class="uicontrol">locationIdentifier</strong>—Identifier of the location where
                      the inventory is reserved</li>
                    <li><strong class="uicontrol">quantity</strong>—The reserved quantity of the product.</li>
                    <li><strong class="uicontrol">stockKeepingUnit</strong>—The SKU of the reserved
                      product.</li>
                  </ul>
                </li>
                <li><strong class="uicontrol">errors</strong>—A list of Apex-defined variables of class <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_output_o_c_i_create_reservation_error_output.htm" target="_blank">ConnectApi.OCICreateReservationErrorOutputRepresentation</a>. Each
                  variable represents a returned error and has these fields.<ul>
                    <li><strong class="uicontrol">errorCode</strong>—The error code.</li>
                    <li><strong class="uicontrol">message</strong>—Details of the error, if available.</li>
                  </ul>
                </li>
                <li><strong class="uicontrol">expirationTime</strong>—The time at which the reservation would
                  expire.</li>
                <li><strong class="uicontrol">reservationTime</strong>—The time when the reservation was
                  recorded.</li>
                <li><strong class="uicontrol">success</strong>—Indicates whether the reservation succeeded.</li>
              </ul>
            </td>

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

To set up the Omnichannel Inventory Create Service Reservation Input:

- For each product to reserve, use Assignment elements to set the **locationGroupIdentifier** or **locationIdentifier** field, **quantity** field, and **stockKeepingUnit** field values on a **ConnectApi.OCICreateReservationSingleInputRepresentation** variable.
- Use Assignment elements to add the **ConnectApi.OCICreateReservationSingleInputRepresentation** variables to the **createRecords** field on a **ConnectApi.OCICreateReservationInputRepresentation** variable.
- Use Assignment elements to set the **actionRequestId**, **allowPartialReservations**, **expirationSeconds**, **externalRefId**, and **reservationTime** field values on the **ConnectApi.OCICreateReservationInputRepresentation** variable.
- Use the **ConnectApi.OCICreateReservationInputRepresentation** 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.")