How to add results

Whenever the Pickzen interface is not enough to map your products with answers, you can use the Pickzen API to select them programmatically.

Say that based on specific conditions you want to recommend only these two products:

You can add products to the results by IDs or Alternative IDs. For example:

Extension.addResult('id', '30205004039', model, results);
Extension.addResult('sku', 'CLOETT', model, results);

Just enter this code in the JavaScript code to recommend products section on the end slide:

In this example, we are discarding the default recommended products and adding only those two. Apply this concept to your business needs writing your logic in JavaScript.

Last updated