User Guide

Please email training@callscripter.com for omissions or errors.
×
Menu

Message Queue Type 5 - Report (SMS - dynamic recipient)

 

Sending SMS messages to dynamically changing addresses

Those customers using a supported SMS provider that wish to use the Message Queue to send SMS messages (automated at certain times) with dynamic recipient (mobile number) addresses that can change from script run data, need to utilise an Email to SMS function.
 
2SMS provide this functionality.   The messages will need to be sent to the message queue table as message type 5 (report) with the delivery options set to send via email.
 
The report format must be as follows:
 
__________________________________________
id: 2SMS Username
password: 2SMS Password
message: enter message to send
007900913945
 
end
__________________________________________
 
The recipient mobile number must follow the message to send.  This can be a field from the script if required.
 
An example of this format created in the Report Designer:
 
 
 
If this report is emailed to an address of email@2sms.com, then all the data other than the message is stripped out and 2SMS relay the message to the nominated mobile number as specified in the body of the report.
 
Report options should be set up as follows:
 
 
 
The report ID should be noted and this is used in the database insert statement in the script.
 
EXAMPLE SQL:
 
if [MQUpdated] = '' –Thie stops it inserting more than once per session
BEGIN
Insert into tblMQs (
--first declare the column names in order
messageType, messagePriority, fromaddress, toAddresses, subject, messageText, queuedAt, nextSendTime, maxAttempts, disabled,reportID, sessionList, reference, Notes, GroupID)
 
VALUES
-- then add the values that will be inserted into each column heading, in same order so they match the column headings
 
('5', -- message type of 5 sends a report - the report should be set up in report designer and the report id used in the reportID column,
 '0', -- set a priority, 1 is normal 
 'messagequeue@callscripter.com', -- will store this value in the 'from address' column this mirrors report delivery options
'email@2sms.com', -- email2sms as toaddress - mirrors report delivery options
[Operative Name], -- subject can be set to some text to identify in future searches – here we use engineers name
'welfare sms insert', -- ignored as messagetext will be determined by report fields
 GETDATE(), -- set queued at to today's current date and time
 GETDATE(), -- set nextsendtime to today's current date and time
  '3', -- set maxattempts to 3
  'False', -- set disabled to False 
  '6', -- Set ReportID of report template to use
  [var_csSessionID], --set sessionlist to current session
  [var_csSessionID], --set reference to current session, can be something else if required - although this is used in the REPEAT (10) Function
  [Operative Number 1], --enter some notes - here we are storing the mobile number of engineer (recipient of SMS)
'1') -- set groupID to 1 - this is the agent group that will see the record in CallQueueHandler script ( if MQType = 6)