Changelog for Messaging Platform SDK


Publish Date: 11th of June 2024


  • Detailed subscription query documentation: All possible query properties are now explained and examples are provided.
  • Enhance get last consumer message example: The example does not pause execution while waiting for a conversation. See get last consumer message

Bug Fixes:

  • No message subscription for closed conversations: When a closed conversation is received on a consumer connection, there is no open dialog. The SDK will not subscribe to any message events of any closed conversations. This fixes, the error when a consumer closed a conversation and a step-up is performed on a new conversation.
  • Updated dependencies: Updated dependencies to versions which stay compatible with node version 16.


Publish Date: 4th of April 2024


  • Consumer authentication and step up. This release changes how consumers can establish an authenticated connection. By default, consumers connections are unauthenticated and sometimes anonymous. For certain actions a brand has to verify the authenticity of a consumer. This verification can be done in two ways: Establish an authenticated connection or step up an unauthenticated one. For both of these cases a JSON Web Token is necessary. For more information please refer to the documentation about consumer auth flow and consumer step up. Note: If you have been using authenticated connections before this change, you need to adapt your implementation. The changes are explained in the consumer auth flow documentation.
  • Code examples. Starting from this release code examples for brand and consumer use cases are documented.

Bug Fixes:

  • Transfers to agents are more robust. When a conversation is transferred to a different agent, the agent id is always sent in the following format accountId.agentId.


Publish Date: 28th of February 2024

Bug Fixes:

  • Fixing missing messageAudience for the latest message while calling the queryMessages method. Instead of null the correct audience of the message will be returned.
  • Adding content-type header when using uploadFile method. Previews for preview able file types, for example PNG, are now properly created for conversations.


Publish Date: 7th of February 2024

Bug Fixes:

  • Fixed typo when emitting a warning about outdated conversations over a certain threshold. For example, if there were 200 outdated conversations for account accountId1, the connection will emit a warning in the following way:
    connection.on('warning', msg => {
       expect(message).toEqual('200 outdated conversations found for account accountId1, which is above the threshold of 100.');


Publish Date: 5th of February 2024

Bug Fixes:

  • Added configuration parameter unsubscribeFromOutdatedConversationsOnReconnect (defaults to true) whether to close outdated conversations on reconnect or not. True is recommended, but should be set to false if issues with lost messages are encountered. For example:
    const connection = lpm.createConnection({
      appId: 'quick_start',
      userType: lpm.UserType.BRAND,
      unsubscribeFromOutdatedConversationsOnReconnect: false

    More information can be found in the documentation.


Publish Date: 30th of January 2024

Bug Fixes:

  • Updated URL path for all message/conversation related REST endpoints. From /v1/conversations/ to /messaging/v1/conversations/.
  • Fixed issue with agentId being null if message is sent by an agent that has been removed from the conversation before the connection. The agentId now contains the right agentId.


Publish Date: 17th of January 2024


  • Adding anonymous async function as param of the ring which could be resolved if rings need to use directly the conversation
  • Adding ringConversationTimeout param to createConnection so brands can configure it.
  • Adding conversation.getLatestConsumerMessage() to allow brand users to get latest consumer message.


  • The code below showcases how a conversation can be accepted on the ring and how to retrieve the last consumer message:
      // connect as admin for brand
      const connection = lpm.createConnection({appId: 'quick_start', userType: lpm.UserType.BRAND, accountId, authData, ringConversationTimeout: 2000});
      // agent state must be "ONLINE" in order to receive rings
      await connection.setAgentState({agentState: lpm.AgentState.ONLINE});
      // subscribe to routing tasks (rings)
      const taskRoutingSubscription = await connection.createRoutingTaskSubscription();
      // process the rings as they arrive
      connection.on('ring', async ring => {
          // ignore old rings
          if (ring.ringState !== lpm.RingState.WAITING) return;
          // accept the ring
          await ring.accept();
          // await conversation or null if waiting times out after 2000 ms
          const conversation = await ring.conversation();
          // Get the latest consumer message
          const latestConsumerMessage = conversation.getLatestConsumerMessage();

    More information can be found in the documentation.


Publish Date: 15th of January 2024

Bug Fixes:

  • Fixed issue with consumer connection not properly reflecting assigned agent change on skill transfer.
  • conversation-deleted now emitted when DELETE notification is received, previously this was only emitted when a conversation was removed during disconnect.


Publish Date: 9th of January 2024

Bug Fixes:

  • Bumped axios version to 1.6.5 due to security vulnerabilities.


Publish Date: 12th of December 2023

Bug Fixes:

  • Adding check for existing dialog before trying to transfer conversation on the transfer method. If there is no open dialog an error will be emitted:
    conversation.on('error', err => expect(err.message).toEqual('Cannot transfer without open dialog present.'));


Publish Date: 7th of December 2023

Bug Fixes:

  • Omit Accept-Encoding header when invoking UMS REST API


Publish Date: 6th of December 2023

Bug Fixes:

  • Support additional query parameters for getMessages in BrandRestConnection


Publish Date: 28th of November 2023

Bug Fixes:

  • Fixing proxy web socket connection configuration issue


Publish Date: 22nd of November 2023


  • Adding responseTimeout param to createConnection so brands can configure it.


Publish Date: 10th of November 2023


  • Add support for proxy http request

Bug Fixes:

  • Fix documenting example inside of the README about createConversationSubscription


  • Fixing missing metadata for some messages while calling the queryMessages method.


  • Fix a race condition when creating a new conversation which caused some conversations to have multiple conversation objects
  • add originatorId and originatorRole as optional args for the rest publishMessage


  • RoutingTaskSubscriptions are now restored upon reconnect.


  • For Brand Rest Connections, getConversationById will now make a fetch call, parse the data, and return a conversation object. Previously it would only return the raw result of the HTTP request.


  • Added await connection.getMessageStatisticsForUser() and await connection.getMessageStatisticsForBrand() to allow brand users to get message statistics information.
  • Added conversation.resumeConversation() to allow brand users to resume previously closed conversation with a consumer.
  • Added connection.on('failed-to-connect') event which will fire when moving to FAILED_TO_CONNECT state, ie when failed attempt occurs while trying to establish websocket connection.


  • connection.closeConversation(conversationId) is now available. With this function conversations can be closed without a conversation object.


  • Conversation.assignedAgent should return active assigned agent only. Also handled edge case where suggested agents do not have userId


  • Fix chatStateEvent for unknown participant undefined error after moving message originator transformation in 1.9.2


  • Exposed TTRType enum
  • Added message.sentByCurrentUser method to the Message class
  • Added getConversationById & getAllKnownConversations methods to Connection
  • Added notificationType of child for deferred notifications from child subscriptions


  • Move message originator transformation from connection to MessageFactory, fixes issues where Message objects created from lastContentEventNotification and queryMessages did not have the correct sender


  • Use HTTPS for the baseURI call to CSDS


  • Rename waitForFirstNotification to waitForReady. waitForFirstNotification will still function to ensure backwards compatibility, but is now deprecated.
  • Use of notificationType in ConversationSubscription to determine notification type, fixes issues around onFirstNotification and child subscriptions
  • userId for brand connections is now userId uuid, rather than the un-prefixed agentId
  • Fix limit-break chain for subscriptions with more than 2002 conversations


  • Truncate setAgentNote to 5000-character limit, throw error if note cannot be added


  • Don't delete lastContentEventNotification when emitting it to subscriptions
  • Update participant role when they are removed and then re-added


  • Add setAgentNote method to conversation, which deprecates setNote
  • BrandWebsocketConnection now has userProfile parameter, available after opening the connection
  • Fix to allow connection with existing unauthenticated token to step up
  • Added documentation for continuing an anonymous user session between two connections


  • Add consumer-step-up event to the conversation


  • Removed reference to a test module that was preventing code execution


  • File sharing - Upload and Download for both node.js and browser
  • Authenticated consumer flow
  • Consumer stepup via connection.stepUp() function
  • participant.getUserProfile() is now available
  • dialog.leave() and conversation.leave() are now available
  • Arbitrary websocket requests with connection.send()
  • Listen to all websocket notifications via connection.on('notification')
  • Expanded documentation


  • added conversation.consumer getter to help get the conversation's consumer participant


  • Fixed bug in 1001 conversation limit break for LP originating disconnects
  • Lower default max reconnection time limit from 4 hours to 10 minutes


  • Bug fixes
    • When reconnecting, only drop conversations that have actually been closed while we were disconnected
    • When a conversation is dropped for any reason and it is later seen in a notification, re-add it to the cache


  • Added assignedAgent getter to Conversation class


  • Update appId with correct capitalization


  • appId must be limited to alphanumeric plus special characters -_.


  • MA-238 appId is now a required argument when calling createConnection


  • Handle notifications that have missing participantsDetails


  • Add support for quickReplies, available by setting the third argument on sendMessage and sendRichText conversation.sendMessage('test', null, quickReplies);


  • Pass through getShiftStatus#response & getShiftStatus#error events to the connection


  • TokenMaintainer fixes - prevent caching token generation errors to allow reconnections
  • getToken now blocks until token generation succeeds or TokenMaintainer is stopped


  • CO-6234: Add APIs to change TTR and ManualETTR of a conversation, which consequently emits ttr-change and manual-ettr-change events respectively
  • Whitelist dialog:close event and bubble up to conversation & connection


  • CO-6394: fix for conversation.sendRichText, metadata was populated with message audience
  • expose ConversationContextType, add conversationContext and campaignInfo to readme


  • shift-status polling now encapsulated and exposed in lpmsdk.ShiftStatusPoller
  • rest helper functions exposed through


  • Bubble up dialog and conversation events to the connection. These will have a conversation: prefix to them e.g. conversation:close
  • Minor refactor of refreshSession internal method


  • Fix for serialization of rich content events


  • TokenMaintainer ctor now expects an object. Also added getAuthSessionInfo() method and extended support for refreshing tokens when authSessionInfo is passed in ctor


  • loadConversation(serializedConversationData) function on connection, which allows previously serialized conversations to be resumed by the connection.
  • unload() function on conversation that allows a conversation to bemanually removed from the SDK's memory.


  • Expose TokenMaintainer class


  • Added a queue when processing onNotificationPart


  • CO-6062: Create ConversationNotificationFeed, WebhooksIntake, and NullConnection classes to consume notifications from webhooks/kafka. Accessed via connection.processWebhooksNotification(notification)


  • Public documentation now available @
  • Introduced TokenMaintainer class to keep bearer tokens valid
  • TokenMaintainer now used in BrandWebsocketConnection & BrandRestConnection
  • Bug fixes for simple-websocket library related to retrieving close and error codes
  • CO-6063: Add setCsat function to conversation, available for consumers
  • CO-6099: Expose connection.getToken() async method to obtain token from connection
  • CO-5613: Static deserialize function to recreate a hydrated Conversation object from DB


  • add "consumer" getter helper to dialog
  • expose ParticipantChatState enum


  • CO-5950: Always create context and attach clientProperties


  • CO-5989: Add setNote function to conversation


  • CO-5907: Allow campaignInfo argument on createConversation to pass through correctly
  • CO-5880: RoutingTaskSubscriptions and Rings are now available
  • Browser stand alone build is now available /web/lpm-sdk.js
  • Websocket library "ws" has been replaced with "simple-websocket" for browser compatibility
  • CO-5987: use v2.1 of the WS API to allow suggested agents
  • Increased default wait to reconnect time to 2 seconds, as per UMS recommendation


  • Added Conversation REST APIs under lib/api/rest/conversation


  • Minor fix so conversationContext is passed in correctly when consumers create conversations


  • BrandWebsocketConnection now emits skill-entered-work-hours and skill-entered-off-hours for any of its skills


  • Allow access to ParticipantRole enum
  • CO-5713: Added ability to attach metadata to messages in sendMessage, sendPrivateMessage, and sendRichText
  • CO-5612: serialize method added for Conversation object to allow it to be persisted in DBs
  • Added Messaging & General REST APIs under lib/api/rest


  • CO-5322: Subscriptions now have a process to get more than 1001 conversations, there is now no limit to the number of conversations. This feature is enabled by default, but can be disabled by passing limitBreakEnabled: false as an option to createConnection
  • CO-5603: Removed errors when receiving duplicate read or accept message notifications from UMS
  • CO-5604: Fixed issue where onReconnect calls could be doubled up in certain scenarios


  • CO-5512: maintainConnection is now true by default when calling createConnection


  • CO-4981: Added tracking info to WS connection URL params
  • CO-5532: Mock stepup: automatic consumer take over
  • CO-5463: Shift-status will now start and retrieve initial data before default subscription is created


  • CO-5436: Skill.isInOffHours helper function


  • CO-5517: Conversation Deleted Event


  • CO-5295: Media Handler File upload requests
  • CO-5013: Wait for the first MS notification


  • CO-5322: Conversation subscriptions async .init() which must be called to create subscription


  • _callShiftStatus now has a return value
  • CO-5321: dialog.getAll() retrieves all messages


  • CO-5470: Remove optional chaining parameter for compatibility with old versions of node.js
  • CO-5470: add wait option to createSubscription


  • CO-4978: dialog.setChatState function
  • Shift-status poller


  • CO-4866: Resubscribe Subscriptions on Reconnect
  • CO-5232: Private messages
  • CO-5154: Support for Multiple Dialogs of the same Type