Commerce Cloud includes two mechanisms for storefront event notification:
The PubSub library provides a way for code to publish and subscribe to a set of “global” messages. That is, any code in the application can publish messages about an event and any code can listen for those messages.
The
event-dispatcher
module provides the ability to listen for events triggered by a specific instance of an object.
This chapter covers both mechanisms and includes the following topics: