Trigger Templates
Trigger templates help you automatically generate trigger scripts without writing any code, or they can help you quickly get started with custom trigger scripts.
Triggers are small script files or stored procedures that run automatically when a message is received. A trigger can also run on failure or success. Find out how to create triggers here.
A trigger template can be used to generate VBScript, JavaScript, or SQL Script triggers. You can modify the script after generating it from a template. Find out how to write, customize, and test triggers here.
The following trigger templates are available in Auron Omni:
- Empty trigger
- Apply delivery reports
- Forward trigger
- Auto reply
- Retry / Failover
- Database query
- Web HTTP query
- SMPP server bind
- SMPP server acknowledge
- SMPP server forward delivery reports
- SMPP server assemble multipart SMS
Empty trigger
Supported languages: VBScript, JavaScript, SQL Script
This template creates the trigger definition and attaches an empty script file with the correct structure. You can extend this script in any way you need.
Apply delivery reports
Supported languages: VBScript, JavaScript
This template applies the delivery report status to its originating message. Create a new trigger from this template for every channel that should automatically apply delivery reports.
Delivery reports in Auron Omni are a type of SMS message. The delivery report contains the delivery status of the originating message. A delivery report and its originating message are linked by the message reference.
Multiple SMPP channels can be selected because multiple connections to the same provider can cause delivery reports to arrive on a different SMPP channel than the original SMS. This is not possible for GSM channels.
This trigger updates the message StatusID field to either DELIVERED or NOT DELIVERED.
| Input | Description |
| SMS Channel(s) | Delivery reports on these SMS channel(s) are matched with originating messages on these channel(s). |
Forward trigger
Supported languages: VBScript, JavaScript
Use this template to automatically forward messages to a different channel.
Use cases:
- Forward SMS to email
- Forward email to SMS
- Pickup file to SMS
- Pickup file to email
- Auto reply to email by forwarding IMAP or POP3 to SMTP
- Route SMPP messages over SMPP channels
The generated trigger script runs on an incoming message on the originating channel. It creates a new outgoing message on the destination channel.
These options can be specified in the forward trigger. Message fields are formatted using the placeholders below and applied to the new outgoing message:
| Input | Description |
| From channel | The originating channel |
| To channel | The destination channel |
| Forward delivery reports | If SMS delivery reports should also be forwarded |
| ToAddress | Recipient phone number or email address |
| CC | CC email addresses |
| BCC | BCC email addresses |
| Subject | Email subject |
| Body plain | SMS or email body |
| Body HTML | Email HTML body |
Message properties can be set to fixed values or built from the originating message using placeholders:
| Token | Original message type | Use |
| %FROMADDRESS% | SMS or email | Originator phone number or email address |
| %TOADDRESS% | SMS or email | Recipient phone number or email |
| %CCADDRESS% | CC address line | |
| %BCCADDRESS% | BCC address line | |
| %SUBJECT% | Subject | |
| %BODY% | SMS | Body |
| %BODYPLAINTEXT% | Plain text body | |
| %BODYHTML% | HTML body | |
| %FROMUSERNAME% | Username part of email address | |
| %PATH% | File | Full path |
| %FILENAME% | File | Filename without directory |
| %1STLINE% | File | First line |
| %2NDLINE% | File | Second line |
| %3RDLINE% | File | Third line |
| %2NDLINETOEOF% | File | Second line to end of file |
| %3NDLINETOEOF% | File | Third line to end of file |
| %4NDLINETOEOF% | File | Fourth line to end of file |
Auto reply
Supported languages: VBScript, JavaScript
Use the auto reply trigger to generate an automatic reply to an incoming SMS.
For automatic replies to email messages use the forward trigger.
| Input | Description |
| Channel | The channel on which this trigger runs |
| Body | The reply SMS body |
The body can be predefined or formatted using placeholders:
| Token | Use |
| %FROMADDRESS% | Originator phone number |
| %TOADDRESS% | Recipient phone number |
| %BODY% | Body |
Retry / Failover
Supported languages: VBScript, JavaScript
Use this trigger to automatically retry a message on the same channel or a different channel.
| Input | Description |
| Trigger channel | The channel to check |
| Retry channel | The channel to retry on |
| Max retries | The maximum number of retries for a message |
Database query
Supported languages: VBScript, JavaScript
Automatically replies with the enabled status of the channel named in the SMS or email message.
This template is intended as a starting point for triggers that query a database.
| Input | Description |
| Channel | The channel to check for received messages |
Web HTTP query
Supported languages: VBScript, JavaScript
Automatically replies with a random fortune from this link.
This template is intended as a starting point for triggers that query a web service.
| Input | Description |
| Channel | The channel to check for received messages |
SMPP server bind
Supported languages: VBScript, JavaScript
Use together with the SMPP Server channel. Find out how to set up a complete secure SMPP server here.
This template authenticates an incoming SMPP bind.
If all parameters are empty, the SMPP server allows all connections. Otherwise it uses a lookup table.
| Input | Description |
| Channel(s) | The SMPP Server channel(s) |
| Connection string | Database connection string |
| Lookup table | User table for authentication |
| System ID field | Login field |
| Password field | Password field |
SMPP server acknowledge
Supported languages: VBScript, JavaScript
Use together with the SMPP Server channel. Find out how to set up a complete secure SMPP server here.
This script accepts or rejects incoming SMS messages from SMPP clients.
If all fields are empty, all messages are accepted. If configured with a database, messages are only accepted when the client has sufficient credit.
| Input | Description |
| Channel(s) | SMPP Server channel(s) |
| Connection string | Database connection string |
| Lookup table | User table |
| System ID field | Login field |
| Credits field | Credit balance field |
SMPP server forward delivery reports
Supported languages: VBScript, JavaScript
Use together with the SMPP Server channel. Find out how to set up a complete secure SMPP server here.
This trigger forwards incoming delivery reports back to the SMPP client that sent the original message.
You typically need one trigger per delivery state: DELIVERED, NOT DELIVERED, and NO REPORT.
| Input | Description |
| Channel(s) | SMPP Server channel(s) |
| Status | DELIVERED, NOT DELIVERED, or NO REPORT |
SMPP server assemble multipart SMS
Supported languages: VBScript, JavaScript
Use together with the SMPP Server channel. Find out how to set up a complete secure SMPP server here.
This trigger automatically assembles multipart SMS messages. The SMPP server does not assemble them automatically so that credits can be tracked per message part.
It is useful when you need to process or forward full message content.
- You need to process full message text automatically
- You need to forward messages to an HTTP channel
| Input | Description |
| Channel(s) | SMPP Server channels |