You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:page-description: Methods for embedding ThoughtSpot into Salesforce Cloud products
8
8
9
-
Integrating ThoughtSpot with Salesforce enables users to access analytics directly within their Salesforce environment. By embedding ThoughtSpot content, organizations can deliver data-driven insights where your end users work, enhancing decision-making and efficiency. This guide explores the various embedding options, including the Visual Embed SDK and non-SDK approaches, and discusses key recommendations for authentication, customization/branding, and embedding in mobile apps.
9
+
Integrating ThoughtSpot with Salesforce enables users to access analytics directly within Salesforce. By embedding ThoughtSpot content, organizations can deliver data-driven insights where their end users work, enhancing decision-making and efficiency.
10
10
11
-
== Embeddable objects
11
+
This guide explores the various embedding options, including the ThoughtSpot Lightning Web Component (LWC) plugin for Salesforce, Visual Embed SDK, and non-SDK approaches, and provides key recommendations for authentication, customization/branding, and embedding in mobile apps.
12
12
13
-
ThoughtSpot allows users to create several types of objects. Before we get into the details, it's important to understand that any of the following objects can be easily embed into Salesforce:
13
+
== Embeddable objects
14
+
ThoughtSpot allows users to create several types of objects. You can easily embed any of the following objects into Salesforce:
14
15
15
-
* *Search* - A self-service interface that allows users to perform searches on data and build visualizations
16
-
* *Answers* - Individual visualizations generated and saved from user search queries
17
-
* *Liveboards* - Interactive dashboards that contain one or more visualizations (Answers)
18
-
* *Spotter* - AI-powered assistant that helps users analyze data using natural language
19
-
* *Full Application* - Allows you to embed the full ThoughtSpot application or the individual application pages
16
+
* *Search* - A self-service interface that allows users to perform searches on data and build visualizations.
17
+
* *Answers* - Individual visualizations generated and saved from user search queries.
18
+
* *Liveboards* - Interactive dashboards that contain one or more visualizations (Answers).
19
+
* *Spotter* - An AI-powered assistant that helps users analyze data using natural language.
20
+
* *Full Application* - Allows embedding the full ThoughtSpot application or the individual application pages.
20
21
21
22
== Embedding methods
22
-
There are two development options for this integration:
23
23
24
-
* Embedding with Visual Embed SDK
25
-
* iFrame embedding without the SDK
24
+
You can embed ThoughtSpot in Salesforce using the following methods:
26
25
27
-
=== Visual Embed SDK
28
-
If you are using the `Salesforce Lightning platform`, we highly recommend using ThoughtSpot's Visual Embed SDK as it provides maximum flexibility and allows you to create highly customized solutions across all Salesforce Cloud products.
26
+
[width="100%" cols="4,8"]
27
+
[options='header']
28
+
|=====
29
+
| Embedding method | Description
29
30
30
-
==== Key considerations
31
+
| ThoughtSpot supported LWC Plugin
32
+
| ThoughtSpot-managed Lightning Web Component (LWC) plugin for Salesforce enables seamless embedding of Liveboards and Spotter directly within Salesforce.
31
33
32
-
* Simplified integration using Lightning Web Components (LWC)
33
-
* Enhanced customization and interactivity
34
-
* Support for authentication mechanisms like SAML and Trusted Authentication
34
+
This is the recommended approach for most Salesforce Lightning environments.
35
35
36
-
=== iFrame embedding
37
-
For organizations using the `Salesforce Classic platform`, or that prefer not to use the SDK, embedding ThoughtSpot can be achieved via iframes. This method is simpler, but considered a legacy approach for embedding.
36
+
| Custom LWC with Visual Embed SDK
37
+
| For maximum flexibility and customization, use the Visual Embed SDK within your own custom LWC. This method supports embedding all ThoughtSpot components such as Liveboards, Spotter, Search, Answers and full application experience, and allows for deep integration with Salesforce Cloud products.
38
+
39
+
| iFrame embedding (without SDK)
40
+
| For Salesforce Classic or when SDK/LWC plugin use is not possible, embed ThoughtSpot using a simple iFrame. This legacy approach is quick to implement but has limitations in authentication, event handling, and customization.
41
+
|=====
42
+
43
+
== Key considerations
44
+
45
+
[width="100%" cols="1,1,1,1"]
46
+
[options='header']
47
+
|=====
48
+
| Capability
49
+
| ThoughtSpot LWC Plugin (managed package)
50
+
| Custom LWC with SDK
51
+
| iFrame via Visualforce/Apex
52
+
53
+
| Setup effort
54
+
| Low +
55
+
56
+
Install, drag and drop in Lightning App Builder, and configure props
57
+
58
+
| Medium/High +
59
+
60
+
Build LWC, handle authentication, events, and testing
61
+
| Low/Medium +
62
+
63
+
Quick to place, but manual parameter and authentication handling is required
64
+
65
+
| Supported ThoughtSpot experiences
66
+
67
+
| Liveboards and Spotter
68
+
69
+
| All SDK-supported components +
70
+
(Liveboards, Spotter, Search, Answers, Full application)
71
+
72
+
| Any embeddable ThoughtSpot URL
38
73
39
-
==== Key considerations
74
+
| Record-aware context +
75
+
(for example, Account/Opportunity filters)
76
+
| Built-in support +
40
77
41
-
* Fewer customization options
42
-
* Potential styling limitations
43
-
* SAML authentication only
78
+
Pass recordId/fields via properties
79
+
| Yes +
44
80
45
-
=== Mobile considerations
46
-
If you require ThoughtSpot content to be available in the Salesforce mobile app, we recommend leveraging the Visual Embed SDK with Single Sign-On (SSO) using Cookieless Trusted Authentication (AuthType.TrustedAuthTokenCookieless). This combination will provide a seamless embedding experience.
81
+
Compose runtime filters from record context
82
+
| Manual +
47
83
48
-
Now that we understand our options, let's walk through the implementation steps for each method.
84
+
Append query parameters to iFrame URL
85
+
86
+
| Authentication options
87
+
| SSO and Cookieless Trusted authentication
88
+
| All authentication methods supported, including SSO, Cookieless Trusted authentication and more)
89
+
| Works with SSO only. +
90
+
Limited options
91
+
92
+
| Salesforce Mobile app
93
+
| Supported when Org authentication is configured
94
+
| Recommended with Cookieless Trusted authentication
95
+
| Inframe authentication limitations
96
+
97
+
| CSP and security
98
+
| Documented CSP entries; package streamlines most settings
99
+
| You must manage Trusted Sites and CSP allowlists
100
+
| Must allow ThoughtSpot as trusted host
101
+
102
+
| Branding, styles, themes
103
+
| Configurable via component properties +
104
+
105
+
Limited deep styling
106
+
| Full control via SDK and custom CSS
107
+
| Minimal +
108
+
109
+
Basic styling options for ThoughtSpot application only
110
+
111
+
| Events and callbacks +
112
+
(For filters, drilldown, and more)
113
+
| Common events exposed via component API
114
+
| Full event surface; wire to Apex/Flow
115
+
| None
116
+
117
+
| Custom Actions
118
+
| None
119
+
| Supported
120
+
| None
121
+
122
+
| Access to ThoughtSpot REST APIs +
123
+
(Object export, metadata, Answer Service, and so on)
124
+
| Limited
125
+
| Available +
126
+
127
+
SDK and REST APIs supported
128
+
| None
129
+
130
+
| Time-to-production
131
+
| Fastest
132
+
| Moderate
133
+
| Fast
134
+
135
+
| Maintainability and upgrades
136
+
| Vendor-maintained; update by package version
137
+
| You own app lifecycle and SDK versioning
138
+
| You own app lifecycle
139
+
140
+
| Granular UX control
141
+
| Medium
142
+
| High
143
+
| Low
144
+
|=====
49
145
50
146
== High-level implementation steps
51
147
52
148
To embed ThoughtSpot content, complete the steps described in the following sections:
53
149
54
-
* Embed with Visual Embed SDK
55
-
* Use iFrame to embed
150
+
* xref:sf-integration.adoc#_embed_spotter_or_a_liveboard_using_lwc_plugin[Embed using ThoughtSpot supported LWC plugin]
151
+
* xref:sf-integration.adoc#_embed_with_visual_embed_sdk[Custom LWC with Visual Embed SDK]
152
+
* xref:sf-integration.adoc#_use_iframe_to_embed[Use iFrame to embed]
153
+
154
+
=== Embed using ThoughtSpot LWC plugin
155
+
For information about the LWC plug-in installation and setup, see link:https://docs.thoughtspot.com/cloud/10.13.0.cl/salesforce-plugin[Integration Guide, window=_blank].
56
156
57
-
=== Embed with Visual Embed SDK
157
+
=== Custom LWC with Visual Embed SDK
58
158
The Salesforce lightning platform moved developers away from Visualforce to *Lightning Web Components (LWC)*. If you are considering using the SDK, we will assume your Salesforce instance is running on Lightning.
59
159
60
160
NOTE: To simplify development, we recommend using the link:https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode[Salesforce extensions pack] in Visual Studio Code.
@@ -69,7 +169,7 @@ NOTE: This guide does not cover LWC development. We will assume you have experie
69
169
Any LWC you develop in Salesforce will contain an html, js, and meta.xml file. Let's walk through a simple Liveboard embed component.
70
170
71
171
*meta.xml* +
72
-
Defines the metadata values for the component. Specifically, where you want to embed in Salesforce (Record Pages, Experience Cloud, Homepage, etc.), and any configurable parameters for your ThoughtSpot objects (type of object to embed, Cluster URL, Org, etc.).
172
+
Defines the metadata values for the component. Specifically, where you want to embed in Salesforce (Record Pages, Experience Cloud, Homepage, and more), and any configurable parameters for your ThoughtSpot objects (type of object to embed, Cluster URL, Org, and more).
73
173
74
174
[source, xml]
75
175
----
@@ -151,8 +251,8 @@ This page defines the div where your ThoughtSpot object will be embedded.
151
251
** The js file will communicate with your ThoughtSpot cluster and use the Visual Embed SDK to embed your objects.
152
252
** Variables set in the `meta.xml` will be tracked and applied in the SDK initialization.
153
253
** You must import the Visual Embed SDK as a static resource in Salesforce. Get the latest NPM version link:https://cdn.jsdelivr.net/npm/@thoughtspot/visual-embed-sdk/dist/tsembed.js[here].
154
-
** Add Salesforce URL to CORS allowed-domains in ThoughtSpot
155
-
** Update CORS and CSP settings in Salesforce with your ThoughtSpot cluster URL
254
+
** Add Salesforce URL to CORS allowed-domains in ThoughtSpot.
255
+
** Update CORS and CSP settings in Salesforce with your ThoughtSpot cluster URL.
We can provide all the code needed to get you started. Contact your ThoughtSpot Sales representative for access to our Git repositories.
308
408
====
309
409
310
-
=== Use iFrame to embed
410
+
=== iFrame embedding
311
411
312
412
If you have configured ThoughtSpot to use the same SAML provider as your Salesforce instance, you can create a simple Visualforce page that can seamlessly embed a ThoughtSpot Object.
313
413
@@ -362,5 +462,5 @@ The Visual Embed SDK allows extensive customization, including the following:
362
462
* Controlling user experience via ThoughtSpot’s developer-friendly APIs.
363
463
364
464
== Conclusion
365
-
Embedding ThoughtSpot into Salesforce enhances analytics accessibility, enabling users to gain insights without leaving their CRM. Whether using the ThoughtSpot SDK or iframe-based approaches, choosing the right authentication and embedding method is essential. By leveraging LWC and customizing ThoughtSpot’s appearance, organizations can create a seamless and powerful analytics experience within Salesforce.
465
+
Embedding ThoughtSpot into Salesforce enhances analytics accessibility, enabling users to gain insights without leaving their CRM. Whether using the ThoughtSpot LWC plugin, Visual Embed SDK or iframe-based approaches, choosing the right authentication and embedding method is essential. By leveraging LWC and customizing ThoughtSpot’s appearance, organizations can create a seamless and powerful analytics experience within Salesforce.
0 commit comments