This is a great tip for Salesforce administrators that I read
about recently in one of my favorite blogs for Salesforce - Adminhero.com. Many times we encounter
requirements asking to alert users on the phone when something important
happens in the system. There are different ways to alert users on their mobile
-
- Salesforce1 push notifications and
in app notifications: If you have deployed Salesforce1 mobile app to
your users, they can be notified via the app. For example: Chatter
notifications which are a result of @Mention in posts can result in a push
notification to the user.
- Email notifications: Nowadays most
enterprise customers have provided their employees access to official mail
on mobile phones with appropriate security enabled. So sending email based
notifications can many times solve the user requirement. However be
mindful of sending too many emails as that reduces the effectiveness of
this tool.
- SMS or text alerts : This can be
appropriate if there are really highly important messages that need to be
sent to user's mobiles. We will talk about this approach below.
Most cell carriers in the USA have an email address format that can be used to send text alerts to a phone. For example if the phone to message is 8041234567 and the carrier is Verizon, the email address that can be used to send the text alert will be 8041234567@vtext.com. Similarly if the number is 8041234567 and the carrier is At&t, the email address will be 8041234567@txt.att.net.
So what we need is to capture the phone number and the cell carrier company of our users. This can be exposed as fields on the user interface. The cell carrier can be a picklist with dropdown choices showing options such as Verizon, At&t etc.
We can configure a workflow rule that populates a custom email address field on the User object with the email address that can be used to send the text message. For example, a formula that concatenates the phone number and carrier information would look like below -
IF(OR(ISNULL( MobilePhone ),ISNULL( TEXT(Cell_Carrier__c) )), '', MobilePhone + SUBSTITUTE( TEXT(Cell_Carrier__c) , 'Verizon', '@vtext.com') )
*** Above i just
used one substitute but we can expand it to add more Substitutes for other
carriers like At&t.
Once the User SMS email address field is populated, it can be copied over to a custom email address field on the object, on which we want our workflow for sending text messages to be based on. For ex: On Contact object, I created a custom Email address field with a default formula to get the $User.SMS_Email_Address__c and also if necessary a workflow to keep this field up to date. Now I have a email field on the object I need containing the 8041234567@vtext.com populated.
Once this is populated, we can configure simple workflow rules to send emails to this custom email address field.
Note: the email content should be short and appropriate for text
alerts.
Thats it, with a formula field and a couple of workflows, you can send text alerts to users. This is definitely a great hack that has been shared with us. I tested this out on my developer salesforce edition and it works great! Hope this helps you out!
Comments
Post a Comment