How to
...
GuidelinesGuidelines
To create a new query, click on the button “Add an item query”.
You'll need to give it a name, and then decide whether you want to inherit it from an existing query or not. Once the query has been created, you are automatically redirected to its details.
...
Then, you will be able add filters to define the scope of items. There are 3 filters available:
Features lang : This filter is used to select the language in which features are to be retrieved from items. The project's default language will be applied by default but it can be overridden. This filter is mandatory if one of the other two filters is selected, so it will be added on its own.
Features value : This filter is used to check the exact value of one or more features on items. For example, to filter on all items with the
"active_sfs"
feature set totrue
.Features comparison : This filter is used to compare one or more item features according to a numerical value. For example, to filter on all items with the
"price"
feature worth more than50
.
Note |
---|
Only indexed features appear in the drop-down list. If you can't find the desired field, please refer to your Onestock contact to have it indexed on your project. |
...
Onestock advices
We advise you to use inheritance to build your queries.
For example, you could start by creating an "items"
query, specifying only the language used for your features. If called, this query will return all items. This basic query can be used for orchestration stock queries if you don't restrict your items in specific cases.
Then, you can define the features primarily used for stock exports to the website. In the example below, we've created the items_sfs
and items_ckc
queries which filter respectively on "active_sfs"
and "active_ckc"
features
The item request tree would look like this
...