Fluent Commerce Logo
Docs
Sign In

Adobe Commerce - Inventory

Feature

Changed on:

17 Oct 2023

Overview

The Inventory module is responsible for aggregate stock synchronization between Fluent and Adobe Commerce. The main purpose of this module is to keep Adobe Commerce Inventory up to date.

Detailed Technical Description

Synchronization process flow

No alt provided

Synchronization flow contains 4 steps:

  • Adobe Commerce Update Stock Service requests Fluent for the aggregate inventory data for a specific date-time range.
  • Fluent returns appropriate stock information.
  • Adobe Commerce publishes received data to the Adobe Commerce message queue.
  • Inventory message consumer fetches published messages and saves appropriate inventory/stocks.

This flow is common for all Inventory synchronization types.

Synchronization types

There are three synchronization types implemented:

  • Full
  • Manual
  • Delta

Full Synchronization

Allows synchronizing the entire inventory, recommended being used after module installation to import all aggregate inventory information from Fluent to Adobe Commerce for the configured catalog. To fetch inventory, it uses a changed date range from 1970-01-01 to NOW + 5 mins.

Can be run from Adobe Commerce CLI with the command below:

`1bin/magento fluent:stock_full:update`

Manual Synchronization

Allows fetching Fluent inventory changes from a specific date. Can be run only from the admin interface. It uses the date range from SPECIFIED to NOW + 5mins

Delta Synchronization

A background process to keep Adobe Commerce inventory up to date is executed by the Adobe Commerce cron job process. The frequency of the cron job execution can be configured in module configuration in Adobe Commerce admin. By default, it runs every 5 minutes. It uses the date range from LAST_EXECUTION_TIME to NOW + 5 mins.

Multi-Source Inventory

The Inventory module uses Adobe Commerce’s out-of-box Multi-Source Inventory solution, see About Stocks and Sources | Adobe Commerce 2.4 User Guide for more details.

It means that the synchronization process runs individually for each website(retailer) configured in Adobe Commerce installation. Ensure stocks and sources are configured per website as per the below guideline.

No alt provided
  • For each Retailer(Per-website) create an Inventory Source.
    Format: 
    `SOURCE\_PREFIX + \_ + RETAILER\_ID`
    , e.g: 
    `FL\_SO\_1`
  • For each website create an Inventory Stock and assign the previously created Source to it.
    Format: 
    `STOCK\_PREFIX + \_ + RETAILER\_ID`
    , e.g 
    `FL\_AG\_1`

Such configuration guarantees that each website(retailer) has its appropriate stock information only.

Simplified module architecture

No alt provided

There is one single StockUpdate service that is used by all synchronization process entry points: cron, admin controller, and CLI. This service uses a builder to retrieve an API request (Builder pattern) and another service to push Inventory messages into the queue.

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo