BigdataWidgetManager. The manager gives you one place for base theming and a shared event path so when the chat raises opendocument (for example from a citation), the document viewer can show that document without wiring your own pub/sub or global state.
Connecting Bigdata widgets
Load both widget script tags first soBigdataAgent and BigdataDocumentViewer are defined. Then create one BigdataWidgetManager and pass it in each widget’s config along with distinct instanceId values.
BigdataWidgetManager may be exposed by more than one widget bundle (for example the chat and document viewer). In this guide we use the canonical UMD export on BigdataDocumentViewer: BigdataDocumentViewer.BigdataWidgetManager. Use either export consistently-don’t mix them in the same page’s code.The proxy, API keys, and CORS story are unchanged. Each widget may still use its own
proxyUrl; see the two embed guides for your backend and Research Agent API and document Content flows.How a citation reaches the document viewer
Citation flow - the chat emitsopendocument on the shared BigdataWidgetManager; the manager delivers it to the document viewer, which opens the file.
Event payloads in handlers include instanceName, timestamp, and data. The data object matches the chat and document viewer event tables.
Minimal wiring (concept)
- Create a manager -
BigdataDocumentViewer; see the Global API: BigdataDocumentViewer section in the document viewer page.
- Initialize the document viewer -
- Initialize the chat -
instanceId for each that is unique on the page. If you omit it, the defaults are "chat" and "document", which is fine for a single pair. Add explicit ids if you add more than one of either widget or want clearer logs and listeners.
Example shape (placeholders; align script URLs and options with the two quickstarts):
Sharing configuration through the manager
-
Base theme - The manager holds an optional shared
baseTheme. The widgets merge their ownthemeon top, same as in Multiple widgets and shared theming (chat) and the document viewer’s matching section. -
Event bus - Internally, when one widget emits an event, the manager broadcasts it to every instance registered on that manager. The document viewer listens for
opendocumentto switch what is on screen. The chat emits that event when a user follows a Bigdata citation, so a shared manager is how those two stay in sync on one page.
Events you lean on for coordination
| Event | Role when connecting the two widgets |
|---|---|
opendocument | Chat emits with data: at least documentId, isPrivate; optional match metadata for highlights when your integration supplies it. The document viewer handles the event to show the file. Full field lists: Chat · Document |
openlink | For opening an external URL instead of in-product document navigation; chat describes the data shape. |
ready | Fires with { widgetName } after the widget is mounted. |
addListener / removeListener (or the chat’s emit for advanced flows such as a host-triggered send - see the chat page) on the returned instances the same as on a single widget.
Build your own connection
The chat can registeronDocumentClick and onLinkClick in config (or attach equivalent listeners on the chat instance). These are shortcuts for observing user interactions (analytics, logging, or side effects) and do not override the default built-in behavior by themselves. The usual “chat + document on one page” path is the shared manager: the chat emits, the document viewer is already listening through the same manager, so you do not need extra glue for the default “open in viewer” experience.
Further reading
- Chat widget -
proxyUrl,config, themes, and events. - Document viewer -
openDocumentshape, proxy contract, and events. - Support - for WordPress, enterprise questions, or integration help.