SOLVED

What is the reason why we cant use batch for hooks and send alerts?

Go to solution
Anonymous
Not applicable

What is the reason why we cant use batch for hooks and send alerts?

Hi All.

Does anyone know what the technical reason is why we cant use webhooks and send alerts in batch campaigns?

It's quite frustrating when trying to leverage the API in scheduled batches and cant use hooks or send alerts. Additionally, we cant activate trigger campaigns via the API so either way, I cant see a solution.

Is this technically impossible or is there an alternative way.

Thanks... and Merry Christmas

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: What is the reason why we cant use batch for hooks and send alerts?

Hey Matt,

You can use a batch that calls Request Campaign against a trigger -- as you probably know.

As I wrote on the Idea as well, the technical reason is the code is written to throw a 1000 error.

Quoting myself:

The conceptual reason is, I've long assumed, to dissuade people from creating truly massive webhook volume by accident. Obviously you can create a batch that calls Request Campaign against a trigger campaign and ends up trying to make a million webhook calls. But at least you had to know you were doing this. Of course it's also frustrating that, in having to turn Request Campaign, you're also not using the system optimally.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: What is the reason why we cant use batch for hooks and send alerts?

Hey Matt,

You can use a batch that calls Request Campaign against a trigger -- as you probably know.

As I wrote on the Idea as well, the technical reason is the code is written to throw a 1000 error.

Quoting myself:

The conceptual reason is, I've long assumed, to dissuade people from creating truly massive webhook volume by accident. Obviously you can create a batch that calls Request Campaign against a trigger campaign and ends up trying to make a million webhook calls. But at least you had to know you were doing this. Of course it's also frustrating that, in having to turn Request Campaign, you're also not using the system optimally.

Anonymous
Not applicable

Re: What is the reason why we cant use batch for hooks and send alerts?

Hi Sanford,

Hope you are well.

I'm trying to do something a little different where calling a trigger campaign won't work as I want to avoid any manual intervention, with the API performing the work.

I could call a trigger campaign outside of the cloned program that houses the batch campaign although I wanted to wrap up my.tokens from the original and package in a hook. Im not sure if that will work. I know an asset such as an email inherits tokens although not to sure about webhooks.

SanfordWhiteman
Level 10 - Community Moderator

Re: What is the reason why we cant use batch for hooks and send alerts?

The campaign that runs Call Webhook has access to the program-level {{my.tokens}} for that campaign's home program.

Automatically getting the tokens from another program that's at one remove from that home program isn't possible, as I think you and I played around with before. There has to be one canonical "home program."

There might be some insanity we could do with transplanting tokens from one place to another via API before calling the REST Request Campaign.  I'll have to think about the repercussions re: concurrency though.

Anonymous
Not applicable

Re: What is the reason why we cant use batch for hooks and send alerts?

Interesting.... Yes, I think that may work in a crazy way. Although I have a feeling if there are thousands of calls simultaneously we may run into issues.