Control rules let you guarantee the validity and quality of messages prior to delivery: character display, SMS size, address format, etc.
A set of out-of-the-box rules lets you carry out usual checks. These checks (shown in bold in the interface) are:
It is possible to create new control rules to suit your needs. To do this, create a Control typology rule and enter the control formula in SQL in the Code tab.
Example:
In the following example, we are going to create a rule to prevent an SMS offer from being sent to more than 100 recipients. This rule will be linked to a campaign typology, then to the SMS deliveries for which the concerned offer is available.
Apply the following steps:
Create a Control typology rule. Select a Warning alert level.
In the Code tab, enter the script to apply the desired threshold, as shown below:
This script will trigger a warning if the delivery target exceeds 100 contacts:
if( delivery.FCP == false && delivery.properties.toDeliver > 100 ) { logWarning("Significant number of SMS to deliver (" + delivery.properties.toDeliver + "). Please make sure the target is correct.") return false; } return true
Link this rule to a campaign typology and reference the typology in the concerned SMS delivery.
During delivery analysis, the rule is applied and a warning is created if applicable.
However, the delivery will still be ready for sending.
If you increase the alert level, this will prevent the delivery from starting.
At the end of the analysis, the Confirm delivery button will not be available.