Sending templated messages
Use a template to send a message
Once you have successfully created a message template, you can use it to send messages through the Dashboard or Messaging API.
Sending templated messages through the Dashboard
Follow these steps to send a message using a predefined template:
- Navigate to _Messaging >> Messages >> Create Message _ on your dashboard.
- Provide the appropriate details in the next window.
- Include the recipient's phone number.
- Select the messaging stream you wish to use to send the message. Visit Using message streams for more information on the different Falu message streams.
- Select the message template you wish to use to compose your message.
For example, we use the
otp-docs-test
template in the above picture. - Input the template's model values.
For example, the
otp-docs-test
template requires an otp_Value, which, when given a value such as 99921, results in the message: "Your new test OTP code is: 99921".
Ensure you are familiar with your template's model values to define them properly. Refer to Template syntax for infoamtion regarding how Falu interprets a template's values.
- Select whether you want to send the message immediately or later.
Sending templated messages using the API
You can send a templated message using Falu's messaging API by making the following POST call:
For example, if we defined a template otp-docs-test
as follows:
We would send a message as: