Table of Contents

Queries

Retrieve products matching a set of predefined criteria

The Queries section of the Products-area is where you create and configure product queries to e.g. retrieve All active products or All products with no Spanish translation, etc. Queries1 Queries are flexible and can be used for many purposes – you can create as many personal and shared queries as you like to find products you need to look at, but some queries are also used to e.g. retrieve products to include in a dynamic workspace structure.

Queries in PIM are based on repositories – specifically a Product-index – and consist of the same basic components; a source index, some parameters and expressions, etc. We’re not going to go into details about all of these index-related subjects here – but you can read about them in the linked repositories documentation.

To create a query:

  1. In the Query-section of the tree use the + or context menu to create a new query
  2. Specify a name and a source index
  3. Save

The query is now created, but as it does not have any expressions it will return all products in the product index selected as a source. That’s rarely useful, so you should add expressions:

  1. In the tree, open the context-menu for the query and click Edit
  2. On the overview find the Expressions-section and click Manage
  3. Create a number of expressions:
    • Select a field to check – you have access to all standard and custom product attributes as well as a number of generated fields
    • Select a type of test value – e.g. a constant or a value passed by a parameter
    • Select an operator like Contains or IsEmpty
  4. Save and close

The intricacies of queries and expressions are beyond the scope of this article – you can read much more about that subject in the queries documentation – but once you’ve created a set of expressions and saved you should see fewer products returned by the query. In this manner you can create personal and shared queries for a variety of purposes.

Configure Queries

Using the context menu you can open the query configuration screen - it contains two tabs, where you can tweak query behavior:

The General-tab is used for two things:

  • Controlling if products in this query opens on Edit-mode or not
  • To add a context for completeness calculations

GeneralTab

When you add completeness rules & languages to this configuration, products returned by this query will show a completeness percentage calculated based on your selection. This context is also applied if you use the query elsewhere, e.g. in dynamic workspaces.

To top