Chats-In Events Added
This commit is contained in:
@@ -54,5 +54,64 @@ MultiMedia Message Out: Requirments-
|
||||
| `msg.payload` | Image Caption |
|
||||
| `msg.toNumber` | Reciver number (if number not provided in node) |
|
||||
|
||||
|
||||
## Button, List and TemplateButton
|
||||
Supported in Whatsapp-Lite only, `TODO for Whatsapp-Web`.
|
||||
|
||||
* <b>Simple Button </b>For simple 3 Bottons your `msg.paylod` should be...
|
||||
|
||||
```js
|
||||
msg.payload = {
|
||||
text: "Hi it's button message", //String
|
||||
footer: 'Hello World', //String
|
||||
headerType: 1, //keep it "1" only.
|
||||
buttons: [ // Array of buttons.
|
||||
{buttonId: 'id1', buttonText: {displayText: 'Button 1'}, type: 1},
|
||||
{buttonId: 'id2', buttonText: {displayText: 'Button 2'}, type: 1},
|
||||
{buttonId: 'id3', buttonText: {displayText: 'Button 3'}, type: 1}
|
||||
]
|
||||
}
|
||||
```
|
||||
* <b>TemplateButton</b> combination of <b>link button</b>, <b>Call button</b> and Normal buttons. Your `msg.paylod` should look similar to--
|
||||
|
||||
```js
|
||||
msg.payload = {
|
||||
text: "Hi it's a template message by Node-RED 👍 to Test",
|
||||
footer: 'Hello I am footer of message.',
|
||||
templateButtons: [
|
||||
{index: 1, urlButton: {displayText: '⭐ Vist Node-RED', url: 'https://nodered.org/'}},
|
||||
{index: 2, callButton: {displayText: 'Call me!', phoneNumber: '+1 (234) 5678-901'}},
|
||||
{index: 3, quickReplyButton: {displayText: 'Click me I am Button', id: 'I-am-button-id-without-space'}},
|
||||
{index: 4, quickReplyButton: {displayText: '🖱️ Sample Button 2', id: 'button-2-was-clicked'}}
|
||||
]
|
||||
}
|
||||
```
|
||||
* <b>List Message</b> combination of <b>link button</b>, <b>List button</b> and Selectors. Your `msg.paylod` should look similar to--
|
||||
|
||||
```js
|
||||
msg.payload = {
|
||||
text: "This is a list",
|
||||
footer: "nice footer, link: https://google.com",
|
||||
title: "Amazing boldfaced list title",
|
||||
buttonText: "Required, Tap to see List",
|
||||
sections : [{
|
||||
title: "Section 1",
|
||||
rows: [
|
||||
{title: "Option 1", rowId: "option1"},
|
||||
{title: "Option 2", rowId: "option2", description: "This is a description"}
|
||||
]},
|
||||
{
|
||||
title: "Section 2",
|
||||
rows: [
|
||||
{title: "Option 3", rowId: "option3"},
|
||||
{title: "Option 4", rowId: "option4", description: "This is a description V2"}
|
||||
]
|
||||
}]
|
||||
}
|
||||
|
||||
```
|
||||
Yes its lot require for buttons, A node will come soon to minimize these effors.
|
||||
You may direct import these test button with bellow code.
|
||||
|
||||
-*Don't forget to mention international dialing code befor your number. Number must be in format like `+11 99999 99999` without any space.*
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user