This is an old revision of the document!
Our recurring payment system makes use of the idea of “batches of payments” in order to simplify payment processing and help catch mistakes before your clients bank accounts are debited.
The system is quite simple and rather well explained on our Manage Debit Batches section.
This is part of a series of example Rules to help explain what is possible with the rule editor.
In this example we want to send a notification text message to every client whenever a batch they are on is submitted. Since some clients are not happy receiving these messages, we are also going to add an extra custom field to each client with an option to not receive the messages.
To be simple, right at the top we’re going to make sure our messages only get sent out as the batch is submitted to the bank.
Add a statement at the top “Check if a basic test is true” and for the condition enter “$to_state” “is not equal to” “submitted”.
Inside that add a new statement “Stop executing this rule”. These top two statements will ensure that the rest of the rule is only run when batches are marked as submitted (when we want to send out the messages.)
Inside that we want to check that the client hasn’t been put on “Do not send”, so add a “Check if a client custom field value”. In the test fill in “Send batch notifications” “is not equal to” “Do not send”.
Finally we’re ready to add our SMS message.
Inside the check block add a Send SMS control (note the statement is only available once you have enabled a message gateway under Setup ⇒ Messaging ⇒ Text Messages.
Here is an example template:
“Hi $client→firstname, your payment for $payment→amount($payment→currency) has been scheduled for $payment→date→neat. If you have any queries please contact us on 082-111-1111. Regards, SnapBill.”. Once templating has run the messages come out something like: “Hi Josh, your payment for $15.50 has been scheduled for March 3rd. If you have any queries please contact us on 082-111-1111. Regards, SnapBill.”.