Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
Functional Apps
Broadcaster
Official extension
Version: 0.10.2
Latest version: 0.10.2

The Broadcaster app is designed to adapt catalog broadcaster changes to an event in VTEX IO's Events system.

Typically, it's used when developing another IO app that receives the events and calls handler functions to treat the events. For more details about this use, see the Receiving Catalog Changes on VTEX IO guide.

For example, the Availability Notify app uses the Broadcaster app to monitor inventory updates. Once the requested SKU is back in stock, the app will email shoppers who asked to be notified.

The Broadcaster app receives a POST request from the catalog broadcaster with the details of the SKU that changed and pushes an event to the Event system to broadcast to apps that listen to these changes.

The Broadcaster app receives catalog changes from the same account where the app is installed and not from sellers.

SKU information

When the Broadcaster app sends an event, it contains a payload with the following fields:

Field nameDescriptionType
IdSkuSKU ID on VTEX.string
ProductIdProduct ID on VTEX. This field is optional and is only sent in marketplace contexts when an event occurs in the affiliate catalog.long
AnAccount name on VTEX, shown in the store’s VTEX Admin URL.string
IdAffiliateID code of the affiliate that generated the event. This field is optional and is only sent in marketplace contexts when an event occurs in the affiliate catalog.string
SellerChainSellers involved in the chain. This field is optional and is only sent in marketplace contexts with Multilevel Omnichannel Inventory when an event occurs in the affiliate catalog. When there is more than one seller in the chain, they're all included in this field separated by a forward slash (/). Example: "cea/rihappy".string
DateModifiedDate when the item was updated.string
IsActiveIdentifies whether the product is active or not. If true, the product/SKU is active.boolean
StockModifiedIndicates that the inventory level has changed. If false, the inventory level hasn't changed.boolean
PriceModifiedIndicates that the price has changed. If false, the product/SKU price hasn't changed.boolean
HasStockKeepingUnitModifiedIndicates that the product/SKU details have changed, such as name, description, weight, etc. If true, the product/SKU details have changed.boolean
HasStockKeepingUnitRemovedFromAffiliateIndicates that the product is no longer associated with the trade policy. If true, the trade policy has changed.boolean

Notifications in subaccounts

When attempting to listen for catalog change notifications in a subaccount, you'll likely find that your app isn't receiving notifications. This is because, by default, catalog change notifications are only sent to the Broadcaster app installed in the main account.

"Notify Subaccounts" setting

The Broadcaster app installed in the main (parent) account can be configured to push a notification event to all associated subaccounts.

To configure this setting, follow the steps below:

  1. Go to My Apps in the VTEX Admin.
  2. In the list of installed apps, search for Broadcaster.
  3. Click Settings in the app box.
  4. Check the Notify Subaccounts box.
  5. Click Save.

Testing the app

By default, when the Broadcaster Adapter app sends events, they're only sent in the master workspace of each account. If you work in a development workspace, there's a way to receive events there:

"Notify Target Workspace" setting

The app installed in the master workspace can be configured to push a notification event to a selected target workspace in addition to the master workspace.

To configure this setting, follow the steps below:

  1. Go to My Apps in the VTEX Admin.
  2. In the list of installed apps, search for Broadcaster.
  3. Click Settings.
  4. Enter the name of the workspace you want to notify in the Notify Target Workspace field.
  5. Click Save.
See also
VTEX App Store
VTEX IO Apps