Prefill form from a different MKTO instance | Community
Skip to main content
New Participant
February 9, 2021
Solved

Prefill form from a different MKTO instance

  • February 9, 2021
  • 1 reply
  • 1838 views

Our company was just acquired by another company. Our new parent company would like to send out an email to their Marketo database, but direct them to a form in our Marketo instance. Is it possible to prefill the form using their data on our form? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

If you loosen the definition of "pre-fill" then yes.

 

You can't do it with Marketo's native pre-fill (let's call that Form Pre-Fill™) which is defined as filling form fields on a page whose URL references a Marketo lead in the same database as the form. The only way to create such a link is to send an email from the same Marketo instance. Marketo will append the mkt_tok query parameter that points back to the lead. You can't create those links any other way, including in another Marketo instance.

 

Now, what you can do is simply embed lead data directly in the URL. Not a reference to the lead as mkt_tok does, but literally their info itself. You probably want to Base64-encode so it looks like an encrypted string to the average recipient.

 

For example:

?data=JTdCJTIyRmlyc3ROYW1lJTIyJTNBJTIyU2FuZHklMjIlMkMlMjJMYXN0TmFtZSUyMiUzQSUyMldoaXRlbWFuJTIyJTdE

 

That's the encoded form of the simple JSON:

{ "FirstName": "Sandy", "LastName": "Whiteman" }

 

And you can decode it on your form and use it to fill fields.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
February 9, 2021

If you loosen the definition of "pre-fill" then yes.

 

You can't do it with Marketo's native pre-fill (let's call that Form Pre-Fill™) which is defined as filling form fields on a page whose URL references a Marketo lead in the same database as the form. The only way to create such a link is to send an email from the same Marketo instance. Marketo will append the mkt_tok query parameter that points back to the lead. You can't create those links any other way, including in another Marketo instance.

 

Now, what you can do is simply embed lead data directly in the URL. Not a reference to the lead as mkt_tok does, but literally their info itself. You probably want to Base64-encode so it looks like an encrypted string to the average recipient.

 

For example:

?data=JTdCJTIyRmlyc3ROYW1lJTIyJTNBJTIyU2FuZHklMjIlMkMlMjJMYXN0TmFtZSUyMiUzQSUyMldoaXRlbWFuJTIyJTdE

 

That's the encoded form of the simple JSON:

{ "FirstName": "Sandy", "LastName": "Whiteman" }

 

And you can decode it on your form and use it to fill fields.

New Participant
February 9, 2021

Awesome. I will give this a try. Thanks @sanfordwhiteman!