Best answer

Delay salesforce queries triggered from Zapier

  • 12 September 2022
  • 3 replies
  • 53 views

Userlevel 1

I have a setup on Zapier that triggers a query to Salesforce each time a user buy tickets from one of my applications. The flow goes as follows:  New user buys a ticket, then a webhook configuration sends the ticket information to Zapier and once zapier's got the data, it triggers a find query to salesforce which tries to find a record with the user's id/passport and if the record doesn't exist, it must then create a new record on SF and map the ticket information to that record & if the record exists already, then the system must just append the ticket information on the record in SF side.  The issue that I have is that if a new user that has no record on SalesForce buys more than one ticket on my application, SF's mapping only the last ticket information after creating the resource and the other tickets abort the SF mapping process yet they are supposed to just append one after the other under the recently created resource, my thinking is that this is happening because the find record query happens in one iteration regardless of the number of tickets purchased by the user, is there possibly a way to do async/delay checks of finding a record on salesforce for each ticket?   

icon

Best answer by MohSwellam 12 September 2022, 15:16

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +8

Hi @claytonsiby , 

 

What is the data structure coming from the Webhook? You might wanna use a Zapier Formatter step that converts the tickets into line items (this is a great resource for how to do that https://zapier.com/help/create/format/create-line-items-in-zaps) then add those line items in SalesForce? 

Userlevel 7
Badge +8

@claytonsiby checking in to see if @MohSwellam ‘s Formatter suggestion helped you with this particular workflow. Let us know if we need to dig any deeper! And thanks @MohSwellam !

Userlevel 1

@claytonsiby checking in to see if @MohSwellam ‘s Formatter suggestion helped you with this particular workflow. Let us know if we need to dig any deeper! And thanks @MohSwellam !

Yes, thanks a lot @MohSwellam. I didn’t even know about the Formatter; you saved my day 👍