Skip to content

spotter embed SF, ServiceNow, and SCAL-237357 fixes #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions modules/ROOT/pages/common/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
*** link:{{navprefix}}/search-embed[Embed search page]
*** link:{{navprefix}}/embed-nls[Embed Natural Language Search]
*** link:{{navprefix}}/embed-spotter[Embed Spotter ^BETA^]
**** link:{{navprefix}}/spotter-embed-sf[Embed Spotter in Salesforce]
**** link:{{navprefix}}/spotter-embed-ServiceNow[Embed Spotter in ServiceNow]
*** link:{{navprefix}}/embed-searchbar[Embed search bar]
*** link:{{navprefix}}/react-app-embed[Embed with React components]

Expand Down
118 changes: 118 additions & 0 deletions modules/ROOT/pages/embed-spotter-salesforce.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
= Embed Spotter in Salesforce
:toc: true
:toclevels: 2

:page-title: Embed Spotter in Salesforce
:page-pageid: spotter-embed-sf
:page-description: Embed conversational analytics with Spotter in Salesforce

Developers can integrate Spotter[beta betaBackground]^Beta^ directly into the Salesforce platform to enable the CRM application users to access real-time analytics through an intuitive interface that supports natural language queries. With this seamless integration, Salesforce users can engage directly with Spotter to ask analytics questions and receive relevant insights, charts, or visualizations instantly.

This article provides step-by-step instructions on embedding Spotter in Salesforce in an iFrame without using the Visual Embed SDK.


== Before you begin

* Check if you have access to a ThoughtSpot instance. Note the application URL.
* Ensure that you have a Salesforce account with developer access.
* Add Salesforce application URLs as CSP visual embed hosts and set frame-ancestors:
+
. On your ThoughtSpot instance, navigate to *Develop* > *Customizations* > *Security Settings*.
. Click *Edit*.
. Add the following domains to *CSP visual embed hosts*.
+
`\https://*.my.salesforce.com`
+
`\https://*.lightning.force.com`

. Click *Save changes*.

== Embed Spotter in the Salesforce Portal

To embed Spotter as a tab within Salesforce, complete these steps:

. Log in to your ThoughtSpot instance using Basic authentication with your username and password.
. Log in to Salesforce with developer credentials.
. In the Salesforce portal, click the *Setup* icon.
+
[.bordered]
[.widthAuto]
image::./images/setup-sf.png[Salesforce setup for Spotter]
. On the *Setup* page, search for tabs and select *Tabs*.
+
[.bordered]
[.widthAuto]
image::./images/search-tab.png[search tabs]
. Scroll to the *Web tabs* section and click *New*.
+
[.bordered]
[.widthAuto]
image::./images/create-tab.png[Tab for Spotter]
. In the *New Web Tab* view, configure the following attributes:
.. Select *Full page width* and click *Next*.
+
[.bordered]
[.widthAuto]
image::./images/full-width-sf.png[full page width]
.. Set the *Tab Type* to *URL* and specify the tab name.
.. Select a tab style. For example, *Umbrella*, and set *Content Frame Height (pixels)* to 800.
+
[.bordered]
[.widthAuto]
image::./images/tab-config-sf.png[Set page width]

.. Click *Next*.
.. Specify the ThoughtSpot instance URL from which you want to embed Spotter, and then click *Next*. +
Ensure that the embed URL for Spotter is in the following format: +
`https://{ThoughtSpot-Host}/?embedApp=true#/embed/insights/conv-assist?worksheet={worksheetID}`

+
[.bordered]
[.widthAuto]
image::./images/spotter-url-sf.png[Spotter URL]
.. Set tab visibility.
+
[.bordered]
[.widthAuto]
image::./images/tab-visibility-sf.png[tab visibility setting]
.. Select *Apply one tab visibility to all profiles* and click *Next*.
.. Click *Save*.
. Click the App Launcher icon and then click *Sales*. +

+
[.bordered]
[.widthAuto]
image::./images/sales-page-sf.png[Sales page]
+
Notice that Spotter is embedded as a tab on the *Sales* page.


== Test your embed

. Click the *Spotter* tab and select a Worksheet or Model as the data source for Spotter queries.
+
[.bordered]
[.widthAuto]
image::./images/spotter-ws-selection-sf.png[Spotter tab]

. Initiate the conversation with Spotter by sending a query.
. View the resulting data in *Salesforce Lightning Experience* or *Salesforce Classic* mode.
+
[.bordered]
[.widthAuto]
image::./images/sf-classic.png[Salesforce Classic]

+
[.bordered]
[.widthAuto]
image::./images/sf-lightning-exp.png[Salesforce Lightning experience]

. Send a follow-up query and analyze the answer generated by Spotter.








110 changes: 110 additions & 0 deletions modules/ROOT/pages/embed-spotter-servicenow.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
= Embed Spotter in ServiceNow
:toc: true
:toclevels: 2

:page-title: Embed Spotter in ServiceNoe
:page-pageid: spotter-embed-ServiceNow
:page-description: Embed conversational analytics with Spotter in Salesforce

Developers can integrate Spotter[beta betaBackground]^Beta^ directly into ServiceNow platform to enable the CRM application users to access real-time analytics through an intuitive interface that supports natural language queries. With this seamless integration, ServiceNow users can engage directly with Spotter to ask analytics questions and receive relevant insights, charts, or visualizations instantly.

This article provides step-by-step instructions on embedding Spotter in ServiceNow in an iFrame without using the Visual Embed SDK.

== Before you begin

* Check if you have access to a ThoughtSpot instance. Note the application URL.
* Ensure that you have access to a ServiceNow developer site. For more information about ServiceNow developer site access, refer to link:https://developer.servicenow.com/dev.do#!/guides/washingtondc/now-platform/devsite_account_guide_washingtondc_developer-site-account-guide/DAG_CreateDevSiteAccount[ServiceNow documentation].
* Add Salesforce application URLs as CSP visual embed hosts and set frame-ancestors:
+
. On your ThoughtSpot instance, navigate to *Develop* > *Customizations* > *Security Settings*.
. Click *Edit*.
. Add the following domain to *CSP visual embed hosts*.
+
`\https://*.service-now.com` +
. Click *Save changes*.

== Embed Spotter in your ServiceNow workspace

To embed Spotter as a tab in your ServiceNow instance, complete these steps:

. Log in to your ServiceNow instance.
. On the home page, click *All* > *UI Builder*.
. On the UI Builder page, search for the experience in which you want to embed Spotter, and select that experience.
. On the workspace page, click the `+` icon next to *Pages and variants*.
. Click *Create a new page* and complete the steps:
+
[.bordered]
[.widthAuto]
image::./images/serviceNow-create-page.png[Create a new page]
.. Click *Create from scratch instead*.
+
[.bordered]
[.widthAuto]
image::./images/create-from-scratch-serviceNow.png[Create from scratch]
.. Specify the URL name and click *Continue*.
.. Specify the page name and the URL of the page.
+
[.bordered]
[.widthAuto]
image::./images/spotter-url-servicenow.png[Page name and URL]

.. Click *Continue*, and then click *Looks good*.
+
[.bordered]
[.widthAuto]
image::./images/spotter-url-servicenow.png[Review Spotter parameters]
.. Click *Continue* to add the Spotter component.
+
[.bordered]
[.widthAuto]
image::./images/add-component-sNow.png[add Spotter iframe]
. In the components list, search for iFrame and select the *iFrame* component.
. Define the following properties for the iFrame component.
.. *Title* - Name of the Spotter component +
.. *Source* - Source URL. Enter the URL of ThoughtSpot instance from which you want to embed Spotter. Ensure that the embed URL for Spotter is in the following format: +
`https://{ThoughtSpot-Host}/?embedApp=true#/embed/insights/conv-assist?worksheet={worksheetID}`
.. *Height* and *Width* - Height and width of the iFrame component. Set the width as 100% and height as 855.
+
[.bordered]
[.widthAuto]
image::./images/iframe-setup-servicenow.png[iframe settings]
.. Click *Save*.
. Return to the workspace page and click *View Experience Settings*.
+
[.bordered]
[.widthAuto]
image::./images/review-workspace-settings-servicenow.png[Review workspace settings]
. To add the Spotter component to the side navigation menu, scroll down to locate *Side navigation* and click *Add*.
. Select the Spotter component, and define the properties for *Icon*, *Label*, and *Group* fields and then click *Save*.
. Return to the home page and then navigate to the workspace in which you embedded Spotter.
+
[.bordered]
[.widthAuto]
image::./images/spotter-component-leftnav-servicenow.png[Spotter in ServiceNow workspace]


== Test your embed

. Click the *Spotter* icon in the side navigation menu of your ServiceNow workspace.
. Select a Worksheet or Model that you want to use as a data source for Spotter analytics.
+
[.bordered]
[.widthAuto]
image::./images/datasource-select-leftnav-servicenow.png[Data source selection]

. Initiate the conversation with Spotter by sending a query.
. View the resulting data.
+
[.bordered]
[.widthAuto]
image::./images/spotter-query-servicenow.png[View Spotter response]

. Send a follow-up query and analyze the answer generated by Spotter.








35 changes: 35 additions & 0 deletions modules/ROOT/pages/rest-api-sdk-typescript.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,41 @@ a|* ThoughtSpot Cloud release versions: +
For information about new features, breaking changes, and deprecated parameters, see xref:rest-apiv2-changelog.adoc[API changelog].


== Supported versions

Note the version recommendations for your ThoughtSpot clusters:

[width="100%" cols="1,4"]
[options='header']
|====
|SDK version|Minimum required version on ThoughtSpot cluster
|v2.0.2 a| ThoughtSpot Cloud: 9.6.0.cl +
ThoughtSpot Software: 9.8.0.sw
|v2.1.0| ThoughtSpot Cloud: 9.7.0.cl +
ThoughtSpot Software: 9.8.0.sw
|v2.2.0| ThoughtSpot Cloud: 9.8.0.cl +
ThoughtSpot Software: 9.8.0.sw
|v2.4.0| ThoughtSpot Cloud: 9.10.0.cl +
ThoughtSpot Software: 10.1.0.sw
|v2.4.1| ThoughtSpot Cloud: 9.10.5.cl +
ThoughtSpot Software: 10.1.0.sw
|v2.5.0| ThoughtSpot Cloud: 9.12.0.cl, 9.12.5.cl +
ThoughtSpot Software: 10.1.0.sw
|v2.6.0| ThoughtSpot Cloud: 10.1.0.cl +
ThoughtSpot Software: 10.1.0.sw
|v2.7.1| ThoughtSpot Cloud: 10.1.0.cl +
ThoughtSpot Software: 10.1.0.sw
|v2.9.0| ThoughtSpot Cloud: 10.3.0.cl +
ThoughtSpot Software: 10.7.0.sw
|v2.10.0| ThoughtSpot Cloud: 10.4.0.cl +
ThoughtSpot Software: 10.7.0.sw
|v2.11.0| ThoughtSpot Cloud: 10.5.0.cl +
ThoughtSpot Software: 10.7.0.sw
|====

For information about new features, breaking changes, and deprecated parameters, see xref:rest-apiv2-changelog.adoc[API changelog].


== SDK Reference

For a complete list of methods to use for API requests, see the following resources:
Expand Down
Binary file added static/doc-images/images/add-component-sNow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/create-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/full-width-sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/sales-page-sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/search-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/setup-sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/sf-classic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/sf-lightning-exp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/spotter-url-sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/tab-config-sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/tab-visibility-sf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/doc-images/images/tab-visibilty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading