Use cases
We don’t prescribe how you create your set of products, you can use any algorithm you desire. All we need is a list of product IDs. For example, use your own algorithm to generate:- Cross-sells.
- Related products.
- Checkout upsells.
Example API call
Request
Let’s assume we use some kind of algorithm to create a set of product IDs. We can then pass them to an auction request:- It will have a maximum of two winners due to the
slotsfield. - The
products.idsis the set of products. These need to exist in your catalog.
Adding custom quality scores
You may sometimes want to incorporate custom quality scores for each product. The quality score is a number between 0 and 1 that encodes the relevance of the participating products. The use of quality scores helps mitigate risks and losses due to non-relevant products winning auctions. To include custom quality scores in the request, modify theproducts field as shown below:
- Product
p_PJbnNhas a quality score of0.5. - Product
p_ojng4has a quality score of0.4. - Product
p_8VKDthas a quality score of0.7. - Product
p_Mfk15has a quality score of0.6.
Filtering by product attributes
You may want to restrict the auction further, to products with specific attributes. Add afilter field to do so:
- The
operatorisand, so an ad only participates if its product has both thebrand:nikeand thecolor:blackattributes. Useorinstead to keep ads matching any of the attributes. - The
attributesarekey:valuestrings. You can provide up to 5 of them.
products.ids, never instead of it. A bid needs to target one of the four products and match the attributes to have a chance of winning. Non-matching ads are removed before ranking, so they never win and are never charged.
Attribute filtering requires additional integration and configuration. Contact your Topsort representative to enable it.
Response
If bids targeting the products exist, they could win this auction. The resulting response would look something like this:- The type of the winners is
product, because we’re running a listings auction. - Both winning
idcorrespond to a product ID in the request. - There are two winners, the maximum that is allowed by the
slotsfield in the request.