Symphony Messaging Dev Docs
Developer CertificationREST API
  • Start Your Developer Journey
  • Bots
    • Building Bots
    • Planning Your Bot
      • Conversational Bot
      • Interactive Bot
      • Headless Bot
    • Getting Started
      • Getting Started with BDK
      • Creating a Service Account
      • Configuration
      • Truststores
    • Overview of REST API
      • REST API Architecture
      • Overview of Pod API
      • Overview of Key Manager API
      • Overview of Agent API
      • Bot Permissions
      • REST API Reference
    • Authentication
      • RSA Authentication Workflow
      • Certificate Authentication Workflow
    • Datafeed
      • Real-Time Events
      • Overview of Streams
    • Messages
      • MessageML
        • MessageML Basics
          • Content Grouping
          • Text formatting and semantics
          • Tables
          • Images
          • Tags and mentions
            • Enhanced tags notice
          • Style Attributes
          • Special Characters
          • Emojis
        • Elements Interactive Forms
          • Buttons
            • Icon set for Buttons
          • Text Field
          • Masked Text Field
          • Text Area
          • Checkbox
          • Radio Button
          • Dropdown Menu
          • Person Selector
          • Room Selector
          • Date Picker
          • Time Picker
          • Timezone Picker
          • Table Select
          • Regular Expressions - Regex
        • Extensibility UI Actions
          • OpenChat
          • Dialog
        • Entities
          • Standard Entities
          • Custom Entities
      • PresentationML
    • Bots Best Practices
    • Open Source Code Samples
  • Extension Apps
    • Building Extension Apps
    • Planning Your App
    • Getting Started
      • Getting Started with ADK
      • Application Manifest Bundle
      • Add an Extension App to a Symphony Pod
    • Overview of Extension API
      • Initialization
      • Register and Connect
      • Extension API Services
        • Service Interface
        • Register and Subscribe
        • Modules Service
        • Entity Service
          • Entity Advanced Templating
          • Message Format - ExtensionML
        • Applications-Nav Service
        • Share Service
        • Commerce Service
        • Dialogs Service
        • UI Service
          • Receiving Conversation and User Information
          • Filter Function
    • App Authentication
      • Circle of Trust Authentication
      • OBO Authentication
  • Developer Tools
    • Symphony Messaging Generator
    • Bot Developer Kit for Java
      • Build a Conversational Bot
      • Build an Interactive Bot
      • Build a Headless Bot
      • Integrate a Bot with an Identity Provider
    • Bot Developer Kit for Python
    • App Developer Kit
      • Build a Basic Extension App
      • Build an Extension App with App Views
        • Add Buttons and Handlers to an Extension App
        • Add BDK to an Extension App for Circle of Trust
      • Build an Extension App with Message Renderers
    • Postman
    • UI Style Guide
      • Colors
      • Form Elements
      • Buttons
  • Embedded Modules
    • Symphony Messaging URI
      • Symphony Messaging URI for Mobile (deprecated)
    • Desktop interoperability
      • FDC3 intents
        • Message format
      • Configuration guide
        • Configure Interop.io
        • Configure Here Core
        • Configure Finsemble
        • Configure with Embedded Mode
        • Troubleshooting
      • Change log
    • Embedded Mode
      • Get started
      • Configuration parameters
      • Open a chat
      • Send a message
      • Create a room
      • Pin a message
      • Notifications
      • Support for extension applications
      • Open an app
      • Embedded Mode with Sponsored Access
      • Pricing tiers
      • Logout
    • Universal Webhook
      • User guide
        • Example with Splunk
      • Installation guide
  • Symphony REST API
    • Messaging REST API
    • Federation
    • Sponsored Access API
    • Enhanced Directory API
  • Developer Certification
    • Developer Certification
  • Mobile Frameworks
    • Blackberry
    • MobileIron
  • Admin Guides
    • Change Logs
      • API Agent
        • Agent - 25.5
        • Agent - 25.3 (LTS)
        • Agent - 24.12 (LTS)
        • Agent - 24.9 (LTS)
        • Agent - 24.6 (LTS)
        • Archives
          • Agent - 24.11
          • Agent - 24.10
          • Agent - 23.9 (LTS)
          • Agent - 24.8
          • Agent - 24.3 (LTS)
          • Agent - 24.2
          • Agent - 24.1
          • Agent - 23.12 (LTS)
          • Agent - 23.11
          • Agent - 23.10
          • Agent - 23.7
          • Agent - 23.6 (LTS)
          • Agent - 23.4
          • Agent - 23.3 (LTS)
          • Agent - 23.1
          • Agent - 22.12 (LTS)
          • Agent - 22.11
          • Agent - 22.10
          • Agent - 22.9 (LTS)
          • Agent - 22.8
          • Agent - 22.7
          • Agent - 22.6 (LTS)
          • Agent - 20.14
          • Agent - 20.13
          • Agent - 20.12
          • Agent - 20.10
          • Agent - 20.9 (2.62)
          • Agent - 20.7 (2.61)
          • Agent - 20.6 (2.60)
          • Agent - 20.5 (2.59)
          • Agent - 20.4 (2.58)
      • SBE (Pod API)
        • SBE - 24.1
        • SBE - 20.16
        • SBE - 20.15
        • Archives
          • SBE - 20.14
          • SBE - 20.13
          • SBE - 20.12
          • SBE - 20.10
          • SBE - 20.9 (1.62)
          • SBE - 20.7 (1.61)
          • SBE - 20.6 (1.60)
          • SBE - 20.5 (1.59)
          • SBE - 20.4 (1.58)
      • Client 2.0 APIs
        • Client 2.0 - 25.05
        • Client 2.0 - 25.03
        • Client 2.0 - 24.12
        • Client 2.0 - 24.05
        • Client 2.0 - 23.02
        • Client 2.0 - 22.11
        • Archives
          • Client 2.0 - 20.4
          • Client 2.0 - 20.5
          • Client 2.0 - 20.6
          • Client 2.0 - 20.7
          • Client 2.0 - 20.9
          • Client 2.0 - 20.10
          • Client 2.0 - 20.12
          • Client 2.0 - 22.8
          • Client 2.0 - 22.10
      • Universal Webhook
        • Univ Webhook - 2.6
        • Univ Webhook - 2.4
        • Univ Webhook - 2.2
        • Univ Webhook - 2.1
        • Univ Webhook - 2.0
    • API Change Management
    • Global Throttling
    • Agent Guide
      • Network Topology
      • Agent Download
      • Agent Installation
      • Agent Configuration Fields
      • Agent Server High Availability
      • Agent Performance Tuning
Powered by GitBook
On this page
  • Standard HTML Tags
  • Text Tags
  • Extended HTML Tags
  • Special Entity Tags
  • Flow Control Tags
  • Generating Properly Formatted XML

Was this helpful?

Export as PDF
  1. Extension Apps
  2. Overview of Extension API
  3. Extension API Services
  4. Entity Service

Message Format - ExtensionML

Last updated 1 year ago

Was this helpful?

ExtensionML is a special form of markup that a front end app can use to perform custom rendering of an entity, instead of relying on Symphony to perform the default presentation.

ExtensionML is generated from a given entity and emitted by a built-in or third-party renderer. It is similar to but is used for interactive presentation.

While similar to PresentationML, ExtensionML consists of a template and corresponding data. Each tag in the template can have an ID that references a value stored in the data, binding the data to whatever is being rendered. For example, multiple paragraphs in the template can reference a sentence stored in the data by ID, allowing for reuse of that sentence in multiple places within the template being rendered.

Symphony Elements

Note: ExtensionML does not support Symphony Elements. For more information, refer to .

Standard HTML Tags

A number of standard HTML tags are supported within templates: b, u, i, strong, br, ul, ol, li, span, div, table, th, tr, and td.

These behave like their HTML counterparts but must be properly-formatted XML. So, for example, rather than <br> you must use <br/>.

Text Tags

The following tags present text in different ways. Most of these require data to specify their content, but some can also use the content between the opening and closing tags.

Tag

Description

Attributes

<formatted>

• id (Required): The key of a string within the template data.

<text>

Specifies regular text to be inserted into the entity. This text is inserted as is, without processing any HTML markup.

• id (Optional): The key of a string within the template data. If no id is specified, it uses the contents between the opening and closing tags.

<label>

Inserts a label. Labels are like text tags but are styled differently.

• id (Optional): The key of a string within the template data. If no id is specified, it uses the contents between the opening and closing tags.

<color-text>

Inserts a colored text. Supported colors: red, purple, green, darkGreen, blue, darkBlue, orange, grey, and yellow.

id (Optional): The key of an object with two members: • text specifies the text to be used • color is one of the listed colors.

<pill>

Inserts text with a colored background and rounded corners. Supported colors: red, purple, green, darkGreen, blue, darkBlue, orange, grey, and yellow.

id (Optional): The key of an object with two members: • text specifies the text to be used • color is one of the listed colors.

Extended HTML Tags

The following HTML tags are handled in a slightly modified way:

Tag

Description

Attributes

<a>

Inserts a link.

• id (Optional): The tag must include either an id attribute or an href attribute. If id is specified, it must be a key to a string specifying the URL of the link. If no id attribute is specified, the href attribute is used.

<hr>

Inserts a horizontal line.

​

<icon>

Displays a 16x16 pixel icon.

• id (Required): The key to a text string specifying the URL to the image to display.

<small-icon>

Displays a 13x13 pixel icon.

• id (Required): The key to a text string specifying the URL to the image to display.

<img>

Displays a 128x128 pixel image.

• id (Optional): The tag must include either an id attribute or an src attribute. If id is specified, it must be a key to a string specifying the URL of the link. If no id attribute is specified, the src attribute is used.

<iframe>

Inserts an iframe.

• src (Required): The URL to the iframe. • height (Optional): If not specified, the default height of the iframe will be 50px. The maximum height is 1000px. • width (Optional): If not specified, the default width of the iframe will be 100%. The maximum width is 300px.

Special Entity Tags

Tag

Description

Attributes

<mention>

Insert a mention.

• id (required): The key to an object with the following members: - id: The unique ID of the user being mentioned. - name: The pretty name that is displayed for the mentioned user.

<hashtag>

Inserts a hashtag.

• id (required): The key to a string specifying the hashtag. The string must be prefixed with '#'.

<cashtag>

Inserts a cashtag.

• id (required): The key to a string specifying the cashtag. The string must be prefixed with '$'.

Flow Control Tags

The following flow control tags are used for entities that have conditional logic or data that can be iterated upon:

Tag

Description

Attributes

<if>

Conditionally uses the enclosing template.

• id (required): The key to the data. If there is data at the specified key, the enclosing template is used; otherwise it is skipped.

<if:not-last>

Conditionally uses the enclosing template within an iteration. If the current iteration is not the last item in the iterated list, the enclosing template is used. This is convenient when you want to add commas between list items without adding one after the last item.

​

<if:last>

Conditionally uses the enclosing template within an iteration. If the current iteration is the last item in the iterated list, the enclosing template will be used.

​

<iterate>

Loops through the items in an array. The template between the opening and closing iterate tag is used for each array item. The data for the template references the data in the current list item.

• id (Required): The key to an array in the data object.

The following example shows the XML template for an entity with flow control logic and corresponding data:

<entity>
    <label>Guild: </label><text id="guildName"/>
    <if id="webpageLink">
        <label>Web page: </label>
        <a id="webpageLink"><text id="webpageName"/></a>
    </if>
    <if id="people">
        <iterate id="people">
            <label>Name: </label><text id="name">
            <label>Notes:</label><br/>
            <formatted id="notes"/>
            <if:not-last><hr/></if:not-last>
        </iterate>
    </if>
</entity>
var data = {
    "content" = {
        "guildName": "Loyal Order of Water Buffalo",
        "webpageLink": "https://www.waterbuffalo.net/bedrock",
        "webpageName": "The Loyal Order of Water Buffalo, Bedrock Chapter",
        "people": [{
            "name": "Fred Flintstone",
            "notes": "Yabba Dabba Dooooo!"
        },
        {
            "name": "Barney Rubble",
            "notes": "Fred's sidekick"
        },
        {
            "name": "Dino",
            "notes": "He's kind of like a dog, but also a small sauropod. Yaps a lot.<br/> Really odd, he spoke in his first appearance."
        }]
    }
}

Generating Properly Formatted XML

The following function can be used to turn HTML into properly formatted XML:

function xmlize(html) {
    return new XMLSerializer().serializeToString($('<span>').html(html)[0])
}

Adds text formatted with HTML markup. This must be properly formatted XML See for information on converting HTML to XHTML.

PresentationML
Symphony Elements
here