Throttle Web Hook Requests | Community
Skip to main content
February 17, 2017
Question

Throttle Web Hook Requests

  • February 17, 2017
  • 1 reply
  • 3097 views

Hi -

Hoping someone can provide a suggestion about how to throttle webhook requests. I'd like to invoke a one-time webhook call for each record in our database. The API I'm calling has a rate-limit of 10 requests per second, so I'm trying to find the best way to make the calls in small batches -- ideally in an automated way. Any suggestions?

Thanks in advance.

Peter

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Devraj_Grewal
Level 10
February 17, 2017

Peter,

There is no way to automate throttling in a single flow step, but instead of the regular "call webhook" flow step, you can use "request campaign" instead. Create another smart campaign triggered by "webhook is called" and that smart campaign's flow steps will be to "call webhook" as follows:

1. Call Webhook

Choice 1: If random sample is 5%

Default Choice: Do nothing

2. Remove from flow

Choice 1: If webhook was called

Default Choice: Do nothing

3. Call Webhook

Choice 1: If random sample is 5%

Default Choice: Do nothing

4. Remove from flow

Choice 1: If webhook was called

Default Choice: Do nothing

5. Call Webhook

At every "call webhook" step, only a certain small percentage of the leads will call the webhook and they will subsequently be removed from the flow so they do not call the webhook again. Repeat steps #3 and #4 as necessary depending on how small of a percentage you want to qualify each time. The last step (#5) will be to call the webhook for all remaining leads.

February 17, 2017

Thank you very much Devraj!

Devraj_Grewal
Level 10
February 17, 2017

Also make a note that in the "remove from flow" steps, leads will be removed if the webhook has ever been called, not just if the webhook was called in this smart campaign flow. If the webhook will only ever be called once for a lead, then the above flow will work.