The PubSub library is a publishing and subscription system based on jQuery.Callbacks functions. With this implementation, messages can be published by any object in the system when events happen and subscribers can listen for those messages and perform additional tasks as needed. The backbone of the PubSub library is a list of topics identified by ID, for example, PAGE_READY and CART_ADD. Publishers (which are typically Commerce Cloud widgets) publish messages to these topics when events happen. Subscribers to a given topic receive the messages published to that topic along with supporting data.

You can create custom topics and add them to the PubSub library; however, these custom topics may only be used by custom widgets that you build. Out-of-the-box widgets will not have awareness of or access to custom PubSub topics.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices