Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Introduction

You can add filtering options on some of the store app pages. This facilitates the preparation process by selecting only items from certain brands, certain shelves or certain delivery modes.

A default configuration is applied in the pages, but this configuration can be overridden. To do this, go to the Configuration > Store App > Pages > {Page name} > Filters section.

Configuration structure

The structure is an array of objects, each object corresponding to 1 filter, with the following fields:

  • name (mandatory) - Key used to translate the filter, which appears in the format 'filter.{name}.title'.

  • field (mandatory) - Path used to access the filter value in the entity structure

  • filter_type (optionnal)

  • possible_values

  • do_not_translate

Default configuration and overlays examples by page

Page

Default filter

Default JSON format

Overlays examples

Prepare_select

  • Delivery type

 Default config
[
  {
    "name": "delivery",
    "field": "order.delivery.type"
  }
]
 Filter on the delivery mode stored in the order information section
[
    {
        "field": "order.information.delivery_mode",
        "name": "delivery"
    }
]

Pack_scan

  • Delivery type

 Default config
[
  {
    "name": "delivery",
    "field": "parcel.order.delivery.type",
    "filter_type": "filter_sub_entity"
  }
]
 Filter on the delivery type + the carrier name of the parcel
[
  {
    "field": "parcel.order.delivery.type",
    "filter_type": "filter_sub_entity",
    "name": "delivery"
  },
  {
    "field": "parcel.delivery.carrier.name",
    "filter_type": "filter_sub_entity",
    "name": "carrier"
  }
]

Bag_scan

  • Single line orders

 Default config
[
  {
    "name": "monoline",
    "filter_type": "different_value_count_is",
    "field": "content_ids",
    "possible_values": [
      {
        "value": 1,
        "translation_key": "filter.monoline.is_monoline"
      }
    ]
  }
]

N/A

Picking

  • Delivery type

  • Delivery carrier

  • Department feature of items

  • Single line orders

 Default config
[
  {
    "name": "delivery",
    "field": "order.delivery.type"
  },
  {
    "name": "carrier",
    "field": "order.delivery.carrier.name"
  },
  {
    "name": "departement",
    "filter_type": "filter_sub_entity",
    "do_not_translate": true,
    "field": "item.features.departement.0"
  },
  {
    "name": "monoline",
    "filter_type": "different_value_count_is",
    "field": "item_id",
    "possible_values": [
      {
        "value": 1,
        "translation_key": "filter.monoline.is_monoline"
      }
    ]
  }
]
 Add a filter on the order types (sfs, c&c, ropis)
[
    {
        "field": "order.delivery.type",
        "name": "delivery"
    },
    {
        "field": "order.delivery.carrier.name",
        "name": "carrier"
    },
    {
        "do_not_translate": true,
        "field": "item.features.departement.0",
        "filter_type": "filter_sub_entity",
        "name": "departement"
    },
    {
        "field": "item_id",
        "filter_type": "different_value_count_is",
        "name": "monoline",
        "possible_values": [
            {
                "translation_key": "filter.monoline.is_monoline",
                "value": 1
            }
        ]
    },
    {
        "field": "order_type",
        "filter_type": "order_type_is",
        "name": "order_type",
        "possible_values": [
            {
                "value": "ffs"
            },
            {
                "value": "ckc"
            },
            {
                "value": "ropis"
            }
        ]
    }
]
 Add new filters on item features (in the example, the size)
[
    {
        "field": "order.delivery.type",
        "name": "delivery"
    },
    {
        "field": "order.delivery.carrier.name",
        "name": "carrier"
    },
    {
        "do_not_translate": true,
        "field": "item.features.departement.0",
        "filter_type": "filter_sub_entity",
        "name": "departement"
    },
    {
        "field": "item_id",
        "filter_type": "different_value_count_is",
        "name": "monoline",
        "possible_values": [
            {
                "translation_key": "filter.monoline.is_monoline",
                "value": 1
            }
        ]
    },
    {
        "do_not_translate": true,
        "field": "item.features.size.0",
        "filter_type": "filter_sub_entity",
        "name": "size"
    }
]

Consolidation

  • Delivery type

  • Delivery carrier

  • Single line orders

 Default config
[
  {
    "name": "delivery",
    "field": "order.delivery.type"
  },
  {
    "name": "carrier",
    "field": "order.delivery.carrier.name"
  },
  {
    "name": "monoline",
    "filter_type": "different_value_count_is",
    "field": "item_id",
    "possible_values": [
      {
        "value": 1,
        "translation_key": "filter.monoline.is_monoline"
      }
    ]
  }
]

N/A

Boxing

  • Delivery type

  • Delivery carrier

  • Single line orders

 Default config
[
  {
    "name": "delivery",
    "field": "order.delivery.type"
  },
  {
    "name": "carrier",
    "field": "order.delivery.carrier.name"
  },
  {
    "name": "monoline",
    "filter_type": "different_value_count_is",
    "field": "item_id",
    "possible_values": [
      {
        "value": 1,
        "translation_key": "filter.monoline.is_monoline"
      }
    ]
  }
]

N/A

Order list

  • Delivery type

  • Delivery carrier

  • Order state

  • Order type

  • Single line orders

 Default config
[
  {
    "name": "delivery",
    "field": "order.delivery.type"
  },
  {
    "name": "carrier",
    "field": "order.delivery.carrier.name"
  },
  {
    "name": "state",
    "field": "state"
  },
  {
    "name": "order_type",
    "filter_type": "order_type_is",
    "field": "order",
    "possible_values": [
      { "value": "ffs" },
      { "value": "ckc" },
      { "value": "ropis" }
    ]
  },
  {
    "name": "monoline",
    "filter_type": "different_value_count_is",
    "field": "item_id",
    "possible_values": [
      {
        "value": 1,
        "translation_key": "filter.monoline.is_monoline"
      }
    ]
  }
]
 Restrict the state filter on specific values
[
    {
        "field": "order.delivery.type",
        "name": "delivery"
    },
    {
        "field": "order.delivery.carrier.name",
        "name": "carrier"
    },
    {
        "field": "state",
        "name": "state",
        "possible_values": [
            {
                "value": "new"
            },
            {
                "value": "picking"
            },
            {
                "value": "consolidable"
            },
            {
                "value": "consolidating"
            },
            {
                "value": "packable"
            },
            {
                "value": "packing"
            },
            {
                "value": "finish"
            },
            {
                "value": "dispatched"
            }
        ]
    },
    {
        "field": "order",
        "filter_type": "order_type_is",
        "name": "order_type",
        "possible_values": [
            {
                "value": "ffs"
            },
            {
                "value": "ckc"
            },
            {
                "value": "ropis"
            }
        ]
    },
    {
        "field": "item_id",
        "filter_type": "different_value_count_is",
        "name": "monoline",
        "possible_values": [
            {
                "translation_key": "filter.monoline.is_monoline",
                "value": 1
            }
        ]
    }
]

Users

  • Operator state

 Default config
[
  {
    "name": "state",
    "field": "state",
    "possible_values": [
      {
        "value": "idle",
        "translation_key": "entity_states.operator.idle"
      },
      {
        "value": "picking",
        "translation_key": "entity_states.operator.picking"
      },
      {
        "value": "consolidating",
        "translation_key": "entity_states.operator.consolidating"
      },
      {
        "value": "packing",
        "translation_key": "entity_states.operator.boxing"
      }
    ]
  }
]

N/A

Catalog

  • Color feature

  • Size feature

The available filters in the catalog must appear in the GET/categories API call

Please follow the steps in the example on the right to add a filter.

 Default config
[
  {
    "name": "color",
    "field": "color",
    "do_not_translate": true
  },
  {
    "name": "size",
    "field": "size",
    "do_not_translate": true
  }
]
 Add an item feature filter (e.g. departement)

Unlike the other pages, adding a new features filter to the catalogue requires more complex configuration, as the search is carried out in all the items in the database. Here are the steps to follow:

  1. Make sure that the feature is indexed on your project. To find out, please contact your Onestock technical contact.

  2. Add the feature to the ‘Available filters’ configuration available via this path Configuration > Store App > Pages > Catalog > Specific settings > Available filters

    image-20241202-103034.png
  3. Wait for the pre-calculation of the filters, which runs every hour.
    Note : The change can be applied immediately by calling the POST/category_filters/compute route, but it is not open to external users. Please contact your Onestock technical contact.

  4. Add the configuration to the ‘Filters’ section of the catalogue page:

[
  {
    "name": "color",
    "field": "color",
    "do_not_translate": true
  },
  {
    "name": "size",
    "field": "size",
    "do_not_translate": true
  },
  {
    "do_not_translate": true,
    "field": "departement",
    "name": "departement"
  }
]
  • No labels