Setting Up the Pubsub SDK (Winter '20)

The Vlocity Digital Commerce SDK includes the pubsub SDK, which supports communication between Digital Commerce components, including Digital Commerce Lightning Web Components, Digital Commerce Web Components, JavaScript-based framework, and so on. For more details, see the PubSub SDK reference.

Use the following example Digital Commerce pubsub register method to add a callback function to the list of subscribers for a particular event:

Use the following example fire method to publish the occurrence of an event:

Use the following example unregister method to cancel subscription of an event: