SMS Magic supports two formats for sending and receiving text messages - (xxx) xxx-xxxx or 1xxxxxxxxxx . (Where 1 is the country code)


Sometimes, you may have stored the mobile numbers in various other formats which may result in incoming responses not getting attached to your related Contact or any other object.


We can easily create a new formula field which will auto update the number format in the  Salesforce standard format.


Please follow the steps mentioned in the video below - 


How to format mobile number using formula field


You just need to create a new formula field and add the following code (here you just need to replace Phone with the API name of any phone field you have) - 


IF( Phone <> null,

'('& MID(
(SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(  (Phone) , "(", ""), ")", ""), " ", ""), "-", ""), ".", "")) ,1, 3) &') '& MID(
(SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(  (Phone) , "(", ""), ")", ""), " ", ""), "-", ""), ".", "")) ,4,3)&'-'& MID( (
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(  (Phone) , "(", ""), ")", ""), " ", ""), "-", ""), ".", "")) ,7,4)
, "")



You can use this new field to send out messages and configure incoming look up settings for it as well (so that incoming response is attached to the respective record).