Offer Search
Offers Overview
Offer is any tangible or non-tangible collection of entities for sale in a store. An offer represents a product or product bundle defined in Commerce Manager. Using the information returned by the offer
resource, a store configured with offer search can implement the following use cases in the front-end:
Availability of an offer even if only one SKU is available
If a SKU associated with an offer is unavailable the search result is filtered to remove it from the search results.
Price range of offers or starting price an offer in the search result page
Product swatches for all SKUs by using the offer codes that has associated swatch images in the product configuration
On sale and other product promotion information that are configured as offer attributes
The offer search result consists of offers and each offer in the result consists of:
- A unique offer code to identify the offer
- Price ranges for all SKUs
- Offer attributes
- Availability of SKUs
- Offer constituents if the offer is a bundle
- Items
With offer search configuration, the store-front displays prices at the offer level when a shopper searches for an offer. For the price display, merchandiser can configure attributes to:
- Display only the list price
- Strike through the list price and display the sale or purchase price
- Display the price range for the offer list
- Display only the starting price in the offer list price or sale price
- Strike through the price range list and display sale or purchase price range
Faceted Offer Search
A store might be configured with product attributes, SKU attributes, SKU options, or other attributes for the entire product catalog in the store. These product details are called facets and the options available in each facet are called facet values. A merchandiser can configure a facet as facetable in Commerce Manager.
For a store with huge catalogs, an offer search query might return a large number of results, and the shopper might have to navigate through the results to find the right item. With the faceted offer search operation, the search engine processes the search query and returns relevant search results with facets and facet values depending on the facet configuration in Commerce Manager.
Faceting is arranging search results into categories based on the indexed terms. Solr returns the number of results for each facet value within each facet category, such as color, brand, or size. The shoppers use facets to refine the search results, and thus searchability on a commerce website improves.
For example, if the size and color attributes in a clothing store are facetable; when a shopper searches for shirts, the search engine returns shirts in all available sizes and colors. A shopper can refine the search results by selecting the required size or color. In this example size and color are facets and the options in each facet, such as large, small, blue, or red are the facet values. A variant of product corresponding to a specific SKU, such as a large blue shirt, large white shirt, or small blue shirt, represents an offer.
important
After configuring facets in Commerce Manager, the merchandiser must save the changes to enable facets in the storefront. If the merchandiser does not save the changes, storefront returns the search results without facets for a search query.
Example: Faceted Offer Search Results in Cortex
When you search for an item with the faceted offer search, the search engine returns search result to Cortex as in the following example:
{
"self": {
"type": "searches.offer-search-result",
"uri": "/searches/mobee/offers/qkugwzlzo5xxezdtuvqwy2lfn2uxaylhmuwxg2l2mwqtk=/filters/qgqka=/1",
"href": "http://api.elasticpath.net/cortex/searches/mobee/offers/qkugwzlzo5xxezdtuvqwy2lfn2uxaylhmuwxg2l2mwqtk=/filters/qgqka=/1"
},
"messages": [],
"links": [
{
"rel": "element",
"type": "offers.offer",
"uri": "/offers/mobee/qgqvbjlbnruwk3q=",
"href": "http://api.elasticpath.net/cortex/offers/mobee/qgqvbjlbnruwk3q="
},
{
"rel": "facets",
"rev": "offersearchresult",
"type": "searches.facets",
"uri": "/searches/mobee/offers/qkugwzlzo5xxezdtuvqwy2lfn2uxaylhmuwxg2l2mwqtk=/filters/qgqka=/facets",
"href": "http://api.elasticpath.net/cortex/searches/mobee/offers/qkugwzlzo5xxezdtuvqwy2lfn2uxaylhmuwxg2l2mwqtk=/filters/qgqka=/facets"
}
],
"pagination": {
"current": 1,
"page-size": 5,
"pages": 1,
"results": 1,
"results-on-page": 1
}
}
The search result consists of all items that represent each SKU associated with the product or product bundle with the available facets. The facets resource provides the available facets in the front-end to refine the search result.
Faceted Navigation
The facets appear on both search results pages and category pages. Shoppers can use the facets to refine the search results or the product or offer listing on category pages. For example, when a shopper selects a facet value, such as, a brand, all offers from the selected brand in the category appear.
When shoppers select values from more than one facet, all products in the category that meet the selected criteria are returned. As an example, when a shopper selects two different values from the same facet, such as $25-$50 and $50-$100 price ranges, all products in both price ranges are displayed. If the shopper selects two values from two different facets such as, price and brand, all products in both facets are displayed.
Example: Faceted navigation in Cortex
When you use faceted navigation in Cortex, the search engine returns the faceted navigation results to Cortex as in the following example:
{
"self": {
"type": "offersearches.offer-search-result",
"uri": "/offersearches/mobee/offers/qkwwgylumvtw64tzfvrw6zdfuvdwc3lfoouxaylhmuwxg2l2mwqtk=/filters/qgqka=/1",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offersearches/mobee/offers/qkwwgylumvtw64tzfvrw6zdfuvdwc3lfoouxaylhmuwxg2l2mwqtk=/filters/qgqka=/1"
},
"messages": [],
"links": [
{
"rel": "element",
"type": "offers.offer",
"uri": "/offers/mobee/qgqvbj2hjuytamrzgm=",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offers/mobee/qgqvbj2hjuytamrzgm="
},
{
"rel": "element",
"type": "offers.offer",
"uri": "/offers/mobee/qgqvbl3qnrqw45dtkzzvu33nmjuwk4y=",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offers/mobee/qgqvbl3qnrqw45dtkzzvu33nmjuwk4y="
},
{
"rel": "element",
"type": "offers.offer",
"uri": "/offers/mobee/qgqvbj2hjuztqobshe=",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offers/mobee/qgqvbj2hjuztqobshe="
},
{
"rel": "element",
"type": "offers.offer",
"uri": "/offers/mobee/qgqvbj2hjeytqmrzgm=",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offers/mobee/qgqvbj2hjeytqmrzgm="
},
{
"rel": "element",
"type": "offers.offer",
"uri": "/offers/mobee/qgqvbj2hjezdsojthe=",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offers/mobee/qgqvbj2hjezdsojthe="
},
{
"rel": "next",
"type": "offersearches.offer-search-result",
"uri": "/offersearches/mobee/offers/qkwwgylumvtw64tzfvrw6zdfuvdwc3lfoouxaylhmuwxg2l2mwqtk=/filters/qgqka=/2",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offersearches/mobee/offers/qkwwgylumvtw64tzfvrw6zdfuvdwc3lfoouxaylhmuwxg2l2mwqtk=/filters/qgqka=/2"
},
{
"rel": "facets",
"rev": "offersearchresult",
"type": "offersearches.facets",
"uri": "/offersearches/mobee/offers/qkwwgylumvtw64tzfvrw6zdfuvdwc3lfoouxaylhmuwxg2l2mwqtk=/filters/qgqka=/facets",
"href": "http://bammbamm-1-facetedsearch.elasticpath.net:8080/cortex/offersearches/mobee/offers/qkwwgylumvtw64tzfvrw6zdfuvdwc3lfoouxaylhmuwxg2l2mwqtk=/filters/qgqka=/facets"
}
],
"pagination": {
"current": 1,
"page-size": 5,
"pages": 2,
"results": 7,
"results-on-page": 5
}
}
Offer Lookup
With offer lookup, you can look for a specific offer by the offer code. If the offer is available in the catalog, the exact offer with that offer code is returned.
Batch Offer Lookup
With batch offer lookup, you can retrieve for multiple offers in one query using multiple offer codes. If the offers are available in the catalog, the exact offers with those offer codes are returned.
Multiple Facet Selection
The faceted offer search operation groups all similar SKUs and returns offers with facets
. This operation also provides the shoppers an option to select multiple facet values.
Depending on the facet value selections, the search engine uses an OR
or AND
operation to filter the search results for the facet values in the facets that are not selected.
Multiple Facet Value Selection Within the Same Facet
When a shopper selects multiple facet values within the same facet, the search engine:
Performs an
OR
operation on the search resultsReturns the search result corresponding to the selected facet values
Example Workflow
Scenario: An apparel store with brand, price, category, weight, and color facets and various facet values in each facet.
The shopper searches for the keyword shirt and search engine returns all shirts and available facets.
The shopper selects the white facet value in the Color facet.
The search results are filtered for the facet values in other facets, such as brand, price, category, to return only the white color shirts in those facets.
The shopper selects the Charcoal facet value in the Color facet Search engine filters the result to return all shirts in charcoal color.
All shirts in white or Charcoal color with the relevant facets applicable to the search result are returned.
In this example, when shopper searches for shirt, the the search engine returns 10 results. For white facet value, search engine filters the search result and returns only 2 results. The shopper selects Charcoal, and the search engine filters the search result again to return all 3 shirts in white or charcoal.
In this example, search engine first filters all facet values other than the facet values in the Color facet for the white color shirts and then filters this result for charcoal color shirts. The final search result consists of all white or charcoal shirts for all facet values other than the Color facet values. Search result for each selection is highlighted with a green ellipse.
Multiple Facet Value Selection in Multiple Facets
When a shopper selects facet values in multiple facets, the search engine:
Performs an
AND
operation on the search resultsReturns the search result applicable for the selected facet values
For more information about selecting facets, see the Facet Selector section. The search engine returns the offers corresponding to the selected facet values and the relevant facets for the search result.
Example Workflow
Scenario: An apparel store with brand, price, category, weight, and color facets and multiple facet values in each facet. The shopper selected white and Charcoal facet values in the Color facet and the search engine returned all shirts in white or charcoal as described in the Figure 1 workflow.
The shopper searches for the keyword shirt and search engine returns all shirts and available facets.
The shopper selects the white facet value in the Color facet.
The search results are filtered for the facet values in other facets, such as brand, price, category, to return only the white color shirts in those facets.
The shopper selects the Charcoal facet value in the Color facet Search engine filters the result to return all shirts in charcoal color.
All shirts in white or Charcoal color with the relevant facets applicable to the search result are returned.
The shopper selects Womens facet value in the Category facet.
The search engine filters the search result and returns the white or Charcoal shirts that are in the Womens category. Search result for each selection is highlighted with a green ellipse.