Import Message
Organizations can import messages to Symphony from another system using Symphony’s REST API. Typically message import is performed before an organization begins using Symphony, so that users' previous content and context are available from day one within Symphony.
This endpoint Imports a message into Symphony from another system. Imported messages will be displayed in Symphony clients with the original system's content, sender, and timestamp.
This endpoint takes as input a list of messages to be imported and outputs a status for each message. If a message is successfully imported, the messageId
of the message created in Symphony is returned. If import fails on a given message, the rest of the operation will continue. It will be possible to detect any failures only after the entire operation is completed.
Request Examples
Prerequisites
Your pod must be configured for Symphony's REST API, and you must have the Agent, the component used for handling encryption and decryption of messages and content, set up.
You must have a Service User with the Content Management roles. This user can be set up in the Admin Portal. In most cases, you will also want this user to have the User Provisioning role as well. This user will be used to import messages.
You must have a X.509 identity certificate for your import service user for REST API authentication, where the common name on the certificate matches your service user's username.
📘 Service User AccountsA service account is a type of account used for bots or applications, rather than for real end-users.
🚧 Importing MessagesThe Content Management role is required to call the Import Message endpoint.
Please note that the service user account needs to be part of the room where it imports messages.
See Bot Permissions for a list of roles and associated privileges.
v4ImportedMessage Format
You must specify each message to import as an object with the following fields:
V4ImportResponse
Unread Status and Notifications
Imported messages do not generate unread message count badge notifications in the user's left navigation menu.
Imported messages are not highlighted as unread in conversations.
Read Receipts
Read receipts cannot be imported from another system to Symphony.
Read receipts will be generated if a user views an imported message. This will be reflected in the Message Status table, displayed when clicking on the timestamp of a message.
Special Entities
Imported messages which contain an at-mentions will appear in Social Activity under Recently Mentioned You; however, they do not generate unread message count badge notifications.
Imported messages which contain hashtags and cashtags will not appear in Signals.
Content Export of Imported Messages
Imported messages are reflected in content export based on their intendedMessageTimestamp
. This means that when the import occurs, content export:
Excludes historical messages with an
intendedMessageTimestamp
outside of the content export range.Includes include historical messages with an
intendedMessageTimestamp
within the content export range.
For ad-hoc content export, the content export range is specified by the user. For example, for an ad-hoc content export set with a start date of Jan 3 and an end date of Jan 5:
Messages with an
intendedMessageTimestamp
prior to Jan 3 at 00:00:00 UTC **are not **exported.Messages with an
intendedMessageTimestamp
between to Jan 3 at 00:00:00 UTC and Jan 5 at 23:59:59 UTC are exported.Messages with an
intendedMessageTimestamp
after to Jan 5 at 23:59:59 UTC are not exported.
For recurring content export, the content export range is defined as the period until the next scheduled content export, with a duration of the content export frequency. For example, for a frequency of 24 hrs running at 01:00:00 UTC on Feb 10:
Messages with an
intendedMessageTimestamp
prior to Feb 9 at 01:00:00 UTC **are not ** exported.Messages with an
intendedMessageTimestamp
between to Feb 9 at 01:00:00 UTC and Feb 10 at 01:00:00 UTC are exported.
Correct and Reimport Failed Messages
If a message import fails, use the information reported in the diagnostic
field to correct the error and call this endpoint again. Symphony ignores any message with the same originalMessageId
value as an existing message, and imports only those messages with uniqueoriginalMessageId
values.
Steps to Import a Message
Ensure users involved with the message are provisioned.
Ensure all streams have been created .
Import the message.
(Optional) User and Stream Membership and Deactivation.
User Provisioning
When you migrate messages from another system to Symphony, you will need to ensure that the accounts of all users involved (all original senders and recipients) are created.
If all these users exist, you can skip this step.
User accounts can be provisioned via Symphony's REST API.
📘 User Provisioning Service User AccountAccounts are provisioned by a Service User account which must be assigned the User Provisioning role. This user can be set up in the Admin Portal.
It is possible to use the same service user account for both message import and account provisioning provided it has been assigned both the Content Management and User Provisioning roles.
In some cases, you will want to import messages where the original sender is no longer a member of the room or the firm. In this case, you should create the user, import any messages sent by that user, and either remove the user from the room or deactivate the user after the import has been performed.
Stream Creation
You will also need to ensure that all the streams (IMs/MIMs/chatrooms) have been created.
If all of these streams exist, you can skip this step.
Chatrooms can be created and managed via Symphony's REST API. Refer to the Create Room v3 endpoint.
📘 Changing Chatroom OwnershipIf the import service user account is used to create chatrooms, the import service user will be the owner of those chatrooms.
To change this, you can promote a member of the room to an owner and remove the import service user from the room.
In some cases, you may wish to import conversations into chats between two or more users - IMs or MIMs.
IMs and MIMs can be created using the Create IM or MIM (admin) endpoint.
🚧 Admin IM/MIM CreationThe User Provisioning role is required to call the Create IM or MIM (admin) endpoint.
You must use this endpoint rather than the Create IM or MIM endpoint, so that the calling service user is not included as a participant of the chat.
Message Import
Messages are imported using the Import Message endpoint described above.
🚧 Message Import Limits
We recommend importing in batches of no more than 5,000 messages at a time. Importing more than this number may result in slowness.
We recommend to be very precautious when using attachments with this endpoint as it will increase the payload hence the network usage between the Bot and the Agent.
🚧 Migration TimesYou should plan for a migration period, length dependent on the volume of messages to import and network latency.
In our experience, an organization can import about 200K messages / hour.
❗️ Import LimitationsIt is only possible to import messages from another system into Symphony. It is not possible to import read receipts or chatroom events (ex. membership changes).
User and Stream Membership and Deactivation
Once you have imported all your messages, you may wish to remove certain users from rooms or deactivate certain users or rooms.
For example, if you used the import service user for room creation, you may want to transfer ownership of the room and remove this user from the room.
For example, you may want to deactivate the Symphony user that was created to represent a user who sent messages in the old system, but has since left the firm.
Admin Impact
Content Export The following are some notes that may be of interest to admins regarding aspects of imported messages:
Imported messages are exported in Content Export based on the original timestamp (
intendedMessageTimestamp
).After messages are imported, Content Export will not include imported messages where the original timestamp is outside of the Content Export range and will include messages where the original timestamp is within the Content Export range.
In ad-hoc content export, the range is specified by the admin user.
For example, for an ad-hoc content export with a start date of January 1 and end date of January 5:
Messages with an original timestamp before January 1, 00:00:00 UTC would not be exported.
Messages with an original timestamp between January 1, 00:00:00 UTC and January 5, 23:59:59 UTC would be exported.
Messages with an original timestamp after January 5, 23:59:59 would not be exported.
In recurring content export, the range is defined as the period until the next scheduled content export, with a duration of the content export frequency specified by the admin user.
For example, for a recurring content export with a frequency of 24 hours running on February 2, 00:00:00 UTC:
Messages with an original timestamp before February 1, 00:00:00 UTC would not be exported.
Messages with an original timestamp between February 1, 00:00:00 UTC and January 2, 00:00:00 UTC would be exported.
Room Monitor
Imported messages will be displayed in the Room Monitor as they are displayed to room members - with the original sender and original timestamp.
📘 See also
Message MessageML Message ID Message Format - MessageML PresentationML Message Format - ExtensionML Colors Symphony Elements
Last updated