SOLVED

Re: Update/Append Contact's Email Address from Marketo Form after creation from REST API.

Go to solution
Jeremy_Caverly
Level 2

Update/Append Contact's Email Address from Marketo Form after creation from REST API.

Flow of process as we've configured it:

  1. Lead/Contact comes to our website and submits a Mobile Phone Number [9091234567] in our web app
  2. We push that Mobile Phone Number & a Hash of it to a CreateOrUpdate API call for those two Fields in Marketo db [We follow with a Custom Activity API push for the action they just took on the web app into that same Record/LeadID]
  3. Contact is then redirected to a Marketo Landing Page with Marketo Form and asked for F_Name, L_Name and Email Address [Mobile Phone Number & Hash are included in URL Query String and captured on hidden Form Fields]
  4. Contact submits that Marketo Form and is shown a "Thank You" Marketo Landing Page

As I suspected, the Form submission is creating a new Contact Record because that is first time Marketo is getting an Email Address. We'd like this Form submission to Append/Update the same record we created on the API call in Steps #1 & #2 above.

Two solutions I was hoping to possibly work and looking for any guidance here:

  1. When Contact submits Mobile Phone Number in step #1 we also do a JavaScript Identify Lead push with a placeholder Email Address like 9091234567@email.invalid and then send them to the Marketo Landing Page, now with an identified Marketo cookie from the Identify js call.
    • If we did this, turned off "Auto Fill" on the Marketo Form for Email Address Field, would the Contact be able to "Update"/Change their own Email Address from 9091234567@email.invalid  to myREALemail@domain.net upon submitting the Form?
  2. We simply keep creating these "Duplicate" records and run a constant Smart Campaign in the background that de-dupes based on the Mobile Phone Number and/or the Hash we're capturing?
    • I don't even know if De-Duping can work in background like that or would we be manually having to do these from the Duplicates "report" that Marketo generates? Maybe Sanford Whiteman‌ has a cool tool that might work in that regard.
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Update/Append Contact's Email Address from Marketo Form after creation from REST API.

You're on the right track with #1 but not quite.

When you create the lead via API, use the mobile_number@email.invalid as the placeholder Email Address value as you indicate.

Include Email Address as a hidden field on the form. Fill it from the query string with the mobile_number@email.invalid.

Include another email field, SelfServiceEmailAddress (or whatever you want to call it) as a visible field on the form. Label it "Email" of course.

When the SelfServiceEmailAddress comes in via form fill, use Change Data Value to change Email Address to {{lead.SelfServiceEmailAddress}}.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Update/Append Contact's Email Address from Marketo Form after creation from REST API.

You're on the right track with #1 but not quite.

When you create the lead via API, use the mobile_number@email.invalid as the placeholder Email Address value as you indicate.

Include Email Address as a hidden field on the form. Fill it from the query string with the mobile_number@email.invalid.

Include another email field, SelfServiceEmailAddress (or whatever you want to call it) as a visible field on the form. Label it "Email" of course.

When the SelfServiceEmailAddress comes in via form fill, use Change Data Value to change Email Address to {{lead.SelfServiceEmailAddress}}.

Jeremy_Caverly
Level 2

Re: Update/Append Contact's Email Address from Marketo Form after creation from REST API.

Working like a charm! Is it risky that the hidden "real" email field is Required since a user could possibly get back to this page w/o the query string on their URL?

SanfordWhiteman
Level 10 - Community Moderator

Re: Update/Append Contact's Email Address from Marketo Form after creation from REST API.

You could fill it with the SelfServiceEmailAddress (using JS) if it's empty, if that's a worry.