Advanced Online Store Filters
You have an online store connected in our application, but you don't want certain orders to be received? No problem, with our advanced filters, you can choose which orders will or won't come in based on all possible order content.
While our basic filter only gives you a choice between the possible order statuses, you can use advanced filters to very precisely determine which orders will or won't be imported by Stoqflow. For example, you can exclude orders from one specific country, or orders containing a certain SKU, or orders from a particular customer, and so on.
What filter options are available?
Different online store platforms generate different order objects. In principle, you can filter all content from that order object with the following statements:
- eq (EN:equals, NL: is equal to)
- neq (EN:not equals, NL: is not equal to)
- in (EN: in, NL: contains)
- nin (EN: not in, NL: does not contain)
- inc (EN: includes, NL: has)
- exc (EN: excludes, NL: does not have)
- lt (EN: less than, NL: less than)
- lte (EN: less than or equals, NL: less than or equal to)
- gt (EN: greater than, NL: greater than)
- gte (EN: greater than or equals, NL: greater than or equal to)
Examples
The following filter can be applied to a Shopify online store:
{
"financial_status": {
"eq": "paid"
},
"shipping_address": {
"country_code": {
"neq": "DE"
}
}
}
This means that only orders with the status 'paid' will be received, unless their shipping address contains the country code 'DE' (Germany).
Since an order can have only one country code, it is also possible to exclude a list of countries using 'NIN' (not in). An order can have multiple tags; for example, you can use the 'INC' (includes) filter to only import orders that contain a certain tag.
{
"financial_status": {
"eq": "paid"
},
"shipping_address": {
"country_code": {
"nin": [
"DE",
"US"
]
}
},
"tags": {
"inc": "priority"
}
}
When this filter is applied, orders from Germany and the United States will not be imported in Stoqflow.
!> Note: The structure of the filter always follows the hierarchical structure of the order object. Filters can therefore never contain [] or {}, but must always be built as a nested structure.
Below you can download the full order objects (filled with fictional data) for each online store platform in JSON format, so you know what filters are possible and how to build them:
- Woocommerce order object
- Shopify order object
- Bol.com order object
- Lightspeed order object
- Magento 2 order object
How to apply?
Finally: you can apply these filters by navigating in Stoqflow to 'Stores' and selecting the desired online store. Then, under 'order filters', choose 'advanced' (instead of 'status').