How to dynamically set preferences on send
When automating or mass sending, it is sometimes necessary to dynamically set or change some send parameters. This task can also be solved by creating a new gateway, but this is not always convenient and can mislead managers who work with the CRM.
Let's imagine a situation where you have created a general gateway with the following parameters (we recommend doing just that):
- Sending - both (First on Viber, if not received, then SMS);
- Viber image - Your logo URL;
- Viber button - Contac US;
- Viber button URL - Your company contact page.
But let's say you want to make a robot that automatically sends notifications to a customer who hasn't paid for an order, that he can pay for it online and get a 5% discount and send this only to Viber. To do this, you can create a new gateway with these parameters:
- Sending - VIBER;
- Viber image - URL to the promo banner;
- Viber button - Pay now;
- Viber button URL - Link to pay.
But you can also change the settings dynamically by passing a special JSON in the message. Example:
- JSON must be correct and without errors, check it here - https://jsonformatter.curiousconcept.com/
- You must additionally pass the "MESSAGE" parameter, in which to place the message text;
- Please check before sending it!