Hi All,
My sales team would like a country code field. Ideally, I could have some kind of prefix on the phone field like this
I don't think that's possible so I am thinking of ways to populate this field.
1) Custom field on forms and ask the prospect to fill it in (not user-friendly)
2) Automation rule per country (this will use up many automation rules)
3) Engagement program (This will take a long time to set up and is there a rule on the number of steps in an engagement program?)
I know I can just ask them to look it up, but ideally this is automated.
What does everyone think?
Hey Alex, the behaviour of phone numbers on Salesforce is quite unique, as I noticed that it depends on your locale and can be saved as a number or string depending on the inclusion of any form of parentheses, dashes, and so on.
I am going to go on the assumption that you will not be using any third-party apps or integrations for this as you've only mentioned standard Pardot functionality ie custom fields, automation rules, and engagement programs.
And, since it is your sales team who needs this country code, I will also assume that this country phone code will need to be visible within Salesforce first and foremost.
(Option 1) Changing phone number to reflect country code
Steps:
> Set the sync behaviour for the Phone number field on Pardot to read from Salesforce
> Flow on Salesforce to check & populate Phone number field with country code
> Pardot phone number field will be updated accordingly
*Note that there may be possible issues if the prospect changes phone number via a Pardot form, as it will always be overwritten by the previous value on Salesforce 🥲 But, if your Sales team is more likely to change phone numbers on the CRM directly, this would be a better choice.
–
(Option 2) Having a separate country code field
> Set the sync behaviour for the Phone number field to read from Pardot
> Flow on Salesforce to check country & populate a new custom field country code with the relevant number
> (If needed) Create a new & separate phone number field that uses a formula to combine the country code with the phone number to get a complete phone number.
*Note that any change your Sales team makes on Salesforce CRM will be overwritten by the phone number stored in Pardot, but this method will allow for the prospect to change phone number via a Pardot form if this is a possible use case.
–
Additionally, I think that both these ways would require some form of validation to check that the phone number input into the Pardot form does not have the + or country phone code already appended to it to prevent it from being added unnecessarily to phone numbers. Here are some resources which you may be able to reference/reverse-engineer for this validation:
- How to validate Mobile Number with Country code followed by 10 digits
- Get country code from mobile number
I am curious to know which solution you'll end up going with, so if you could let me/us know that would be great. All the best and hope this helps!