SMS notifications and alerts

Notifications and escalations generated by Rulemanager are an integral component of the Clarify/Dovetail system. Traditionally, email and in-application notifications are the most common notification delivery mechanisms. Digital pagers were popular years ago, but are pretty much non-existent today.


With mobile devices (iPhones, Windows Mobile, BlackBerrys, etc.) becoming almost ubiquitous, we can look to using these devices for notification delivery. And they all share a common communication platform – SMS. SMS (Short Message Service) is commonly referred to as text messaging.


So let’s look at how we can use SMS as a delivery mechanism.


A while back, I detailed how to use Twitter as a notification channel, and then use Twitter to send SMS messages.


If we don’t want to be coupled to a service like Twitter (which doesn’t have guaranteed delivery, SLAs, etc.), we can use a very similar process, but instead of Twitter, we’ll  communicate directly with a commercial Mobile messaging provider. In this case, we’ll use Clickatell.



Clickatell provides an SMS gateway. It is a paid service, but you can signup for free, and you get 10 free credits to test things out.


Clickatell provides multiple scripts and APIs for connecting to their gateway, including:

  • HTTP/S
  • FTP
  • SMTP
  • C#
  • PHP
  • SOAP


For this example, we’ll use HTTP.

Script to send an SMS message


First, we’ll create a simple script for sending a text message. I used JavaScript.


I named the script send-sms.js:


var arguments = WScript.Arguments;


var smsNumber = arguments(0);
var message = arguments(1);


var sUrl = “”;
var sAPI_ID = “xxxx”;
var sPassword = “xxxx”;
var sUsername = “xxxx”;


var sPostData = “api_id=” + sAPI_ID;
sPostData+= “&user=” + sUsername;
sPostData+= “&password=” + sPassword;
sPostData+= “&to=” + smsNumber;
sPostData+= “&text=” + message;


var oXMLHTTP = WScript.CreateObject(“Microsoft.XMLHTTP”);“POST”, sUrl, false);
oXMLHTTP.SetRequestHeader(“Content-Type”, “application/x-www-form-urlencoded”);


var sResult = oXMLHTTP.responseText;


The script takes 2 arguments: the SMS number to send to, and the message to be sent.


Notice the3 variables: s_API_ID, sPassword, sUsername. When you sign up with Clickatell, you’ll get your own unique API ID, username, and password. Simply replace the “xxxx” placeholders with your credentials.


From the command line, we call it like so:


cscript send-sms.js 15121234567 “hello, world”



As expected, the message is delivered to my mobile device – within a few seconds. Nice.



A Replacement Paging Application


Now that we have a script to send SMS messages, we need a replacement paging application for Rulemanager.


We’ll use a simple BAT file, named notifySMS.bat, that simply calls the send-sms script, with the appropriate parameters:


@echo off
REM How RuleManager calls this script:
REM     pagerApplication -p <pager_type> -t <employees pager number> -m <message to be sent> -e <employees email address>
REM How we need to call the send-sms.js script:
REM     cscript send-sms.js smsNumber message


cscript send-sms.js %4 %6



Then, we tell Rulemanager to use our new BAT file as the paging application:


<!–The full path to the pager application executable to use for the pager notification –>
<add key=”NotificationConfig.PagerApplicationPath” value=”notifySMS.bat” />



We’ll use the Clarify out of the box Text Pager notification preference. For this example, for the user annie, I simply set her preferences to always notify by Text Pager.




We also want to be sure that the pager number for annie is set:



Create a rule for testing


Object Type: Case
Rule Name/Description: Test rule – notify annie when a note is logged to a case
Start Events: Log Note
Cancel Events: None
Conditions: None
Action Title: Notify
Who to Notify: annie
Start Action: 0 minutes
From: Event Creation
Using: Elapsed Time
Repeat : Never


RE: Notification for [Object Type] [Object ID]


A note was logged to [Object Type] [Object ID]


[Object Type] Title: [Title]
Severity: [Severity]




Start the Dovetail RuleManager service, log a note to a case, and check the mobile device for a notification:

mobile phone with SMS message




I can also look at the Rulemanager log file and see exactly what happened:


RuleManager.Employee – Notification preference for User login “annie” and severity “High” determined to be “TextPagerNotification”.
RuleManager.EmployeePreferenceNotificationDealer – Notification type “TextPagerNotification” being created.
RuleManager.TextPagerNotification – User login “annie” was added to the Pager Notification (TextPagerNotification).
RuleManager.Notifier – Recipient User login “annie” was added to Notification type “TextPagerNotification”.
RuleManager.ProcessExecutor – Command to be executed: “”notifySMS.bat” -p SKY_WORD -t “15121234567” -m ” A note was logged to Case 74
Case Title: problem with a slurpee machine
Severity: Medium” -e “””


Clarify Rulemanager (Windows)


The same process and scripts work with the Clarify/Amdocs Rulemanager.


Simply set the custom paging application path to the notifySMS.bat file that we created earlier.



Start the Clarify Rulemanager service, log a note to a case, and the message is delivered to my mobile device – as expected.


I can also look at the Clarify Rulemanager log file and see exactly what happened:


Executing SHELL ‘C:\clarify\eFrontOffice11.5.0\ClarifyCRMServer\Rulemgr\notifySMS.bat -p SKY_WORD -t “15121234567” -m “RE: Notification for Case 93  A note was logged to Case 93 Case Title: problem with my vpn connection  Severity: High” -e “” &’

Clarify Rulemanager (UNIX)


If you’re running the Clarify Rulemanager on UNIX, the process is the same, except you would probably use a different language for the send-sms script (such as Java, Perl, PhP, Ruby, etc.)

Dovetail Mobile


We can easily tie this in with Dovetail Mobile by simply including the URL to the case within the business rule message:




RE: Notification for [Object Type] [Object ID]


A note was logged to [Object Type] [Object ID]


[Object Type] Title: [Title]
Severity: [Severity]




You can view this case here:[Object ID]


Here’s the SMS notification, showing a clickable URL:

mobile phone with SMS message


Now, as users get notifications on their mobile devices, they can click the link, log in to Dovetail Mobile, allowing the agent to view and work the case – all from their mobile device.


dovetail mobile screenshot







Combining SMS notifications and alerts with Dovetail Mobile allows IT help desk and support professionals to respond regardless of physical location. The world is getting flatter everyday.