Implementing automations might necessitate the use of JavaScript to extract customer phone numbers and names from every payload that satisfies the trigger condition originating from the selected source.
Example of SMS
This SMS Msisdn field will always have the below text as seen below in yellow
InputData.Phone.ToString()
InputData. and .ToString() stay constant
Phone will be a parameter in the payload of the external source
See an example of a payload:
{
"customerName": "Kira",
"emailAddress": "silversurfer@mailinator.com",
"Phone": "0825633259",
"toEmail": "kira.francis@ignitiongroup.co.za",
"fromEmail": "info@ignitiongroup.co.za",
"sms":"kira SMS11231",
"head1":"Head1",
"body1":"body1",
"body2":"body2",
"body3":"body3",
"body4":"body4",
"date":"23-01-24",
"amount":"299"
}
Watch out for capital letters in the field name
In another payload, the Phone field could be called 'CustomerNumber' or 'msisdn', in which your action would reflect the following: InputData.msisdn.ToString() or InputData.CustomerNumber.ToString()
The aim here is to use the Msisdn field as a variable path so we can send the SMS to many customers. If we had inserted a single number, then the SMS would send to that one number only.