Retrieving chunk recommendations

What are chunks?

Chunks are distinct product categories available in the data model that allow you to identify the specific category for your product in the webshop. Having the correct product category ensures that relevant attributes are available and your product is discoverable.

For more information, refer to understanding the data model.

Chunk recommendations endpoint

The Get chunk recommendations endpoint allows you retrieve top three chunk recommendations for the specified product. Based on a machine learning model, this endpoint uses the Name and Description attributes to synchronously provide you the most suitable product category for your product.

You can use this endpoint to:

  • Verify if the current product classification category selected by you optimally suits your product.

  • Evaluate the suggested product classification category by bol.

Choosing the product classification category suggested by bol is not obligatory.

Retrieving chunk recommendations

To retrieve the chunk recommendations for your product:

  1. Specify the Name (title of a product) attribute and its value.

  2. Specify the Description attribute and its value.

    Providing the Description attribute is optional. Ensure to use the exact casing for the specified attributes to avoid validation errors.
  3. The response contains top three chunk recommendations for the specified product combined with the probability ratio of the recommended chunk.

An example of the response body is given below:

{
  "recommendations": [
    {
      "predictions": [
        {
          "chunkId": "80007268",
          "probability": 0.120168649
        },
        {
          "chunkId": "30007391",
          "probability": 0.115523033
        },
        {
          "chunkId": "80007269",
          "probability": 0.104380183
        }
      ]
    }
  ]
}

For more information, refer to the Redoc.

Understanding the probability ratio

The Get chunk recommendations endpoint not just provides information about specific product category for your product, but also informs about its probability. The probability ratio allows you to assess the likeliness of the chance that the recommended product category matches with the specified product. The higher the probability ratio, the more suited the product category for your product.

In the aformentioned example, chunk 80007268 has the highest probability amongst the other chunks hence is optimally suited for the product.