Attributes
Klevu Magento v4 uses the Klevu Data Indexing JSON API which requires the registering of any custom attributes before entity data can be sent to Klevu for those attributes.
Klevu has a set of standard attributes that already exist for your account. At the time of writing those attributes are:
These standard attributes are immutable and therefore their settings can not be changed. It is also possible for merchants to register custom attributes with Klevu. This registration is handled via the Register with Klevu setting on the attribute.
Upon installation, the Klevu module will create a database table klevu_indexing_attribute to maintain the status of all attributes. This database is automatically populated via attribute discovery after account integration.
This database table is updated whenever relevant attribute data is changed. e.g. a name change or an attribute is made searchable. These changes will update the next_action column. The next_action will be set to either , Add, Delete or Update. This ---column defines what action will take place during the next sync.
When editing any attribute in the admin you will find a new section Klevu Indexing at the bottom of the Properties tab. This new section has 2 options:
This setting determines whether an attribute is registered with Klevu or not. Changing this setting will not send the request to Klevu immediately. The attribute record in the database table klevu_indexing_attributes will have the next_action column updated to Add, Update or Delete depending on the value of this setting. When the cronjob next runs it will pick up all entries in this table with a next_action and send those API requests.
If a product attribute is set to Register with Klevu it does not automatically meant that an update will be sent for an entity if that attribute value is updated, unless Triggers Update of is also set.
For which product types should this data be automatically added to the data sent in entity sync? e.g for color or size we would probably want to sync that data for simple and configurable (variants) but not virtual, downloadable or configurable (parents). This setting is dependent on Register with Klevu being set to Yes and otherwise it will be hidden.
If a product attribute is set to Register with Klevu it does not automatically meant that the data for that attribute is automatically sent to Klevu when entity sync is run, unless Automatically Generate Pipeline Configuration For is set for that product type.
Those generated pipeline files can be found in var/klevu/indexing/pipeline/
When saving an entity (category, CMS page, product or custom type) we do not always trigger an update in Klevu. e.g. if the only data on the product that has changed is the weight and we’re not sending weight in the product sync, then we don’t need to send an update for that product.
However, there will be attributes we do not sync that we want to trigger a sync when changed. e.g. when tax_class_id of a product is changed we would want to trigger an update of the price. This setting determines what data to send when the attribute data is updated on the entity.
Currently selecting any option other than Nothing will sync the full product data. Partial product data sync is on the roadmap for a future release.
All attributes in Klevu have the following settings
- Searchable - should this value be used in search
- Filterable - should this attribute be usable as a facet
- Returnable - should this attribute data be returned to the frontend
For any custom attribute, these values are controlled by the following attribute config settings:
- Searchable - Use in Search
- Filterable - Use in Layered Navigation
- Returnable - Used in Product Listing
Note: Standard Klevu attributes (listed above) have predefined settings for these values and are immutable. They will not use these setting from Magento admin.