Action - Return No Results | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How to structure the Return No Results action
- Example for Return No Results action
Action Structure
The Return No Result action has the following structure:
- The
verticals
property should be the list of verticals that should return no results
Key | Type | Example |
---|---|---|
verticals | Array of strings | [“jobs”, “faqs”] |
Using the UI
When you select Return No Results as a query rule action in the UI, you can select the vertical(s) to return no results from the dropdown.
Config Structure
"actions": [
{
"actionType": "RETURN_NO_RESULTS",
"verticals": ["jobs"]
}
]
}
No Results Example
For a query like the below, we may want to avoid returning results for Jobs if someone searches for “Executive Chef” - Turtlehead Tacos won’t be replacing their executive chef anytime soon! Without any changes, both FAQs and Jobs would return for a query like “Who is your executive chef?”.
To suppress Jobs results for queries like these, we’ll:
- Check if the search term contains Executive Chef
- Return no results for the ‘jobs’ vertical
Below is how we would set up this query rule in the JSON editor, but you can also use the UI.
{
"criteria": {
"searchTermContains": [
"executive chef"
]
},
"actions": [
{
"actionType": "RETURN_NO_RESULTS",
"verticals": ["jobs"]
}
]
}
After this rule is applied, only the FAQ will be returned as a result.
unit Quiz
+20 points
How many inputs are required for the Return No Results action?
Which of the following is a good use case for the Return No Results action?
You're out of this world! 🌎
You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Sign up for Hitchhikers to start earning points!
If you're already a Hitchhiker, log in to access this content.
Feedback
<% elem.innerText %>