Example match new buy box

(simple example filters: stay above floor, rating >= 90%)

If you would like to ONLY match the new buy box and not consider other offers, you can use the script below. This script will change your price to MATCH the NEW BUY BOX offer on Amazon.com. If there isn't a New Buy Box offer, the script will use your Base Price. This script applies a price floor of Cost or $1, whichever is greater.

You can change the price floor from ((1.00)) in the script below, if desired.

Example Code

// match new buy box

var item = FILLZ.ITEM.v1;

// default price
var price = item.base_price;
// price floor
var floor = Math.max(item.cost, ((1.00)) );

//match buy box if lower
var source = FILLZ.SOURCE.AMAZONUS.v2;
if (source.buy_box.new) {
  var bb_price = source.buy_box.new.price;
  if (bb_price < price) {
    debug('matching buy box: '+bb_price);
    price = bb_price;

//apply price floor
if (price < floor) price = floor;

return price;