Skip to content

Template button selection#

סעיף זה מתאר פורמט אינטרנט נכנס של אובייקט 'messageData' עבור לחצני תבנית. לתיאור של הפורמט הכללי של webhooks נכנסות, עיין בסעיף הודעות נכנסות.

Webhook#

פרמטרים של Webhook#

פרמטרי אובייקט messageData

פרמטר הקלד תֵאוּר
typeMessage **string* סוג הודעה שהתקבלה. עבור הודעות מסוג זה, הפרמטר מקבל את הערך templateButtonsReplyMessage
templateButtonReplyMessage object אובייקט נתונים בבחירת הלחצן של המשתמש

פרמטרי אובייקט templateButtonReplyMessage

פרמטר הקלד תֵאוּר
selectedIndex **string* אינדקס דיגיטלי של הכפתור שנבחר
selectedId **string* מזהה הכפתור שנבחר
selectedDisplayText **string* טקסט הכפתור שנבחר
stanzaId **string* מזהה הודעת כפתור

Webhook body example#

{
    "typeWebhook": "incomingMessageReceived",
    "instanceData": {
        "idInstance": 1101000001,
        "wid": "11001234567@c.us",
        "typeInstance": "whatsapp"
    },
    "timestamp": 1656315272,
    "idMessage": "9BB19BB0D568BA7B185EEAD21A33D317",
    "senderData": {
        "chatId": "11001234567@c.us",
        "sender": "11001234567@c.us",
        "senderName": "John",
        "senderContactName": "John Doe"
    },
    "messageData": {
        "typeMessage": "templateButtonReplyMessage",
        "templateButtonReplyMessage": {
            "stanzaId": "BAE53AFDD5F0C137",
            "selectedIndex": 2,
            "selectedId": "id1",
            "selectedDisplayText": "red"
        }
    }
}