How to send a push message with variables? (i.e. order number)
You could send the push via Stella API, so you could include the customer details (i.e.order number) in the template message from your database.
You could also refer to the documentation here on how to Apply Stella API to Chatbot
1. Please use the API to pass the meta object first and then you could use this.agendaMeta to access your meta.
{
"channelId": "61149207e746725434536d",
"recipientId": "65874121212",
"redirect": {
"tree": "60ff7a60fe961671129234s,
"nodeCompositeId": "gQEytkyMjZdwR39N"
},
"meta": {
"v1": "FP201121118253",
"v2": "Furniture polish",
},
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJBUEkiLCJhcHAiOiI2MDgyNDJh",
"headers": {
"Content-Type": "application/json",
}
}
2. To apply the variable in the response, please create a preaction in the node that is going to be redirected to save the variable from meta to member Temp Data.
Action for saving the variable to member Temp Data:
- return new Promise((resolve) => {
- this.member.botMeta.tempData.v1 = this.agendaMeta.v1
- this.member.botMeta.tempData.v2 = this.agendaMeta.v2
- this.member.botMeta.tempData.imageUrl = this.agendaMeta.imageUrl
- resolve({ member: this.member })
- })
3. Custom info saved in Member Temp Data after calling the API
4. After saving the variable in member Temp Data, you could use the following code format in the response to access your Temp Data and send messages with variables to your users.
{{botMeta.tempData.v1}}
{{botMeta.tempData.v2}}
{{botMeta.tempData.imageUrl}}
Related Articles
What is the usage of "priority" in the Push Panel?
"Priority" in the Push Panel can be used when you need to send multiple push messages at the same time. Stella will schedule the sequence of sending the messages according to the "priority" of each message, i.e. (the smaller the value, the higher the ...
What is a “Push”?
A “Push” is a subscription message sent to users on Facebook and WhatsApp via the Stella Push Panel. The types of push messages you can send out to your subscribers are the same as those listed in Facebook Message Types or the WhatsApp approved ...
How to send template messages on Stella with Push Panel?
Before getting started, please make sure you have completed the Message Template Submission, otherwise, you will not be able to select your existing message templates. After that, head to Push Panel and create your push content. You can also refer to ...
What are the differences between the 'WhatsApp message template' and 'text' in the response?
When WhatsApp users do not initiate a message or it has been over the 24 hours window, businesses can only send approved template messages to users (via Stella push panel or Stella API). The costs vary by country. For text messages, you can only can ...
If I just schedule a date and without specifying the time, will the push send out immediately?
Yes, if you only select the date and do not select the time, the system will use the current time and schedule the push immediately. Please note it will take a few minutes for the system to run the push.