Result Mappings
The Search Studio Result Manager can be used to curate the perfect result sets, redirect customers to specific pages, rewrite queries, and more.
However, depending on how a particular query has been mapped, the search response will be slightly different.
Defined Result Set
If a mapping was set up to define the result set (action: "search and customize results"), then in the interpretedQuery
array, you will find the queryIntent
with the type DEFINITION
and intentMatched
true.
"interpretedQuery": {
"matchSources": [],
"queryIntent": {
"type": "DEFINITION"
},
"category": null,
"categoryId": null,
"normalizedCategory": null,
"categorySource": "ZOOVU",
"corrected": "*",
"queryWasCorrected": false,
"original": "searchandcustomizedmapping",
"intentMatched": true,
If products have been pinned, they will be placed in the results array in the correct positions. Additionally, you will find the product IDs listed in placements:
"placements": [
{
"type": "PRODUCT",
"position": 0,
"id": "4455667"
}
]
Rewrite
If a mapping has been set up to rewrite a query (action: rewrite trigger to) then the results in the search response will be for the rewritten query.
For example, if the mapping says to rewrite "deep dish pizza" to "Chicago style pizza", the seach results returned when a customer types in "deep dish pizza" will be the results for the query "Chicago-style pizza."
In the response you will see:
"original": "deep dish pizza"
as well as
"corrected": "chicago style pizza"
intentMatched
will also be true.
Redirect
If you wish to direct customers who type in a certain query to a specific page (e.g., to the "Contact" page when they type in "support"), you can set up redirects.
A query that matches a redirect mapping will return the URL like this:
{
"redirect": "http://mywebsite.com/contact"
}
Custom Results
It is possible to create different types of custom results in the Result Manager. These custom results will show up in different ways in the search response.
Custom search result
Custom search results can be added anywhere in your search results. Custom results will be objects in the results array and you will find them wherever they are placed in the result manager. For example, I pinned a custom result as my first search result here:
"results": [
[
{
"type": "HTML",
"link": "https://placeholder.com/customresultlink",
"name": "Custom Result Title",
"content": "This is the content for my custom result.",
"image": "https://placeholder.com/customresultimage.png",
"dataPoints": [],
"resultSet": 0
}
],
HTML
Custom HTML can be inserted as search results or used to place banners in your search results.
If you integrate a custom HTML result into your search results, it will again be part of the results array:
"results": [
[
{
"type": "custom",
"html": "<img src=\"https://yourwebsite.com/1200x300?text=Your+Banner+Here\" alt=\"Banner\" style=\"width:100%; height:auto; display:block;\">",
"suggestionHtml": "",
"resultSet": 0
}
]
If you use your custom HTML as a banner, you will see a new key in your response called banner:
"banner": "<img src=\"https://yourwebsite.com/1200x300?text=Your+Banner+Here\" alt=\"Banner\" style=\"width:100%; height:auto; display:block;\">",
Video
The result type Video lets you add videos to your search results. As part of your results array, they look like this:
"results": [
[
{
"type": "YOUTUBE_VIDEO",
"link": "https://www.youtube.com/watch?v=k_tkrZglRoE",
"name": "Video Title",
"content": "This is the content for my video result.",
"image": "https://placeholder.com/video-image.png",
"dataPoints": [],
"resultSet": 0
}
]
Document
You can insert a variety of document types into your search results. As part of your results array, a PDF would look something like this:
"results": [
[
{
"type": "PDF",
"link": "https://placeholder.com/mydocument.pdf",
"name": "PDF Title",
"content": "The content for my PDF result.",
"image": "https://placeholder.com/pdf.svg",
"dataPoints": [],
"resultSet": 0
}
]
]
}
],
Assistant
You can integrate your guided selling assistant above the search results for relevant queries by using the custom result type Assistant. All you need to do is provide your assistant ID and add the custom result as a banner to your result mapping. This will populate the banner property like this:
"banner": "<div id=\"zoovu-assistant\"></div><script type=\"text/javascript\" src=\"https://api-tiger.zoovu.com/api/v1/advisors/vNzmkXCs/js-loader\"></script>",