SOLVED

Splitting data into two separate fields

Go to solution
Sarah_Way1
Level 2

Splitting data into two separate fields

Is it possible to split up a field's data into two separate fields?

We are creating a survey and asking for a preferred phone number (work, home or cell). In our CRM, we keep separate fields for the area codes, so each phone type has two separate fields (work area code, work phone number; home area code, home phone number; cell area code, cell phone number). 

We have found in the past that, for some reason, people get very confused when we list the two fields (area code and phone number) separately.

Is it possible to only add the phone number field (work, home or cell), and then split it into the two fields via Smart Campaign? Since the field would have 10 characters every time (3 for area code and 7 for phone number), is it possible to create a Smart Campaign that would take the first 3 characters and populate the area code field, and the last 7 characters and correctly populate the phone number field?

Thanks in advance!

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Splitting data into two separate fields

Only possible with a webhook; there's no built-in flow step.

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Splitting data into two separate fields

Only possible with a webhook; there's no built-in flow step.

Jason_Raisleger
Level 4

Re: Splitting data into two separate fields

Hi Sarah,

As Sanford stated, the best way to do this would be through a webhook. However, technically it is possible to do this as long as every phone number has the same 10 digit format with area code being the first 3 digits. I will lay out how you can do this so you can at least see the rationale, but it would take a while to setup - particularly if you have leads from outside of the United States.

1. Create a recurring batch smart campaign

2. Add filters of: Lead created in past 24 hours OR Data Value Changed for Mobile Phone (or whichever field you want to evaluate) in past 24 hours AND Mobile Phone (or whichever field you want to evaluate) is not empty

area-code-step-1.png

3. On the flow step, you would need to drag in the Change Data Value and add alot of choices becuase you will need to create a choice for each area code (full list of US area codes can be found here - https://www.allareacodes.com/area_code_listings_by_state.htm).

4. For the choices, you would have to look to see if Mobile Phone (or whichever field you want to evaluate) starts with a certain string and if it does, populate the area code field. For my example, I used the Fax Number as the field I wanted to populate.

area-codes-2.png

5. Schedule it run nightly (or whatever cadence you want - being mindful of system resources) and allow people to go through every time.

area-codes-3.pngarea codes 4.png

Again, this would take a while to initially build and could be a resource hog depending on how many people qualify on a daily basis but it can be done.

SanfordWhiteman
Level 10 - Community Moderator

Re: Splitting data into two separate fields

You left out

...and the last 7 characters and correctly populate the phone number field?

That's the other reason you need a webhook.

Jay_Jiang
Level 10

Re: Splitting data into two separate fields

... or using javascript to split it on the form into hidden fields before it enters marketo

Sarah_Way1
Level 2

Re: Splitting data into two separate fields

Thanks guys! I kind of figured it wouldn't be that easy. Thanks for the breakdown!