Smart Campaign Trigger Consolidate Lead Information Before Calling Webhook

MaxwellOneTrust
Level 1

Smart Campaign Trigger Consolidate Lead Information Before Calling Webhook

I have a smart campaign that has 40 "data value changes" triggers associated to check for when one of my lead fields is changed, I want to call a webhook. The issue is, if multiple fields are changed, that webhook is called multiple times. Is there a way to consolidate all changes before calling my webhook? I already tried doing a batch/scheduler, but this option is not feasible because I can only run the scheduler once a day.

Tags (1)
3 REPLIES 3
Phillip_Wild
Level 10

Re: Smart Campaign Trigger Consolidate Lead Information Before Calling Webhook

This would be easier with a batch campaign as you mentioned if you don't need the info updated in real-time. Something like this would do what you want I think:

 

1. Batch campaign that runs daily, overnight. Filter is "data value changed", with any of the fields that are important to you. Unfortunately you might need 40 different filters since I don't think you can have multiple fields in that filter. You might even need to split it into two smart campaigns since I think Marketo has a limit of 20 filters per smart campaign.

2. The flow step for either campaign is to change a boolean field of something like "webhook_update" to be True.

3. Batch campaign which is based on webhook_update value being true. Run this an hour or so after the earlier smart campaigns have run to ensure it's all updated.

4. Flow step for that batch campaign is "request campaign".

5. Finally, a triggered smart campaign based on "campaign is requested" with the flow step of "call webhook", and then "change data value of webhook_update" to be False.

 

So effectively you will be marking certain people as needing an update based on an update to any of those 40 fields. Then you run a campaign to trigger a webhook for all of those people where that field is true. After the webhook has fired, you change it back to false. It's a bit complicated since you can only trigger webhooks from "campaign is requested" smart campaigns, but it should work. It will only run once per day and consolidate all of those changes.

 

Note that webhooks take a significant amount of time to run and if this is running thousands of people through daily you might run into some problems.

SanfordWhiteman
Level 10 - Community Moderator

Re: Smart Campaign Trigger Consolidate Lead Information Before Calling Webhook

Thousands aren't a problem, many tens of thousands perhaps.

SanfordWhiteman
Level 10 - Community Moderator

Re: Smart Campaign Trigger Consolidate Lead Information Before Calling Webhook

If you expect the values to change because of an activity like Filled Out Form or an API call, then do this:

 

  • trigger on that activity and use Change Data Value to write all the values at once to a Textarea, using a suitable delimiter of course
  • trigger on Data Value Changes to that Textarea field - which means one trigger for a net change to at least one field