Trigger on incoming messages and state changes
With triggers, you can script what should happen when receiving a message or when a message reaches a certain status.
Triggers are incredibly versatile. Read more about how to write triggers and how to test them here. Read more about message states here.
For most common actions, Auron Omni includes ready-made scripts. Find a complete list of these trigger templates here.
To view triggers:
- Open the Auron Omni Manager.
- Click Triggers in the tree view on the left.
There are three types of triggers:
- JavaScript – Runs a custom JavaScript
- VBScript – Runs a custom Visual Basic Script
- SQL Script – Runs a custom SQL query or stored procedure
Creating a new trigger
You can create a new trigger by clicking New Trigger. This opens the trigger wizard.
The first page of the trigger wizard is the trigger selection screen. This is where you select the template to start with.
Empty triggers generate only the script skeleton. The other templates guide you through a few steps and generate a working script automatically.
This means that for most common use cases, no programming is required or only minimal adjustments are needed.
The following use cases can be set up using generated scripts:
- Automatically forwarding a message, for example SMS to E-mail, E-mail to SMS, or file to SMS
- Automatically replying to a message, optionally based on a web query or database query
- Applying delivery report status to the original message
- Authorizing logins on SMPP Server channels
- Subtracting credits for incoming SMPP Server messages
- Forwarding message delivery status to SMPP Server clients
Edit an existing trigger
A trigger has two parts:
- The trigger script
- The trigger condition
Find out more about how conditions work here.
Both can be edited and fine-tuned after the trigger is generated by the wizard. Clicking the Edit icon in the trigger view opens the trigger editor.
The dialog has two tabs. The first tab edits the trigger condition. The condition is a SQL expression that determines which messages will trigger the script.
The message type and message status are already part of the condition and do not need to be specified in the SQL expression.
The second tab depends on the trigger type and is either VBScript, JavaScript, or SQL Script.
VBScript and JavaScript triggers
This is where you can edit the script or select a different one. The Function specifies the function in the script that Auron Omni calls when the trigger condition matches.
The Support attachments check box is relevant when processing E-mail messages. If attachments are not needed in the trigger script, leave this unchecked to improve performance.
SQL triggers
With SQL triggers, the script is stored in the database instead of an external file.
Like VBScript and JavaScript triggers, SQL triggers can use message data already loaded into memory. Any message field you want to use can be prefixed with @fld to access it directly.
You can view available fields and insert them automatically using the Insert Field button.





