SMS/Text Message Solution User Guide 2-way SMS messaging with Microsoft Dynamics CRM 2011
Contents Contents... 2 Introduction... 3 Pre-requisite... 3 North52 Formula Manager... 3 How to handle replies and opt-out from your SMS messages... 4 1. Ensure your recipients can reply to your SMS messages... 4 2. Set up SMS forwarding for received SMS (Esendex account settings)... 5 3. Set up Do Not Bulks SMS Contact Method on the contact form... 6 4. Set up Formulas to process SMS reply... 8 Process SMS reply email to set Regarding the appropriate Contact... 8 Process SMS reply email to run the workflow and update Contact s Do not Bulk SMS preference.. 10 5. Testing it all works... 13 Keeping Mobile Number Formatting Consistent... 15 Importing Sample Solution and Formulae... 16 Import the SMS Extensions Solution... 16 Import the SMS Formulae... 18 Support... 20 Bulk SMS Guide: Contents 2
Introduction xrm Consultancy has partnered with North52 to bring you the ability to easily send bulk SMS messages and process replies to your messages. This functionality is available to you at no additional cost. North52 s product Formula Manager is a must-have solution for any Microsoft Dynamics CRM system it allows you to extend the capabilities of Microsoft Dynamics CRM very quickly without the need for expensive developer resources. This guide provides step-by-step instructions on how to set everything up to process replies to your SMS messages. To learn how to send Bulk SMS messages please refer to our Sending Bulk SMS guide download from: http://www.xrmconsultancy.com/sms-text-messaging-for-crm/ Pre-requisite This guide assumes your System Administrator has installed and configured the xrm Consultancy SMS Solution and given the appropriate security roles to users. If you encounter any errors trying to perform the actions outlined in this guide please consult your System Administrator. Please see the xrm Consultancy SMS Installation and User Guide for further information download from: http://www.xrmconsultancy.com/sms-text-messaging-for-crm/ North52 Formula Manager North52 s Formula Manager Solution needs to be installed and can be downloaded from www.north52.com. There is no cost for the Standard Edition which is sufficient to set up and send bulk SMS messages. Tip - Skip the detail and let me get going! If you would like to just get it all working with little effort you can skip to the last section Importing Sample Solution and Formulae on page 16 and get up and running within a few minutes. Bulk SMS Guide: Introduction 3
How to handle replies and opt-out from your SMS messages With a combination of our SMS Solution, Esendex s SMS to email function and North52 s Formula Manager it is easy to automate the process of handling replies and opt-outs from within Microsoft Dynamics CRM 2011. The example below shows you how to process opt-out requests but you can use the same method to trigger other automatic actions. We are going to outline how to set your environment up below. The basic process flow will be: a) Send contact SMS b) Contact replies to SMS c) SMS reply is forwarded to email address d) Email is Tracked in CRM e) North52 Formula is executed on the creation of any inbound emails from an email address containing @esendex f) The formula logic finds the contact with the associated SMS reply sets the regarding of the email and processes the workflow in our sample we find the contact with the associated SMS reply and update their Do not allow Bulk SMS contact preference to Do Not Allow Note this guide only covers replies to Contacts, it is possible to combine Leads into the process please contact us for further details on how to do this. 1. Ensure your recipients can reply to your SMS messages Firstly we need to ensure that recipients can reply to the SMS messages we send. For contacts to reply to your messages you must either include your SMS virtual number (contact Esendex support if this is not enabled in your account) in your outgoing messages or ensure that you do not use a Send Alias (the send alias allows you to put your company name as the sender rather than a number but means direct replies are not possible). 4
To check/remove your Send Alias open the SMS Configuration: (Settings > Solutions> SMS/Text Messaging from xrm Consultancy > Configuration > Open SMS Configuration Send Alias field on SMS Configuration page should be left blank unless you include your virtual number in outgoing messages: 2. Set up SMS forwarding for received SMS (Esendex account settings) Note: You may need to contact Esendex to get this feature activated. To process SMS replies you need to configure your Esendex account to forward SMS replies sent to your virtual number to an email address. For ease of set up we are going to use a standard CRM User account and Outlook tracking to do the integration but in a production environment we would set up a queue and the email router to handle the replies. Tip - set up a specific email address and Queue and use the Email Router to process incoming emails for a more automated setup. Contact us if you would like help setting this up. 5
Log on to your Esendex Account then navigate to Settings > Receiving > Email forwarding section. Set the email address where you want the received SMS message to go: 3. Set up Do Not Bulks SMS Contact Method on the contact form This is not mandatory but it is best practice to be able let your SMS recipients opt out from receiving future messages. Create a new field on the Contact entity to match the existing Contact Method options. Easiest way to do this is to navigate to a Contact > Open the form > Customize tab > Form Create a new Two Options field by clicking the New Field button at the bottom right of the form page. 6
Display Name: Do not allow Bulk SMS Name: new_donotbulksms Type: Two Options Edit the allowable values to be consistent with that other Contact Method options: Edit the No option to be Allow Edit the Yes option to be Do Not Allow Your Field should look like this: Click Save and Close. Drag the field from the Field Explorer and position it under the Do not allow Faxes field in the Contact Methods section Click Save and then Publish. Close the form window and go back to your Contact form window that was previously open. 7
Scroll down to the Contact Methods section and you should see your new field: 4. Set up Formulas to process SMS reply Tip you can either set up the formula manually (see below for details) or download and import the formulas (see section Importing Sample Solution and Formulae on page 16) Process SMS reply email to set Regarding the appropriate Contact To enable workflow actions that can be associated to the appropriate Contact we need to set the Regarding attribute of the received SMS reply email to the correct Contact record. We do this by matching the inbound SMS number with that of a Contact. Navigate to Settings > North52 > N52 Formula Manager Create a new Formula by clicking the New button and set the following properties: Name: leave default or rename to something more meaningful for you. E.g. SMS Reply - Update Bulk SMS preference Formula Type: Save To Current Record Mode: Server Side Event: Create Source Entity: E-mail Source Property: Sender Target Entity: E-mail Target Property: Regarding 8
Create your formula in the Formula Description area: Copy formula: if(indexof([email.sender], 'esendex', 0) > -1, SetRegardingLookup('contact', FindValue('contact', 'mobilephone', Substring([email.sender], 0, IndexOf([email.sender], '@',0)), 'contactid'), FindValue('contact', 'mobilephone', Substring([email.sender], 0, IndexOf([email.sender], '@',0)), 'fullname')), 'NoOp') Click Save and your formula is ready to test. 9
Process SMS reply email to run the workflow and update Contact s Do not Bulk SMS preference We need to create the workflow first. If you only want to process one type of reply your workflow would simply be a single action, however we have shown below how easy it is to set up your workflow to handle multiple reply types and have different business processes start. You could get as complex as you like with the workflow and even send automated SMS replies back to your contact. The workflow properties The workflow steps: The Update Contact properties: 10
Next we create a new Formula. Navigate to Settings > North52 > N52 Formula Manager, click the New button and set the following properties: Name: leave default or rename to something more meaningful for you Formula Type: Save Perform Action Mode: Server Side Event: Create Source Entity: E-mail Source Property: Subject Stage: Post-Operation Note: You will need to enable the advanced view to set the Stage parameter: 11
Bui Create your formula in the Formula Description area This formula executes a workflow for the email that is tracked in CRM (uses it s CRM record ID) and has a sender email address from esendex Copy formula: if((indexof([email.sender], 'esendex', 0) > -1, ExecuteWorkflow('SMS Response', [email.activityid]), 'NoOp') Click Save and your formula is ready to test. Note: The above formulas assume that you only have one contact with the matching incoming mobile number. Numbers must be formatted in an international format e.g. 447733262333 for this to work correctly. Formula Manager can enforce this formatting for all your existing contact records see the Keeping Mobile Number Formatting Consistent section on page 15. 12
5. Testing it all works Send yourself a SMS message File > New Activity > SMS Reply to the message with the word Stop You should receive a message in your Outlook in a few seconds Click Track in CRM from within Outlook 13
Tip for a more robust and automated setup you should create a CRM queue and use the E-mail Router to automatically have the inbound emails created and processed in CRM. Contact us if you want help setting this up. The Formula should execute as the email is tracked and created in CRM. It will set the Regarding field for the associated contact and then run the workflow to update the Do not bulk SMS contact method preference. Tracked message with set regarding the correct contact: Contact preferences are updated: Now when sending your future bulk SMS messages you should include a filter to exclude contacts where Do not allow Bulk SMS is equal to Do Not Allow 14
Keeping Mobile Number Formatting Consistent To ensure that you can send SMS messages and receive replies you need to ensure you have mobile numbers recorded in your CRM in the correct format. This can be achieved with a simple formula to enforce a format structure. To keep things simple we are going to require that mobile numbers are recorded in an international format of a between 11 and 15 numbers without a leading 0, e.g. 441212341234. If you wish you could make this +44 (0)12 1234 1234 (note if you do this your formula to manage replies would need to convert the sender number from 441212341234 format to +44 (0)12 1234 1234 to ensure an exact match with the mobile number recorded at the contact level please contact us if you would like help with this). Navigate to Settings > North52 > N52 Formula Manager Create another new Formula by clicking the New button and set the following properties: Name: leave default or rename to something more meaningful for you. E.g. SMS - Contact Mobile field validation Server Side Formula Type: Validation Mode: Server Side Event: Create & Update Source Entity: Contact Source Property: Mobile Number Build your formula: Copy formula: if(containsdata([contact.mobilephone]) and RegexIsMatch([contact.mobilephone], «^[1-9]{1}[0-9]{10,15}$»), 'NoOp', 'Mobile Phone should be in the international format without a leading 0, +, () or spaces e.g. 447712341234, to ensure SMS delivery and reply matching') Bulk SMS Guide: Keeping Mobile Number Formatting Consistent 15
Importing Sample Solution and Formulae We have in the previous sections outlined in detail how to set up sending bulk SMS messages and handle SMS replies, however if you just want to get going quickly without getting into the detail of what is going on under the hood follow these simple steps: 1. Download and unzip the SMSExtensionsSampleSolutionAndFormula.zip file from http://www.xrmconsultancy.com/storage/smsextensionssamplesolutionandformula.zip It contains: a. SMSExtensions_1_0_0_0.zip b. SMSExtensionsForumalae.zip 2. Import the SMSExtensions_1_0_0_0.zip Solution (this is an unmanaged solution so that you can modify things if you need to see section below for installation instructions), it contains: a. Do Not Bulk SMS attribute on the contact record b. Sample workflow for use with sending bulk messages c. Sample workflow for processing SMS Reponses 3. Import the SMS Formulae.zip file (see section below for instructions), this contains formulae to: a. Format mobile phone numbers in the international format: 441212341234 b. Process SMS reply emails track the reply against the relevant contact and start the SMS Reponses workflow 4. See sections 1. Ensure your recipients can reply to your SMS messages (page 4) and 2. Set up SMS forwarding for received SMS (Esendex account settings) (page 5) to ensure you can reply to messages 5. Set up your first bulk SMS schedule (see our separate guide on sending bulk SMS messages) to send some messages 6. Test! See section 5. Testing it all works on page 13 Import the SMS Extensions Solution a) Navigate to Settings > Solutions and click the Import button b) Locate the solution zip file downloaded from link above (SMSExtensionsSolution.zip) Bulk SMS Guide: Importing Sample Solution and Formulae 16
c) Review the solution information and click Next d) Leave the default Import Options and click Next e) After a successful import Publish All Customizations Bulk SMS Guide: Importing Sample Solution and Formulae 17
Import the SMS Formulae a) Navigate to Settings > North52 > N52 Formula and click the Import button b) Locate the formulae zip file downloaded from link above (SMSExtensionsFormulae.zip) c) Review File Upload Summary and click Next Bulk SMS Guide: Importing Sample Solution and Formulae 18
d) Select the N52Formula Data Map and click Next e) Review the Mapping Summary and click Next Bulk SMS Guide: Importing Sample Solution and Formulae 19
f) Review Setting and Import Data and click Submit g) The import process is asynchronous so might take a few minutes. You can review progress by going to Settings > System > System Jobs and reviewing the imports h) Once the import is completed you will see 3 formulas in the N52 Formula view. These are ready to be used/tested. Support Please contact support@xrmconsultancy.com if you have any questions. Bulk SMS Guide: Support 20