Stay below ceiling

This script will change your price to MATCH the lowest offer in ANY CONDITION on Amazon.com. If there isn’t competition, the script will use your Base Price. This script applies a ceiling of $9999 and a price floor of Cost or $1, whichever is greater.

You can change the ceiling from 9999 and the price floor from 1.00 in the script below, if desired.

var item = FILLZ.ITEM.v1;

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

// match lowest price offer from amazon.com
var lowest = FILLZ.SOURCE.AMAZONUS.v2.offers().lowest_price_offer();
if (lowest) {
  debug('matching lowest price: '+lowest);
  price = lowest.price;
}

//apply price floor and ceiling
if (price > ceiling) price = ceiling;
if (price < floor) price = floor;
return price;
Have more questions? Submit a request