SOLVED

Block multiple entries with same email address

Go to solution
Exequiel_Carriz
Level 2

Block multiple entries with same email address

Hi community,

Just got a client that would like to limit the webform submission by email address. Unfortunately, our instance have a composite primary key (email + first name) and we cannot use the default dedupe by email from Marketo.

We had recent cases that people use same email address and different first name & last name and Marketo creates a new record…

I’m thinking if velocity scripts can query Marketo's database to check whether the email address already exist or not in a Marketo webform.

Do you guys have any thoughts on this?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Block multiple entries with same email address

We had recent cases that people use same email address and different first name & last name and Marketo creates a new record…

Well... that's what your instance's form dedupe key (not actually a "primary key" as it is not enforced as such at the database level) says it should do, no?

I’m thinking if velocity scripts can query Marketo's database to check whether the email address already exist or not in a Marketo webform.

Velocity tokens are used for custom email content based on person fields and custom object properties. They don't (can't) pre-process form fields, nor make permanent changes to person fields. (Webhooks, which can use JavaScript depending on the engine you choose, can make permanent changes to fields, FYI.)

It sounds to me like you've set up your instance in a way that specifically complicates this client's needs.

One workaround is as follows:

  • create a custom (String) field like First Name Proxy
  • on forms for this client, publish the First Name Proxy, not the standard First Name
  • add the standard First Name as a Hidden field with either an empty value or a constant like "N/A"
  • use the proxy field in tokens, etc.

This setup ensure that this client's leads implicitly dedupe on Email alone, since the other part of the compound key will have a constant value.

P.S. Another note: using JavaScript (and an intermediate gateway to handle authentication) in order to pre-process form fields is using the Marketo REST API might seem tempting.  But that's a non-starter as it creates a Denial of Service vulnerability.

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Block multiple entries with same email address

We had recent cases that people use same email address and different first name & last name and Marketo creates a new record…

Well... that's what your instance's form dedupe key (not actually a "primary key" as it is not enforced as such at the database level) says it should do, no?

I’m thinking if velocity scripts can query Marketo's database to check whether the email address already exist or not in a Marketo webform.

Velocity tokens are used for custom email content based on person fields and custom object properties. They don't (can't) pre-process form fields, nor make permanent changes to person fields. (Webhooks, which can use JavaScript depending on the engine you choose, can make permanent changes to fields, FYI.)

It sounds to me like you've set up your instance in a way that specifically complicates this client's needs.

One workaround is as follows:

  • create a custom (String) field like First Name Proxy
  • on forms for this client, publish the First Name Proxy, not the standard First Name
  • add the standard First Name as a Hidden field with either an empty value or a constant like "N/A"
  • use the proxy field in tokens, etc.

This setup ensure that this client's leads implicitly dedupe on Email alone, since the other part of the compound key will have a constant value.

P.S. Another note: using JavaScript (and an intermediate gateway to handle authentication) in order to pre-process form fields is using the Marketo REST API might seem tempting.  But that's a non-starter as it creates a Denial of Service vulnerability.