import { EmbedEvent } from '@thoughtspot/visual-embed-sdk';
// Or
// const { EmbedEvent } = window.tsembed;
// create the liveboard embed.
liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => {
console.log('Drilldown event', drilldown);
}));
EmbedEvent
- Index
- Enumeration members
- AIHighlights
- ALL
- AddRemoveColumns
- AddToCoaching
- AddToFavorites
- Alert
- AnswerChartSwitcher
- AnswerDelete
- ApiIntercept
- AskSageInit
- AuthExpire
- AuthInit
- Cancel
- ChangePersonalizedView
- CopyAEdit
- CopyLink
- CopyToClipboard
- CreateConnection
- CreateLiveboard
- CreateModel
- CreateWorksheet
- CrossFilterChanged
- CustomAction
- Data
- DataModelInstructions
- DataSourceSelected
- Delete
- DeletePersonalisedView
- DeletePersonalizedView
- DialogClose
- DialogOpen
- Download
- DownloadAsCsv
- DownloadAsPdf
- DownloadAsPng
- DownloadAsXlsx
- DownloadLiveboardAsContinuousPDF
- DrillExclude
- DrillInclude
- Drilldown
- Edit
- EditTML
- EmbedPageContextChanged
- Error
- Explore
- ExportTML
- FilterChanged
- GetDataClick
- Init
- LastPromptDeleted
- LastPromptEdited
- LiveboardInfo
- LiveboardRendered
- Load
- MakeACopy
- NoCookieAccess
- OnBeforeGetVizDataIntercept
- OrgSwitched
- ParameterChanged
- Pin
- Present
- PreviewSpotterData
- QueryChanged
- RefreshLiveboardBrowserCache
- Rename
- ResetLiveboard
- ResetSpotterConversation
- RouteChange
- Save
- SaveAsView
- SavePersonalisedView
- SavePersonalizedView
- Schedule
- SchedulesList
- SendTestScheduleEmail
- Share
- ShowUnderlyingData
- SpotIQAnalyze
- SpotterConversationDeleted
- SpotterConversationPinned
- SpotterConversationRenamed
- SpotterConversationSelected
- SpotterConversationShareRevoked
- SpotterConversationShared
- SpotterConversationUnpinned
- SpotterData
- SpotterInit
- SpotterLoadComplete
- SpotterQueryTriggered
- SpotterResponseComplete
- SpotterShareConversationButtonHeaderClicked
- SpotterShareConversationMenuItemSidebarClicked
- SpotterShareIncludeNewMessagesCheckboxToggled
- SpotterShareModalCancelButtonClicked
- SpotterShareModalConfirmButtonClicked
- SpotterShareStaleInfoBannerDismissed
- SpotterSharedConversationExitButtonClicked
- SpotterSharedConversationViewed
- SpotterVizCheckpointCreated
- SpotterVizCheckpointRestored
- SpotterVizClosed
- SpotterVizError
- SpotterVizInit
- SpotterVizQueryTriggered
- SpotterVizResponseComplete
- Subscribed
- TableVizRendered
- UpdateConnection
- UpdatePersonalisedView
- UpdatePersonalizedView
- UpdateTML
- VizPointClick
- VizPointDoubleClick
- VizPointRightClick
Event types emitted by the embedded ThoughtSpot application.
To add an event listener use the corresponding LiveboardEmbed.on or AppEmbed.on or SearchEmbed.on method.
If you are using React components for embedding, you can register to any
events from the EmbedEvent list by using the on<EventName> convention.
For example,onAlert, onCopyToClipboard and so on.
// ...
const MyComponent = ({ dataSources }) => {
const onLoad = () => {
console.log(EmbedEvent.Load, {});
};
return (
<SearchEmbed
dataSources={dataSources}
onLoad = {logEvent("Load")}
/>
);
};
Indexπ
Enumeration membersπ
AIHighlightsπ
AIHighlights:= "AIHighlights"
Emitted when the AI Highlights action is triggered on a Liveboard
Defined in : types.ts
Version : SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
console.log('AI Highlights', payload);
})
ALLπ
ALL:= "*"
Emits all events.
Defined in : types.ts
Version : SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.ALL, payload => {
console.log('Embed Events', payload)
})
AddRemoveColumnsπ
AddRemoveColumns:= "addRemoveColumns"
One or more data columns have been selected.
Defined in : types.ts
Version : SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
returns : columnIds - the list of columns
appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
console.log('AddRemoveColumns', payload);
})
AddToCoachingπ
AddToCoaching:= "addToCoaching"
Emitted when user opens up the Add to Coaching modal on any visualization in Spotter Embed.
Defined in : types.ts
Version : SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
spotterEmbed.on(EmbedEvent.AddToCoaching, (payload) => {
console.log('payload', payload);
})
AddToFavoritesπ
AddToFavorites:= "addToFavorites"
Emitted when a user clicks on the Favorite icon on a Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
console.log('favorites', payload);
})
Alertπ
Alert:= "alert"
The embedded object has sent an alert.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : alert - An alert object
searchEmbed.on(EmbedEvent.Alert)
AnswerChartSwitcherπ
AnswerChartSwitcher:= "answerChartSwitcher"
Emitted when an Answer is switched to a chart or table view.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
console.log('switch view', payload);
})
AnswerDeleteπ
AnswerDelete:= "answerDelete"
Emitted when an Answer is deleted in the app Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
appEmbed.on(EmbedEvent.AnswerDelete, payload => {
console.log('delete answer', payload)}, {start: true })
//trigger when action is completed
appEmbed.on(EmbedEvent.AnswerDelete, payload => {
console.log('delete answer', payload)})
ApiInterceptπ
ApiIntercept:= "ApiIntercept"
Emitted when the user intercepts a URL.
Supported on all embed types.
Defined in : types.ts
Version : SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
console.log('payload', payload);
responder({
data: {
execute: false,
error: {
errorText: 'Error Occurred',
}
}
})
})
// We can also send a response for the intercepted api
embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
console.log('payload', payload);
responder({
data: {
execute: false,
response: {
body: {
data: {
// Some api response
},
}
}
}
})
})
// here embed will use the response from the responder as the response for the api
// We can also send error in response for the intercepted api
embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
console.log('payload', payload);
responder({
data: {
execute: false,
response: {
body: {
errors: [{
title: 'Error Occurred',
description: 'Error Description',
isUserError: true,
}],
data: {},
},
}
}
})
})
AskSageInitπ
AskSageInit:= "AskSageInit"
Emitted when the Ask Sage is initialized.
Defined in : types.ts
Version : SDK: 1.29.0 | ThoughtSpot Cloud: 9.12.0.cl
returns : viewName: string
returns : viewId: string
returns : liveboardId: string
returns : isPublic: boolean
AuthExpireπ
AuthExpire:= "ThoughtspotAuthExpired"
The ThoughtSpot authentication session has expired.
Defined in : types.ts
Version : SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
//show auth expired banner
function showAuthExpired() {
document.getElementById("authExpiredBanner");
}
AuthInitπ
AuthInit:= "authInit"
Authentication has either succeeded or failed.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.AuthInit, payload => {
console.log('AuthInit', payload);
})
returns : isLoggedIn - A Boolean specifying whether authentication was successful.
Cancelπ
Cancel:= "cancel"
Emitted when a user clicks Cancel in edit mode on a Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.Cancel)
ChangePersonalizedViewπ
ChangePersonalizedView:= "changePersonalisedView"
Emitted when a user selects a different Personalized View or resets to the original/default view on a Liveboard.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
console.log(data.viewId); // '2a021a12-...' or null (default)
console.log(data.liveboardId); // 'abc123...'
console.log(data.isPublic); // true | false
})
returns : viewName: string - Name of the selected view,
or 'Original View' when reset to default.
returns : viewId: string | null - GUID of the selected view,
or null when reset to default.
returns : liveboardId: string
returns : isPublic: boolean
CopyAEditπ
CopyAEdit:= "copyAEdit"
Emitted when the user creates a copy of an Answer. Use start:true to subscribe to when copy and edit is initiated, or end:true to subscribe to when copy and edit is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
appEmbed.on(EmbedEvent.CopyAEdit, payload => {
console.log('Copy and edit', payload)}, {start: true })
//emit when action ends
appEmbed.on(EmbedEvent.CopyAEdit, payload => {
console.log('Copy and edit', payload)})
CopyLinkπ
CopyLink:= "embedDocument"
Emitted when a user clicks Copy link action on a visualization.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.CopyLink, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'})
CopyToClipboardπ
CopyToClipboard:= "context-menu-item-copy-to-clipboard"
Emitted when a column value is copied in the embedded app.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
searchEmbed.on(EmbedEvent.CopyToClipboard, payload => {
console.log('copy to clipboard', payload);
})
CreateConnectionπ
CreateConnection:= "createConnection"
Emitted when a user updates a connection on the Data page
Defined in : types.ts
Version : SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
CreateLiveboardπ
CreateLiveboard:= "createLiveboard"
Emitted when the liveboard is created from pin modal or Liveboard list page. You can use this event as a hook to trigger other events on liveboard creation.
liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
console.log('payload', payload);
})
Defined in : types.ts
Version : SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
CreateModelπ
CreateModel:= "createModel"
Emitted when a user creates a Model.
Defined in : types.ts
Version : SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
CreateWorksheetπ
CreateWorksheet:= "createWorksheet"
Emitted when a user creates a Worksheet.
Defined in : types.ts
Version : SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
CrossFilterChangedπ
CrossFilterChanged:= "cross-filter-changed"
Emitted when a user interacts with cross filters on a visualization or Liveboard.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'})
CustomActionπ
CustomAction:= "customAction"
A custom action has been triggered.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : actionId - ID of the custom action
returns : payload CustomActionPayload - Response payload with the
Answer or Liveboard data
appEmbed.on(EmbedEvent.customAction, payload => {
const data = payload.data;
if (data.id === 'insert Custom Action ID here') {
console.log('Custom Action event:', data.embedAnswerData);
}
})
Dataπ
Data:= "data"
Data pertaining to an Answer, Liveboard or Spotter visualization is received. The event payload includes the raw data of the object.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : data - Answer of Liveboard data
liveboardEmbed.on(EmbedEvent.Data, payload => {
console.log('data', payload);
})
DataModelInstructionsπ
DataModelInstructions:= "DataModelInstructions"
Emitted when user opens up the data model instructions modal in Spotter embed.
Defined in : types.ts
Version : SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
spotterEmbed.on(EmbedEvent.DataModelInstructions, (payload) => {
console.log('payload', payload);
})
DataSourceSelectedπ
DataSourceSelected:= "dataSourceSelected"
One or more data sources have been selected.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : dataSourceIds - the list of data sources
searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
console.log('DataSourceSelected', payload);
})
Deleteπ
Delete:= "delete"
Emitted when a user clicks Delete on a visualization
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.Delete,
{vizId: '730496d6-6903-4601-937e-2c691821af3c'})
DeletePersonalisedViewπ
DeletePersonalisedView:= "deletePersonalisedView"
Emitted when a PersonalisedView is deleted. This event is deprecated. Use EmbedEvent.DeletePersonalizedView instead.
Defined in : types.ts
Version : SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
Deprecated : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
returns : views: string[]
returns : liveboardId: string
DeletePersonalizedViewπ
DeletePersonalizedView:= "deletePersonalisedView"
Emitted when a PersonalizedView is deleted.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
returns : views: string[]
returns : liveboardId: string
DialogCloseπ
DialogClose:= "dialog-close"
Emitted when any modal is closed in the app
Defined in : types.ts
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.DialogClose, payload => {
console.log('dialog close', payload);
})
DialogOpenπ
DialogOpen:= "dialog-open"
Emitted when any modal is opened in the app
Defined in : types.ts
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.DialogOpen, payload => {
console.log('dialog open', payload);
})
Downloadπ
Download:= "download"
Emitted when the download action is triggered on an Answer.
Note: This event is deprecated in v1.21.0.
To fire an event when a download action is initiated on a chart or table,
use EmbedEvent.DownloadAsPng, EmbedEvent.DownloadAsPDF,
EmbedEvent.DownloadAsCSV, or EmbedEvent.DownloadAsXLSX
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
liveboardEmbed.on(EmbedEvent.Download, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'
})
DownloadAsCsvπ
DownloadAsCsv:= "downloadAsCsv"
Emitted when the Download as CSV action is triggered on an Answer. Use start:true to subscribe to when download as CSV is initiated, or end:true to subscribe to when download as CSV is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
console.log('download CSV', payload)}, {start: true })
//emit when action ends
searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
console.log('download CSV', payload)})
DownloadAsPdfπ
DownloadAsPdf:= "downloadAsPdf"
Emitted when the Download as PDF action is triggered on an Answer Use start:true to subscribe to when download as PDF is initiated, or end:true to subscribe to when download as PDF is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
console.log('download PDF', payload)}, {start: true })
//emit when action ends
searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
console.log('download PDF', payload)})
DownloadAsPngπ
DownloadAsPng:= "downloadAsPng"
Emitted when the download action is triggered on an Answer. Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
//emit when action starts
searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
console.log('download PNG', payload)}, {start: true })
//emit when action ends
searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
console.log('download PNG', payload)})
DownloadAsXlsxπ
DownloadAsXlsx:= "downloadAsXlsx"
Emitted when the Download as XLSX action is triggered on an Answer. Use start:true to subscribe to when download as XLSX is initiated, or end:true to subscribe to when download as XLSX is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
console.log('download Xlsx', payload)}, { start: true })
//emit when action ends
searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
console.log('download Xlsx', payload)})
DownloadLiveboardAsContinuousPDFπ
DownloadLiveboardAsContinuousPDF:= "downloadLiveboardAsContinuousPDF"
Emitted when the Download Liveboard as Continuous PDF action is triggered on a Liveboard.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
console.log('download liveboard as continuous PDF', payload)})
DrillExcludeπ
DrillExclude:= "context-menu-item-exclude"
Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.DrillExclude, payload => {
console.log('Drill exclude', payload);
})
DrillIncludeπ
DrillInclude:= "context-menu-item-include"
Emitted when a user clicks the Include action to include a specific value or data on a chart or table.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.DrillInclude, payload => {
console.log('Drill include', payload);
})
Drilldownπ
Drilldown:= "drillDown"
A drill-down operation has been performed.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : additionalFilters - Any additional filters applied
returns : drillDownColumns - The columns on which drill down was performed
returns : nonFilteredColumns - The columns that were not filtered
searchEmbed.on(EmbedEvent.DrillDown, {
points: {
clickedPoint,
selectedPoints: selectedPoint
},
autoDrillDown: true,
})
In this example, VizPointDoubleClick event is used for
triggering the DrillDown event when an area or specific
data point on a table or chart is double-clicked.
searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
console.log(payload);
const clickedPoint = payload.data.clickedPoint;
const selectedPoint = payload.data.selectedPoints;
console.log('>>> called', clickedPoint);
embed.trigger(HostEvent.DrillDown, {
points: {
clickedPoint,
selectedPoints: selectedPoint
},
autoDrillDown: true,
})
})
Editπ
Edit:= "edit"
Emitted when a user clicks Edit on a Liveboard or visualization
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.Edit, payload => {
console.log('Liveboard edit', payload);
})
EditTMLπ
EditTML:= "editTSL"
Emitted when a user clicks the Edit TML action on an embedded Liveboard.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.EditTML, payload => {
console.log('Edit TML', payload);
})
EmbedPageContextChangedπ
EmbedPageContextChanged:= "EmbedPageContextChanged"
Triggered whenever the page context changes, returning the current context along with the navigation stack.
Defined in : types.ts
Version : SDK: 1.47.2 | ThoughtSpot: 26.3.0.cl
embed.on(EmbedEvent.EmbedPageContextChanged, (payload) => {
console.log('payload', payload);
})
Errorπ
Error:= "Error"
Fired when an error occurs in the embedded component.
Important: This event fires for many reasons β including internal
validation warnings (e.g. HOST_EVENT_VALIDATION), configuration issues,
and transient errors that ThoughtSpot already handles gracefully inside the
iframe. Do not call embed.destroy() or unmount the embed component on
every error. Doing so will tear down the iframe and abort all in-flight
requests, causing the embed to fail entirely.
Only treat the following codes as unrecoverable:
- INIT_ERROR β SDK was not initialised before render
- LOGIN_FAILED β authentication could not be completed
All other error codes should be logged and inspected, not acted upon destructively.
Note: There is currently no dedicated event for a true unrecoverable
crash. A future EmbedEvent.FatalError event is planned to give customers
a clean signal for when the embed cannot recover and needs to be torn down.
Error types include:
API - API call failure.
FULLSCREEN - Error when presenting a Liveboard in full screen mode.
VALIDATION_ERROR - Internal host event or configuration validation warning.
For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : error - An error object or message
// Recommended pattern β only destroy on truly fatal errors
embed.on(EmbedEvent.Error, (error) => {
const FATAL_CODES = ['INIT_ERROR', 'LOGIN_FAILED'];
if (FATAL_CODES.includes(error.data?.code)) {
embed.destroy();
return;
}
// Log all other errors β do not destroy
console.warn('Embed error (non-fatal):', error);
});
// API error
SearchEmbed.on(EmbedEvent.Error, (error) => {
console.log(error);
// { errorType: "API", message: '...', code: '...' }
});
Exploreπ
Explore:= "explore"
Emitted when a user clicks Explore on a visualization
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.Explore, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'})
ExportTMLπ
ExportTML:= "exportTSL"
Emitted when the Export TML action is triggered on an an embedded object in the app Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.ExportTML, payload => {
console.log('Export TML', payload)}, { start: true })
//emit when action ends
searchEmbed.on(EmbedEvent.ExportTML, payload => {
console.log('Export TML', payload)})
FilterChangedπ
FilterChanged:= "filterChanged"
Emitted when a user changes any filter on a Liveboard.
Returns filter type and name, column name and ID, and runtime
filter details.
The payload includes an optional applicability attribute indicating the
scope of the changed filter. It contains a level (LIVEBOARD,
TAB, or GROUP) and, when level is TAB or GROUP, a
targetId with the GUID of the target. At LIVEBOARD level there
is no targetId, since the filter applies to the whole Liveboard.
The applicability attribute is available from SDK: 1.53.0 |
ThoughtSpot: 26.10.0.cl.
Defined in : types.ts
Version : SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
console.log('payload', payload);
// payload.data optionally includes applicability: { level, targetId }
})
GetDataClickπ
GetDataClick:= "getDataClick"
Emitted when the Get Data action is initiated.
Applicable to SearchBarEmbed only.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
searchbarEmbed.on(EmbedEvent.GetDataClick)
.then(data => {
console.log('Answer Data:', data);
})
Initπ
Init:= "init"
Rendering has initialized.
Defined in : types.ts
liveboardEmbed.on(EmbedEvent.Init, showLoader)
//show a loader
function showLoader() {
document.getElementById("loader");
}
returns : timestamp - The timestamp when the event was generated.
LastPromptDeletedπ
LastPromptDeleted:= "LastPromptDeleted"
Emitted when the last Spotter query is deleted in Spotter embed.
Defined in : types.ts
Version : SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => {
console.log('payload', payload);
})
LastPromptEditedπ
LastPromptEdited:= "LastPromptEdited"
Emitted when the last Spotter query is edited in Spotter embed.
Defined in : types.ts
Version : SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => {
console.log('payload', payload);
})
LiveboardInfoπ
LiveboardInfo:= "pinboardInfo"
Emitted when a user clicks Show Liveboard details on a Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => {
console.log('Liveboard details', payload);
})
LiveboardRenderedπ
LiveboardRendered:= "PinboardRendered"
Emitted when the Liveboard shell loads. You can use this event as a hook to trigger other events on the rendered Liveboard.
Defined in : types.ts
Version : SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
console.log('Liveboard is rendered', payload);
})
The following example shows how to trigger
SetVisibleVizs event using LiveboardRendered embed event:
const embedRef = useEmbedRef();
const onLiveboardRendered = () => {
embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
};
Loadπ
Load:= "load"
The embed object container has loaded.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
returns : timestamp - The timestamp when the event was generated.
liveboardEmbed.on(EmbedEvent.Load, hideLoader)
//hide loader
function hideLoader() {
document.getElementById("loader");
}
MakeACopyπ
MakeACopy:= "makeACopy"
Emitted when a user clicks Make a copy on a Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
console.log('Copy', payload);
})
NoCookieAccessπ
NoCookieAccess:= "noCookieAccess"
Emitted when the embed does not have cookie access. This happens
when third-party cookies are blocked by Safari or other
web browsers. NoCookieAccess can trigger.
Defined in : types.ts
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
appEmbed.on(EmbedEvent.NoCookieAccess)
OnBeforeGetVizDataInterceptπ
OnBeforeGetVizDataIntercept:= "onBeforeGetVizDataIntercept"
This event allows developers to intercept search execution and implement logic that decides whether Search Data should return data or block the search operation.
Prerequisite: Set`isOnBeforeGetVizDataInterceptEnabled` to true
to ensure that EmbedEvent.OnBeforeGetVizDataIntercept is emitted
when the embedding application user tries to run a search query.
This framework applies only to AppEmbed and SearchEmbed.
Defined in : types.ts
Version : SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
- Parameter
-
Includes the following parameters:
-
payload: The payload received from the embed related to the Data API call. -
responder: Contains elements that let developers define whether ThoughtSpot will run or block the search operation, and if blocked, which error message to provide. -
execute- Whenexecutereturnstrue, the search is run. Whenexecutereturnsfalse, the search is not executed. -
error- Developers can customize the user-facing error message whenexecuteisfalseby using theerrorparameters inresponder. -
errorText- The error message text shown to the user.
-
This example blocks search operation and returns a custom error message:
embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
responder({
data: {
execute: false,
error: {
// Provide a custom error message to explain why the search did not run.
errorText: 'This search query cannot be run. Please contact your administrator for more details.',
},
},
});
})
This example allows the search operation to run
unless the query contains both sales and county,
and returns a custom error message if the query is rejected:
embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
// Record the search query submitted by the end user.
const query = payload.data.data.answer.search_query;
responder({
data: {
// Returns true as long as the query does not include both `sales` and `county`.
execute: !(query.includes('sales') && query.includes('county')),
error: {
// Provide a custom error message when the query is blocked by your logic.
errorText:
"You can't use this query: "
+ query
+ ". The 'sales' measure can never be used at the 'county' level. "
+ "Please try another measure or remove 'county' from your search.",
},
},
});
})
OrgSwitchedπ
OrgSwitched:= "orgSwitched"
Emitted when the organization is switched.
Defined in : types.ts
Version : SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
appEmbed.on(EmbedEvent.OrgSwitched, (payload) => {
console.log('payload', payload);
})
ParameterChangedπ
ParameterChanged:= "parameterChanged"
Emitted when parameter changes in an Answer
or Liveboard.
The payload includes an optional applicability attribute indicating the
scope of the changed parameter. It contains a level (LIVEBOARD,
TAB, or GROUP) and, when level is TAB or GROUP, a
targetId with the GUID of the target. At LIVEBOARD level there
is no targetId, since the parameter applies to the whole Liveboard.
The applicability attribute is available from SDK: 1.53.0 |
ThoughtSpot: 26.10.0.cl.
liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
console.log('payload', payload);
// payload.data optionally includes applicability: { level, targetId }
})
Defined in : types.ts
Version : SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
Pinπ
Pin:= "pin"
Emitted when a user initiates the Pin action to add an Answer to a Liveboard. Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.Pin, payload => {
console.log('pin', payload)
}, {
start: true
})
//emit when action ends
searchEmbed.on(EmbedEvent.Pin, payload => {
console.log('pin', payload)
})
Presentπ
Present:= "present"
Emitted when a user clicks Present on a Liveboard or visualization
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.Present)
liveboardEmbed.on(EmbedEvent.Present, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'})
})
PreviewSpotterDataπ
PreviewSpotterData:= "PreviewSpotterData"
Emitted when user opens up the data source preview modal in Spotter embed.
Defined in : types.ts
Version : SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => {
console.log('payload', payload);
})
QueryChangedπ
QueryChanged:= "queryChanged"
Search query has been updated by the user.
Defined in : types.ts
Version : SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
RefreshLiveboardBrowserCacheπ
RefreshLiveboardBrowserCache:= "refreshLiveboardBrowserCache"
Emitted when a user clicks the Refresh button in the
Liveboard header. Requires enableLiveboardDataCache
to be enabled.
Defined in : types.ts
Version : SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
liveboardEmbed.on(EmbedEvent.RefreshLiveboardBrowserCache, (payload) => {
console.log('Liveboard browser cache refreshed', payload);
// payload: { liveboardId: string }
})
Renameπ
Rename:= "rename"
Emitted when a Liveboard or visualization is renamed.
Defined in : types.ts
Version : SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw
ResetLiveboardπ
ResetLiveboard:= "resetLiveboard"
Emitted when a Liveboard is reset.
Defined in : types.ts
Version : SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
returns : viewName: string
returns : viewId: string
returns : liveboardId: string
returns : isPublic: boolean
ResetSpotterConversationπ
ResetSpotterConversation:= "ResetSpotterConversation"
Emitted when the conversation is reset in Spotter embed.
Defined in : types.ts
Version : SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => {
console.log('payload', payload);
})
RouteChangeπ
RouteChange:= "ROUTE_CHANGE"
Detects the route change.
Defined in : types.ts
Version : SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
searchEmbed.on(EmbedEvent.RouteChange, payload =>
console.log('data', payload))
Saveπ
Save:= "save"
Emitted when an Answer is saved in the app. Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//Emit when action starts
searchEmbed.on(EmbedEvent.Save, payload => {
console.log('Save', payload)
}, {
start: true
})
//emit when action ends
searchEmbed.on(EmbedEvent.Save, payload => {
console.log('Save', payload)
})
SaveAsViewπ
SaveAsView:= "saveAsView"
Emitted when an Answer is saved as a View.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
appEmbed.on(EmbedEvent.SaveAsView, payload => {
console.log('View', payload);
})
SavePersonalisedViewπ
SavePersonalisedView:= "savePersonalisedView"
Emitted when a Personalised view is saved. This event is deprecated. Use EmbedEvent.SavePersonalizedView instead.
Defined in : types.ts
Version : SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
Deprecated : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
returns : viewName: string
returns : viewId: string
returns : liveboardId: string
returns : isPublic: boolean
SavePersonalizedViewπ
SavePersonalizedView:= "savePersonalisedView"
Emitted when a Personalized view is saved.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
returns : viewName: string
returns : viewId: string
returns : liveboardId: string
returns : isPublic: boolean
Scheduleπ
Schedule:= "subscription"
Emitted when a user clicks Schedule on a Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.Schedule, payload => {
console.log('Liveboard schedule', payload);
})
SchedulesListπ
SchedulesList:= "schedule-list"
Emitted when a user clicks Manage schedules on a Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.on(EmbedEvent.SchedulesList)
SendTestScheduleEmailπ
SendTestScheduleEmail:= "sendTestScheduleEmail"
Emitted when a user clicks the Send Test Email button in the
Liveboard schedule modal. Requires isSendNowLiveboardSchedulingEnabled
to be enabled.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
liveboardEmbed.on(EmbedEvent.SendTestScheduleEmail, (payload) => {
console.log('Send test email', payload);
// payload: { liveboardId: string, sendToSelf: boolean }
})
Shareπ
Share:= "share"
Emitted when a user shares an object with another user or group
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.Share, payload => {
console.log('Share', payload)
}, {
start: true
})
//emit when action ends
searchEmbed.on(EmbedEvent.Share, payload => {
console.log('Share', payload)
})
ShowUnderlyingDataπ
ShowUnderlyingData:= "showUnderlyingData"
Emitted when a user clicks Show underlying data on an Answer.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
console.log('show data', payload);
})
SpotIQAnalyzeπ
SpotIQAnalyze:= "spotIQAnalyze"
Emitted when SpotIQ analysis is triggered
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
//emit when action starts
searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
console.log('SpotIQAnalyze', payload)
}, {
start: true
})
//emit when action ends
searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
console.log('SpotIQ analyze', payload)
})
SpotterConversationDeletedπ
SpotterConversationDeleted:= "spotterConversationDeleted"
Emitted when a Spotter conversation is deleted.
Defined in : types.ts
Version : SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
console.log('Conversation deleted', payload);
// payload: { convId: string, title: string }
})
SpotterConversationPinnedπ
SpotterConversationPinned:= "spotterConversationPinned"
Emitted when a Spotter conversation is pinned.
Defined in : types.ts
Version : SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationPinned, (payload) => {
console.log('Conversation pinned', payload);
// payload: { conversationId: string, pinnedAt: string (ISO 8601) }
})
SpotterConversationRenamedπ
SpotterConversationRenamed:= "spotterConversationRenamed"
Emitted when a Spotter conversation is renamed.
Defined in : types.ts
Version : SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
console.log('Conversation renamed', payload);
// payload: { convId: string, oldTitle: string, newTitle: string }
})
SpotterConversationSelectedπ
SpotterConversationSelected:= "spotterConversationSelected"
Emitted when a Spotter conversation is selected/clicked.
Defined in : types.ts
Version : SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
console.log('Conversation selected', payload);
// payload: { convId: string, title: string, worksheetId: string }
})
SpotterConversationShareRevokedπ
SpotterConversationShareRevoked:= "spotterConversationShareRevoked"
Emitted when access to a shared Spotter conversation is revoked
(recipients removed). fullyRevoked is true when the last sharee is removed
and the share is deleted entirely.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationShareRevoked, (payload) => {
// payload: { convId: string, shareId: string,
// recipientsRemoved: string[], fullyRevoked: boolean }
})
SpotterConversationSharedπ
SpotterConversationShared:= "spotterConversationShared"
Emitted when a Spotter conversation is shared (recipients added, or a new
share created). The host builds its own link from shareId/convId + its
configured CONVERSATION_URL β no link string is sent. Distinct from
SpotterShareModalConfirmButtonClicked, which fires at click time before
the save resolves.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationShared, (payload) => {
// payload: { convId: string, shareId: string,
// recipientsAdded: string[], recipientsRemoved: string[] }
})
SpotterConversationUnpinnedπ
SpotterConversationUnpinned:= "spotterConversationUnpinned"
Emitted when a Spotter conversation is unpinned.
Defined in : types.ts
Version : SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
spotterEmbed.on(EmbedEvent.SpotterConversationUnpinned, (payload) => {
console.log('Conversation unpinned', payload);
// payload: { conversationId: string, unpinnedAt: string (ISO 8601) }
})
SpotterDataπ
SpotterData:= "SpotterData"
Emitted when Spotter response is text data
Defined in : types.ts
Version : SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
spotterEmbed.on(EmbedEvent.SpotterData, (payload) => {
console.log('payload', payload);
})
SpotterInitπ
SpotterInit:= "spotterInit"
Emitted when the Spotter is initialized.
Defined in : types.ts
Version : SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => {
console.log('payload', payload);
})
SpotterLoadCompleteπ
SpotterLoadComplete:= "spotterLoadComplete"
Emitted when a Spotter conversation has been successfully created.
Defined in : types.ts
Version : SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
console.log('payload', payload);
})
SpotterQueryTriggeredπ
SpotterQueryTriggered:= "SpotterQueryTriggered"
Emitted when the Spotter query is triggered in Spotter embed.
Defined in : types.ts
Version : SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => {
console.log('payload', payload);
})
SpotterResponseCompleteπ
SpotterResponseComplete:= "spotterResponseComplete"
Emitted when the Spotter agent finishes streaming/rendering a response. Includes the conversation and message identifiers so the host app can fetch the full conversation history via the REST API if needed.
The payload data has the shape { convId: string, messageId: string }.
Works with SpotterEmbed as well as AppEmbed (when Spotter is reached inside the full application).
Defined in : types.ts
Version : SDK: 1.51.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => {
console.log('Spotter response complete', payload);
})
appEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => {
console.log('Spotter response complete', payload);
})
SpotterShareConversationButtonHeaderClickedπ
SpotterShareConversationButtonHeaderClicked:= "spotterShareConversationButtonHeaderClicked"
Emitted when the header Share button is clicked. Fires Start then End
to bracket the interaction. Appβhost counterpart of the
ShareSpotterConversation host event (user-driven vs programmatic open).
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterShareConversationButtonHeaderClicked, (payload) => {
// payload: { convId: string }
})
SpotterShareConversationMenuItemSidebarClickedπ
SpotterShareConversationMenuItemSidebarClicked:= "spotterShareConversationMenuItemSidebarClicked"
Emitted when the sidebar Share item is clicked. Fires Start then End
to bracket the interaction.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterShareConversationMenuItemSidebarClicked, (payload) => {
// payload: { convId: string }
})
SpotterShareIncludeNewMessagesCheckboxToggledπ
SpotterShareIncludeNewMessagesCheckboxToggled:= "spotterShareIncludeNewMessagesCheckboxToggled"
Emitted when the user toggles the share-modal "include new messages since last shared version" checkbox.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterShareIncludeNewMessagesCheckboxToggled, (payload) => {
// payload: { convId: string, includeNewMessages: boolean }
})
SpotterShareModalCancelButtonClickedπ
SpotterShareModalCancelButtonClicked:= "spotterShareModalCancelButtonClicked"
Emitted when the share modal is dismissed via the Cancel button.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterShareModalCancelButtonClicked, (payload) => {
// payload: { convId: string }
})
SpotterShareModalConfirmButtonClickedπ
SpotterShareModalConfirmButtonClicked:= "spotterShareModalConfirmButtonClicked"
Emitted when the modal Share (confirm) button is clicked β fires at click
time, before the save resolves. Distinct from the SpotterConversationShared
/ SpotterConversationShareRevoked result events.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterShareModalConfirmButtonClicked, (payload) => {
// payload: { convId: string }
})
SpotterShareStaleInfoBannerDismissedπ
SpotterShareStaleInfoBannerDismissed:= "spotterShareStaleInfoBannerDismissed"
Emitted when the user dismisses the stale-snapshot info banner via its cross (distinct from the include-new-messages checkbox toggle).
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterShareStaleInfoBannerDismissed, (payload) => {
// payload: { convId: string }
})
SpotterSharedConversationExitButtonClickedπ
SpotterSharedConversationExitButtonClicked:= "spotterSharedConversationExitButtonClicked"
Emitted when a recipient leaves the read-only shared view via the Exit button.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterSharedConversationExitButtonClicked, (payload) => {
// payload: { convId: string }
})
SpotterSharedConversationViewedπ
SpotterSharedConversationViewed:= "spotterSharedConversationViewed"
Emitted when a recipient opens a shared Spotter conversation (read-only view). No shareId available viewer-side.
Defined in : types.ts
Version : SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
spotterEmbed.on(EmbedEvent.SpotterSharedConversationViewed, (payload) => {
// payload: { convId: string, sourceConvId: string }
// convId = resolved snapshot conv id; sourceConvId = the shared URL id
})
SpotterVizCheckpointCreatedπ
SpotterVizCheckpointCreated:= "SpotterVizCheckpointCreated"
Emitted when a checkpoint is created in the SpotterViz panel.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointCreated, (payload) => {
console.log('SpotterViz checkpoint created', payload);
// payload: { checkpointId: string, source: string, label: string }
})
SpotterVizCheckpointRestoredπ
SpotterVizCheckpointRestored:= "SpotterVizCheckpointRestored"
Emitted when a checkpoint is restored in the SpotterViz panel.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointRestored, (payload) => {
console.log('SpotterViz checkpoint restored', payload);
// payload: { checkpointId: string, newGenNumber: number }
})
SpotterVizClosedπ
SpotterVizClosed:= "SpotterVizClosed"
Emitted when the SpotterViz panel is closed.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizClosed, (payload) => {
console.log('SpotterViz panel closed', payload);
})
SpotterVizErrorπ
SpotterVizError:= "SpotterVizError"
Emitted when an error occurs in the SpotterViz panel.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizError, (payload) => {
console.log('SpotterViz error', payload);
})
SpotterVizInitπ
SpotterVizInit:= "SpotterVizInit"
Emitted when the SpotterViz panel mounts in embed mode.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizInit, (payload) => {
console.log('SpotterViz initialized', payload);
// payload: { liveboardId: string }
})
SpotterVizQueryTriggeredπ
SpotterVizQueryTriggered:= "SpotterVizQueryTriggered"
Emitted when the user submits a prompt in the SpotterViz panel.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizQueryTriggered, (payload) => {
console.log('SpotterViz query triggered', payload);
// payload: { query: string, sessionId: string }
})
SpotterVizResponseCompleteπ
SpotterVizResponseComplete:= "SpotterVizResponseComplete"
Emitted when the SpotterViz agent finishes responding.
Defined in : types.ts
Version : SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
liveboardEmbed.on(EmbedEvent.SpotterVizResponseComplete, (payload) => {
console.log('SpotterViz response complete', payload);
// payload: { sessionId: string, messageId: string }
})
Subscribedπ
Subscribed:= "Subscribed"
Represents a special embed event that is triggered whenever any host event is subscribed.
You can listen to this event when you need to dispatch a host event during load or render, particularly in situations where timing issues may occur.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot: 26.4.0.cl
embed.on(`${HostEvent.Save} Subscribed`, () => {
// make action
});
embed.on(subscribedEvent(HostEvent.Save), () => {
// make action
});
TableVizRenderedπ
TableVizRendered:= "TableVizRendered"
Emits when a table visualization is rendered in the ThoughtSpot embedded app.
You can also use this event as a hook to trigger host events
such as HostEvent.TransformTableVizData on the table visualization.
The event payload contains the data used in the rendered table.
You can extract the relevant data from the payload
stored in payload.data.data.columnDataLite.
columnDataLite is a multidimensional array that contains
data values for each column, which was used in the query to
generate the table visualization. To find and modify specific cell data,
you can either loop through the array or directly access a cell if
you know its position and data index.
In the following code sample, the first cell in the first column
(columnDataLite[0].dataValue[0]) is set to new fob.
Note that any changes made to the data in the payload will only update the
visual presentation and do not affect the underlying data.
To persist data value modifications after a reload or during chart
interactions such as drill down, ensure that the modified
payload in the columnDataLite is passed on to
HostEvent.TransformTableVizData and trigger an update to
the table visualization.
If the Row-Level Security (RLS) rules are applied on the Model, exercise caution when changing column or table cell values to maintain data security.
Defined in : types.ts
Version : SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
searchEmbed.on(EmbedEvent.TableVizRendered, (payload) => {
console.log(payload);
const columnDataLite = payload.data.data.columnDataLite;
columnDataLite[0].dataValue[0]="new fob";
console.log('>>> new Data', columnDataLite);
searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
})
UpdateConnectionπ
UpdateConnection:= "updateConnection"
Emitted when a user updates a connection on the Data page
Defined in : types.ts
Version : SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
UpdatePersonalisedViewπ
UpdatePersonalisedView:= "updatePersonalisedView"
Emitted when name, status (private or public) or filter values of a Personalised view is updated. This event is deprecated. Use EmbedEvent.UpdatePersonalizedView instead.
Defined in : types.ts
Version : SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
Deprecated : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
returns : viewName: string
returns : viewId: string
returns : liveboardId: string
returns : isPublic: boolean
UpdatePersonalizedViewπ
UpdatePersonalizedView:= "updatePersonalisedView"
Emitted when name, status (private or public) or filter values of a Personalized view is updated.
Defined in : types.ts
Version : SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
returns : viewName: string
returns : viewId: string
returns : liveboardId: string
returns : isPublic: boolean
UpdateTMLπ
UpdateTML:= "updateTSL"
Emitted when a user clicks the Update TML action on embedded Liveboard.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
liveboardEmbed.on(EmbedEvent.UpdateTML)
})
VizPointClickπ
VizPointClick:= "vizPointClick"
Listen to clicks on a visualization in a Liveboard or Search result.
Defined in : types.ts
Version : SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
returns : viz, clickedPoint - metadata about the point that is clicked
embed.on(EmbedEvent.VizPointClick, ({data}) => {
console.log(
data.vizId, // viz id
data.clickedPoint.selectedAttributes[0].value,
data.clickedPoint.selectedAttributes[0].column.name,
data.clickedPoint.selectedMeasures[0].value,
data.clickedPoint.selectedMeasures[0].column.name,
)
});
VizPointDoubleClickπ
VizPointDoubleClick:= "vizPointDoubleClick"
Listen to double click actions on a visualization.
Defined in : types.ts
Version : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
returns : ContextMenuInputPoints - Data point that is double-clicked
LiveboardEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
console.log('VizPointDoubleClick', payload);
})
VizPointRightClickπ
VizPointRightClick:= "vizPointRightClick"
Emitted when a user right clicks on a visualization (chart or table)
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
console.log('VizPointClick', payload)
})