Hi everyone,
I have a question for you all. So I have a promotion where we want only 1 person from a domain to receive a coupon code. So for example, person1@ABC.com fills out a form and gets their coupon. Then person 2 from @ABC.com attempts to fill out the same for for the same offer. What I'm trying to do is to block person 2 from @ABC.com from receiving the offer because Person1 already claimed it.
The idea I had was to create some custom code that took the email domain and put it on a list, then checked that list for each subsequent form submission to see if that email domain was already on said list. The challenge I'm having is that my developer team does not want to store this information outside Marketo.
So - does anyone know if there is a way to store this in Marketo and call this code to process when each person fills out a form?
Solved! Go to Solution.
Well, at the risk of being overly precise, the code must execute outside Marketo but need not be stored permanently outside Marketo. That is, you pass your logic to an external task runner which doesn't save anything, just runs and exits.
However the data must be stored outside Marketo, because that's how the different webhook executions can access the db of the already-used domains.
Is your Developer team concerned about security or just annoyance? The data doesn't sound super-sensitive.
In any case, you can't do this kind of cross-lead coordination thing without using a webhook, and we do it 10s of thousands of times a day across lots of instances.
Hey @SanfordWhiteman thanks for the assist again! And basically to use a webhook the actual code lives outside Marketo - do I have that right?
Well, at the risk of being overly precise, the code must execute outside Marketo but need not be stored permanently outside Marketo. That is, you pass your logic to an external task runner which doesn't save anything, just runs and exits.
However the data must be stored outside Marketo, because that's how the different webhook executions can access the db of the already-used domains.
Hey @SanfordWhiteman - Had a quick follow up to our thread here. Do you know if it's possible to have an API write to a static list?
For example, I was thinking that I could do it manually by updating the "Not Contains" field (see screenshot). I was wondering though if I could automate this? If so, how? Any ideas? As always the help here is appreciated.
A webhook response can't directly add someone to a static List, but it can certain trigger them being added to a List (by using the Webhook is Called trigger with a string match on the response, for example.
How would a List help you here, though?
The idea is to use that "Not Contains" value to filter people out who may fill out our form. I manually receive a list from a peer here of people to block (so it grows each week).
Now, ideally I'd like to automatically update that domain list. That's why I was asking if I could get a webhook to write to that "Not Contains" value. Does that make sense? Is that possible?