SOLVED

Add a delay step before a marketo form thank you page followup

Go to solution
Highlighted
Anonymous
Not applicable

Add a delay step before a marketo form thank you page followup

We have a scenario where we need to re-direct the users post a form submission to a specific URL but need to include a token value that is populated via a webhook

Here are the steps:

1.User sign ups to form

2.Webhook call is made and value is returned

3.Use that returned value in the thank you page URL

The issue is that there is a delay between the form submission and the webhook populating that value. Is there a way to add a delay step on the 'thank-you' page re-direct until this value is populated

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Add a delay step before a marketo form thank you page followup

In general, a Marketo form is not a safe entry point into an authenticated system. Think about it: anyone can fill out the form on behalf of anyone else.  Would you give me an account + auto-login token just because I filled in someone else's email (and I couldn't even prove I could receive an email at that address)?

Anyway, to complement what Rajesh is saying, while webhooks execute synchronously within a flow, they update lead fields asynchronously (the actual database update is "out-of-band"). And, of course, entering the flow itself is asynchronous relative to the form post, since the form post can't be blocked from completing.

There's a direct workaround, and that's periodically refreshing the Thank You page until you detect (with JS) that the token is filled in. That's not hard to do. But I'm wary of recommending that given my first point above.

View solution in original post

7 REPLIES 7
Highlighted
Anonymous
Not applicable

Re: Add a delay step before a marketo form thank you page followup

Hi Abdallah,

Webhooks are called by Marketo server separately (and independently) of 'web session' in which the user is filling the form. Also, even if it was possible, it will add a possibly long delay for the user to get the thank you page.

Thus if the value is being populated using a webhook, its probably not possible to show in the thank you page immediately.

Option 1:

May be send that value using a response email instead of the thank you page.

Option 2:

Instead of using a webhook, possibly use a AJAX call to get the value in a hidden form field on the form just before the form is submitted / or directly on the thank you page.

Here is an indirect example of such AJAX call

https://www.linkedin.com/pulse/marketo-tip-automatically-cap-registrations-any-form-part-mba-6104062...

Call me if you want to chat about it.

Rajesh Talele

Highlighted
Anonymous
Not applicable

Re: Add a delay step before a marketo form thank you page followup

Hi Rajesh,

Thanks. The actual webhook call executes pretty quick but the dealy is in getting the lead name into marketo. That seems to vary between few seconds to 1 minute.

The webhook call is generating a unique user token that we then want to use to auto-login the user in the product so it has be generated after the form is submitted. In other words, we can't populate a value pre to form submission.

Highlighted
Level 10 - Community Moderator

Re: Add a delay step before a marketo form thank you page followup

In general, a Marketo form is not a safe entry point into an authenticated system. Think about it: anyone can fill out the form on behalf of anyone else.  Would you give me an account + auto-login token just because I filled in someone else's email (and I couldn't even prove I could receive an email at that address)?

Anyway, to complement what Rajesh is saying, while webhooks execute synchronously within a flow, they update lead fields asynchronously (the actual database update is "out-of-band"). And, of course, entering the flow itself is asynchronous relative to the form post, since the form post can't be blocked from completing.

There's a direct workaround, and that's periodically refreshing the Thank You page until you detect (with JS) that the token is filled in. That's not hard to do. But I'm wary of recommending that given my first point above.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Add a delay step before a marketo form thank you page followup

Hi Sanford,

Thanks for the advice and the warning. We currently offer a free trial and the product team has resisted validating email to grant a trial. So our current process does auto-login anyone who signs up to a product straight away. We are moving this process (from the current API form) to work via marketo/webhook calsl (for various reasons). The team wants to keep the end user experience seamless and they believe that auto-logging into the product is more important.

Can you provide more details about your proposed solution. It sounds like it might be the best work around we have.

Thanks so much

Highlighted
Level 10 - Community Moderator

Re: Add a delay step before a marketo form thank you page followup

Can you provide more details about your proposed solution. It sounds like it might be the best work around we have.

A little script in the <head> that checks the token before redirecting:

<script>

if ( !'{{Lead.AutoLoginToken}}' ) {

  setTimeout(document.location.reload.bind(document.location),5000); // reload this page in 5 seconds to check again

  document.body.insertAdjacentHTML('beforeend','Generating your first-time token, please wait...');

} else {

document.location.href = '//yoursecuresite.example.com/?token={{Lead.AutoLoginToken}}';

}

</script>

Anonymous
Not applicable

Re: Add a delay step before a marketo form thank you page followup

This is great. So I am assuming we put that on a marketo thank-you page which then will re-direct them to a different page.

Thanks again.

Highlighted
Level 10 - Community Moderator

Re: Add a delay step before a marketo form thank you page followup

Right, it has to be a Marketo LP in order for the token to be output to the page.

You could also dress it up a bit so it adds more periods...... on subsequent reloads (to give the impression that work is happening).