SMS (Text Message) Notification
SMS (Text Message) Notification allows users to be notified by SMS (text message). This feature is made possible by installing a module (sms-notification) to the VizionHub and by using Amazon SNS Service. The module is responsible for periodically processing the Notification Queue and pushing the notifications that are assigned to sms-notification as text messages by using Amazon SNS service.
The sms-notification module can be installed by an Administrator or manually by a user.
Setting Up SMS Notification
In order to setup SMS Notification, complete the following steps:
1. Set Up an AWS Account
Customers need to set up or have credentials of an AWS SNS Account. This will be the account from which the text messages will be sent. There will be additional costs associated with this.
Log into AWS console
Create an IAM policy using SNSPublishSMSOnly.json
Create an IAM user and store credentials
Attach this new profile to the user
2. Set Up Field for Phone Number in a User Trackor Type
The Administrator sets up a field that stores the Phone Number for the user who will receive the notification. This field should be added to a User Trackor Type. Phone numbers should be stored with country code in this field. Examples are +1(999)888-1234 and 19998881234. Field Format Validation can be used to ensure the entered value is in this format.
3. Set Up a Module Account and Security Token
The Administrator sets up a dedicated account for running the module. The module account will need the privileges listed below. Make sure you validate the account's credentials by logging in.
WEB_SERVICES R
ADMIN_NOTIF_QUEUE RE
ADMIN_USERS R
ADMIN_MODULE_LOG RA
<User Trackor Type> R (discussed in step #2 above)
<User Trackor Type Tab containing phoneNumberField> R (discussed in step #2 above)
Now, the Administrator generates a security token specifically for the already created user. Record the Access Key and Secret Key which you will need to configure the module.
4. Create Notification Service
The Administrator creates a notification service from Admin Center->System Administration->Services page. Make sure the Service has a Name, ‘is Enabled’ and type is ‘Notification.' Other values from this panel are not applicable as they will be obtained from the settings file in the module.
5. Install and Configure Module
The Administrator installs the sms-notification module or users can install using VizionHub installing the latest version, currently this is 2.0.
The sms-notification module that gets installed should be configured by setting values in the installation step or directly in the settings.json file as follows:
ovUrl- OneVizion URL
ovAccessKey - OneVizion Login
(created in step #3 above)ovSecretKey - OneVizion Password
(created in step #3 above)serviceId - ID of the Notification Service
(created in step #4 above)phoneNumberField - The name of the field which contains the phone number of the rec
ipient. The recipient is a user Trackor related with User ID from the Notif Queue record.
(created in step #2 above)awsAccessKeyId - AWS Access Key ID
(created in step #1 above)awsSecretAccessKey - AWS Secret Access Key
(created in step #1 above)maxAttempts - The number of attempts to send SMS
nextAttemptDelay - The delay in seconds before the next SMS sending after an unsuccessful attempt
awsRegion - AWS Region.
(defaults to us-east-1, which is one of the SMS enabled regions in AWS)
6. Create SMS Notification
After completing steps 1 - 5, users can create notifications on the Notifications page and select SMS Notification as the Notif Service so that the notification is sent as a text message. For information on creating notifications, see Notifications.
Investigating SMS Issues
Below are a few things Administrators can check on if Text Messages are not being received.
Module Runs: Is the Service Running?
Select the installed sms-notification module and open the Runs tab. This opens a grid that shows all the runs of the current module. The ‘Schedule’ configured in step#5 dictates the frequency in which the module runs. The default is set to run every five minutes. For test purposes daily interval is configured, but ~5 minute or less for the interval is recommended based on the sms notifications load. If you don't see any entries here, contact OneVizion Support to make sure your service is running.
Clicking on the Status link (Executed with Errors) will provide more details. In the screenshot below, you can see that the Module failed to run because of invalid credentials in the settings.json file.
Module Logs: Check for Errors Module Run
For successful Module Runs (Status - Executed without Errors), the logs pertaining to that run can be accessed by selecting the run record and clicking on the Log in the right corner.
Notification Queues: Is My Notification Being Sent?
Administrators can access the Notification Queue page from Admin Center → Audits Logs menu. By filtering/searching on ‘Notif Service’ = “sms,” we can see the Queue Status and Error Message of the individual SMS notifications. In the screenshot below, a few SMS Notifications failed because the user(s) did not specify a phone number.