SpotterAgentEmbedViewConfig
- Index
- Properties
- additionalFlags
- customActions
- customizations
- disableRedirectionLinksInNewTab
- disabledActionReason
- disabledActions
- doNotTrackPreRenderSize
- enableLinkOverridesV2
- enableV2Shell_experimental
- exposeTranslationIDs
- frameParams
- hiddenActions
- insertAsSibling
- interceptTimeout
- interceptUrls
- isOnBeforeGetVizDataInterceptEnabled
- linkOverride
- locale
- overrideOrgId
- preRenderId
- refreshAuthTokenOnNearExpiry
- shouldBypassPayloadValidation
- showAlerts
- useHostEventsV2
- visibleActions
- worksheetId
Configuration for bodyless conversation options.
Indexπ
Propertiesπ
additionalFlagsπ
additionalFlags: {[key: string ] : string | number | boolean}
Optional
This is an object (key/val) of override flags which will be applied to the internal embedded object. This can be used to add any URL flag. If the same flags are passed in init, they will be overridden by the values here. Warning: This option is for advanced use only and is used internally to control embed behavior in non-regular ways. We do not publish the list of supported keys and values associated with each.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Index Signature Parameters
Version : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
additionalFlags: {
flag1: 'value1',
flag2: 'value2'
},
});
customActionsπ
customActions: CustomAction[]
Optional
Custom Actions allows users to define interactive UI actions (like buttons or menu items) that appear in ThoughtSpotβs visualizations, answers, and Liveboards. These actions enable users to trigger custom workflows β such as navigating to an external app, calling an API, or opening a modal β based on the data context of what they clicked can be used to trigger custom logic when the action is clicked.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterEmbed
Version : SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
import {
CustomActionPayload,
CustomActionsPosition,
CustomActionTarget,
} from '@thoughtspot/visual-embed-sdk';
// Use supported embed types such as AppEmbed or LiveboardEmbed
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed config options
customActions: [
{
// Unique identifier for the custom action
id: 'my-custom-action',
// Display name shown to users in the UI
name: 'My Custom Action',
// Where the action appears in the UI
// PRIMARY: Shows as a primary button (e.g., in the toolbar)
// MENU: Shows in the "More" menu (three dots menu)
// CONTEXTMENU: Shows in the right-click context menu
position: CustomActionsPosition.PRIMARY,
// What type of content this action applies to
// ANSWER: Available on answer pages
target: CustomActionTarget.ANSWER,
// Optional: Restrict where this action appears based on data models
// dataModelIds: {
// // Restrict to specific data models
// modelIds: ['model-id-1', 'model-id-2'],
// // Restrict to specific columns within models
// modelColumnNames: ['model-id::column-name']
// },
// Optional: Restrict where this action appears based on metadata
// metadataIds: {
// // Restrict to specific answers
// answerIds: ['answer-id-1', 'answer-id-2'],
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1', 'group-id-2'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1', 'org-id-2'],
}
],
})
// to trigger a custom flow on custom action click listen to Custom action embed event
embed.on(EmbedEvent.CustomAction, (payload: CustomActionPayload) => {
console.log('Custom Action event:', payload);
})
import {
CustomActionsPosition,
CustomActionTarget,
} from '@thoughtspot/visual-embed-sdk';
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed config options
customActions: [
{
// Unique identifier for the custom action
id: 'my-custom-action',
// Display name shown to users in the UI
name: 'My Custom Action',
// Where the action appears in the UI
// MENU: Shows in the "More" menu (three dots menu)
// CONTEXTMENU: Shows in the right-click context menu
position: CustomActionsPosition.MENU,
// What type of content this action applies to
// SPOTTER: Available in Spotter (AI-powered search)
target: CustomActionTarget.SPOTTER,
// Optional: Restrict where this action appears based on data models
// dataModelIds: {
// // Restrict to specific data models
// modelIds: ['model-id-1', 'model-id-2'],
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1'],
}
],
})
import {
CustomActionsPosition,
CustomActionTarget,
} from '@thoughtspot/visual-embed-sdk';
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed config options
customActions: [
{
// Unique identifier for the custom action
id: 'my-liveboard-custom-action',
// Display name shown to users in the UI
name: 'My Liveboard Custom Action',
// Where the action appears in the UI
// PRIMARY: Shows as a primary button (e.g., in the toolbar)
// MENU: Shows in the "More" menu (three dots menu)
position: CustomActionsPosition.PRIMARY,
// What type of content this action applies to
// LIVEBOARD: Available on liveboard pages
target: CustomActionTarget.LIVEBOARD,
// Optional: Restrict where this action appears based on metadata
// metadataIds: {
// // Restrict to specific liveboards
// liveboardIds: ['liveboard-id-1', 'liveboard-id-2'],
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1', 'group-id-2'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1', 'org-id-2'],
},
{
// Unique identifier for the custom action
id: 'my-viz-custom-action',
// Display name shown to users in the UI
name: 'My Viz Custom Action',
// Where the action appears in the UI
// PRIMARY: Shows as a primary button (e.g., in the toolbar)
// MENU: Shows in the "More" menu (three dots menu)
// CONTEXTMENU: Shows in the right-click context menu
position: CustomActionsPosition.PRIMARY,
// What type of content this action applies to
// VIZ: Available on individual visualizations
target: CustomActionTarget.VIZ,
// Optional: Restrict where this action appears based on metadata
// metadataIds: {
// // Restrict to specific answers
// answerIds: ['answer-id-1', 'answer-id-2'],
// // Restrict to specific liveboard. If liveboardId is
// // passed, custom actions will appear on all vizzes of liveboard
// liveboardIds: ['liveboard-id-1'],
// // Restrict to specific vizIds
// vizIds: ['viz-id-1']
// },
// dataModelIds: {
// // Restrict to specific data models
// modelIds: ['model-id-1', 'model-id-2'],
// // Restrict to specific columns within models
// modelColumnNames: ['model-id::column-name']
// },
// // Restrict to specific groups (for group-based access control)
// groupIds: ['group-id-1', 'group-id-2'],
// // Restrict to specific organizations (for multi-org deployments)
// orgIds: ['org-id-1', 'org-id-2'],
}
],
})
customizationsπ
customizations: CustomisationsInterface
Optional
Dynamic CSSUrl and customCSS to be injected in the loaded application.
You would also need to set style-src in the CSP settings.
Version : SDK: 1.17.2 | ThoughtSpot: 8.4.1.sw, 8.4.0.cl
default : ''
disableRedirectionLinksInNewTabπ
disableRedirectionLinksInNewTab: boolean
Optional
This flag can be used to disable links inside the embedded app, and disable redirection of links in a new tab.
Note: When set to true, this flag automatically disables
SpotterEmbedViewConfig.enableLinkOverridesV2 for the
embed session. The two features are mutually exclusive β link
overrides mutate anchors (delete href, attach a JS click handler),
which breaks native browser behavior (Cmd/Ctrl+Click, middle-click,
right-click "Open in new tab") when combined with the disable flag.
The disable flag preserves native anchor semantics instead.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Version : SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
disableRedirectionLinksInNewTab: true,
});
disabledActionReasonπ
disabledActionReason: string
Optional
The tooltip to display for disabled actions.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
disabledActions: [Action.Download, Action.Save],
disabledActionReason: "Reason for disabling",
});
disabledActionsπ
disabledActions: Action[]
Optional
The list of actions to disable from the primary menu, more menu (β¦β), and the contextual menu. Disabled actions are grayed out and still visible to the user, but cannot be clicked. Use this when you want to disable an action (keep it visible but non-interactive). To completely remove an action from the UI, use SpotterEmbedViewConfig.hiddenActions instead.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
disabledActions: [Action.Download, Action.Save],
});
doNotTrackPreRenderSizeπ
doNotTrackPreRenderSize: boolean
Optional
Determines if the PreRender component should dynamically track the size of its embedding element and adjust its own size accordingly. Enabling this option allows the PreRender component to automatically adapt its dimensions based on changes to the size of the embedding element.
Version : SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
default : false
// Disable tracking PreRender size in the configuration
const config = {
doNotTrackPreRenderSize: true,
};
// Instantiate an object with the configuration
const myComponent = new MyComponent(config);
enableLinkOverridesV2π
enableLinkOverridesV2: boolean
Optional
Enables the V2 link override mechanism with improved
handling. When enabled, navigation links within the
embedded ThoughtSpot app are intercepted and routed
through the SDK via the EmbedEvent.DialogOpen
event.
The SDK automatically sends SpotterEmbedViewConfig.linkOverride alongside this flag for backward compatibility with older ThoughtSpot versions.
Note: This flag is ignored when
SpotterEmbedViewConfig.disableRedirectionLinksInNewTab is true.
Supported embed types: AppEmbed, LiveboardEmbed,
SearchEmbed, SpotterAgentEmbed,
SpotterEmbed, SearchBarEmbed
Version : SDK: 1.46.0 | ThoughtSpot: 26.2.0.cl
const embed = new LiveboardEmbed('#tsEmbed', {
... // other embed view config
enableLinkOverridesV2: true,
});
embed.on(EmbedEvent.DialogOpen, (payload) => {
console.log('Link clicked:', payload);
});
enableV2Shell_experimentalπ
enableV2Shell_experimental: boolean
Optional
Enable the V2 shell. This can provide performance benefits due to a lighter-weight shell.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Version : SDK: 1.31.2 | ThoughtSpot: 10.0.0.cl
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
enableV2Shell_experimental: true,
});
exposeTranslationIDsπ
exposeTranslationIDs: boolean
Optional
This flag can be used to expose translation IDs on the embedded app.
Version : SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
default : false
frameParamsπ
frameParams: FrameParams
Optional
The width and height dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Version : SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
frameParams: {
width: '500px' | '50%',
height: '400px' | '60%',
},
})
hiddenActionsπ
hiddenActions: Action[]
Optional
The list of actions to completely remove from the embedded view. Hidden actions are not visible to the user at all (fully removed from the UI). Use this when you want to remove an action entirely. To keep an action visible but non-interactive (grayed out), use SpotterEmbedViewConfig.disabledActions instead.
Supported embed types: AppEmbed, LiveboardEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SearchBarEmbed
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
// Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
const embed = new <EmbedComponent>('#tsEmbed', {
... // other embed view config
hiddenActions: [Action.Download, Action.Export],
});