Exclude SKUs that begin with a certain prefix from marketplaces

If you would like to prevent items that begin with a certain prefix from being sent to a marketplace, you can use this script, and replace the SKU (example will exclude SKUs that start with AAA from AbeBooks):

var item = FILLZ.ITEM.v1;
if (FILLZ.venue == 'abebooks') {
  var pat = /^AAA/i;
  if (pat.test(item.sku)) return 0;
}

If you would like to prevent items that start with several different SKU prefixes from being sent to a marketplace, you can use a script like this (example will exclude SKUs that start with AAA or BBB or CCC from AbeBooks):

var item = FILLZ.ITEM.v1;
if (FILLZ.venue == 'abebooks') {
  var pat = /^(AAA|BBB|CCC)/i;
  if (pat.test(item.sku)) return 0;
}

If you would like to prevent items that start with several different SKU prefixes from being sent to more than one marketplace, you can use a script like this (example will exclude SKUs that start with AAA or BBB or CCC from AbeBooks and Amazon):

var item = FILLZ.ITEM.v1;
if (FILLZ.venue == 'abebooks' || FILLZ.venue == 'amazon') {
  var pat = /^(AAA|BBB|CCC)/i;
  if (pat.test(item.sku)) return 0;
}
Have more questions? Submit a request