From 07ec7c1c3c9cd718f05c9d89d8486b6779ca9eef Mon Sep 17 00:00:00 2001 From: ShashiSubramanya Date: Wed, 9 Jul 2025 11:32:02 +0530 Subject: [PATCH 01/14] nav title update --- modules/ROOT/pages/common/nav.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/common/nav.adoc b/modules/ROOT/pages/common/nav.adoc index 396200e61..7cfcb2a5b 100644 --- a/modules/ROOT/pages/common/nav.adoc +++ b/modules/ROOT/pages/common/nav.adoc @@ -121,7 +121,7 @@ include::generated/typedoc/CustomSideNav.adoc[] **** [.typedoc-Interface]#link:{{navprefix}}/Interface_RuntimeFilter[RuntimeFilter]# **** [.typedoc-Enumeration]#link:{{navprefix}}/Enumeration_RuntimeFilterOp[RuntimeFilterOp]# *** Others -**** [.typedoc-Enumeration]#link:{{navprefix}}/Enumeration_Action[Actions]# +**** [.typedoc-Enumeration]#link:{{navprefix}}/Enumeration_Action[Action]# **** [.typedoc-Enumeration]#link:{{navprefix}}/Enumeration_ContextMenuTriggerOptions[ContextMenuTriggerOptions]# **** [.typedoc-Enumeration]#link:{{navprefix}}/Enumeration_DataSourceVisualMode[DataSourceVisualMode]# **** [.typedoc-Enumeration]#link:{{navprefix}}/Enumeration_Page[Page]# From 2619e050eb85e1fa4fed3868ada41e526a833496 Mon Sep 17 00:00:00 2001 From: ShashiSubramanya Date: Wed, 16 Jul 2025 13:59:52 +0530 Subject: [PATCH 02/14] updates --- modules/ROOT/pages/api-changelog.adoc | 14 ++++++++++++++ modules/ROOT/pages/filters_overview.adoc | 2 +- modules/ROOT/pages/tml.adoc | 6 ++++-- modules/ROOT/pages/whats-new.adoc | 4 ++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/api-changelog.adoc b/modules/ROOT/pages/api-changelog.adoc index 2f4450c14..44e600850 100644 --- a/modules/ROOT/pages/api-changelog.adoc +++ b/modules/ROOT/pages/api-changelog.adoc @@ -8,6 +8,20 @@ This changelog lists only the changes introduced in the Visual Embed SDK. For information about new features and enhancements available for embedded analytics, see xref:whats-new.adoc[What's New]. +== Version 1.40.0, July 2025 + +[width="100%" cols="1,4"] +|==== +|[tag greenBackground]#NEW FEATURE# a| *Fullscreen presentation mode controls for Liveboards and visualizations* + +Developers can now control whether a visualization or Liveboard can be presented in the full screen mode using the `disableFullscreenPresentation` attribute. +The deprecated components with old names in the existing Spotter embed implementations will continue to function until further notice. For code samples with new component names, see xref:embed-spotter.adoc[Spotter embed documentation]. +|[tag greenBackground]#NEW FEATURE# a| *Action ID of Spotter coaching* + +For ThoughtSpot instances that have the new Spotter feedback and coaching workflow enabled, SDK provides the action ID `Acion.InCoversationTraining` to manage the visibility of the *Add to coaching* button on Answer generated from Spotter prompts. + +[NOTE] +The **Add to Coaching** feature is currently in beta and is turned off by default on embed deployments. To enable this feature on your instance, contact ThoughtSpot Support. + + == Version 1.39.0, July 2025 [width="100%" cols="1,4"] diff --git a/modules/ROOT/pages/filters_overview.adoc b/modules/ROOT/pages/filters_overview.adoc index 58add1abf..6747e30b7 100644 --- a/modules/ROOT/pages/filters_overview.adoc +++ b/modules/ROOT/pages/filters_overview.adoc @@ -12,7 +12,7 @@ ThoughtSpot provides multiple types of filters for various xref:intro-thoughtspo The behavior of each filter type and the mechanism for setting filters can differ widely. There are different types of filters, which can be applied in the following order: -1. xref:rls-rulesl.adoc[Row-level security (RLS) Rules] + +1. xref:rls-rules.adoc[Row-level security (RLS) Rules] + Tied to the logged-in user and their group memberships. Completely secure and cannot be altered by the logged-in user. 2. xref:abac-user-parameters.adoc[Attribute-Based Access Control (ABAC) filter rules] + Filters and Parameter rules applied on a Worksheet and assigned to a token. diff --git a/modules/ROOT/pages/tml.adoc b/modules/ROOT/pages/tml.adoc index 3ae557450..b485ef759 100644 --- a/modules/ROOT/pages/tml.adoc +++ b/modules/ROOT/pages/tml.adoc @@ -165,7 +165,8 @@ If the API request is successful, ThoughtSpot schedules an import task, and retu "completed_at": null, "total_object_count": 2, "object_processed_count": null, - "modified_at": null + "modified_at": null, + "author_display_name": "UserA" } ---- @@ -300,7 +301,8 @@ If Orgs are enabled on your instance, the API returns task status only for objec "completed_at": 1732601184476, "total_object_count": 2, "object_processed_count": 2, - "modified_at": 1732601184476 + "modified_at": 1732601184476, + "author_display_name": "UserA" } ], "last_batch": true diff --git a/modules/ROOT/pages/whats-new.adoc b/modules/ROOT/pages/whats-new.adoc index a5f2e5b00..766c63ad0 100644 --- a/modules/ROOT/pages/whats-new.adoc +++ b/modules/ROOT/pages/whats-new.adoc @@ -8,6 +8,10 @@ This page lists new features, enhancements, and deprecated functionality in ThoughtSpot Embedded instances. +== Version 10.11.0.cl + + + == Version 10.10.0.cl === Email customization per Org [beta betaBackground]^Beta^ From 3dcabde597b350eae5dec384a7f5dc26146ce593 Mon Sep 17 00:00:00 2001 From: ShashiSubramanya Date: Wed, 16 Jul 2025 15:34:30 +0530 Subject: [PATCH 03/14] edits --- modules/ROOT/pages/api-changelog.adoc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/api-changelog.adoc b/modules/ROOT/pages/api-changelog.adoc index 44e600850..260564d0e 100644 --- a/modules/ROOT/pages/api-changelog.adoc +++ b/modules/ROOT/pages/api-changelog.adoc @@ -12,11 +12,15 @@ This changelog lists only the changes introduced in the Visual Embed SDK. For in [width="100%" cols="1,4"] |==== -|[tag greenBackground]#NEW FEATURE# a| *Fullscreen presentation mode controls for Liveboards and visualizations* + -Developers can now control whether a visualization or Liveboard can be presented in the full screen mode using the `disableFullscreenPresentation` attribute. -The deprecated components with old names in the existing Spotter embed implementations will continue to function until further notice. For code samples with new component names, see xref:embed-spotter.adoc[Spotter embed documentation]. -|[tag greenBackground]#NEW FEATURE# a| *Action ID of Spotter coaching* + -For ThoughtSpot instances that have the new Spotter feedback and coaching workflow enabled, SDK provides the action ID `Acion.InCoversationTraining` to manage the visibility of the *Add to coaching* button on Answer generated from Spotter prompts. +|[tag greenBackground]#NEW FEATURE# a| *Fullscreen presentation mode controls for embedded Liveboards and visualizations* + +Developers can now control whether a visualization or Liveboard can be presented in the full screen mode using the `disableFullscreenPresentation` attribute. By default, the fullscreen mode is disabled on embedded Liveboards and visualizations. +|[tag greenBackground]#NEW FEATURE# a| *PDF download settings* + +Developers can now control the display of *Include cover page* and *Include filter page(s)* options on the Download PDF dialog for Liveboards. The *Include cover page* and *Include filter page(s)* options are disabled by default on ThoughtSpot instances. When this feature is enabled, developers can use the `coverAndFilterOptionInPDF` attribute to show or hide these options for the Liveboard users in their embed. + +|[tag greenBackground]#NEW FEATURE# a| *Full application embed experience enhancements* + + +* The SDK now includes the `hideObjectSearch` property to allow developers to hide the object search button on navigation bar in their full application embed. + [NOTE] The **Add to Coaching** feature is currently in beta and is turned off by default on embed deployments. To enable this feature on your instance, contact ThoughtSpot Support. From 31ba9589830ab311f094f81e59cbe1ef75a6f026 Mon Sep 17 00:00:00 2001 From: ShashiSubramanya Date: Wed, 23 Jul 2025 07:30:16 +0530 Subject: [PATCH 04/14] changelog, what's new and spotter updates --- modules/ROOT/pages/api-changelog.adoc | 109 +++- modules/ROOT/pages/embed-spotter-agent.adoc | 498 ++++++++++++++++++ modules/ROOT/pages/embed-spotter.adoc | 2 +- .../ROOT/pages/rest-api-v1v2-comparison.adoc | 3 + .../pages/rest-api-v2-metadata-search.adoc | 181 ++++--- modules/ROOT/pages/whats-new.adoc | 18 + 6 files changed, 715 insertions(+), 96 deletions(-) create mode 100644 modules/ROOT/pages/embed-spotter-agent.adoc diff --git a/modules/ROOT/pages/api-changelog.adoc b/modules/ROOT/pages/api-changelog.adoc index 260564d0e..13a6be9ad 100644 --- a/modules/ROOT/pages/api-changelog.adoc +++ b/modules/ROOT/pages/api-changelog.adoc @@ -17,14 +17,117 @@ Developers can now control whether a visualization or Liveboard can be presented |[tag greenBackground]#NEW FEATURE# a| *PDF download settings* + Developers can now control the display of *Include cover page* and *Include filter page(s)* options on the Download PDF dialog for Liveboards. The *Include cover page* and *Include filter page(s)* options are disabled by default on ThoughtSpot instances. When this feature is enabled, developers can use the `coverAndFilterOptionInPDF` attribute to show or hide these options for the Liveboard users in their embed. +|[tag greenBackground]#NEW FEATURE# a| *Primary action configuration on charts* + + +Developers can now override the default primary action button on Liveboard visualizations with a custom action. If Spotter is enabled on your instance, the *Spotter* button appears by default as the primary action on embedded Liveboard charts; if Spotter is not enabled, the *Explore* button is shown. You can configure a different action to replace this button as the primary action. + +Note that when you set the `primaryAction` property, your configured action replaces the existing primary button on visualizations on a Liveboard. However, on Answers, the configured action is added as a secondary button, positioned above the chart or table along with the other main actions. + +[source,JavaScript] +---- +primaryAction: Action.Download, +---- + |[tag greenBackground]#NEW FEATURE# a| *Full application embed experience enhancements* + +The SDK now includes the `hideObjectSearch` property to allow developers to hide the object search button on navigation bar in their full application embed. -* The SDK now includes the `hideObjectSearch` property to allow developers to hide the object search button on navigation bar in their full application embed. +|[tag greenBackground]#NEW FEATURE# a| *Events* + +In this version, the SDK includes following new event handlers: -[NOTE] -The **Add to Coaching** feature is currently in beta and is turned off by default on embed deployments. To enable this feature on your instance, contact ThoughtSpot Support. +Embed events:: + +- `EmbedEvent.ExitPresentMode` + +Emits when a user exits the Liveboard or visualization presentation mode. +- `EmbedEvent.LastPromptDeleted` + +Emits when a query prompt in Spotter embed is deleted. +- `EmbedEvent.LastPromptEdited` + +Emits when a query prompt in Spotter embed is edited. +- `EmbedEvent.ResetSpotterConversation` + +Emits when a Spotter query is reset. +- `EmbedEvent.PreviewSpotterData` + +Emits when a user clicks the Preview data button in the Spotter conversation panel. +- `EmbedEvent.SpotterQueryTriggered` +Emits when a Spotter query is triggered. + +HostEvents:: + +- `HostEvent.ExitPresentMode` + +Triggers the exit action that allows users to exit the Liveboard or visualization present mode. +- `HostEvent.SpotterSearch` + +Triggers a search operation for the specified query string Spotter embed. +- `HostEvent.PreviewSpotterData` +Triggers the *Preview data* action that shows the data used for Spotter conversations. +- `HostEvent.ResetSpotterConversation` +Triggers the *Reset* action to reset Spotter conversation. +- `HostEvent.EditLastPrompt` +Triggers the edit prompt action. +- `HostEvent.DeleteLastPrompt` +Triggers the delete prompt action. + +|[tag greenBackground]#NEW FEATURE# a|*Events support for Spotter embed* + +You can now use the following embed and host events in Spotter embed: + +Embed events:: +- `EmbedEvent.AddRemoveColumns` +- `EmbedEvent.AnswerChartSwitcher` +- `EmbedEvent.AuthExpire` +- `EmbedEvent.AuthInit` +- `EmbedEvent.CopyToClipboard` +- `EmbedEvent.Data` +- `EmbedEvent.DataSourceSelected` +- `EmbedEvent.DialogClose` +- `EmbedEvent.DialogOpen` +- `EmbedEvent.Download` +- `EmbedEvent.DownloadAsCsv` +- `EmbedEvent.DownloadAsPng` +- `EmbedEvent.DownloadAsXlsx` +- `EmbedEvent.DrillDown` +- `EmbedEvent.DrillExclude` +- `EmbedEvent.DrillInclude` +- `EmbedEvent.Edit` +- `EmbedEvent.Error` +- `EmbedEvent.Load` +- `EmbedEvent.Pin` +- `EmbedEvent.Save` +- `EmbedEvent.TableVizRendered` +- `EmbedEvent.VizPointClick` +- `EmbedEvent.VizPointDoubleClick` +- `EmbedEvent.VizPointRightClick` +Host events:: + +- `HostEvent.DownloadAsCsv` +- `HostEvent.DownloadAsPng` +- `HostEvent.DownloadAsXlsx` +- `HostEvent.Edit` +- `HostEvent.GetParameters` +- `HostEvent.GetTML` +- `HostEvent.MakeACopy` +- `HostEvent.Pin` +- `HostEvent.Save` + +|[tag greenBackground]#NEW FEATURE# a| *Lazy loading with full height* + +The SDK introduces `lazyLoadingForFullHeight` parameter to progressively load the visualizations on Liveboard in your embed. This parameter works in conjunctions with the `fullHeight` attribute and when both these attributes are enabled, the visualizations in the current viewport are loaded initially and additional visualizations on the Liveboard page are loaded as the user scrolls. + +Note that your ThoughtSpot instance requires 10.12.0.cl or later versions to effectively use these attributes in your embed. +|==== + +//// + +TBD 10.12 events + +- `HostEvent.AnswerChartSwitcher` +- `HostEvent.AskSpotter` +- `HostEvent.DeleteLastPrompt` +- `HostEvent.EditLastPrompt` +- `HostEvent.PreviewSpotterData` +- `HostEvent.ResetSpotterConversation` +- `HostEvent.SpotterSearch` + +//// == Version 1.39.0, July 2025 diff --git a/modules/ROOT/pages/embed-spotter-agent.adoc b/modules/ROOT/pages/embed-spotter-agent.adoc new file mode 100644 index 000000000..170684b48 --- /dev/null +++ b/modules/ROOT/pages/embed-spotter-agent.adoc @@ -0,0 +1,498 @@ += Embed Spotter Agent +:toc: true +:toclevels: 3 + +:page-title: Embed Spotter Agent +:page-pageid: embed-spotter-agent +:page-description: You can use the SpotterAgentEmbed SDK library to embed Spotter experience in your application. + +Spotter Agent is an embeddable AI analyst component from ThoughtSpot that enables you to integrate natural language data search and analysis into your own applications. Unlike the standard Spotter embed, which provides a ready-made search bar and interface, Spotter Agent is designed for deeper integration and customization. It allows you to build your own UI or agent experience, broker user questions to ThoughtSpot, and receive structured answers and visualizations, giving you full control over the look, feel, and workflow of the embedded analytics experience. + +== How is Spotter Agent Embedding Different from Spotter Embed? + +* Spotter embed provides a pre-built search bar and interface for quick embedding. +* Spotter Agent embedding is intended for custom agent or chatbot experiences, letting you control the UI and workflow while leveraging ThoughtSpot’s AI-powered analytics engine. + +== Prerequisites + +* Access to a ThoughtSpot instance. +* Your application domain must be allowlisted in ThoughtSpot CSP and CORS settings. +* Admin or developer privileges in ThoughtSpot. +* A worksheet or table to use as the data source. + +== Install the Visual Embed SDK + +[source,bash] +---- +npm install @thoughtspot/visual-embed-sdk +---- + +== Import the SDK and Components + +[source,js] +---- +import { AuthType, init } from '@thoughtspot/visual-embed-sdk'; +import { SpotterAgentEmbed, SpotterAgentViewConfig } from '@thoughtspot/visual-embed-sdk/react'; +---- + +== Initialize the SDK + +[source,js] +---- +init({ + thoughtSpotHost: 'https://', + authType: AuthType.None // Or AuthType.TrustedAuthToken, etc. +}); +---- + +== Configure SpotterAgentViewConfig + +[source,js] +---- +const viewConfig = { + worksheetId: '', // Required: Data source object ID + searchQuery: 'sales by region', // Optional: Initial query + runtimeFilters: [ + { + columnName: 'region', + operator: 'EQ', + values: ['West'] + } + ], // Optional: Pre-filtered context + visibleActions: [ + 'Action.Save', + 'Action.Download', + 'Action.DownloadAsPDF' + ], // Optional: Show only these actions + disabledActions: [ + 'Action.Download' + ], // Optional: Disable specific actions + disabledActionReason: { + 'Action.Download': 'Download is not allowed for this user' + }, // Optional: Tooltip for disabled actions + hideSourceSelection: true, // Optional: Hide data source selector + disableSourceSelection: false, // Optional: Disable data source selection + locale: 'en-US', // Optional: Set locale + showSpotterLimitations: false, // Optional: Show Spotter limitations + hideSampleQuestions: true // Optional: Hide sample questions +}; +---- + +== Embed the Spotter Agent + +[source,jsx] +---- + console.log('Spotter Agent loaded')} + onInit={() => console.log('Spotter Agent initialized')} +/> +---- + +== Register and Handle Events + +You can handle Spotter Agent events for analytics and integration. + +[source,jsx] +---- + +---- + +*Common events include:* +- `onLoad`: Fires when Spotter Agent is loaded. +- `onInit`: Fires when Spotter Agent is initialized. +- `onData`: Fires when data is returned from a query. +- `onError`: Fires on error. + +== Customizing the UI + +* Use `visibleActions`, `hiddenActions`, and `disabledActions` in the config to control menu actions. Do not use both `visibleActions` and `hiddenActions` at the same time [1], [2], [3]. +* To apply custom styles, use CSS variables such as: ++ +[source,css] +---- +:root { + --ts-var-spotter-input-background: #f5f5f5; + --ts-var-spotter-prompt-background: #e0e0e0; +} +---- + + +== Test the Embedded Spotter Agent + +* Start your app. +* Verify Spotter Agent loads and is interactive. +* Confirm initial query and runtime filters are applied. +* Test event handlers and UI customizations. + +== Additional Notes + +* Use only `answerId` for event tracking in SpotterAgentEmbed. +* SpotterAgentEmbed supports both host and embed events for two-way communication. +* For advanced use, refer to the official SDK and API documentation. + + + + + + + + + + + + + + + + + + + + + + + +//// + +== Runtime Filters + +* Pass runtime filters in the `runtimeFilters` array in the config. +* Filters are applied to the initial query and search suggestions. +* Invalid filters are handled gracefully (error message or ignored). + + +ThoughtSpot supports Natural Language Search queries and AI-generated Answers. With ThoughtSpot Spotter, this experience is further enhanced to provide a conversational interface for users to query data, ask follow-up questions, and get insights. + +Visual Embed SDK offers several options to seamlessly embed conversational analytics within your applications and customize the interface and experience as per your organization's branding guidelines. + +To integrate Spotter capabilities into other apps, ThoughtSpot provides the following components: + +* To embed the full Spotter interface with a conversation panel that allows natural language text strings, data source selection, and interactions with AI generated Answers, use the `SpotterEmbed` component. + + +* To integrate Spotter Agent capabilities in a chatbot, use the `SpotterAgentEmbed` component. + + +[NOTE] +==== +The `ConversationEmbed` and `BodylessConversation` components are deprecated and replaced with `SpotterEmbed` and `SpotterAgentEmbed` respectively in Visual Embed SDK v1.38.0 and later. +==== + +This article describes how to embed the Spotter interface using the `SpotterEmbed` component. For information about how to integrate Spotter Agent capabilities without body in a chatbot, see xref:spotter-in-custom-chatbot.adoc[Integrate Spotter into your chatbot]. + +== Before you begin + +Before you begin, check the following: + +* Spotter is enabled on your ThoughtSpot instance. +* You have access to the latest version of the Visual Embed SDK or at least v1.33.1. + +== Import the SDK package + +Import the `SpotterEmbed` SDK library to your application environment: + +**npm** +[source,JavaScript] +---- +import { + SpotterEmbed, + AuthType, + init, + prefetch, +} +from '@thoughtspot/visual-embed-sdk'; +---- + +**ES6** +[source,JavaScript] +---- +