---
schema_version: "1"
id: df6bf2ab18de8e2120a1efb8ff081e95678c4453bd042c12018a0889f3c032d9
title: Automated Inventory Replenishment Process
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/aslm_inventoryreplenishment_create_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.aslm_inventoryreplenishment_create_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: adfad346564d99b9c5ed0227df097257be6112ec6e4825986f0e5fbec450c983
description: Build an inventory replenishment process that automatically replenishes product items based on their applicable inventory replenishment policies. Use a preconfigured batch job definition and create a flow to schedule and invoke the replenishment process.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Automated Inventory Replenishment Process

Build an inventory replenishment process that automatically replenishes product items based on their applicable inventory replenishment policies. Use a preconfigured batch job definition and create a flow to schedule and invoke the replenishment process.

### 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;">Available in: Automotive Cloud, Communications Cloud, Consumer Goods, Energy and Utilities Cloud, Manufacturing Cloud, Service Cloud, and Media Cloud. <a href="https://help.salesforce.com/s/articleView?id=xcloud.aslm_editions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported products and editions for Asset Service Lifecycle Management features.">View edition availability</a>.</td></tr></tbody></table>

## Key Components of an Automated Replenishment Process

You can build an automated inventory replenishment process by using these capabilities.

- Flow: Flow Builder is a declarative tool for building complex automated workflows. Inventory Replenishment comes with a preconfigured flow called Replenish Inventory. See [Automate Tasks with Flows](https://help.salesforce.com/s/articleView?id=platform.flow.htm&language=en_US).
- Batch Jobs: Batch Management helps flows process a large number of records. Inventory Replenishment comes with a preconfigured batch job definition called Replenish Inventory. [Batch Management](https://help.salesforce.com/s/articleView?id=ind.concept_batch_management.htm&language=en_US).

## Workflow of an Automated Replenishment Process

An automated process periodically replenishes your inventory in batches. Here are the high-level steps in the workflow of the automated process.

  
| stage | purpose | Implementation |
| --- | --- | --- |
| 1 | A schedule-triggered flow runs at regular intervals to invoke a batch job. | Create a schedule-triggered flow. |
| 2 | A batch job creates batches of product items to be processed in another flow. | Use the preconfigured Replenish Inventory batch job definition or create a batch job definition. |
| 3 | A flow processes one product item in a batch at a time. It identifies the product item's applicable policy, determines if the product item requires replenishment, and performs replenishment actions accordingly. | Use the preconfigured Replenish Inventory flow or create a flow. |

## Flow to Periodically Run a Replenishment Process

For your automated inventory replenishment process, create a schedule-triggered flow that invokes the replenishment batch job.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-asset_service_lifecycle_mgmt-264-0-0-production-enus/645b17dc-6eea-4fac-9d5c-016dea098887/images/icon_note.png)

Note Inventory Replenishment includes a prebuilt flow named Replenish Inventory. This autolaunched flow is used internally by the batch job to process product items. Don’t modify this flow.

- From Setup, go to **Flows**, and click **New Flow**.
- Select **Schedule-Triggered Flow**.
- Configure the **Start** element:
    - Set the start date and time.
    - Define the run frequency (for example, daily).
- Add an **Action** element.
- Select the **Replenish Inventory** batch job definition.
- Save and activate the flow. The flow runs at scheduled intervals and invokes the batch job, which processes product items and performs replenishment based on applicable policies

## Batch Job to Process Product Items

For your automated inventory replenishment process, use the preconfigured Replenish Inventory batch job definition or create a batch job definition.

The preconfigured batch job processes product items in batches and invokes the Replenish Inventory autolaunched flow to perform replenishment actions.

You can create a custom batch job definition to process product items based on specific criteria.

When creating a batch job, configure these fields:

- Process Type: Flow
- Group: Inventory
- Execution Process: A flow that replenishes inventory, such as Replenish Inventory
- Flow Input Variable: A variable for Product Item ID
- Object: Product Item

Define the filter criteria for adding product items to batches. For example, you can filter product items with the Compactor D21 product to be added to batches.

Track the progress and status of batch job runs by using Monitor Workflow Services in Setup. See [Monitor Your Batch Jobs](https://help.salesforce.com/s/articleView?id=ind.task_monitor_batches.htm&&language=en_US) .

## Flow to Replenish Inventory

Inventory Replenishment includes a prebuilt autolaunched flow named **Replenish Inventory**. This flow is used internally by the batch job to process product items. Don't modify this flow.

The **Replenish Inventory** flow evaluates each product item based on its applicable inventory replenishment policy. It uses the **Replenish Inventory Using Policy** invocable action to determine whether replenishment is required. The flow evaluates inventory based on the Replenishment Quantity Basis field in the policy, which determines whether to use Quantity On Hand or Quantity Available for replenishment decisions.

When you configure a replenishment policy, the Replenishment Quantity Formula must reference the quantity field that matches your Replenishment Quantity Basis:

Basis: Quantity On Hand

MaximumInventoryQuantity - ProductItem.QuantityOnHand

Use this basis if you want replenishment to be based on total physical stock regardless of usability.

Basis: Quantity Available

MaximumInventoryQuantity - ProductItem.QuantityAvailable

Use this basis if you want replenishment to automatically account for unusable stock, such as damaged or expired inventory, without adjusting your formula. Quantity Available excludes both unusable and allocated quantities.

If the evaluated quantity is less than or equal to the minimum inventory quantity defined in the policy, the flow performs the configured replenishment action, such as creating a product request. The flow also determines the replenishment quantity and source location based on the policy.

To process a product item individually for testing or troubleshooting, you can run the **Replenish Inventory** flow.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-asset_service_lifecycle_mgmt-264-0-0-production-enus/645b17dc-6eea-4fac-9d5c-016dea098887/images/icon_note.png)

Note Ensure that existing product requests for the same product and replenishment policy are closed before running the replenishment process. Otherwise, the system updates the existing product request instead of creating a new one.