Data Cleansing - Remove Dashes '-' from Mobile Number Field | Community
Skip to main content
Jeremy_Caverly
New Participant
May 14, 2019
Solved

Data Cleansing - Remove Dashes '-' from Mobile Number Field

  • May 14, 2019
  • 1 reply
  • 4678 views

I want to standardize my Mobile Number field to just the 10-digit of the phone number.

Is there a way to use two different Smart Campaigns?

  1. IF Mobile Number Contains '-'  >> Write "wrong" data value to a second "To-Be-Cleaned Phone" Custom Field for cleaning
  2. WHEN "To-Be-Cleaned Phone" Custom Field changes to something >> Write that data, minus the dashes '-' back to the Mobile Number field

Marketo Support suggested I do this by exporting a list, making the corrections in Excel and then re-importing with email address as the de-dupe field. I need this to be automated to ensure a Webhook call can run properly that depends on this Mobile Number field as a token and the POST endpoint only accepts the 10-digit number.

Any ideas of a potential solution that I'm not even aware of?

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

The response also contains the E.164 version, which is unpunctuated except for the leading +.

If you must have the plus sign stripped then... well, check some of my posts from a couple of years back. 

1 reply

SanfordWhiteman
New Participant
May 14, 2019
Is there a way to use two different Smart Campaigns?
  1. IF Mobile Number Contains '-'  >> Write "wrong" data value to a second "To-Be-Cleaned Phone" Custom Field for cleaning
  2. WHEN "To-Be-Cleaned Phone" Custom Field changes to something >> Write that data, minus the dashes '-' back to the Mobile Number field

Yes, but you clearly need an initial webhook to cleanse the data.

You can call the Twilio Lookup API for that, or use a more robust service if you need other fixup.

Jeremy_Caverly
New Participant
May 14, 2019

Yeah, was actually trying to do the same thing with couple Smart Campaigns. Definitely can try to leverage the Twilio Lookup since we're already using Triggered Webhook's to Twilio for sending SMS messages.

However, it looks like Twilio's service is responding with US-Formatted structure of (555) 555-5555 ... that would still leave me with characters I don't want in my field. Am I just not seeing an option in the API call to them to return 10-digits ONLY? Or do you know of something else that might help me strip all but the numerical digits?

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
May 14, 2019

The response also contains the E.164 version, which is unpunctuated except for the leading +.

If you must have the plus sign stripped then... well, check some of my posts from a couple of years back.