Options
All
  • Public
  • Public/Protected
  • All
Menu

Event types that can be triggered by the host application to the embedded ThoughtSpot app

To trigger an event use the corresponding LiveboardEmbed.trigger or AppEmbed.trigger or SearchEmbed.trigger method.

example
import { HostEvent } from '@thoughtspot/visual-embed-sdk';
// Or
// const { HostEvent } = window.tsembed;

// create the liveboard embed.

liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
  { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
]);
group

Events

Index

Enumeration members

AddColumns

AddColumns: = "addColumns"

Adds the columns to the current Search.

param
example
searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
version

SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl

CopyLink

CopyLink: = "embedDocument"

Triggers the Copy link action on a Liveboard or visualization

param

object - to trigger the action for a s pecfic visualization in Liveboard embed, pass in vizId as a key

example
liveboardEmbed.trigger(HostEvent.CopyLink)
liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger((HostEvent.CopyLink)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

CreateMonitor

CreateMonitor: = "createMonitor"

Triggers the Create alert action on a visualization

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.CreateMonitor {
 vizId: '730496d6-6903-4601-937e-2c691821af3c'
})
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

Delete

Delete: = "onDeleteAnswer"

Triggers the Delete action on visualization or search

param

incase of Liveboard embed, takes in an object with vizId as a key can be left empty for search and visualization embeds

example
liveboardEmbed.trigger(HostEvent.Delete, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.Delete)

searchEmbed.trigger(HostEvent.Delete)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

Download

Download: = "downloadAsPng"

Triggers the Download action on visualization or search when Displaymode is Chart

example
liveboardEmbed.trigger(HostEvent.Download, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.Download)

searchEmbed.trigger(HostEvent.Download)
deprecated

from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1-sw ,Use DownloadAsPng

version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

DownloadAsCsv

DownloadAsCsv: = "downloadAsCSV"

Triggers the downloadAsCSV action on visualization or search

example
liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.DownloadAsCsv)

searchEmbed.trigger(HostEvent.DownloadAsCsv)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

DownloadAsPdf

DownloadAsPdf: = "downloadAsPdf"

Triggers the Download PDF action on a Liveboard

example
liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

DownloadAsPng

DownloadAsPng: = "downloadAsPng"

Triggers the Download action on visualization or search when Displaymode is Chart

example
liveboardEmbed.trigger(HostEvent.DownloadAsPng,
{vizId:'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.DownloadAsPng)

searchEmbed.trigger(HostEvent.DownloadAsPng)
version

SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1-sw

DownloadAsXlsx

DownloadAsXlsx: = "downloadAsXLSX"

Triggers the downloadAsXLSX action on visualization or search

example
liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.DownloadAsXlsx)

searchEmbed.trigger(HostEvent.DownloadAsXlsx)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

DrillDown

DrillDown: = "triggerDrillDown"

Trigger a drill on certain points by certain column

param

points - an object containing selectedPoints/clickedPoints eg. { selectedPoints: []}

param

columnGuid - a string guid of the column to drill by. This is optional, if not provided it will auto drill by the configured column.

example
searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
      console.log(payload);
      const clickedPoint = payload.data.clickedPoint;
      const selectedPoint = payload.data.selectedPoints;
      console.log('>>> called', clickedPoint);
      searchEmbed.trigger(HostEvent.DrillDown, {
            points: {
                 clickedPoint,
                 selectedPoints: selectedPoint
            },
            autoDrillDown: true,
      });
})
version

SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1

Edit

Edit: = "edit"

Triggers the Edit action on a Liveboard or visualization

param

object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key

example
liveboardEmbed.trigger(HostEvent.Edit)

liveboardEmbed.trigger(HostEvent.Edit, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger((HostEvent.Edit)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

EditTML

EditTML: = "editTSL"

Triggers the Edit TML action on a Liveboard

example
liveboardEmbed.trigger(HostEvent.EditTML)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

Explore

Explore: = "explore"

Triggers the Explore action on a visualization

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

ExportTML

ExportTML: = "exportTSL"

Triggers the Export TML action on a Liveboard

example
liveboardEmbed.trigger(HostEvent.ExportTML)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

GetTML

GetTML: = "getTML"

Get TML for the current search.

example
searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
  console.log(
     tml.search_query // TML representation of the search query
  );
})
version

SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw

important

LiveboardInfo

LiveboardInfo: = "pinboardInfo"

Triggers the Show Liveboard details action on a Liveboard

example
 liveboardEmbed.trigger(HostEvent.LiveboardInfo)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

MakeACopy

MakeACopy: = "makeACopy"

Triggers the Make a copy action on a Liveboard, search or visualization

example
liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.MakeACopy)
searchEmbed.trigger(HostEvent.MakeACopy)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

ManageMonitor

ManageMonitor: = "manageMonitor"

Triggers the Manage alert action on a visualization

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.ManageMonitor, {
 vizId: '730496d6-6903-4601-937e-2c691821af3c'
})
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

ManagePipelines

ManagePipelines: = "manage-pipeline"

Triggers the ManagePipelines action on visualization

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.ManagePipelines)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

Navigate

Navigate: = "Navigate"

Navigate to a specific page in App embed without any reload. This is the same as calling appEmbed.navigateToPage(path, true)

param

path - the path to navigate to (can be a number[1/-1] to go forward/back)

example
appEmbed.navigateToPage(-1)
version

SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw

OpenFilter

OpenFilter: = "openFilter"

Opens the filter panel for a particular column. Works with Search embed.

param

{ columnId: string, name: string, type: INT64/CHAR/DATE, dataType: ATTRIBUTE/MEASURE }

example
searchEmbed.trigger(HostEvent.OpenFilter,
 { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
version

SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl

Pin

Pin: = "pin"

Triggers the Pin action on an embedded object

param

incase of Liveboard embed, takes in an object with vizId as a key can be left empty for search and visualization embeds

example
liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.Pin)
searchEmbed.trigger(HostEvent.Pin)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

Present

Present: = "present"

Triggers the Present action on a Liveboard or visualization

param

object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key

example
liveboardEmbed.trigger(HostEvent.Present)
liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger((HostEvent.Present)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

Remove

Remove: = "delete"

Triggers the Delete action on a Liveboard

example
appEmbed.trigger(HostEvent.Remove)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

RemoveColumn

RemoveColumn: = "removeColumn"

Removes a column from the current Search.

param
example
searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
version

SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl

ResetSearch

ResetSearch: = "resetSearch"

Triggers the Reset search in answer

example
searchEmbed.trigger(HostEvent.ResetSearch)
version

SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw

Save

Save: = "save"

Trigger the Save action on a liveboard or answer

example
liveboardEmbed.trigger(HostEvent.Save)

searchEmbed.trigger(HostEvent.Save)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

Schedule

Schedule: = "subscription"

Triggers the Schedule action on a Liveboard

example
 liveboardEmbed.trigger(HostEvent.Schedule)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

SchedulesList

SchedulesList: = "schedule-list"

Triggers the Manage schedule action on a Liveboard

example
 liveboardEmbed.trigger(HostEvent.ScheduleList)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

Search

Search: = "search"

Trigger a search

param

dataSourceIds - The data source GUID to Search on - Although an array, only a single source is supported at this time.

param

searchQuery - The search query

param

execute - execute the existing / updated query

example
searchEmbed.trigger(HostEvent.Search, {
  searchQuery: "[sales] by [item type],
  dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
  execute: true
})

SetVisibleVizs

SetVisibleVizs: = "SetPinboardVisibleVizs"

Set the visible visualizations on a Liveboard.

param

an array of ids of visualizations to show, the ids not passed will be hidden.

example
liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
 '730496d6-6903-4601-937e-2c691821af3c',
 'd547ec54-2a37-4516-a222-2b06719af726'])
version

SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw

Share

Share: = "share"

Triggers the Share action on a liveboard or answer

example
liveboardEmbed.trigger(HostEvent.Share)

searchEmbed.trigger(HostEvent.Share)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

ShowUnderlyingData

ShowUnderlyingData: = "showUnderlyingData"

Triggers the ShowUnderlyingData action on visualization or search

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.ShowUnderlyingData)

searchEmbed.trigger(HostEvent.ShowUnderlyingData)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

SpotIQAnalyze

SpotIQAnalyze: = "spotIQAnalyze"

Triggers the SpotIQAnalyze action on visualization or search

param

incase of Liveboard embed, takes in an object with vizId as a key can be left empty for search and visualization embeds

example
liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.SpotIQAnalyze)

searchEmbed.trigger(HostEvent.SpotIQAnalyze)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

SyncToOtherApps

SyncToOtherApps: = "sync-to-other-apps"

Triggers the SyncToOtherApps action on visualization

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.SyncToOtherApps)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

SyncToSheets

SyncToSheets: = "sync-to-sheets"

Triggers the SyncToSheets action on visualization

param

an object with vizId as a key

example
liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})

vizEmbed.trigger(HostEvent.SyncToSheets)
version

SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw

UpdateRuntimeFilters

UpdateRuntimeFilters: = "UpdateRuntimeFilters"

Update the runtime filters. The runtime filters passed here are extended on to the existing runtime filters if they exist.

param

RuntimeFilter[] an array of RuntimeFilter Types.

example
liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
  {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
  {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
])
version

SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw

important

UpdateTML

UpdateTML: = "updateTSL"

Triggers the Update TML action on a Liveboard

example
liveboardEmbed.trigger(HostEvent.UpdateTML)
version

SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw

getExportRequestForCurrentPinboard

getExportRequestForCurrentPinboard: = "getExportRequestForCurrentPinboard"

Gets the current pinboard content.

example
liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
version

SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw