Applying redirects - Bloomreach Experience - Open Source CMS

Applying redirects

Applying keyword redirect rules

Web admins can create keyword redirect rules in the Bloomreach Dashboard. If a keyword redirect rule applies to your search API request, then the response includes a keywordRedirect field.

keywordRedirect field in the response

keywordRedirect": {
    "redirected url": "www.example.com/stores?navid=redirect:stores",
    "original query": "Store Hours",
    "redirected query": "store hours"
},

 

Attribute

Description

original query The value of the request's q parameter.
redirected url The URL where your customer is redirected.
redirected query The query after Bloomreach processes the q parameter value. The redirect rule is executed on the redirected query value.

Example request and response

Here's an example product search API request for the keyword,  Store Hours:

Example request

GET
http://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8830241055597
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=Store%20Hours
&request_type=search
&rows=20
&start=0
&fl=pid,title,brand,price,sale_price,colors,sizes,thumb_image,price_range,sale_price_range
&q=Store%20Hours
&search_type=keyword

And here's the response, redirecting the Store Hours keyword to the Store Locator page: 

Example response

{
  "response": {
    "numFound": 1259,
    "start": 0,
    "docs": [
     ]
  },
  "facet_counts": {
  },
  "keywordRedirect": {
    "redirected url": "www.example.com/stores?navid=redirect:stores",
    "original query": "Store Hours",
    "redirected query": "stores"
  },
  "category_map": {
  },
  "sort_fields": [
     ]
}

The redirected URL in search responses can be either a full URL or a relative path, depending on your integration requirements. Redirected URLs are configured in the Bloomreach Dashboard.

Review your logic. We strongly recommend that you review your logic to process the API response. If a keywordRedirect rule is present, it must execute before any other special event, such as a redirect to null results page when numFound is 0. This sequence allows your merchandising team to redirect search terms that otherwise return zero results to a better landing page than the null results page.
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?