Export your catalog to Optimizely Product Recommendations
Describes how to export your catalog to Optimizely Product Recommendations from Optimizely Commerce Connect.
To provide accurate and valuable recommendations for Optimizely Product Recommendations, export your catalog in Optimizely Commerce Connect to the Product Recommendations engine. You should schedule the export job to run every 24 hours.
Products must have the following information to be exported. If a product is missing any of the information in the list, the export ignores it.
- instock
- have prices (and that they are valid and not out of date)
- published
- products have variants
Note
You can change the export behavior with a custom implementation of the ICatalogItemFilter and ICatalogFeedJob interfaces.
You can also attach a log for the appropriate namespace for debugging.
<logger name="EPiServer.Personalization.Commerce " additivity="false">
<level value="Info " />
</logger>
To export a catalog, start your site, enter admin mode, and launch the Export Product Feed scheduled job. If the job finishes with a successful status, your catalog was successfully exported.
The scheduled job has two parts:
- Serialize the catalog to XML, compress it, and store it as a blob.
- Notify Optimizely Product Recommendations that a new catalog is available.
After Commerce Connect generates a new export or feed, it makes a call to Product Recommendations and passes a callback address and an authorization token. When the Product Recommendations engine has the resources to handle downloading the catalog, it calls the specified callback method and passes the token. If the callback method determines that the passed token is valid, the download is allowed.
The callback address is formulated using SiteDefinition.SiteUrl as the host and a static path. You can find SiteDefinitions in CMS under Settings > Manage Websites. The correct SiteDefinition is found by matching the current Scope’s ID to a SiteDefinition ID.
If you are not using scopes, Commerce Connect picks the SiteDefinition that has the *
wildcard host entry. There can be only one of those. Once Commerce Connect has identified the correct SiteDefinition, it chooses the Primary host, if available, or fall back to SiteDefinition URL.
See Install and configure the native integration package for information on scopes.
Incremental export of the catalog feed
Personalization Commerce Connect version 3.2.7 introduces a scheduled job that exports added or updated products only: Export Catalog Feed Incrementally. This job keeps Optimizely Personalization up-to-date with product changes without exporting the entire catalog. Because the job exports fewer products, it runs more quickly and provides better performance than the full Export Catalog Feed job. But, the incremental job does not replace the Full Export Catalog Feed job because it does not include the deletion of products nor edits to asset or inventory information.
By default, a maximum of 10,000 products are processed when the job runs. You can increase the maximum number of products with the MaxEntryProcessForIncrementalCatalogFeed setting below.
Export Catalog Feed Incrementally job settings
You can modify the Export Catalog Feed Incrementally scheduled job in the web.config
settings.
{
"EPiServer": {
"Commerce": {
"CatalogFeedOptions": {
"EnableEventDrivenCatalogFeed": true,
"CatalogFeedBatchSize": 50,
"CalculateDiscountPrices": true,
"MaxEntryProcessForIncrementalCatalogFeed": 10000
}
}
}
}
- EnableEventDrivenCatalogFeed – Indicates if Commerce Connect tracks catalog changes for export with the scheduled job. The default setting is false. If false, the job does not run.
- CatalogFeedBatchSize – Batch size when processing the catalog feed. The default is 50.
- CalculateDiscountPrice – Calculate discounted prices for the feed. The default is true.
- MaxEntryProcessForIncrementalCatalogFeed – The maximum number of products to be processed when the scheduled job is executed. The default setting is 10,000.
Updated about 1 month ago