When employees are notified as part of a business rule action, the notification method is determined by the employee's notification preference.
The default notification methods are:
Dovetail Rulemanager adds support for one additional option: SMS
An SMS notifications will send an SMS message to an employee's configured device, typically their mobile phone.
Dovetail Rulemanager uses Twilio (https://www.twilio.com) as an SMS provider.
You must have a Twilio account in order to use SMS notifications.
As of this writing, Twilio charges $1.00 per month for a phone number, and $0.0075 per SMS message sent.
For 1000 messages/month, the total monthly cost would be $8.50 ($1.00 for the phone number, plus $7.50 for 1000 messages).
More information is available at https://www.twilio.com/sms/pricing
1. Create a Twilio account (https://www.twilio.com)
2. Buy a phone number from Twilio
3. Retrieve your Account SID and Auth Token from the Programmable SMS page within Twilio. This information will get used later.
4. Configure SMS Responses
If an employee responds to an SMS message, we can define the message that they get back.
By default, nothing within Clarify/Dovetail happens with any messages that they send back, so we want to inform them of this.
Example:
The following image shows an example of:
We'll do this by some simple configuration within Twilio.
1. Create a new TwiML Bin
From the Developer Console, click on `TwiML Bin`, then the Plus icon to create a new one.
Set its friendly name to be SMS response - not accepted
Set the TWIML to be:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Message>Sorry - responses are not accepted. Not yet, anyway</Message>
</Response>
Click the `Create` button to save it.
2. Assign this response to your phone number
Twilio - All Products and Services - Phone Numbers
Click on the phone number you created.
Within the Messaging section:
Configure With --> WebHooks/TwiMl
A message comes in --> TwiMl - SMS response - not accepted
Click the Save button
Within the FChoice.RuleManager.WindowsService.exe.config file, configure Rulemanager with your Twilio information
<add key="Twilio.From" value="myTwilioPhoneNumberGoesHere" />
<add key="Twilio.AccountSid" value="myTwilioSidGoesHere" />
<add key="Twilio.AuthToken" value="myTwilioAuthTokenGoesHere" />
Example:
<add key="Twilio.From" value="512-123-4567" />
<add key="Twilio.AccountSid" value="ACdf864ac420dd4f87a533b4fe7d62d" />
<add key="Twilio.AuthToken" value="505416a718d0418dabd991cdd656da38" />
Rulemanager must be restarted after making changes to the FChoice.RuleManager.WindowsService.exe.config file.
By default, Rulemanager will use the employee's Pager number to send SMS messages.
By default, the label in the UI is "Pager", and this maps to the beeper field on the employee table (table_employee.beeper)
If you wish to use a different field on the employee table, you can do so by editing the Sms.EmployeeSmsField configuration setting within the FChoice.RuleManager.WindowsService.exe.config file.
Example:
<add key="Sms.EmployeeSmsField" value="x_cell_phone" />
To add SMS as a Notification option, simply edit the user-defined list named Notification Types, and add a new element titled SMS. Then refresh the application cache within Dovetail Agent.
To add SMS as a Notification option within the Clarify Client:
1. Edit form 707 (Employee - 2 of 2).
1. Edit form 721 (Preferences for).
1. Compile ClearBasic code modules for the following forms:
The ClearBasic code can be found at https://gist.github.com/gsherman/656a2c1e6aa48a5e06b98c1850ceb14f
If you already have existing CB code for these forms, merge the given code with your existing code.
When sending SMS messages, Twilio is very forgiving with the format of a phone number.
The following phone number formats have been tested and all work successfully:
More information is available at https://support.twilio.com
When sending a SMS message as a result of a business rule, Rulemanager will use the "Pager Message" from the business rule action for the message body.
If the Pager Message field is empty, then the regular "Message" will be used.
To test SMS Notifications:
Property |
Value |
Object Type |
Case |
Name |
Twilio SMS test rule |
Rule Set |
Test |
Start Event |
Log Note |
Condition |
Object ID = {the id of the test case you just created} |
Action title |
Notify with high urgency |
Notify with high urgency |
Message |
Start |
0 minutes from Event Creation using Elapsed Time |
Create Activity Log? |
True |
Notify - To |
{Your login name} |
To Urgency |
High |
Message |
RE: notification for case [Object ID] A note was logged to case [Object ID] This is the regular message |
Pager Message |
A note was logged to case [Object ID] This is the pager message |
See Also |
Next |