Connecting Answers With Products
Product mapping is one of the most important steps when setting your assistant up. This is where you can configure the logic and influence result generation.
During the process of product mapping, and the products in your data file. For example, imagine your customer wants a bike for daily commutes. You can use zoovu’s condition framework to define the features any suitable bike should have. To do this, simply associate the specific answer with product feature-based rules using simple conditions, such as equals, contains, and matches as explained below in this article.
To start, open the product mapping menu for the desired answer, as shown in the example above. You can define multiple conditions and decide whether all or any of them need to match.
Be mindful, that the stricter your rules and the more conditions need to be met, the fewer perfect matching products may be displayed.
All vs Any
Let’s have a look at an example.
Here, we define that all conditions must be met (‘ALL’).
The zoovu algorithm will only consider all products of the type ‘electric bike’ that are not categorized as ‘adventure bikes’.
On the other hand, if we select “ANY”, a product will be considered in the result view even if only one condition is met.
Equals, Contains, Matches…
Let’s take a closer look at how conditions work.
You can build your conditions using three expressions:
- Equals (Simple expression)
- Contains (Simple expression)
- Matches (Advanced expression)
Use “equals” if the data value must match exactly.
if you define a condition: “type” → “equals” → “electric”, only products with the type “electric” will be considered in the results view. It means that products with the value of “Electric” (capital letter) won’t be shown.
Use ‘contains’ if the data value has to contain at least a part of the specified value (case-sensitive).
if you select: “type” → “contains” → “lec”, products whose type contains the term ‘lec’, as in “electric” and “Electric” will be considered in the results view.
At first glance, matches do exactly the same what “equals”. Meaning, if you select: “type” → “matches” → “electric”, only the products with a specific value of “electric” will be displayed in the results view.
Matches & Regular Expressions
Unlike equals, matches lets you be even more specific providing the mechanism of Regular Expressions, e.g.:
|Value||Will match...||What does it do?|
|Ca(t|r|m)||Car, Cat, Cam||Acts like a boolean OR. Matches the character before or after the “|”|
|Bi.*||Bike, Big, Binary, Binoculars (etc.)||.* Matches any character which follows the “Bi”|
|Colou?r||Color, Colour||Matches 0 or 1 of the preceding characters, making it optional.|