SOLVED

Can I store code somewhere and call it in Marketo?

Go to solution
Highlighted
Level 2

Can I store code somewhere and call it in Marketo?

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Can I store code somewhere and call it in Marketo?

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.

View solution in original post

3 REPLIES 3

Re: Can I store code somewhere and call it in Marketo?

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. 

Level 2

Re: Can I store code somewhere and call it in Marketo?

Hey @SanfordWhiteman thanks for the assist again! And basically to use a webhook the actual code lives outside Marketo - do I have that right?

Re: Can I store code somewhere and call it in Marketo?

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.

View solution in original post