SOLVED

Re: Phone Number Format Webhook

Go to solution
Anonymous
Not applicable

Phone Number Format Webhook

Hell Marketo community,

I'm trying to format phone number field values for existing records (can't rely on Mask Input within Marketo Forms prior to Lead creation) by calling the following webhooks with support from Hoosh Marketing's (launchpoint partner) free Excel for Marketo webhook solution. Feel free to suggest an alternative approach if these webhooks or webhooks in general are not the best approach.

The first webhook below works successfully, but the second one fails. See the Response "Disallowed Key Characters".

1) Clean Phone Number: remove non-numeric charcters from the field value.

  • Sample Record Phone Number field value (pre-webhook being called): +12111123456
  • Webhook Payload Template:=text(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("{{lead.Phone Number}}"," ",""),"-",""),"%2B1",""),"%29",""),"%28",""),"*",""),".",""),"+",""),"(",""),")",""),"%",""),"2B",""),"0")
  • Payload: =text(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("%2B12111123456"," ",""),"-",""),"%2B1",""),"%29",""),"%28",""),"*",""),".",""),"+",""),"(",""),")",""),"%",""),"2B",""),"0")
  • Response: {"result":"2111123456"}

2) Format Phone Number: (XXX) XXX-XXXX

  • Sample Record Phone Number field value (pre-webhook being called): 2111123456
  • Webhook Payload Template: ="("&LEFT("2111123456",3)&") "&MID("2111123456",4,3)&"-"&MID("2111123456",7,4)
  • Response: Disallowed Key Characters LEFT("2111123456",3)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Phone Number Format Webhook

Gah, life's too short to even look at code like that. I have a headache now.

I recommend you check my response here: https://nation.marketo.com/message/145579#145672​ (last comment on page 1)

View solution in original post

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Phone Number Format Webhook

Gah, life's too short to even look at code like that. I have a headache now.

I recommend you check my response here: https://nation.marketo.com/message/145579#145672​ (last comment on page 1)

Anonymous
Not applicable

Re: Phone Number Format Webhook

Thanks, Sanford. Is FlowBoost an application of or a reference library to

use within munctions? To leverage FlowBoost, do we need to ask to have

munctions turned on before testing the sample script you provided? I don't

see any other discussions within the Marketo community about FlowBoost and

very few that even reference munctions. If you can point me in the right

direction I'd appreciate it.

Daniel​

<https://nation.marketo.com/?et=watches.email.thread> The Marketo Marketing

Nation Community <https://nation.marketo.com/?et=watches.email.thread>

Re: Phone Number Format Webhook

reply from Sanford Whiteman

<https://nation.marketo.com/people/63ea064b55e61d1184c4e1e1cc5ee59b25d3a3a1?et=watches.email.thread>

in Products - View the full discussion

<https://nation.marketo.com/message/150895?et=watches.email.thread#comment-150895>

SanfordWhiteman
Level 10 - Community Moderator

Re: Phone Number Format Webhook

Hi Daniel!

Munctions were promising, but are now discontinued, so any threads about them tend to meander into discussions of webhook-based alternatives. The Excel function simulator you tried is one, though I find its syntax unsuitable for all but the most basic tasks (this is not a hit on the service, as it also applies to Excel itself -- thus why VBA is preferred for Excel power users). Rajesh (who responded above) has another one, BrightHooks, which offers a built-in function for your phone number task, so give him a shout.

FlowBoost is way more than a set of data cleansing functions (though we do bundle some industry-standard libraries like Google's Phone Number validator). Rather, FB is a full-fledged scripting environment for use in Marketo Flows. Anything you can do with variables in JavaScript -- i.e. anything at all -- you can do w/FB. With the Pro version, you can perform almost magical things, like sorting leads by percentiles (think top 25% of leads by number of site visits) and getting deep insight into lead domains.

However, though it's been live for over a year for in-house clients (small to multinational, serving millions of requests per month) it's somewhat of a secret project from a commercial standpoint. As tech lead, I blog about new features over at http://blog.teknkl.com/tag/flowboost. But to get a trial key, you should hit up eunthank@etumos.com. I sometimes answer Community questions with ways you could do things in FlowBoost/JS, not because... okay, not only because!... I'm bigging up the service, but because that's literally the way I'd attack the problem if it were for our clients, rather than building a new app every time.

Anonymous
Not applicable

Re: Phone Number Format Webhook

Hey Sanford,

I'll reach out to Etumos to try out FlowBoost. It sounds like that is a more flexible and formalized product vs. Munctions. Much appreciated. Have a happy new year!

Daniel

Grégoire_Miche2
Level 10

Re: Phone Number Format Webhook

Hi Sanford,

I have still not figured out how and where we can access Flowboost

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Re: Phone Number Format Webhook

Sent you an email.

Anonymous
Not applicable

Re: Phone Number Format Webhook

Hi Daniel,

If you are still looking for solving this quickly, this web hook can be useful.

Web Hook Library

part of

DIY webhooks library for Marketo - Marketo LaunchPoint – Marketo LaunchPoint

If you need any help, access, please feel free to reach out.

Rajesh Talele