Klevu Module v4.x Overview
Release Notes
4.4.0
14 min
overview this version focuses primarily on issues relating to stock changes and entity discovery in sync, as well as providing additional diagnostic information and improvements to extensibility indexing improvements changes in stock status cause products to be queued for sync issues relating to stock status changes not being reflected in entity discovery for example, where a product changed to or from being in stock which may previously have required a klevu entity update or discovery operation have been addressed note there remain some scenarios which will still do not cause a product to be queued for sync, primarily revolving around configurable products using multi source inventory, where the last variant moves out of stock; or edge cases where variants exist in a different website to the parent additional improvements will be rolled out in future versions of the 4 4 x branch deferred entity updates to address difficulties determining stock and status changes during database transactions, and to better support customisations to stock status logic, some discovery operations are now deferred this means that the indexing records will be marked as "requiring update", with the applicable status flag stored for reference a cron job has been added to process records requiring update, setting the next action if applicable job code klevu indexing process require update entities ; default schedule /15 (though this can be modified via the bin/magento config\ set klevu\ indexing\ process require update entities cron expr \[cron expr] cli command) improved multi source inventory support a new module has been included to provide improved compatibility with magento msi package name klevu/module m2 indexing msi ; this module is required by klevu/module indexing products , though is designed to be replaceable via composer if msi has been removed from your installation this module also adds a new setting to stores > configuration > klevu > developer settings > indexing products > append reservations action, which allows you to determine how we respond to reservations for example, when a sale is made through the storefront available options calculate requires update will mark the sold item(s) as requiring update and determine whether to sync via deferred entity updates (see above) this is the default mark all for update will indiscriminately mark all items as requiring a sync, regardless of whether the change has changed the product's stock status no action will not respond to reservations, requiring additional update or discovery operations to queue items this is the pre 4 4 0 behaviour note if you are experiencing high traffic through the checkout, calculate requires update is the most processing intensive and may cause slowdown; mark all for update is quicker, bu will cause additional load on the klevu sync process; no action has negligible impact on checkout speed but may lead to inaccurate data in klevu's indexes improved extensibility for stock and status determination the logic to determine whether a product is out of stock, or disabled, has been moved to two independent services, which can be plugged into; preferenced; or replaced using standard magento development practices reference product status https //github com/klevu/module m2 indexing products/blob/3 4 0/service/provider/productstatusproviderinterface php https //github com/klevu/module m2 indexing products/blob/3 4 0/service/provider/productstatusprovider php stock status https //github com/klevu/module m2 indexing products/blob/3 4 0/service/provider/productstockstatusproviderinterface php https //github com/klevu/module m2 indexing products/blob/3 4 0/service/provider/productstockstatusproviderinterface php additionally, the native stock status provider now supports multiple calculation methods, configurable via stores > configuration > klevu > developer settings >indexing products > stock status calculation method available options stock item this is the default setting to provide backwards compatibility there are known issues relating to reservations and indexing, and this setting is no longer recommended stock registry utilises the magento stock registry, which msi plugs into this is recommended setting if you encounter issues with products' stock status is available references the product entity's is available data property is salable references the product entity's is salable data property consolidation of stock status in discovery and payload generation prior to 4 4 0, the stock status value used for entity discovery and the value included in the sync payload may have differed due to independent calculations it is now possible to use the provider (above)'s logic to generate the sync payload value to support backward compatibility, this is disabled by default and must be turned on via stores > configuration > klevu > developer settings > indexing products > use provider for stock status value once enabled (and the magento config cache flushed), you will need to regenerate the indexing pipeline overrides to ensure the changes are applied bin/magento klevu\ indexing\ configuration overrides regenerate entity type klevu product diagnostics improvements metapackage and library versions in stores > configuration the overal metapackage version (eg 4 4 0) and the standalone klevu library (sdk and pipeline) versions are now available in stores > configuration > klevu > information > module versions cron execution information in stores > configuration schedule and execution information for all klevu cron jobs can now be found under stores > configuration > klevu > information > cron information live product sync information shown in products grid in addition to the existing sync entity information found in the backend products grid under action > klevu sync info, a new section has been added to display live calculated data for the record for all integrated keys regardless whether an indexing entity is present and all store views using that key (if multiple stores share a key) information includes is discovered whether an indexing entity exist for this product parent product api key combination is indexable while the next sync actions shows the is indexable value for the sync record, this will show the real time calculated value assigned to website whether the product is assigned to the parent website for the store code in this row product status whether the product is enabled as determined by the status provider (see above) stock status whether the product is in stock as determined by the stock status provider (see above) is salable the realtime value of $product >issalable() is available the realtime value of $product >isavailable() live product sync information available via cli a new terminal command has been added to provide a holistic overview of an individual product (including where it exists as a variant) across all integrated websites this information can be viewed by running the following command via the console bin/magento klevu\ indexing\ sync information entity type klevu product target entity id \[magento product id] the output contains the same information as the products grid (above) as well as relevant global configuration settings information about deferred processing (see above) via the requires update and orig values lines minor bugfixes and technical improvements this release also contains a number of minor bug fixes and technical improvements see changelog below for more details changelog \[ feature feature ] output klevu cron execution information in stores > configuration \[ feature feature ] add cli command to show indexing entity sync information \[ improvement improvement ] implement deferred stock status processing for indexing \[ improvement improvement ] add stores > configuration setting to determine indexing action following product sale \[ improvement improvement ] add stores > configuration setting to allow matching stock status logic for discovery and sync payload generation \[ improvement improvement ] add stores > configuration setting to define method used to determine stock status for entity discovery \[ improvement improvement ] show metapackage and sdk package versions in stores > configuration \[ improvement improvement ] output additional indexing entity sync information in backend products grid modal \[ improvement improvement ] hide sync info link in backend products grid where no klevu api key is integrated \[ improvement improvement ] improve stock status support for stores utilising multisource inventory \[ bugfix bugfix ] cascade variant and child stock changes to parent product (configurable; grouped; and bundle) \[ bugfix bugfix ] resolve products not being marked for sync on stock status change \[ bugfix bugfix ] resolve parent stock status not correctly considered for variant stock status in some scenarios during discovery and payload generation \[ bugfix bugfix ] resolve missing data in discoveryorchestrator result objects \[ technical ] add events to indexing record provider to support customisation \[ technical ] extract product status determination to standalone service to support customisation \[ technical ] extract product stock status determination to standalone service to support customisation \[ technical ] implement cache clean support on storesprovider \[ technical ] expand indexing entity properties to include created and update dates \[ technical ] add batch size validation to setindexingentities actions \[ technical ] add provider for consolidation product parent ids \[ technical ] add missing dependencies \[ chore chore ] miscellaneous refactoring and clean up