Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can use buttons with each types: call, url, node. You can provide custom action to be performed with the button. Actions can only be attached to the url, and node button types. Actions for buttons must comply with the same format and restrictions as described in the Actions format.

Code Block
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "text",
        "text": "simple text",
        "buttons": [
          {
            "type": "url",
            "caption": "External link",
            "url": "https://uchat.com.au",
          },
          {
            ...Another buttons
          }
        ]
      },
      {
        ...Another messages
      }
    ],
    "actions": [  //optional
      {
        "action": "add_tag",
        "tag_name": "example tag"
      },
      {
        ...Another actions
      }
    ],
    "quick_replies": [ //optional
      {
        "type": "node",
        "caption": "Quick reply text",
        "target": "My Content"
      },
      {
        ...Another quick replies
      }
    ]
  }
}

...

medium - (75%),

compact - (50%)

The "webview_size" and actions property is are optional.

Code Block
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "text",
        "text": "simple text with button",
        "buttons": [
          {
            "type": "url",
            "caption": "External link",
            "url": "https://uchat.com.au",
            "webview_size": "full",
            "actions": [] //optional
          }
        ]
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}

Go to node button

The actions property is optional.

Code Block
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "text",
        "text": "simple text with button",
        "buttons": [
          {
            "type": "node",
            "caption": "Show",
            "target": "My Content",
            "actions": [] //optional
          }
        ]
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}

...