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
  • Get notified of the chat activity
  • Keep track of unread messages
  • New messages
  • Activity of the user
  • Connection notifications
  • Symphony Messaging link notifications
  • Get notified of interop actions

Was this helpful?

Export as PDF
  1. Embedded Modules
  2. Embedded Mode

Notifications

Last updated 2 months ago

Was this helpful?

Get notified of the chat activity

The Embedded Mode SDK allows you to be notified of various aspects of the chat activity. This allows you to better integrate the chat within your parent page.

Here is the list of possible notifications:

  • : Be notified of the number of unread messages in each chat conversation.

  • : Be notified when a new message is received.

  • : Be notified if the user is interacting with the chat or is inactive.

  • : Be notified when the user receives a new connection request or when a request has been accepted or deleted.

  • : Be notified when a Symphony Messaging link is clicked.

To listen to some notifications, use the listen method exposed by the SDK. It takes a SubscriptionPayload object as parameter:

interface SubscriptionPayload<SubscriptionParameters, NotificationObject>{
  type: string; // Notification type
  params: SubscriptionParameters; // params associated to the subscription
  callback: (cbArgs: NotificationObject) => any; // callback to be applied on new notifications
}

Specific examples of how the listen method can be used are listed below.

Keep track of unread messages

Unread count notifications

(When the conversation is opened by the user, the unread count will revert to 0.)

SubscriptionParameters

Parameter
Type
Description

streamId

string

ID of the chat conversation to register to

NotificationObject

Parameter
Type
Description

streamId

string

ID of the chat conversation

count

number

Number of unread messages in the chat conversation

// Example
symphony.listen({
  type: 'UnreadCountNotifications',
  params: {
    streamId: 'someStreamId',
  },
  callback: (notification) => {
    console.log('Stream id: ' + notification.streamId);
    console.log('Notification count: ' + notification.count);
  },
});

Global unread count notifications

Same as above, but covering all conversations of the user.

GlobalUnreadCountNotificationsCallbackData

Parameter
Type
Description

notifications

Array<NotificationObject>

A notification object per chat conversation that has unread messages

totalCount

number

Total number of unread messages in all conversations

// Example
symphony.listen({
  type: 'GlobalUnreadCountNotifications',
  callback: (
    notifications: GlobalUnreadCountNotificationsCallbackData,
  ) => {
    console.log('Global Notifications', notifications);
  },
});

New messages

You can receive notifications when there is a new incoming message.

SubscriptionParameters

Parameter
Type
Description

streamId

string | undefined

ID of the chat conversation to register to, if not provided; will register to all conversations the user is in

withMaestroMessages

boolean

If true, system messages are also returned (room deactivation, room member addition/removal, pin/unpinned message)

NotificationObject

Depending on the type of messages returned the notification object can take various forms as follows:

Social message

Parameter
Type
Description

type

string

Type of message. Equals SOCIALMESSAGE for standard messages

streamId

string

ID of the chat conversation

fromWhomId

number

User ID of the sender

isMention

boolean

true if the user was mentioned in the message

Room deactivation

Parameter
Type
Description

type

string

Type of message. Equals “MAESTRO” for system messages

streamId

string

ID of the chat conversation

event

string

=”DEACTIVATE_ROOM”

Room join

Parameter
Type
Description

type

string

Type of message. Equals “MAESTRO” for system messages

streamId

string

ID of the chat conversation

event

string

=”JOIN_ROOM”

userId

string

ID of the user joining the room

Room leave

Parameter
Type
Description

type

string

Type of message. Equals “MAESTRO” for system messages

streamId

string

ID of the chat conversation

event

string

=”JOIN_ROOM”

userId

string

ID of the user leaving the room

Room update with pinned message

Parameter
Type
Description

type

string

Type of message. Equals “MAESTRO” for system messages

streamId

string

ID of the chat conversation

event

string

=”UPDATE_ROOM”

roomUpdate.updateType

string

Type of room update. Equals “PIN_MESSAGE”

roomUpdate.pinnedMessageId

string

ID of the message being pinned

Room update with unpinned message

Parameter
Type
Description

type

string

Type of message. Equals “MAESTRO” for system messages

streamId

string

ID of the chat conversation

event

string

=”UPDATE_ROOM”

roomUpdate.updateType

string

Type of room update. Equals “UNPIN_MESSAGE”

// Example
symphony.listen({
  type: 'MessageNotifications',
  params: {
    streamId: 'someStreamId',
  },
  callback: (notification) => {
    console.log('Stream id: ' + notification.streamId);
    console.log('Sender id: ' + notification.fromWhomId);
    console.log('Mentioned me: ' + notification.isMention);
  },
});
// Example
symphony.listen({
  type: 'MessageNotifications', 
  params: { withMaestroMessages: true },
  callback: (data) => {
    console.log("MESSAGE RECEIVED:", data);
  },
});

Activity of the user

You can be notified of the user's activity. As any user activity within Embedded Mode happens within an iFrame, the parent page can't know if the user is still active or not. This can be a problem, for example, when implementing an automatic inactivity logout on the parent page. To solve this, you can subscribe to "activity notifications" from Embedded Mode, and plug this into your general activity status.

There are no SubscriptionParameters or NotificationObject for this notification feed.

// Example
symphony.listen({
  type: 'ActivityNotifications',
  callback: () => {
    console.log('last active time: ' + Date.now());
  },
});

Connection notifications

When the user needs to communicate with users from external organizations, they require an accepted connection request. Subscribing to connection notifications will allow you to act on connection requests that have been accepted or new incoming requests from other users.

SubscriptionParameters

Parameter
Type
Description

status

Array<string> | undefined

If specified, it filters the notifications to only those statuses provided. Valid statuses are: pending_incoming, accepted or deleted

NotificationObject

Parameter
Type
Description

status

string

pending_incoming, accepted or deleted

userId

number

User ID of the external user

// Example
symphony.listen({
  type: 'ConnectionNotifications',
  status: [ 'accepted', 'pending_incoming' ],
  callback: ({ userId, status }) => {
    console.log(`connection to ${userId} is ${status}`);
  },
});

Symphony Messaging link notifications

Internal links are specific URIs, processed by Symphony, in order to trigger specific actions (opening a room, a user profile or a message, etc.).

In full collaboration mode, the interactions through internal links are supported. In focus mode, these interactions can’t be processed (i.e. opening a room through a chat link).

Subscribing to "internal link notifications" allows executing a callback when a Symphony link is clicked.

This notification is only available in focus mode when canClickInternalLinks is enabled.

NotificationObject

Parameter
Type
Description

url

string

Full URL of the internal link clicked

selector

string

ECEmbedded Mode frame selector in which the link has been clicked (undefined for main Embedded Mode frame)

// Example
symphony.listen({
  type: 'InternalLinkNotifications',
  callback: ({ url, selector }) => {
    console.log(`Internal link clicked in ${selector || 'main frame'}: ${url}`);
    
    // example of Embedded Mode frames redirection on internal link clicked
    const streamId = new URL(url).searchParams.get('streamId');
    if (streamId) {
      window.symphony.setStream(streamId, selector);
    }
  },
});

Get notified of interop actions

Similarly to what is available through the extension API and the desktop interoperability API, it is possible for the parent page to register extensibility buttons in Embedded Mode chats.

Extensibility buttons can be added in the following locations:

  • On a user contact profile or profile hovercard (View Contact button). If a user clicks on the button, the parent page will be notified of the clicked user profile, including the name and email. Intent will be 'ViewContact' and the context data will be a fdc3.contact structure.

  • On an enhanced tag hovercard (View Instrument button). Clicking on the button will share the financial instrument with the parent page, including the ticker and all other available identifiers. Intent will be 'ViewInstrument' and the context data will be a fdc3.instrument structure.

  • On a message action menu (Share Message button). Clicking on the button will share the content of the message and the users present in the conversation. Intent will be 'CreateInteraction' and the context data will be a fdc3.interaction structure.

To register interop actions, use the registerinterop method, as demonstrated below:

registerInterop( callback: (intent: string, context: Context) => void ): Promise<void>;

Your page will be notified through the callback method each time an extensibility button will be clicked.

At this time, it is not possible to register for only one type of extensibility button.

Note: You will need a specific Embedded Mode plan in order to use the registerInterop API. Please reach out to us if you are interested.

The parent page will be notified each time a button is clicked, and the notification will contain the same context data as what is documented for the .

On custom action buttons that you can embed in chat messages sent with the . The message format that you need to follow is available in .

More information on the format of the context data is available in our desktop interoperability documentation, available .

desktop interoperability API
Keep track of unread messages
New messages
Activity of the user
Connection notifications
Symphony Messaging link notifications
here
Send a message API
FDC3 Action buttons