System Design Overview
There are basically three separate sub-systems in terms of functionality:
Two-Way Messaging
As a two-way SMS query system, this enables mobile users to access or query for information from your system. This enables you to support various scenarios where mobile users access text content or data from your system.
You can obtain two-way capability by using a shortcode from a network provider or a prefix on an already activated shortcode.
Reply messages going through the two-way system does not attract charges for the first response that is sent to the mobile subscriber.
Two options can be used to receive messages;
This system polls the SMSGH Content Servers periodically for incoming text messages. When a new message is received, it goes through a message pipeline where the tasks/projects you have created can subscribe and process the message. The reply is then delivered through our SMS gateway using an HTTP Request.
The polling mechanism uses standard HTTP/HTTPS protocol to ensure that it works behind firewalls and proxies. It can also be run on a system with a private IP Address. The main disadvantage of the polling mechanism is that replies will not be instantaneous; there is a significant delay before the response message can be sent out.
This option requires that you enable SMS Server’s built in a web server or use an external web server to receive new messages. Our SMS Content will send the contents of any message received and wait for the response before sending to the mobile user. The received message goes through the message pipeline for processing and the response message is sent as the HTTP response to the request that came from our server.
The SMS response delay in this method is shorter than in polling. The main disadvantage is that you will need to acquire an IP address that can be accessed from the internet.
One-way Messaging
The one-way system involves outgoing bulk messaging. The process involves obtaining from a data source and merging it with a pre-defined template or executing a custom python script. For example if an insurance company wishes for their system to automatically obtain insurance policies expiring a week today from a database and send them out, you can the obtain data from a database such as:
select name, policynumber,expirydate, premium from PolicyExpireView
where datediff(expirydate, getdate()) = 7
And merge the result against the template will deliver an SMS text message such as :
‘Dear #name#. Your policy number #field2# will expire on #field3#. The next premium payment will be #field4#. Please call XXXXX for more information on how you can quickly renew.’
To achieve this automation, you simply create a task as you will typically need to: