Ken
02/14/2024, 7:54 PMleo_ns
02/14/2024, 8:00 PMKen
02/14/2024, 8:01 PMClay Roper
02/14/2024, 8:01 PMKen
02/14/2024, 8:02 PMClay Roper
02/14/2024, 8:02 PMKen
02/14/2024, 8:03 PMfunction checkExistingOrder({ AmazonOrderId }) {
const searchObj = search.create({
type: "transaction",
filters: [
["numbertext", "is", `${AmazonOrderId}`],
"AND",
["poastext", "is", `${AmazonOrderId}`],
"AND",
["class", "anyof", `${sales_channel}`],
],
columns: [search.createColumn({ name: "entity", label: "Name" })],
});
const searchResult = searchObj.run().getRange({ start: 0, end: 1 });
if (searchResult.length > 0) {
return true;
}
return false;
}
leo_ns
02/14/2024, 8:04 PMKen
02/14/2024, 8:05 PMKen
02/14/2024, 8:05 PMClay Roper
02/14/2024, 8:05 PMtrue
when executing the RESTlet? Is the case just that sometimes, multiple calls to the RESTlet in quick succession will result in multiple SOs with the same PO number?Ken
02/14/2024, 8:06 PMClay Roper
02/14/2024, 8:06 PMKen
02/14/2024, 8:06 PMKen
02/14/2024, 8:07 PMKen
02/14/2024, 8:07 PMClay Roper
02/14/2024, 8:08 PMKen
02/14/2024, 8:09 PMClay Roper
02/14/2024, 8:10 PMKen
02/14/2024, 8:10 PMClay Roper
02/14/2024, 8:14 PMerictgrubaugh
02/14/2024, 8:46 PMKen
02/14/2024, 9:18 PMalien4u
02/14/2024, 10:25 PMerictgrubaugh
02/15/2024, 3:32 AMbattk
02/15/2024, 4:46 AMerictgrubaugh
02/15/2024, 2:56 PMIsrael Gonzalez
02/15/2024, 4:27 PMKen
02/15/2024, 7:53 PM