Fluent Commerce Logo
Docs
Sign In

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.

Detailed Technical Description

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.

Name

Description

Parameters

fluent_send_products_prepare_simple_variant_product_before

Event after the products to be pushed are read from the database

collection

fluent_send_products_prepare_simple_variant_product_data_after

Allows customization of each variant property

product-payload of type array product

fluent_send_products_prepare_simple_standard_product_before

Event after the products to be pushed are read from the database

collection

fluent_send_products_prepare_simple_standard_product_data_after

Allows customization of each standard product property

product-payload of type array product

fluent_send_products_prepare_configurable_product_before

Event after the products to be pushed are read from the database

collection

fluent_send_products_prepare_configurable_product_data_after

Allows customization of each configurable product property

productInfo of type array

fluent_send_products_query_build_after

Allows customization of product push async event

productMessage of type EventMessageInterface

fluent_send_products_before

Event before products are pushed to Fluent

productIds of type array

fluent_send_products_after

Event after products are successfully pushed to Fluent

productIds of type array

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