Match Lowest Price with 30% Maximum Discount from Base Price and Stay Above Cost

From MediaSell

Jump to: navigation, search

This script will change your price to match the lowest price on Amazon.com in SAME OR BETTER CONDITION, but not more than 30% under base price and not below cost:

(Replace A00000000000 with your Amazon ID.)

myAmzID = "A00000000000";   

price = item.basePrice;
cost = item.cost;
maxDiscount = 0.30;
lowPrice = 0;
minPrice = price * (1 - maxDiscount);

priceList = getPrices('sameOrBetter'); 

if (priceList) {
  for (pind=0; pind < priceList.length; pind++) {
    if (priceList[pind].sellerid == myAmzID) continue;
    lowPrice = priceList[pind].price;
    break;
  }
}
 
if (lowPrice > 0) price = lowPrice;

if (price < minPrice) price = minPrice;
if (cost && price < cost) price = cost;
 
return price;


This script will change your price to match the lowest price on Amazon.com in SAME CONDITION ONLY, but not more than 30% under base price and not below cost:

(Replace A00000000000 with your Amazon ID.)

myAmzID = "A00000000000";   

price = item.basePrice;
cost = item.cost;
maxDiscount = 0.30;
lowPrice = 0;
minPrice = price * (1 - maxDiscount);

priceList = getPrices(item.condition); 

if (priceList) {
  for (pind=0; pind < priceList.length; pind++) {
    if (priceList[pind].sellerid == myAmzID) continue;
    lowPrice = priceList[pind].price;
    break;
  }
}
 
if (lowPrice > 0) price = lowPrice;

if (price < minPrice) price = minPrice;
if (cost && price < cost) price = cost;
 
return price;


This script will change your price to match the lowest price on Amazon.com in ANY CONDITION, but not more than 30% under base price and not below cost:

(Replace A00000000000 with your Amazon ID.)

myAmzID = "A00000000000";   

price = item.basePrice;
cost = item.cost;
maxDiscount = 0.30;
lowPrice = 0;
minPrice = price * (1 - maxDiscount);

priceList = getPrices('all'); 

if (priceList) {
  for (pind=0; pind < priceList.length; pind++) {
    if (priceList[pind].sellerid == myAmzID) continue;
    lowPrice = priceList[pind].price;
    break;
  }
}
 
if (lowPrice > 0) price = lowPrice;

if (price < minPrice) price = minPrice;
if (cost && price < cost) price = cost;
 
return price;
Personal tools