<img height="1" width="1" style="display:none" src="https://q.quora.com/_/ad/ad9bc6b5b2de42fb9d7cd993ebb80066/pixel?tag=ViewContent&amp;noscript=1">

Boost and bury rules

Using our boost and bury functionality, you can apply your business logic and have specific brands and/or products rank higher or lower in search results and category listings.

 

Loop54 can incorporate business logic in the relevancy calculation of the search results. Essentially, weaving in automatic merchandising in the search algorithm.
 
What we do, mathematically, is influence the probability that a product will be sampled through our random sampling. The end result of this will be that a product that has qualified (with what ever rule) will score higher/lower, and rank higher/lower than an otherwise statistically identical product.
Boost_And_Bury_Rules.png
Instead of manually making sure specific new products and/or sale products rank higher/lower for certain search queries, we take a different approach. We apply rules based on product data to influence how results are sorted overall. In doing so, we make sure to show the most relevant results without the manual hassle this usually entails.
 
We can work off of any data that is in the product feed, for example, see product 11 and 14 in the example product feed
 
For the products below, we could identify that it has data in the "Campaigns" attribute and boost the relevancy by 50%, for example. Or we could calculate the difference between the "OrgPrice" and "Price" to determine if it is on sale or not, and use that information instead. 
 
Code examples
SHOW INSTRUCTIONS FOR: JSON

{
    "Id": "11",
    		"Title": "Organic Chicken breast",
			"Category": "Meat",
			"SubCategory": "Bird",
			"Manufacturer": "Happy birds",
			"Contents": "Meat from chicken",
			"Description": "Chicken is the most common type of poultry in the world. In developed countries, chickens are usually subject to intensive farming methods.",
			"Organic": true,
			"ImageUrl": "http://www.loop54.com/hubfs/demo_images/organicchickenbreast.jpg",
			"OrgPrice": 65,
			"Price": 55,
			"Campaigns":["Sale", "Organic sale"]
}
This product has a boolean, "IsNew". We can use that as well.

{
    "Id": "14",
    		"Title": "Powdered sugar",
			"Category": "Pantry",
			"SubCategory": "Sugar",
			"Manufacturer": "Sweet Home Alabama",
			"Contents": "Ground sugar from sugar cane",
			"Description": "Sugar is the generalized name for sweet, short-chain, soluble carbohydrates, many of which are used in food. They are carbohydrates, composed of carbon, hydrogen, and oxygen. There are various types of sugar derived from different sources. Simple sugars are called monosaccharides and include glucose (also known as dextrose), fructose and galactose. The table or granulated sugar most customarily used as food is sucrose, a disaccharide. (In the body, sucrose hydrolyses into fructose and glucose.) Other disaccharides include maltose and lactose. Longer chains of sugars are called oligosaccharides. Chemically-different substances may also have a sweet taste, but are not classified as sugars. Some are used as lower-calorie food substitutes for sugar described as artificial sweeteners.",
			"Organic": false,
			"ImageUrl": "http://www.loop54.com/hubfs/demo_images/powderedsugar.jpg",
			"OrgPrice": 11,
			"Price": 11,
			"IsNew": true
}
Below is an example of a request - response cycle of an category listing request request.
POST to  http://helloworld.54proxy.com/productsincategory
{
    "UserId" : "helloworlduser",
    "IP" : "127.0.0.1",

    "RequestEntity":{
        "EntityType":"Category",
        "ExternalId":"Fruit"
    },

    "ProductsInCategory_FromIndex" : 0,
    "ProductsInCategory_ToIndex" : 9,
}

Response: 200 OK
{
  "Success": true,
  "HeroId": "The Count with not enough Writing Sisters",
  "Data": {
    "ProductsInCategory": [
      {
        "Key": {
          "ExternalId": "1",
          "EntityType": "Product",
          "Attributes": {
            "Manufacturer": [
              "The banana company"
            ],
            "Category": [
              "Fruit"
            ],
            "Title": [
              "Banana"
            ],
            "SubCategory": [
              "Musaceae"
            ]
          }
        },
        "Value": 1
      },
      {
        "Key": {
          "ExternalId": "7",
          "EntityType": "Product",
          "Attributes": {
            "Manufacturer": [
              "The banana company"
            ],
            "Category": [
              "Fruit"
            ],
            "Title": [
              "Organic Apple"
            ],
            "SubCategory": [
              "Rosaceae"
            ]
          }
        },
        "Value": 0
      },
      {
        "Key": {
          "ExternalId": "3",
          "EntityType": "Product",
          "Attributes": {
            "Manufacturer": [
              "Fruits n Veggies"
            ],
            "Category": [
              "Fruit"
            ],
            "Title": [
              "Apple"
            ],
            "SubCategory": [
              "Rosaceae"
            ]
          }
        },
        "Value": 0
      },
      {
        "Key": {
          "ExternalId": "17",
          "EntityType": "Product",
          "Attributes": {
            "Manufacturer": [
              "Fruits n Veggies"
            ],
            "Category": [
              "Fruit"
            ],
            "Title": [
              "Orange"
            ],
            "SubCategory": [
              "Citrus"
            ]
          }
        },
        "Value": 0
      }
    ]
  }
}
Below is an example of a request - response cycle of an category listing request request.
Request loopRequest = new Request("ProductsInCategory",request,response);
loopRequest.setValue("RequestEntity", new Entity("Category",request.getParameterValues("category")[0]));
loopRequest.setValue("ProductsInCategory_FromIndex", 0);
loopRequest.setValue("ProductsInCategory_ToIndex", 9);
Response loopResponse = RequestHandling.getResponse("http://helloworld.54proxy.com", loopRequest);
if (loopResponse.success)
{
    if(loopResponse.hasData("ProductsInCategory"))
    {
        ArrayList results = loopResponse.getItemArray("ProductsInCategory");
        if(results.isEmpty())
            response.getWriter().print("There were no items in this category.");

        for(Item resultItem: loopResponse.getItemArray("ProductsInCategory"))
        {
            String productId = ((Entity)resultItem.key).externalId;
            String productTitle = ((Entity)resultItem.key).getAttribute("Title").firstValue();
            response.getWriter().print(productId + " " + productTitle); //render a product on the category listing page
        }
    }
}
else
{
    response.getWriter().print("ERROR: " + loopResponse.requestId); //keep track of unsuccessful requests
}
Below is an example of a request - response cycle of an category listing request request.
var request = new Loop54.Request("ProductsInCategory");
request.SetValue("RequestEntity", new Loop54.Model.Entity("Category", Request.QueryString["category"]));
request.SetValue("ProductsInCategory_FromIndex", 0);
request.SetValue("ProductsInCategory_ToIndex", 9);
var response = Loop54.RequestHandling.GetResponse("http://helloworld.54proxy.com", request);

if (response.Success)
{
    var results = response.GetValue<List<Item<Entity>>>("ProductsInCategory");
    if (!results.Any())
        Response.Write("There were no items in this category.");

    foreach (var resultItem in results)
    {
        var productId = resultItem.Key.ExternalId;
        var productTitle = resultItem.Key.Attributes["Title"].FirstOrDefault() as string;
        Response.Write(productId + " " + productTitle + Environment.NewLine); //render a product on the category listing page
    }
}
else
{
    Response.Write("ERROR: " + response.RequestId + Environment.NewLine);
}
We can also boost on other information, as long as it is in the feed. Certain brands/manufacturers, profit or any information that would make you want to show the product higher up or lower down in the results. Steps to achieve this:
  • Add information to the feed
  • Notify Loop54 to let us know you want to add a new rule (just chat us or email support@loop54.com)
  • Evaluate the results

Remember that boost and bury rules can be added, removed or changed at any time.

Get started now!