...
...
Prepare_select
...
...
Expand |
---|
|
Code Block |
---|
| [
{
"name": "delivery",
"field": "order.delivery.type"
}
] |
|
...
Pack_scan
...
...
Expand |
---|
|
Code Block |
---|
| [
{
"name": "delivery",
"field": "parcel.order.delivery.type",
"filter_type": "filter_sub_entity"
}
] |
|
...
Bag_scan
...
...
...
...
...
Default filter
...
Default JSON format
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
(string - mandatory) - Key used to translate the filter, which appears in the format 'filter.{name}.title'
.
field
(string - mandatory) - Path used to access the filter value in the entity structure (ex: order.delivery.type
)
filter_type
(string- optional) - Choice of one of the following three specific filter types.
filter_sub_entity
- Filters on path sub-entities. If the field is an array, it must be used.
different_value_count_is
- Filters according to a specific number of values in the field. Is often used for single-line orders.
order_type_is
- Specific filter for filtering by order type. For this, it is necessary to specify the possible values in the ‘possible_values’ field, the others will be ignored.
possible_values
(array of objects - optional) Restricts the filter to specific values. All others will be ignored.
do_not_translate
- Display the raw filter value instead of the translation key
Default configuration and overlays examples by page
The pages below provide a default configuration, but they may be overloaded. Examples are given to help.
...
Page | Default filter | Default JSON format | Overlays examples |
---|
Prepare_select | | |
monolinefilter_typedifferent_value_count_is", "field": "content_ids",
"possible_values": [
| Expand |
---|
title | Filter on the delivery mode stored in the order information section |
---|
| |
|
value1"order.information.delivery_mode",
" |
|
|
translation_keyfilter.monoline.is_monoline }
]
}
]PickingDelivery carrierDepartment feature of items
Single line orders
Unfold | Code Block |
---|
| [
{
"name": "delivery",
"field": "parcel.order.delivery.type" |
|
|
}
{namecarrier, "field": "order.delivery.carrier.name"
}, | Expand |
---|
title | Filter on the delivery type + the carrier name of the parcel |
---|
| |
|
namedepartementparcel.order.delivery.type",
"filter_type": "filter_sub_entity",
" |
|
|
do_not_translate true,
"delivery"
},
{
"field": " |
|
|
itemfeaturesdepartement.0"
},
{
"name": "monoline"carrier.name",
"filter_type": " |
|
|
differentvaluecount_isfielditem_id, "possible_values": [
{value1,
"different_value_count_is",
" |
|
|
translation_keyfilter.monoline.is_monoline"content_ids",
"possible_values": [
|
|
|
}] }
]Consolidation | Delivery type Delivery carrier Single line orders
| Expand |
---|
|
Code Block |
---|
|
[{name"delivery",fieldorderdeliverytype,{carrierdelivery",
"field": "order.delivery. |
|
|
carrier.namemonolinefilter_typedifferent_value_count_is"order.delivery.carrier.name"
},
{
" |
|
|
fielditem_idpossiblevalues[ {
"do_not_translate": true,
|
|
|
value1,
"item.features.departement.0"
},
{
" |
|
|
translation_keyfilter..is_monoline",
"filter_type": "different_value_count_is",
|
|
|
}]}
]Boxing | Delivery type Delivery carrier Single line orders
| Expand |
---|
|
Code Block |
---|
|
[name"delivery",fieldorderdeliverytype},{"name": "carrier", | Expand |
---|
title | Add a filter on the order types (sfs, c&c, ropis) |
---|
| Code Block |
---|
| [
{
"field": "order.delivery. |
|
|
carrier.name},{ monoline","filter_type":"different_value_count_is",item_idorder.delivery.carrier.name",
" |
|
|
possible_values[value1translation_keyfield": "item.features.departement.0",
"filter_type": "filter |
|
|
.monoline.is_monoline"}]
]Order list | Delivery type Delivery carrier Order state Order type Single line orders
| Expand |
---|
|
Code Block |
---|
|
[{ namedeliveryfieldorder.delivery.type"different_value_count_is",
|
|
|
},{ carrierfield "order.delivery.carrier.name"},{"name": "state","field":"state"},{nameorder_typefilter.monoline.is_monoline",
|
|
|
"filter_type": "order_type_is", "value": 1
}
]
},
{
"field": "order_type",
"filter_type": "order_type_is",
"name": "order_type",
"possible_values" |
|
|
: [
{ "value": "ffs" },
{ "value": "ckc" },
{ "value": "ropis" }
]
},
{
"name": "monoline",
"filter_type": "different_value_count_is: [
{
"value": "ffs"
},
{
"value": "ckc"
},
{
"value": "ropis"
}
]
}
] |
|
Expand |
---|
title | Add new filters on item features (in the example, the size) |
---|
| Code Block |
---|
| [
{
"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
| Expand |
---|
| Code Block |
---|
| [
{
"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
| Expand |
---|
| Code Block |
---|
| [
{
"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
| Expand |
---|
| Code Block |
---|
| [
{
"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"
}
]
}
] |
|
| Expand |
---|
title | Restrict the state filter on specific values |
---|
| Code Block |
---|
| [
{
"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 | | Expand |
---|
| Code Block |
---|
| [
{
"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
Note |
---|
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. |
| Expand |
---|
| Code Block |
---|
| [
{
"name": "color",
"field": "color",
"do_not_translate": true
},
{
"name": "size",
"field": "size",
"do_not_translate": true
}
] |
|
| Expand |
---|
title | 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: Make sure that the feature is indexed on your project. To find out, please contact your Onestock technical contact. Add the feature to the ‘Available filters’ configuration available via this path Configuration > Store App > Pages > Catalog > Specific settings > Available filters Image AddedWait 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. Add the configuration to the ‘Filters’ section of the catalogue page:
Code Block |
---|
| [
{
"name": "color",
"field": "color",
"do_not_translate": true
},
{
"name": "size",
"field": " |
|
|
item_idpossiblevalues[
value": 1,
"translation_key": "filter.monoline.is_monoline"
}]"name": "departement"
}
] |
|
|
Users | | UnfoldRestrict the possible size values to a specific list |
| |
|
name"state"state
"possible_values": [{value"idle"
translation_keyentity_states.operator.idle" }"name": "size",
"possible_values": [
|
|
|
{ "value": "picking",translation_keyentity_states.operator.pickingconsolidating,"translation_key":"entity_states.operator.consolidating"
},{"value": "packing",translation_keyentity_states.operator.boxing
]}
]Catalog | Color feature Size feature
| Expand |
---|
|
Code Block |
---|
|
[{namecolor,
"field": "color","do_not_translate": true},namesize,"field":"size","do_not_translate": trueConfiguration overlay
...
name
...
field
...
filter_type
...
possible_values