Intro
This tutorial builds two Custom Apps that communicate in real time using App Broadcasting. You’ll create:
- Selector App — A data table that publishes a
selection:changedevent whenever a user clicks a row - Detail App — A panel that subscribes to
selection:changedand displays details for the selected record
- How to declare broadcast channels in
manifest.json - How to use
domo.broadcastState()for sticky messages that survive late mounts - How to filter messages by source using
domo.onBroadcastFrom() - Best practices for topic naming and payload design
Prerequisites: Complete the Setup and Installation guide. You’ll need two app designs published to the same Domo page.
Step 1: Scaffold both apps
Create two separate app projects:
Step 2: Configure the Selector App manifest
Open
selector-app/manifest.json and add the channels and datasetsMapping properties:
sticky: true— The Detail App might mount after the user has already clicked a row. Sticky ensures it receives the last selection immediately.- Topic naming —
selection:changeduses thenamespace:eventconvention. The namespace groups related topics; the event describes what happened.
Step 3: Build the Selector App component
Replace
selector-app/src/App.tsx:
Step 4: Configure the Detail App manifest
Open
detail-app/manifest.json:
Step 5: Build the Detail App component
Replace
detail-app/src/App.tsx:
sticky: true, if the Detail App mounts after a selection has been made, it immediately receives the last value — no waiting for the user to click again.
Step 6: Publish and test
Publish both apps and place them on the same Domo page:
Pattern: Filtering by source
If your page has multiple Selector Apps and you only want to listen to one, use
domo.onBroadcastFrom():
sourceAppId field of any message it sends, or in the App Broadcasting DevTools inspector.
Pattern: Multi-topic coordination
Real apps often use multiple topics. Here’s a Selector App that publishes both selection state and hover events:
Pattern: One-time initialization
Use
domo.onBroadcastOnce() when an app only needs to receive a message once (e.g., initial configuration from a coordinator app):
Error handling
The SDK throws synchronous errors for invalid usage:
Summary
Next steps
- App Broadcasting Guide — Architecture, security model, and lifecycle details
- The Manifest File — Full channel declaration reference
- domo.js SDK Reference — Complete API documentation