Maximum price drop

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. If the price change is greater than 30% below your current price, your price will be set to 30% below current price. This script applies a price floor of Cost or $1, whichever is greater.

You can change the price floor from 1.00, or the 0.3 max discount in the script below, if desired.

var item = FILLZ.ITEM.v1;

// default price
var price = item.old_price;
// price floor
var floor = Math.max(item.cost, 1.00);
// max drop
var max_discount = 0.3;
var min_price = item.old_price * (1 - max_discount);
floor = Math.max(floor, min_price);

// 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
if (price < floor) {
  debug('applying floor: '+price+' -> '+floor);
  price = floor;
}
return price;  
Have more questions? Submit a request