Elastic Path Production Tools

Catalog Syndication Event Messages

Catalog Syndication Event Messages

Domain event messages are the messages that Elastic Path Commerce Manager sends to integration server using Java Messaging Service (JMS) about the catalog updates, which are the domain event messages. You can create, update, or delete any of the following to trigger an event:
  • SKUs
  • Brands
  • Attributes
  • Products
  • Categories
  • Field metadata

The two types of event messages are:

  • Domain event: An event generated when a catalog domain object is updated.
  • Catalog event: A message with the built projection's Global Unique Identifier (GUID).

For more information about adding event message types, see the Adding New Event Type section.

Domain Event Messages

The domain event message contains the following information:
  • class: The type of message, such as, DomainEventType.
  • name: The event type, such as, SKU_OPTION_CREATED.
  • guid: The code for the entity, such as, product code.

The projection builder receives the event message in the following format:

{
    "eventType":{ 
        "@class":"DomainEventType",
        "name":"<EVENT_TYPE>"
    },"guid":"<ENTITY_CODE>","data":{}}

When you update data, Elastic Path Commerce Manager sends a VirtualTopic.ep.domain message to JMS. The following events trigger the projection builder to run an appropriate action:

  • Create, update, or delete the following entities:
  • SKU_OPTION
  • BRAND
  • CART_ITEM_MODIFIER_GROUP
  • ATTRIBUTE
  • PRODUCT
  • CATEGORY
  • Create or delete links in a CATEGORY

Catalog Event Messages

A catalog event message contains the following information:
  • class: The type of message, such as, CatalogEventType.
  • name: The event type, such as, OPTIONS_UPDATED.
  • guid: The aggregate of all updated codes to sent in one list.
  • modifiedDateTime: The time stamp of the projection build.
  • store: The code to identify the store.
  • type: The projection type, such as, option, or brand.
When the projection builder completes building the updates, Elastic Path Commerce Manager sends a message to the VitrutalTopic.ep.catalog topic to notify the CMS.

The following projection event types initiate a VirtualTopic.ep.catalog message:

  • OPTIONS_UPDATED
  • BRANDS_UPDATED
  • FIELD_METADATA_UPDATED
  • ATTRIBUTES_UPDATED
  • OFFERS_UPDATED
  • CATEGORIES_UPDATED

For CMS to consume projections, a catalog event message is sent to notify updates. The message is sent to the catalog events channel. The following is an example of a catalog event message:

{
    "eventType": {
        "@class": "CatalogEventType",
        "name": "OPTIONS_UPDATED"
    },
    "guid": "AGGREGATE",
    "data": {
        "type": "option",
        "store": "MyStore",
        "modifiedDateTime": "2018-01-01T14:47:00+00:00",
        "codes": [
            "COLOUR",
            "SHAPE"
        ]
    }
}
Note: The GUID is listed as AGGREGATE, so the integration server sends events, consisting of all updates, in a single catalog event message.

The CMS consumes a catalog event message and uses the Syndication API to fetch projections.