Looking at the list of traditional CRM activities I always miss the SMS, being a common and effective type of communication between organizations and customers.
Sending SMS triggered by Microsoft Dynamics 365 events (e.g. Case created) used to be a developer’s task. You had to write Plugin or Custom Workflow Activity code to access the SMS provider web service and maintain it as endpoints sometime change.
With Flow you can integrate applications in a declarative manner so an event in one application will trigger an action in another application along with custom conditional logic and even wait capabilities (similar to Dynamics 365 internal Workflow Wait step).
In this post, I’ll walkthrough the process of setting up SMS sending without coding using Flow and Twilio (SMS provider).
- Prerequisites
Before advancing make sure you have the following:
a. Microsoft Dynamics 365 instance (trial will do)
b. Twilio account (trial will do – click +sign up in Twilio home page) - Setting up Twilio account
a. In your Twilio Account console, click ‘Get a number’ button under the build menu
b. In the dialog, choose the suggested number or select a different one.
c. Go to the Home tab and note the Account SID and Auth Token keys, you will need these later - Setting up Flow
a. Login to your Office 365 environment and click the Flow tile
b. In My Flows tab click the ‘+ Create from blank’
c. In the search box, type in Dynamics and from the results list select the ‘Dynamics 365 – When a record is created’ trigger
d. In the Organization Name select the name of your Dynamics 365 instance. In the entity name dropdown select the entity for which the Flow will listen
e. Click the ‘New Step’ button and then ‘Add an action’
f. Search and Select the Twilio – Send Text Message (SMS) action
g. Feed in a name for your Twilio account (for future Flows) and keys from your Twilio Home tab: Account SID goes into the Account ID box, Auth token goes to the Access Token box
h. Feed in the your Twilio assigned Phone number in the From Phone Number box. Feed the target phone number in the To phone number. Feed in the SMS text. Note you can map dynamic data from the Case record into the text or target phone number
i. Click ‘Create Flow’ and then ‘Done’
- Testing & Monitoring
a. In your Dynamics 365 create a new Case.
b. After a few seconds, you should get a SMS messagec. In Flow management console Click ‘Manage’
d. You can view your Flow, edit and deactivate it here. Clicking the i will show you the Flow instances details and running results
Implementation Notes
- It may take Flow some time to kick in. If you didn’t get an SMS message after creating the first Case, create another
- Twilio trial account will grant you a limited amount of SMS messages and each message will starts with ‘Sent from a Twilio Trial account’
- Twilio supports sending messages in these countries