Synchronization filters
This section explains how product selection works in the Akeneo app for Shopify.
What are synchronization filters?
Synchronization filters are filters that can be applied to simple products, product models, and variants during the synchronization process. They represent the product selection - or products and products with variants that will be synced to Shopify.
This mapping is optional. However, if no filters are defined, the app will synchronize all simple products, product models and variants from your PIM linked to the Category tree assigned to the Channel you mapped.
Supported filtering levels
| Filtering level | Supported? |
|---|---|
| Simple product | Yes |
| Product model | Yes |
| Product variant | Yes |
Create synchronization filters
Synchronization filters are built with selection criteria, in the same way as a product selection in the PIM: each criterion is made of a property (a system property or an Attribute), an operator and a value. A product, product model or product variant must match all the criteria of its tab to be synchronized.
Follow these steps to create your filters:
- In your Akeneo App for Shopify, navigate to the Configuration page.
- Go to the Synchronization filters section.
- Select the tab of the level you want to filter: Products, Product models or Product variants. Each tab shows the number of criteria it contains.
- Click Add selection criteria, then search and select a property. Properties are grouped into System properties and Attributes.
- Select an operator and enter or select the value. For scopable or localizable Attributes, also select the Channel and the Locale.
- Repeat for each criterion you need. You can use the same property in several criteria, and remove a criterion with the Remove criterion button.
- In the Product selection block, click the refresh button (Refresh counters with current filters) to update the Products, Product models and Product variants counters, and make sure your filters are applied as expected. The counters are not updated automatically while you edit the criteria.
- Save your configuration.
When a tab has no criteria, every item of this level is synchronized.
Please note that Attributes defined at the sub-product model level must be configured in the Product variants tab, not in the Product models tab, regardless of whether you are using a 1:1 product model structure or the intermediate-level split structure.
Please note that you can also select a filter Attribute (boolean Attribute) when setting up a manual synchronization - this filter will apply only to that specific sync.
The app will combine it with your synchronization filters using an AND condition during synchronization.
Available system properties
| Property | Filter level | Operators |
|---|---|---|
| Status | Simple product, Product variant | Equals, Does not equal |
| Family | Simple product, Product model, Product variant | In, Not in, Is empty, Is not empty |
| Categories | Simple product, Product model, Product variant | In children, Not in children, In, Not in, Is unclassified or in, Is unclassified |
| Completeness | Simple product, Product variant | Less than, Equals or less than, Equals, Does not equal, Equals or greater than, Greater than, and the same comparisons on all Locales |
| Completeness | Product model | Complete on all variants, Incomplete on all variants, Complete on at least one variant, Incomplete on at least one variant |
| Created | Simple product, Product model, Product variant | In the last N days, After, Before, Between, Not between |
| Identifier | Simple product, Product variant (main identifier) Product model (product model code) |
Text operators (Contains, Starts with, Equals, In...) on products and product variants In, Not in on product models |
| Product UUID | Simple product, Product variant | In, Not in |
| Quality score | Simple product, Product variant | In |
| Readiness policy | Simple product, Product model, Product variant | Equals, Does not equal, Less than, Equals or less than, Equals or greater than, Greater than, and the same comparisons on all Locales |
Available Attribute types
Attributes can be used at every filtering level (simple product, product model and product variant).
| Attribute type | Operators |
|---|---|
| Yes/No | Equals, Does not equal, Is empty, Is not empty |
| Simple select | In, Not in, Is empty, Is not empty |
| Multi select | In, Not in, Is empty, Is not empty |
| Text | Contains, Does not contain, Starts with, Equals, Does not equal, In, Not in, Is empty, Is not empty |
| Text area | Contains, Does not contain, Starts with, Equals, Does not equal, In, Not in, Is empty, Is not empty |
| Identifier | Contains, Does not contain, Starts with, Equals, Does not equal, In, Not in, Is empty, Is not empty |
| Number | Less than, Equals or less than, Equals, Does not equal, Equals or greater than, Greater than, Is empty, Is not empty |
| Date | After, Before, Equals, Does not equal, Between, Not between, Is empty, Is not empty |
| Image, File, Asset collection, Measurement, Price, Table, Product link, Reference entity, Reference entity collection | Is empty, Is not empty |
The In and Not in operators accept up to 100 values on identifiers, text Attributes, product model codes and product UUIDs.
Filter presets
Filter presets let you save several sets of synchronization filters for the same store, for example, a "Black Friday" preset next to your usual selection. You can then pick a preset for a manual synchronization, or for each scheduled synchronization.
The filters you define without selecting a preset are the Store default filters. They are used by manual and scheduled synchronizations, unless another preset is picked.
A preset replaces the store default filters for the synchronization it is used for: the two are never combined. A filter Attribute selected in the manual synchronization modal can still be applied on top of the preset.
Create a filter preset
- In the Configuration page, go to the Synchronization filters section.
- Define the criteria you want to save.
- Click Save as new preset, enter a name and click Create preset. Preset names must be unique for the store (regardless of case).
Update a filter preset
- In the Configuration page, go to the Synchronization filters section.
- Select the preset in the Filter preset field. The criteria of this preset are displayed, and the Product selection counters follow the selected preset.
- Add, edit or remove criteria in the Products, Product models and Product variants tabs.
- Click the refresh button (Refresh counters with current filters) to check that the preset selects the expected items.
- Click Save to save your configuration.
The changes apply to the next synchronizations that use this preset, including the scheduled ones. If you switch to another preset with unsaved changes, the app asks you to confirm before discarding them.
Rename or delete a filter preset
Select the preset in the Filter preset field, then click Rename or Delete. The store default filters cannot be renamed or deleted.
If you delete a preset used by a scheduled synchronization, this scheduled synchronization goes back to the store default filters. Past synchronizations are not affected.
Use a filter preset for a manual synchronization
When you launch a manual synchronization, select a preset in the Filter preset field. The preset applies to this run only. The Filters for this run recap shows the criteria that will be applied for each level.
Use a filter preset for a scheduled synchronization
In the scheduled synchronization configuration, select a preset in the Filter preset field. The preset is used on every scheduled run, and any change you make to the preset is applied from the next run.
If you switch the preset of a scheduled synchronization that uses the Delta import process, the next run only synchronizes the products updated since the last run.
Edit synchronization filters in JSON
Editing filters in JSON is still possible, but it is no longer recommended: everything can be done with the criteria form described above. We recommend using the JSON tab only to copy and paste a filter configuration from one store to another.
The JSON tab of the Synchronization filters section shows the same filters as the form: switching between the form and the JSON loses nothing. If your stored filters do not have the shape the form expects, only the JSON tab is shown.
- In your Akeneo App for Shopify, navigate to the Configuration page.
- In the Synchronization filters section, open the JSON tab and edit the JSON in the Product synchronization filters editor. It contains three keys:
•"product_filters":{},: corresponding to simple product filters.
•"product_model_filters": {},: corresponding to product model filters.
•"product_variant_filters": {}: corresponding to product variant filters.
For each key, you can define your own filters using the same REST API structure, but you don’t need to include the URL or thesearch=parameter:"attribute_code":[{"operator":"operator","value":value}]
You can use the Filter examples panel next to the editor as a starting point.
Example with the PIM status:{"enabled":[{"operator":"=","value":true}]} - In the Product selection block, click the refresh button (Refresh counters with current filters) to update the counters and make sure your filters are applied as expected. The counters are not updated automatically while you edit the JSON.
- Save your configuration.
Filter example
Here’s an example of a filter that can be applied to your simple products, product models, and product variants.
For the full list of available filters and operators, please refer to the REST API documentation.
{
"product_filters": {
"categories":[{"operator":"IN CHILDREN","value":["clothing_catalog"]}],
"enabled":[{"operator":"=","value":true}],
"family":[{"operator":"IN CHILDREN","value":["pants","tshirt","shoes"]}],
"send_to_shopify":[{"operator":"=","value":true}]
},
"product_model_filters": {
"categories":[{"operator":"IN CHILDREN","value":["clothing_catalog"]}],
"family":[{"operator":"IN CHILDREN","value":["pants","tshirt","shoes"]}],
"send_to_shopify":[{"operator":"=","value":true}]
},
"product_variant_filters": {
"enabled":[{"operator":"=","value":true}],
"send_to_shopify":[{"operator":"=","value":true}]
}
}Please note that the parent, updated_at, updated, updated_including_linked_entities and updated_including_linked_type filters are not allowed in the app. The app manages them itself, for example when it runs a Delta import.
Common filters
| Filter type | Filter level | Filter syntax |
|---|---|---|
| Filter by Category | Simple product, Product model, Product variant | "categories":[{"operator":"IN","value":["winter_collection"]}] |
| Filter by Status | Simple product, Product variant | "enabled":[{"operator":"=","value":true}] |
| Filter by UUID | Simple product, Product variant | "uuid":[{"operator":"IN","value":["8945388d-cf5b-49af-8799-05d1ed6e296f", "941fe892-99dd-440f-b2a9-8eccb94248f0"]}] |
| Filter by Product model code | Product model | "identifier":[{"operator":"IN","value":["amor","apollon"]}] |
| Filter by Completeness | Simple product, Product variant | "completeness":[{"operator":"=","value":100,"scope":"ecommerce"}] |
| Filter by Readiness | Simple product, Product variant | "readiness":[{"operator":">=","value":80,"readiness_code":"camcorders_ecommerce","locale":"en_US","scope":"ecommerce"}] |
| Filter by Attribute | Simple product, Product model, Product variant | ATTRIBUTE_CODE:[{"operator":OPERATOR,"value":VALUE,"locale":LOCALE_CODE,"scope":CHANNEL_CODE}] |