Ok, so the best approach here will be to have 2 different zaps.
Zap A will move have a QBO trigger, go through your filters, and the last step will be a Code action. Zap B will have a "Catch Webhook" trigger and a ShipStation action. Let's go through them.
Zap A has a code step that takes input data. This'll be all of your SKUs separated by commas.
The code step will look something like this:
var skus = inputData.skus.split(',') // now it's an actual array
var otherZapUrl = 'https://zapier.com/catch/12345'
var lookupTable = {
1: 'New York',
2: 'Chicago',
3: 'Los Angeles'
}
skus.map(function(sku){
var payload = {
sku: lookupTable[sku] || 'default',
// other data you want to send along
// name: inputData.name
};
fetch(otherZapUrl, {method: 'POST', body: JSON.stringify(payload)});
})
return [{status: 'ok'}] // this is so the editor doesn't complain
Your second zap will catch the webhook and fill out the SS fields you expect. Hopefully that's straightforward.
As for what you need to do, you'll need to redo your lookup table in javascript (sorry) and replace the otherZapUrl
to that of the Zap B endpoint. Also, make sure you specify all of the data you want to pass onto SS in the code's inputData
object.
How's that look?