User Guide

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

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

 

Sending SMS messages via Message Queue without a TAP Gateway

 
Customer using supported SMS providers that wish to send SMS messages via the message queue to a static recipient address are able to add messages to the message queue as a type 5 (report).  This must be a single, static mobile number, which does not change dependant on script conditions.   If you wish to use dynamic addresses that change at script run time, then you must use Email to SMS functionality.
 
 
A plain text .txt report template must be created in CallScripter.
 
 
Report delivery options should be set to 'Send SMS' - the number that should be contacted should be entered into the  SMS Number box: 
 
 
Report format can be complied of a static text field updated to display your chosen message, or compiled from individual fields in the script you are adding it to.
 
 
 
Inside the script, a Database Get control will be used to insert the task into the message queue table using SQL.
 
EXAMPLE SQL:
 
 
if [MQUpdated] = ''  --some checks to stop multiple rows being inserted should the script page be hit more than once
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 reportID used in the reportID column,
 '0', -- set a priority, 1 is normal 
 'noreply@callscripter', -- Report needs a default from address, this will overwrite any set at report options
 'will use report defaults', -- the mobile number to send SMS to will be picked up from the send options in the report designer
 [CustomerName],  --subject can be set to some text to identify in future searches
 'This info will be replaced by fields in the report template', -- ignored as messagetext will be determined by report fields
 GETDATE(), -- set queued at to todays current date and time
 GETDATE(), -- set nextsendtime to todays current date and time
  '3', -- set maxattempts to 3
  'False', -- set disabled to False 
  '5', -- 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
    'Welfare SMS Message', -- enter some notes
'1') --enter some notes
 
select @@identity as returnval  --select the most recent inserted MQID back to the script in order to log against script field and stop it running multiple times
 
END