Fluent Commerce Logo
Docs

Product

Feature

Changed on:

17 Oct 2023

Overview

The Product Module is responsible for synchronizing products from Adobe Commerce to Fluent.Key features:
  • Manually synchronize the entire product catalog at any time.
  • Automatic detection and synchronization of modified products.
  • Multi-retailer / multi-website configuration support.
  • Current product type support is limited to the following: Simple and Configurable.

How it Works

Sync types

There are three types of synchronization available
  • Magento CLI command
  • Adobe Admin Console
  • Automatically by the system
Although they are initiated differently, they use the same flow as described below.
Products are added to Adobe’s message queue and a dedicated message consumer will handle the message and export the data to Fluent.
No alt provided

Magento CLI

Executed manually from the Magento CLI and it is supposed to be used right after module installation to export all the products into Fluent. It adds all products into the message queue for a full initial load on Fluent.`1bin/magento fluent:product_full:push`

Adobe Admin Console

Use this option to synchronize products manually. The number of products pushed will depend on the date selected. The extension will look for products that have been modified from the date specified up to the moment the synchronization starts running.

Automatic Delta Sync

This is an automated synchronization that runs in the background to keep Fluent up to date. This synchronization is based on MySql DB triggers and a custom Adobe Commerce indexer. There are 4 tables being observed for modification and these hold the most critical and important product information.
  • catalog_product_entity
  • catalog_product_entity_varchar
  • catalog_product_entity_int
  • catalog_product_entity_decimal
Mysql triggers-based solution guarantees that any product modification is handled: manual changes from Adobe’s admin console, updates via custom modules, and direct SQL queries which are widely used during import.An introduced indexer `FluentConnector\Product\Model\Indexer\Product` takes into processing changed products and sends them into the Adobe Commerce message queue, which is observed by `FluentConnector\Product\Model\MessageQueue\ProductSyncConsumer`. Consumer class is responsible for sending products to Fluent.

Payload Building

A builder pattern is used to build API payloads for each product to be synchronized: class `FluentConnector\Product\Model\Request\BuildProductPayload` is a builder that uses specific product type builders - `FluentConnector\Product\Model\Request\Data\ProductType\Simple` and `FluentConnector\Product\Model\Request\Data\ProductType\Configurable`.

Product Events

List of events that allow product payload modification without overwriting classes.
NameDescriptionParameters
fluent_send_products_prepare_simple_variant_product_beforeEvent after the products to be pushed are read from the databasecollection
fluent_send_products_prepare_simple_variant_product_data_afterAllows customization of each variant propertyproduct-payload of type array product
fluent_send_products_prepare_simple_standard_product_beforeEvent after the products to be pushed are read from the databasecollection
fluent_send_products_prepare_simple_standard_product_data_afterAllows customization of each standard product propertyproduct-payload of type array product
fluent_send_products_prepare_configurable_product_beforeEvent after the products to be pushed are read from the databasecollection
fluent_send_products_prepare_configurable_product_data_afterAllows customization of each configurable product propertyproductInfo of type array
fluent_send_products_query_build_afterAllows customization of product push async eventproductMessage of type EventMessageInterface
fluent_send_products_beforeEvent before products are pushed to FluentproductIds of type array
fluent_send_products_afterEvent after products are successfully pushed to FluentproductIds of type array