This article highlights and explains how to set up conditionals and combine features to build powerful, precise rules.
What are conditionals? And why should I use them?
A conditional statement (also called an If-Then Statement) is a statement with a hypothesis followed by a conclusion. Another way to define a conditional statement is to say, “If this happens, then that will happen.”
The antecedent is the first, or “if,” part of a conditional statement. The consequent is the second, or “then,” part of a conditional statement. The consequent is the result of the antecedent. Keep in mind that conditional statements might not always be written in the “if-then” form. Conditional statements may be nested such that either or both of the antecedent or the consequent may themselves be conditional or logical statements.
Info | ||
---|---|---|
| ||
Examples of conditionals you can use in Hawksearch would be the following:
|
By using well-formed conditionals in Hawksearch to trigger actions, you can precisely enable actions like boost/bury, visibility rules, landing pages, item pinning, etc.
Instructions
From the basic rule box, you are able to set a conditional trigger using a logical conditional statement. When this statement is true then a defined rule or action will occur.
...
Info | ||
---|---|---|
| ||
If a statement only has one condition, it doesn't matter if you use ANY or ALL since they are logically equivalent. |
Field Selection
You may select any field that is set toXXXXX.
Operators
Conditional statements in Hawksearch utilize several operators to logically evaluate statements. All operators are not applicable to each field, depending on if the operator is derived from data or from user inputs.
...
- Contains
- Does Not Contain
- Contains In
- Does Not Contain In
- Is
- Is Not
- Is In
- Is Not In
Contains
This is the operator to use when you want to target part of a field or keyword. For example, if you want to show a banner to anyone who searches for a Nike branded item in the search bar, even if they specify a type of clothing or attire after it, you could use the following statement. Searches for "Nike", "Nike shoes", "Nike pants", "Nike bag", "Nike ball", and "Nike football gear" would all return true for the following conditional.
Does Not Contain
This is the operator to use when you want to target part of a field or keyword, while excluding a subset of the results. For example, if you want to show a banner for a hammock sale to anyone who searches for camping in the search bar, while excluding anyone who searches for tents you may set up the following trigger.
Contains In
Use Contains In when you want to search for any one of several terms to make the conditional true. Think of this as an OR statement. The following example will return true if someone inputs any of the following words into the search bar as a keyword or part of a keyword: camping, hiking, adventure, and sleeping bags.
Does Not Contain In
Instructions
Info |
---|
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...