Pipelines Customisation
Making customisations to existing Klevu pipelines.
Before adding attributes to your pipeline YAML, please ensure they have been registered with Klevu.
Note: All these examples could be combined into one pipelineConfigurationOverrideFilepaths file.
They have been split into multiple files to make it easier to read.
Add meta_description and meta_title to the default (simple, virtual, downlaodable product types) product data during the Add action.
First, in your module add or update etc/di.xml. Add a virtual type for Klevu\IndexingProducts\Service\EntityIndexerService\Add and pass in an array of pipelineConfigurationOverrideFilepaths
If the same changes are required during an Update (almost always the case) then we’d also make the same change to Klevu\IndexingProducts\Service\EntityIndexerService\Update
Create the YAML file.
And add the 2 referenced file (this code could also be added to the above YAML, but it is more readable when split into multiple files)
Add color and size to configurable variant product data during the sync action.
First, in your module add or update etc/di.xml. Add a virtual type Klevu\IndexingProducts\Service\EntityIndexerService\Add and pass in an array of pipelineConfigurationOverrideFilepaths
If the same changes are required during an Update then we’d also make this change to Klevu\IndexingProducts\Service\EntityIndexerService\Update
Create the YAML file.
And add the 2 referenced file (this code could also be added to the above YAML, but it is more readable when split into multiple files)
This works the same as adding a new pipeline stage. In this example, we will append extra data to the description.
First, in your module add or update etc/di.xml. Add a virtual type Klevu\IndexingProducts\Service\EntityIndexerService\Add and pass in an array of pipelineConfigurationOverrideFilepaths
If the same changes are required during an Update then we’d also make this change to Klevu\IndexingProducts\Service\EntityIndexerService\Update
Create the YAML file.
Append the product name and sku to the end of the description
In this example, we will remove the rating and rating count from any configurable variant so indexing falls back to using the parent values
First, in your module add or update etc/di.xml. Add a virtual type Klevu\IndexingProducts\Service\EntityIndexerService\Add and pass in an array of pipelineConfigurationOverrideFilepaths
If the same changes are required during an Update then we’d also make this change to Klevu\IndexingProducts\Service\EntityIndexerService\Update
Create the injected customisation YAML file
An example module with YAML files for common attributes that could be useful. Contains examples of how to:
- change data synced for existing attributes
- add stages to pipelines
- add different attributes for different products types.
- add new product types
- remove attributes
- remove attributes from data if some condition is met (in this case if the value is null)
List of attribute YAML files present in the module
- color
- gender
- manufacturer
- meta_description
- meta_keywords
- meta_title
- new
- sale
- size
- weight
This is not a production ready module and is intended as an example only.
Do not install this module in a production environment.