This topic describes how to use Chat App Message Service flow editor to send OTP messages.
Background information
According to statistics by the end of 2023, WhatsApp has more than 2 billion active users worldwide, covering nearly 200 countries and regions. WhatsApp is not only limited to personal communication, but also widely used in commercial activities, becoming an important bridge between enterprises and consumers. In addition, because its account system is based on the characteristics of mobile phone numbers and can efficiently reach target users, many enterprises will give priority to WhatsApp when sending one-time passwords (OTP), notifications and marketing activities to global users.
However, many companies that have covered users in most countries around the world will find that users who send OTP messages through WhatsApp are not as effective as they would like.
There are two main core reasons:
First of all, although OTP messages, notification messages and marketing campaign messages are all messages sent to users through SMS, email or instant messaging applications, they are fundamentally different in terms of purpose, content and user expectations. For example, the purpose of OTP is to help users complete authentication, usually within 1 minute. Therefore, there are higher requirements for the accuracy and timeliness of message collection, and the criteria for judging the effect of touch are also very simple.
Second, while WhatsApp is hugely popular globally, its penetration varies significantly across countries. Mainstream instant messaging applications vary from country to country. This difference has led to WhatsApp not being the preferred instant messaging tool for users in some countries, thus affecting the reach of OTP messages.
In this way, when companies face a large number of users in various countries around the world, if they only choose to reach through WhatsApp, the effect is bound to be biased. To solve this problem, companies must achieve "where users are used to, where my news will go" and achieve full coverage of mainstream communication channels. However, how to identify and distinguish the massive mobile phone number? How do I send messages through multiple channels after differentiation?
Solution
Use the Alibaba Cloud Chat App Message Service Chat Flow to identify number ownership + multi-channel sending, and get it done quickly!
Chat App Message Service is an efficient messaging engine designed by Alibaba Cloud for enterprises to reach users. It can help enterprises easily use the Message Service of multiple overseas social media platforms, such as WhatsApp,Viber,Messenger,Instagram, and combine a wide range of message types to improve interactive experience. At the same time, To reduce operational barriers, we have integrated a workflow editor (Chat Flow) tool, allowing any employee within a business to quickly build interaction processes in a "low-code" manner.
Chat Flow is a large commercial canvas. On the left side of the canvas, we provide a variety of components, including message components, process flow components, AI components and marketing components. You can drag and drop these components to the canvas to implement the chat process through simple configuration, or quickly build a scene as workflow.
The functions of the Chat Flow are divided into four categories, namely, channel expansion dock, process expansion dock, AI expansion dock, marketing expansion dock. For more information, see Process editor features.
The characteristics of the Chat Flow can be divided into five, which are easy to operate, easy to maintain, high flexibility, deep integration, and wide application. For more information, see Process editor features.
User Guide
Scenario: You can use Viber to reach users in the Philippines, WhatsApp to reach users in Malaysia, and SMS to reach users in other countries.
Canvas orchestration flowchart:
The procedure can be roughly divided into five steps:
Configure the Set Variables node
Yes Chat App Message Service Console > Process Editor > Process Management. On the page that appears, click the Process Name whose Trigger Type is manual. On the canvas, click Start in the canvas. In the right-side pane, turn off Do Not Accept Incoming Variables. Take this scenario as an example. After you turn off Do not accept incoming variables, you need to enter the following variables: user mobile number (customerPhoneNumber) and verification code (verificationCode).
Create a branch in PH and ML
In the Component Library, select the Identify Phone Number component and drag it to the canvas. Turn on Enable Multi-Branch. If you want to use the region code, select Region Code. Select the international code of the target country in the lower branch, such as Philippines (PH), Malaysia (ML). Set the Output Code Variable Name parameter. This parameter can be used to call the variable in subsequent components.
Configure an else branch
Drag and drop the Send SMS component from the else branch. Set the ID of the sender and the phone number of the recipient. In this example, the customerPhoneNumber that is set in Start is selected. The Content Type of Message Content must be set to Verification Code. The message content is the text that is sent to the user. In this example, enter:
"Your one-time password is:{{verificationCode}} The password is valid for 10 minutes. Please do not tell anyone the password to avoid losses."
Where verificationCode is the name of the variable representing the CAPTCHA defined in the beginning. You can click Insert Variable to select a variable. The variable list is all available variables in the current component.
NoteThe significance of configuring the else branch first is that if exception conditions are required during the configuration of other branches, you need to jump to the bottom branch, that is, the else branch.
Configure a PH branch
Drag and drop the Send Viber Messages component to the PH branch, and configure the Send Settings, Message Settings, and Timeout Settings settings.
Sending settings: Select From/To for Action, select Transaction for Sending Message Type, select Service ID for Sending Type (viber business account), select the channel for sending messages for Sending Channel, and use the variable customerPhoneNumber defined in Start to represent the user's mobile phone number.
Message Settings: Set Message Type to Text and enter the text content to be delivered. In this scenario, for example, enter:
"Your one-time password is:{{verificationCode}} The password is valid for 10 minutes. Please do not tell anyone the password to avoid losses."
NoteWhere verificationCode is the name of the variable representing the CAPTCHA defined in the beginning.
Timeout setting: To ensure that users can receive OTP messages, you can set that an action will be triggered if it is not delivered or read by users within a specified period of time.
In this scenario, if a message is not delivered within 30 seconds, a WhatsApp message is sent. If the user does not read it within 60 seconds, the text message will be sent. perform the following steps:
30 seconds message does not arrive for WhatsApp message sending
The procedure can be divided into three steps
Drag the Send WhatsApp Message component to the Send Viber Message component of the PH branch.
Click the Send WhatsApp Message component. In the Send Settings -> Actions section on the right, select From/To, select Phone Number for Send Type, select a WABA channel for Sending Channel, select a verified number under WABA for Sending Number, and click Insert Variable for Recipient to select the user mobile number variable customerPhoneNumber defined in Start.
In the Message Settings section, set Message Type to Template Message, set Channel to the same channel as the sending channel, and set Template Message to the template to be sent. Templates need to be created in advance and approved by WhatsApp.
60 seconds message unread to send SMS
The procedure can be divided into two steps
Drag the Jump to Node component to the Send Viber Message component of the PH branch.
Click Jump to Node. On the Basic Configurations -> page, select Send SMS. Maximum number of redirects indicates the maximum number of times that the Jump component will be triggered. For example, if you enter 3, the Jump component will not be triggered when you enter the Jump component for the fourth time.
In the Send Viber Message -> Send WhatsApp Message component under the PH branch, WhatsApp also supports opening the undelivered and unread branches and setting the branches. In the current process, if WhatsApp messages are not delivered for 30 seconds, it will jump to the unified Send SMS under the else branch to send messages using SMS. Similar to the above steps, configuration may be made with reference to the above steps. You must specify the name of the jump component. You can customize the name of the jump component during process orchestration.
NoteWhen an OTP message is sent to a user in the Philippines, it is first sent via Viber. If Viber fails to send, it will immediately try to send via WhatsApp. If WhatsApp also fails to send, it will eventually be sent by SMS to ensure that the message successfully reaches the user.
Configure an ML branch
The procedure for setting up a Malaysia number in the ML branch is the same as that in the PH (Philippines) branch. You can refer to the preceding PH branch for configuration. For mobile phone numbers in Malaysia, WhatsApp will be used to send messages first. If WhatsApp fails to send, it will be sent immediately using Viber. If Viber also fails to be sent, the jump to node component is configured to jump to the unified SMS channel in the else branch and send SMS through the unified SMS channel. If the WhatsApp message is sent successfully and the user has read it, the process ends automatically.