Skip to main content Link Search Menu Expand Document (external link)

Reply Message

  • Details
    • Reply message to connected User

$.reply ( message )

  • message.text - text reply to user

message.text

$.reply({
    text :  {
      body : "Hi, I am good how are you?"
     }
});

message.options.buttons

  • message.options (optional) - Provide reply options to User

message.options.buttons.text

$.reply({
    text :  {
      body : "Hi, I am good how are you?"
     },
     options : {
       buttons : [ "Good", "Bad" ] //Pass text as options
     }
});

message.options.buttons.code

$.reply({
    text :  {
      body : "Hi, I am good how are you?"
     },
     options : {
       buttons : [
        { code : "good", label : "Good" },
        { code : "bad", label : "Bad" }
      ] //Pass text as options
     }
});

message.template

  • message.template.code - Template code defined in Admin panel
  • message.template.data (optional) - Data to be used in template
  • message.template.lang (optional) - Language preference for code selection
$.reply({
  template: {
    code: "transaction_details",
    data: {
      amount: 10,
      currency: "INR"
    },
    lang: "en_US"
  }
});

message.video

  • message.video.link - Url of video to be sent
  • message.video.filename (optional) - Caption to be attached with video
  • message.video.caption (optional) - Video File name
$.reply({
  "video": {
    "caption": "your-video-caption",
    "filename": "your-video-caption",
    "link": "http(s)://the-url"
  }
});

message.image

  • message.image.link - Url of image to be sent
  • message.image.filename (optional) - Caption to be attached with image
  • message.image.caption (optional) - image File name
$.reply({
  "image": {
    "caption": "your-image-caption",
    "filename": "your-image-caption",
    "link": "http(s)://the-url"
  }
});

message.document

  • message.document.link - Url of document to be sent
  • message.document.filename (optional) - Caption to be attached with document
  • message.document.caption (optional) - document file name
$.reply({
  "document": {
    "caption": "your-document-caption",
    "filename": "your-document-caption",
    "link": "http(s)://the-url"
  }
});

message.audio

  • message.audio.link - Url of audio to be sent
  • message.audio.filename (optional) - Caption to be attached with audio
  • message.audio.caption (optional) - audio file name
$.reply({
  "audio": {
    "caption": "your-audio-caption",
    "filename": "your-audio-caption",
    "link": "http(s)://the-url"
  }
});

.next ( handler )

  • handler - handler responsible for handling next message from user

.listen ( condtions, …)


Table of contents