Adobe Commerce uses indexers to compile catalog data into tables. The process is automatically triggered by events such as a change to a product price or inventory level.
The Catalog Sync service moves product data from an Adobe Commerce instance to the Commerce Services platform on an ongoing basis to keep the data up to date. For example, Product Recommendations requires current catalog information to accurately return recommendations with correct names, pricing, and availability. Use the Catalog Sync dashboard to observe and manage the synchronization process or the command-line interface to trigger a catalog sync and to reindex product data for consumption by Commerce Services.
To use the Catalog Sync dashboard or the command-line interface, you must have an API key and a SaaS data space configured.
The Catalog Sync dashboard is only available when the Product Recommendations modules are installed and reflects data projections related to that feature only. Support for other Commerce Services such as Live Search and Catalog Service are planned for the future.
To access the Catalog Sync dashboard, select System > Data Transfer > Catalog Sync.
With the Catalog Sync dashboard you can:
Reports a sync status of:
The catalog sync process automatically runs every hour. If you are not seeing expected products on the storefront, or if the products do not reflect recent changes you made, you can resolve catalog sync issues.
Displays the total number of products synced from your Commerce catalog. After the initial sync, only changed products should be synced.
If you need to initiate a resync of your catalog before the hourly scheduled sync occurs, you can force a resync.
Forcing a resync triggers a resync of your entire product catalog, which can increase load on hardware resources.
From the Catalog Sync dashboard, select Settings.
The Catalog Sync Settings page appears.
In the Resync Data section, click Resync.
Commerce syncs your catalog during the next scheduled sync window. Depending on the size of your catalog, this operation can take a long time.
The Synced catalog products table displays the following information.
Field | Description |
---|---|
ID | Unique identifier of the product |
Name | Storefront name of the product |
Type | Identifies the product type, such as simple, configurable, or downloadable |
Last Exported | Date the product was last successfully exported from your catalog |
Last Modified | Date the product was last modified in your catalog |
SKU | Displays the stock-keeping unit for the product |
Price | Price of the product |
Visibility | A product’s visibility setting as defined in the Commerce catalog |
When you trigger a data resync, it may take up to an hour for the data to update and be reflected in UI components such as recommendation units. If you still see discrepancies between your catalog and data on the storefront, or if the catalog sync failed, refer to the following:
If the sync is not running on a schedule or nothing is synced, see this KnowledgeBase article.
If the catalog sync has a status of Failed, submit a support ticket.
The saas:resync
command is part of the magento/saas-export
package and is available out of the box with one of the Commerce Services products, such as Product Recommendations or Live Search.
When running a data sync for the first time, run the productattributes
feed first, followed by productoverrides
, before running the products
feed.
Command options:
bin/magento saas:resync --feed <feed name> [no-reindex|cleanup-feed]
The following table describes the saas:resync
parameters and descriptions.
Parameter | Description | Required? |
---|---|---|
feed |
Specifies which entity to resync, such as products |
Yes |
no-reindex |
Resubmits the existing catalog data to Commerce Services without reindexing. When this parameter is not specified, the command runs a full reindex before syncing data. | No |
cleanup-feed |
Cleanup the feed indexer table before a sync. | No |
The feed name can be one of the following:
products
– Products in your catalogproductattributes
– Product attributes such as activity
, gender
, tops
, bottoms
, and so onvariants
– Product variations of a configurable product, such as color and sizeprices
– Product pricesscopesCustomerGroup
– Customer GroupsscopesWebsite
– Websites with Store Viewscategories
– Categories in your catalogcategoryPermissions
- Permissions for each of the categoriesproductoverrides
– Customer-specific pricing and catalog visibility rules, such as those based on category permissionsDepending on which Commerce Services are installed, you may have different set of feeds available for saas:resync
command.
It is not recommended to run the saas:resync
command on regular basis. You may need to run command manually in two scenarios:
When you trigger a saas:resync
from the command line, depending on your catalog size, it may take from a few minutes to a few hours for the data to update.
For the initial sync, it is recommended to run commands in the following order:
bin/magento saas:resync --feed productattributes
bin/magento saas:resync --feed products
bin/magento saas:resync --feed scopesCustomerGroup
bin/magento saas:resync --feed scopesWebsite
bin/magento saas:resync --feed prices
bin/magento saas:resync --feed productoverrides
bin/magento saas:resync --feed variants
bin/magento saas:resync --feed categories
bin/magento saas:resync --feed categoryPermissions
If you do not see expected data in Commerce Service, check if a problem occurred during the sync from the Adobe Commerce instance to the Commerce Service platform.
There are two log files in the var/log/
directory:
commerce-data-export-errors.log
- if an error happened during collecting phasesaas-export-errors.log
- if an error happened during transmitting phaseIt may be useful to see the feed payload that has been sent to the Commerce Service. This can be done by passing the environment variable EXPORTER_EXTENDED_LOG=1
. The no-reindex
flag means that only currently collected data is sent.
EXPORTER_EXTENDED_LOG=1 bin/magento saas:resync --feed=products --no-reindex
The payload is available in var/log/saas-export.log
.
Stating from magento/module-data-exporter:103.0.0
some feeds: product feed, price feeds, keep only the minimum required data in the index table.
Preserving payload data in the index table is not recommended on production, but it may be useful on a developer instance. This is done by passing the PERSIST_EXPORTED_FEED=1
environment variable:
PERSIST_EXPORTED_FEED=1 bin/magento saas:resync --feed=products
If the reindex process of specific feed takes an unreasonable amount of time, run the profiler to collect additional data that might be useful for the Support Team. To do so, pass the EXPORTER_PROFILER=1
environment variable:
EXPORTER_PROFILER=1 bin/magento indexer:reindex catalog_data_exporter_products
Profiler data is stored in var/log/commerce-data-export.log
with the format:
<Provider class name>, <# of processed entities>, <execution time im ms>, <memory consumption in Mb>
If you see errors not related to configuration or third party extensions, submit a support ticket with as much information as possible.