Beat Lowest Price by Percentage
From MediaSell
|
This script will beat the lowest price using Amazon.com pricing data for SAME OR BETTER CONDITION by 5%, with a $1.00 price floor. It can be run on any marketplace. (Replace A00000000000 with your Amazon ID.) myAmzID = "A00000000000";
price = item.basePrice;
discountRate = 0.05;
priceFloor = 1.00;
lowPrice = 0;
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 * (1 - discountRate);
if (price < priceFloor) price = priceFloor;
return price;
(Replace A00000000000 with your Amazon ID.) myAmzID = "A00000000000";
price = item.basePrice;
discountRate = 0.05;
priceFloor = 1.00;
lowPrice = 0;
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 * (1 - discountRate);
if (price < priceFloor) price = priceFloor;
return price;
(Replace A00000000000 with your Amazon ID.) myAmzID = "A00000000000";
price = item.basePrice;
discountRate = 0.05;
priceFloor = 1.00;
lowPrice = 0;
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 * (1 - discountRate);
if (price < priceFloor) price = priceFloor;
return price;
|

