Skip to main content
Skip table of contents

Subscribing to LMS Platform Events

Get Started

The following sections of this document will provide context regarding the Pub/Sub messaging approach that’s used to send data between our API and your LMS.

Pub/Sub model

The pub/sub model allows you to stay up-to-date with any LMS data you track through Nimble AMS. While we do allow you to retrieve data on LMS entities at any time through the LMS API, you will likely want to get this information the second it changes. 

By subscribing to our platform events, your LMS system can receive prompts whenever an LMS-enabled record is added or changed. Using this information, you can use retrieve whatever data you need through our LMS REST API.

What information is in the published event?

In addition to the standard Salesforce platform event data the nams__LmsEvent__e includes the following information:

Field

Description
nams__RecordId__c

The Salesforce ID for the related record which can be used to retrieve all LMS data through the LMS API.

nams__EventType__cThe change that triggered this event. Value will be either "insert" or "update".
nams__RecordType__cThe type of record that was either inserted or updated. Value will be either "product" (for NU__Product__c) or "purchase" (for NU__OrderItemLine__c).

Table 1. Published event information

An example of a typical LMS Event.

When are events published?

These events are published whenever a Product which is configured to Sync With LMS or an Order Item Line for one of these products has changes made to one of their tracked fields. Any changes made to these tracked fields will trigger a platform event prompting your system to retrieve more up-to-date values for that record.
The following tracked fields for both of these SObjects are:
Product: Name, Description, and LMS Product Type.
Order Item Line: LMS Completion Status, LMS External ID, and LMS Sync Status.

The value of these fields will not be included in the Platform Events themselves and will need to be queried through the LMS REST API.

How to Subscribe to the platform event

The name of the platform event we publish is nams__LmsEvent__e. There are a number of ways to subscribe to a Salesforce platform event which are detailed here by Salesforce: Salesforce Developers

Also, if you would like to perform your own testing of these platform events before integrating it into your LMS service, then we would recommend using our Business Event App.

  1. From the App Launcher in Staff view, select Business Events.

  2. From here you can use the Platform Event Debugger by selecting LMS Event option from the dropdown and clicking Subscribe.

  3. You will receive a confirmation saying that you are subscribed to the nams__LmsEvent__e channel.

  4. You can then leave this browser tab open to monitor any incoming events.

  5. To trigger a platform event, you can update any Nimble AMS product by setting the Sync With LMS field to checked.

    1. If this field is already checked, you can update any of the fields listed in the above section.

  6. Once the Product is saved with your changes you should be able to see the platform event recorded in the Platform Event Debugger.


Platform Event Debugger in the Business Event App

Subscribing to Platform Events

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.