yuichirio_ha
07/22/2026, 4:18 AMAnswer Overflow
07/22/2026, 4:18 AMspotter-code
07/22/2026, 4:18 AMUpdateFilters only for existing Liveboard filters. If you need to apply or change runtime filters, use HostEvent.UpdateRuntimeFilters instead.
- LiveboardRendered is documented as “Emitted when the Liveboard shell loads” and can be used as a hook to trigger other events.
- For the most robust “fire as soon as available” behavior, use:
- useHostEventsV2: true
- liveboardEmbed.subscribedEvent(HostEvent.UpdateFilters)
- If multiple users need different filters, keep that logic in your app and only call trigger(...) for the users who match your condition.
Docs:
- Embed a Liveboard: https://developers.thoughtspot.com/docs/embed-liveboard#_register_handle_and_trigger_events
- Embed events: https://developers.thoughtspot.com/docs/embed-events
- `EmbedEvent.LiveboardRendered`: https://developers.thoughtspot.com/docs/Enumeration_EmbedEvent#_liveboardrendered
- Filters overview / `UpdateFilters`: https://developers.thoughtspot.com/docs/filters-overview#_updatefilters_event
- Host events: https://developers.thoughtspot.com/docs/host-events#_retrieving_and_updating_filtersspotter-code
07/22/2026, 4:18 AMEmbedEvent.LiveboardRendered as the normal hook to trigger HostEvent.UpdateFilters right after the Liveboard shell is rendered.
If your goal is “trigger as soon as it’s ready, without timing issues”, the more reliable pattern is to listen for the host-event subscription signal using subscribedEvent(HostEvent.UpdateFilters) and then call trigger(HostEvent.UpdateFilters, ...). The official example specifically calls this the readiness pattern for triggering host events at load time, and it requires useHostEventsV2.
js
import {
init,
AuthType,
LiveboardEmbed,
EmbedEvent,
HostEvent,
} from '@thoughtspot/visual-embed-sdk';
init({
thoughtSpotHost: 'https://your-instance.thoughtspot.cloud',
authType: AuthType.None,
});
const currentUser = {
id: 'u123',
role: 'regional_manager',
};
const shouldApplyUserFilters = currentUser.role === 'regional_manager';
const liveboardEmbed = new LiveboardEmbed(
document.getElementById('ts-embed'),
{
liveboardId: 'your-liveboard-id',
useHostEventsV2: true,
}
);
if (shouldApplyUserFilters) {
const subscribed = liveboardEmbed.subscribedEvent(HostEvent.UpdateFilters);
const applyFilters = () => {
liveboardEmbed.trigger(HostEvent.UpdateFilters, {
filters: [
{
column: 'region',
oper: 'EQ',
values: ['West'],
},
],
});
};
liveboardEmbed.on(subscribed, applyFilters);
}
liveboardEmbed.on(EmbedEvent.LiveboardRendered, () => {
console.log('Liveboard rendered');
});
liveboardEmbed.render();
If you want the simpler event-based approach, this is also supported:
```js
import {
init,
AuthType,
LiveboardEmbed,
EmbedEvent,
HostEvent,
} from '@thoughtspot/visual-embed-sdk';
init({
thoughtSpotHost: 'https://your-instance.thoughtspot.cloud',
authType: AuthType.None,
});
const liveboardEmbed = new LiveboardEmbed(
document.getElementById('ts-embed'),
{Justin Mathew
07/22/2026, 7:19 AMyuichirio_ha
07/22/2026, 8:35 AMJustin Mathew
07/22/2026, 9:41 AM