I want to collect the Country Code in a Contact List. Anyone found how to do that? | XM Community
Skip to main content
Solved

I want to collect the Country Code in a Contact List. Anyone found how to do that?

  • October 30, 2018
  • 8 replies
  • 419 views

M_Palko
I have a survey that uses a form to collect First Name, Last Name and Phone Number. I've added validation to the last field to be sure I receive all 10 digits. That information then populates a contact list that I want to use for SMS distribution of other surveys. However, when I try to send an SMS message to the individuals in that contact list, the messages fail because the phone number is missing the country code. When I manually add a "1" in front of the area code in the contact list, the message are successfully delivered. If I ask the survey participant to enter the "1" the validation fails because there are too many numbers. Is there a secret to getting the country code in the contact list automatically?

Best answer by bstrahin

Okay, sorry. I had forgotten how I set this up. The 1 is saved in the data of the survey. Look at the Survey Flow. You will see that I added an embedded data field to concatenate the 1 onto the phone field from the form. That embedded data field then gets called in your Contact List Trigger rather than the form question field.
View original

8 replies

bstrahin
Level 6 ●●●●●●
Forum|alt.badge.img+38
  • Level 6 ●●●●●●
  • 639 replies
  • October 30, 2018
Instead of passing the form field, you could pass an embedded data field that adds the 1 to the phone number. Survey Flow - Survey Block - Embedded Data, FormattedPhone = 1{piped code for phone field} - Contact list trigger set your phone variable to the embedded variable FormattedPhone field

M_Palko
  • Author
  • 4 replies
  • October 31, 2018
Thanks for the quick reply, Betsy! This certainly sounds like the solution, but I measure my experience with Qualtrics in weeks, not years. I've tried several things that I _think_ should make it work, but haven't been successful yet. It would be helpful to have a screenshot, more details or a link to some step-by-step instructions. Can you provide any of those? Appreciate your help!

bstrahin
Level 6 ●●●●●●
Forum|alt.badge.img+38
  • Level 6 ●●●●●●
  • 639 replies
  • October 31, 2018
@M_Palko here's the .qsf file that you can import into Qualtrics to see the test project I made to come up with the solution. Also attached is a screenshot of the Contact List Trigger in case that comes over weird in the other file.

M_Palko
  • Author
  • 4 replies
  • October 31, 2018
I was able to upload your sample and use it to add to my contact list, and I see the "1" in front of the number. But I don't see where the "1" lives. Is the "1" added in the form field in survey? Thanks for your patience in answering this.

bstrahin
Level 6 ●●●●●●
Forum|alt.badge.img+38
  • Level 6 ●●●●●●
  • 639 replies
  • October 31, 2018
The 1 will not show up in the form field or in the data from this survey. It only lives in the contact list that the form passes to. I assumed you were using a Contact List Trigger when you said > @M_Palko said: > That information then populates a contact list

M_Palko
  • Author
  • 4 replies
  • October 31, 2018
You're correct. I am using a Contact List Trigger to populate the contact list. I'm just not clear where to add 1{piped code for phone field} to make my survey work like yours.

bstrahin
Level 6 ●●●●●●
Forum|alt.badge.img+38
  • Level 6 ●●●●●●
  • 639 replies
  • Answer
  • October 31, 2018
Okay, sorry. I had forgotten how I set this up. The 1 is saved in the data of the survey. Look at the Survey Flow. You will see that I added an embedded data field to concatenate the 1 onto the phone field from the form. That embedded data field then gets called in your Contact List Trigger rather than the form question field.

M_Palko
  • Author
  • 4 replies
  • October 31, 2018
Success! I learned a TON, Betsy. Thanks so much of sharing your expertise.

Leave a Reply