Skip to main content

Hi,

I’m adding order information to a database using zaps from Shipstation.

Because the triggers are different (new order / new line item) I can’t just add actions to the 1 zap.

I’m currently using delays to order the zaps, but it doesn’t always work. This is my current set up

ZAP 1

  • Trigger NEW ORDER
  • Action send order number (& details) to order table

ZAP 2

  • Trigger NEW LINE ITEM
  • Delay (wait 1 min)
  • Action send line details to line item table & link to order number (from zap 1)

I’ve read that adding a webhook to the end of zap 1 can trigger zap 2, but despite reading lots of articles, I can’t figure it out.

Could someone explain in dummy language / add a diagram of what I need to put where to get a webhook in zap 1 to just trigger zap 2?

 

I’d be very grateful!

Many thanks, Sarah

Hi @SarahMonkey 

What database app are you using in the Zaps? (e.g. Airtable)


Thanks for the reply Troy. Yes I am using Airtable! :-)

Also (if it helps) The reason I need a delay with the order lines, is if the order record hasn’t already been created, it just creates a duplicate order record with the same order number) …

 

Thanks for your time.


@SarahMonkey 

Give this a try…

 

Make sure you the a Link field to connect the 2 Tables in Airtable: https://support.airtable.com/hc/en-us/articles/206452848-How-to-link-records-in-Airtable

 

Zap 1 - Orders

  1. Trigger: ShipStation - New Order
  2. Action: Airtable - Create Record
    1. Table: Orders

NOTE: Make sure your Order ID is the Key left-most field in your Order table

 

Zap 2 - Items

  1. Trigger: ShipStation - Item Ordered (this should include the Order ID)
  2. Action: Delay - For (1 minute)
  3. Action: Airtable - Create Record (map the Order ID to the Link field for Order ID)
    1. Table: Items

 

Otherwise, please provide screenshots with how your Airtable Base Tables are configured along with how your Zap steps are currently configured, thanks.


Thank you, I’ll give that a go!


I’ve doubled checked and it is all set up as above - and linked correctly.

It works MOST of the time, but sometimes (some sort of delay somewhere) causes zap 2 to action before zap 1, causing duplicate order records.

The issue with the ORDER ID field in Airtable, is that despite it being linked, if ZAP 2 can not find an order record to link to (because it runs before zap 1) it creates a new record.

Then when zap 1 runs, it creates another record.

Ideally I’d set the ORDER ID field in airtable to not allow duplicates, however this isn’t possible.

So instead of depending on the delay feature, I thought it would work better if I could set it so Zap 2 ONLY runs after zap 1 has!

 

 


@SarahMonkey

Try adding a longer Delay to the Items Zap (e.g. 5 minutes) to give the Order Zap enough time to trigger and process.

Sounds like the ShipStation triggers are firing at different times, perhaps simultaneously, perhaps sequentially (order then items, items > order).

 

Otherwise, you’ll have to rework the Zap logic to add more steps to do more checks such as

Action: Airtable - Find/Create Record

Action: Filter

Action: Airtable - Update Record

 

The above logic would do the check for the Order record.

If the Order Zap processes first, then it would Create a new record and Filter out.

If the Item Zap processes first, then it would Create a new Order record, for which when the Order Zap triggers after would find then update the Order record.

 

NOTE: Both Zap triggers are listed as instant.

 


Ahh I hadn’t thought about it from that end.

So is there no way to use webhooks to at the end of zap 1 to trigger zap 2 then?


@SarahMonkey 

See my additional comments about about the Zap steps logic.

 

So is there no way to use webhooks to at the end of zap 1 to trigger zap 2 then?

Not in this case, since the data points you need come from different Zap triggers, so you can’t chain Zaps together.


Thanks for your time. I’ll try changing the delay.

Sarah


@SarahMonkey 

Another thing to check to better understand how the Zaps are processing is the Zap Runs history details which includes timestamps for when each Zap step runs: https://zapier.com/app/history/