Auto-assign product to groups

Auto-Assign Products to Groups is an advanced PIM feature which makes it possible to automatically place products in warehouse groups based on e.g. field values or (in more advanced scenarios) query criteria.

The basic setup procedure is:

  • Create one or more product assignment rules
  • Create a scheduled task for moving products when they match a rule

Whenever the scheduled task is run, products matching the criteria will be assigned to the groups in question.

There are two types of setup:

  • Group rules – the simplest implementation
  • Query rules – for more advanced scenarios

Each will be explained below

Group rules mode is the simplest implementation, and works the following way:

  1. Open the group settings for each group you want to assign products to
  2. Scroll to the Auto product relation rules section select up to two fields and specify a value for each of them – e.g. Manufacturer and Trek
  3. Go to Settings > Ecommerce > Advanced configuration > Auto-assign products and create a product assignment rule
    • Select which warehouse/shop/channel this rule should apply to
    • Select Group rules mode
  4. Go to System > Scheduled tasks and create a new scheduled task:
    • Select the Assign products to one or more groups based on defined rules add in
    • Select which product assignment rules to schedule

Whenever the scheduled task is run, the products which match the criteria defined on the groups – the group rules – will be added to the groups in question. If the values used to assign a product to a group change, the product will be removed from the group again unless Don't detach products is set on the scheduled task.

Query mode is reserved for more advanced scenarios and works in the following manner:

  1. First create a repository query which finds the products you want to auto-assign groups
  2. Go to Settings > Ecommerce > Advanced configuration > Auto-assign products and create a product assignment rule
    1. Select which warehouse/shop/channel this rule should apply to
    2. Select Query rules mode
    3. Under parameter mapping add a mapping between a product group field and a query parameter
  3. Go to System > Scheduled tasks and create a new scheduled task:
    1. Select the Assign products to one or more groups based on defined rules add in
    2. Select which product assignment rules to schedule

Whenever the scheduled task is run, the products matched by the query will be placed in the product group(s) where the query parameter matches the value on the product group field defined in the mapping.