Order of Operations

Anonymous
Not applicable

Order of Operations

We've come across the need (twice now) to implement some validation/formatting code after the submittal of a form (or as the last step before an email send). There does not seem to be a way to access that portion of the landing page (or email) code.

Our two biggest issues are:

Phone number formatting. We have Salesforce rules that say a phone number must be formatted such as (xxx)xxx-xxxx. The solution proposed here: http://community.marketo.com/MarketoArticle?id=kA050000000L3eqCAC is severly flawed in that, if a user adds their own dashes, the code cuts the phone number up to resemble: (xxx)-x-xx-xxx-x, which is even worse than no formatting at all. AND it does not account for auto-fill data saved in some browers.

We have custom code that worked on our own landing pages prior to Marketo that would format the number upon submittal of a form. We no longer have the means to implement that code to run a validation/formatting behind the scenes after the user clicks submit and prior to entering it into our lead database.

Additionally, we use tokens in our emails that are in integer form. Since Marketo integer fields do not accept commas (as Salesforce does), I thought a good workaround would be to put some code in our email template that would format the number once Marketo has submitted/sent the email and changed the token to an actual number (there was helpful code linked to here http://community.marketo.com/MarketoDiscussionDetail?id=90650000000PdJlAAK but I have nowhere to put it - it doesn't work if placed in the head tag).

In both situations I am wondering how do I access that final step (if it's even possible). What is Marketo's order of operations? These are two issues that have haunted our use of Marketo for months and we are at wits' end trying to come up with a solution. Any help is very much appreciated.
Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: Order of Operations

Hi Ryan:

For your first point, you can create custom JavaScript to achieve this before form submission. Here's an example you can tweak. Also some instructions might do wonders there. You could do an HTML5 placeholder with instructions (that is, create a grayed-out "(xxx) xxx-xxxx" in the field), and I imagine that could do wonders on decreasing your errors.

To address your second point about formatting integer tokens in emails, that solution doesn't work because JavaScript (on which that solution is based) doesn't work in emails. That isn't a Marketo-specific problem, that's an all-email-clients-everywhere problem. 

We can take a step back to the problem that you're having and try to find a different solution that takes less headache. What are you using the integers for? What's the context? Why are commas so necessary? Are these client-facing or internal?


Best,
Edward Unthank
Marketing Operations Specialist
Yesler
Anonymous
Not applicable

Re: Order of Operations

Thanks for the response Edward.

I will try your phone number suggestion. This is a major issue for us because it effects people all the way down the line and their ability to do a variety of things.

We need commas for client-facing emails that contain usage data. We would say something like "Hey, you've clicked 3333 things on our site" and think the un-comma'd integer looks tacky compared to "3,333." Yes, it's mostly  appearance thing, but it's still pretty high on our list of must-dos.