Skip to content
mr_kite edited this page Apr 11, 2018 · 5 revisions

Veranda's support for rich messaging adds a new field called richMessages to the Rocket.chat message object (https://rocket.chat/docs/developer-guides/realtime-api/the-message-object/).

Below is an example of a facebook-messenger-like rich message payload received by the client. Note: "type": "facebook-generic". This format is inspired by facebook's generic template (https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic) but is not exactly the same.

Other types for slack, etc. will be added as they get supported.

        "richMessage": {
          "type": "facebook-generic",
          "elements": [
            {
              "title": "Welcome!",
              "image_url": "https://petersfancybrownhats.com/company_image.png",
              "subtitle": "We have the right hat for everyone.",
              "default_action": {
                "type": "web_url",
                "url": "https://petersfancybrownhats.com/view?item=103",
                "messenger_extensions": false,
                "webview_height_ratio": "tall",
                "fallback_url": "https://petersfancybrownhats.com/"
              },
              "buttons": [
                {
                  "type": "web_url",
                  "url": "https://petersfancybrownhats.com",
                  "title": "View Website"
                },
                {
                  "type": "postback",
                  "title": "Start Chatting",
                  "payload": "START CHATTING COMMAND"
                }
              ]
            }
          ]
        }

This should support a carousel of multiple facebook-generics like below, as described in the above link and at https://developers.facebook.com/docs/messenger-platform/reference/template/generic: