# Visual Embed Playground

> For the complete documentation index, see [llms.txt](https://developers.thoughtspot.com/docs/llms.txt)

Source: https://developers.thoughtspot.com/docs/dev-playground

# Visual Embed Playground

The **Playground** allows developers to try Visual Embed APIs, play with the code, and view results instantly.

You can explore the following SDK components in the Playground.

-   [Search]({{navprefix}}/{{developer-playground}}#playground-search)
    
-   [Spotter]({{navprefix}}/{{developer-playground}}#playground-spotter)
    
-   [Liveboards]({{navprefix}}/{{developer-playground}}#playground-liveboard)
    
-   [Visualizations]({{navprefix}}/{{developer-playground}}#playground-visualization)
    
-   [Full application]({{navprefix}}/{{developer-playground}}#playground-fullapp)
    

## Search

To explore the Search embed function:

1.  Go to **Playground** > **Search**.
    
2.  Select a data source or a saved Answer.
    
3.  Try out the following customization settings and click **Run** to preview the result.
    
    <table class="tableblock frame-all grid-all stretch"><colgroup><col style="width: 100%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Collapse data panel</strong><br>Minimizes the data panel on the left navigation bar.</p></div><a href="{{previewPrefix}}/playground/search?collapseDataSources=true" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Hide data panel</strong><br></p></div><div class="paragraph"><p>Hides the default data panel. You can use this function to create a custom data panel when embedding the search module in your application.</p></div><a href="{{previewPrefix}}/playground/search?hideDataSources=true" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Display data as a table</strong></p></div><div class="paragraph"><p>Displays the Answer data generated from a query in the tabular format:</p></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Add search tokens</strong><br></p></div><div class="paragraph"><p>Allows passing search tokens as a query string and executing search.</p></div><div class="paragraph"><p>The following example shows how to create a <code>searchTokenString</code> and execute search:</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">searchOptions: {
        searchTokenString: '[product][sales][date].daily',
        executeSearch: true,
    }</code></pre></div></div><a href="{{previewPrefix}}/playground/search/searchOptions=true" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Hide Search bar</strong></p></div><div class="paragraph"><p>Hides the Search bar and renders the Search page without the Search Bar. If you are using a saved Answer as a data source, the chart/table will be visible.</p></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Set runtime filters and parameters</strong><br></p></div><div class="paragraph"><p>Enables <a href="{{navprefix}}/{{runtime-filters}}">runtime filters</a> and <a href="{{navprefix}}/{{runtime-parameters}}">Parameters</a>.</p></div><div class="paragraph"><p>To apply runtime filters, pass the <code>columnName</code>, <code>operator</code>, and <code>value</code> parameters in the <code>runtimeFilters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeFilters: [{
        columnName: 'color',
        operator: RuntimeFilterOp.EQ,
        values: ['red']
    }]</code></pre></div></div><div class="paragraph"><p>To apply Parameters, pass the <code>name</code> and <code>value</code> attributes in the <code>runtimeParameters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeParameters: [{
        name: 'Date List Param',
        value: 1656914873
    }]</code></pre></div></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Modify available actions</strong><br></p></div><div class="paragraph"><p>Allows you to show, hide, or disable the primary buttons and menu options that appear in <strong>More</strong> <code>…​</code> or the contextual menu.</p></div><blockquote><p><strong>NOTE:</strong> Use either visibleActions or hiddenActions to show or hide actions in the UI. The SDK does not support simultaneous execution of visibleActions and hiddenActions APIs.</p></blockquote><div class="ulist"><ul><li><p>To define visible actions, specify the action strings in the <code>visibleActions</code> attribute.</p><div class="paragraph"><p>Note that the UI displays only the actions specified in this attribute and does not show the other available actions. If you do not specify any actions and leave it as an empty array, no actions will appear in the UI.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">visibleActions: [Action.Save,Action.ShowUnderlyingData,Action.Download,Action.DownloadAsPDF]</code></pre></div></div></li><li><p>To disable an action, specify the action string in the <code>disabledActions</code> attribute. For example, to disable <strong>Download</strong> in the <strong>More</strong> menu, specify <strong>Action.Download</strong> in the <code>disabledActions</code> attribute. You can also set a tooltip for the disabled menu item in the <code>disabledActionReason</code> attribute.</p></li><li><p>To hide an action menu item, specify the action text string in the <code>hiddenActions</code> attribute. Use this attribute only if the <code>visibleActions</code> attribute is not defined.</p><div class="listingblock"><div class="content"><pre>hiddenActions: [Action.DownloadAsPDF]</pre></div></div><blockquote><p><strong>NOTE:</strong> ThoughtSpot automatically assigns an action ID based on the name you assign to a custom action. For example, if you set the name of a custom action as Send Email, ThoughtSpot sets the ID for this action as send-email by default. To disable, hide, or show a custom action in the embedded UI, specify the custom action ID in the disabledActions, hiddenActions, and visibleActions array.</p></blockquote><div class="paragraph"><p>For more information, see <a href="{{navprefix}}/{{embed-actions}}">Show or hide actions</a>.</p></div></li></ul></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Handle custom actions</strong></p></div><div class="paragraph"><p>Allows you to view the code for a custom action event. If the embedded instance has a custom action, use this checkbox to view the data payload generated after a custom action is clicked.</p></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Use Host Event</strong></p></div><div class="paragraph"><p>Allows registering a host event. The registered event triggers an action in the embedded view when <strong>Try Event</strong> is clicked.</p></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Apply custom styles</strong></p></div><div class="paragraph"><p>Shows the code for interface customization. You can define custom styles and define CSS variables to change the look and feel of the embedded components. For more information about CSS variables, styles, and customizations options, see <a href="{{navprefix}}/{{css-customization}}">Customize CSS</a>.</p></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"></td></tr></tbody></table>
    

## Spotter

To explore the Spotter embedding features:

1.  Go to **Playground** > **Spotter**.
    
2.  Select a data source.
    
3.  [Try out]({{previewPrefix}}/playground/sage) the following customization settings and click **Run** to preview the result.
    

<table class="tableblock frame-all grid-all stretch"><colgroup><col style="width: 100%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Disable changing model</strong><br></p></div><div class="paragraph"><p>Disables data source selection.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Hide model selector</strong><br>Hides the data source selector.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Add search query</strong><br></p></div><div class="paragraph"><p>Allows you to define search query.<br></p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">searchOptions: {
    searchQuery: 'average sales by country and product type'
}</code></pre></div></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Set runtime filters and parameters</strong><br></p></div><div class="paragraph"><p>Enables <a href="{{navprefix}}/{{runtime-filters}}">runtime filters</a> and <a href="{{navprefix}}/{{runtime-parameters}}">Parameters</a>.</p></div><div class="paragraph"><p>To apply runtime filters, pass the <code>columnName</code>, <code>operator</code>, and <code>value</code> parameters in the <code>runtimeFilters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeFilters: [{
    columnName: 'color',
    operator: RuntimeFilterOp.EQ,
    values: ['red']
}]</code></pre></div></div><div class="paragraph"><p>To apply Parameters, pass the <code>name</code> and <code>value</code> attributes in the <code>runtimeParameters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeParameters: [{
    name: 'Date List Param',
    value: 1656914873
}]</code></pre></div></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Modify available actions</strong><br></p></div><div class="paragraph"><p>Allows you to show, hide, or disable the primary buttons and menu options that appear in <strong>More</strong> <code>…​</code> or the contextual menu.</p></div><blockquote><p><strong>NOTE:</strong> Use either visibleActions or hiddenActions to show or hide actions in the UI. The SDK does not support simultaneous execution of visibleActions and hiddenActions APIs.</p></blockquote><div class="ulist"><ul><li><p>To define visible actions, specify the action strings in the <code>visibleActions</code> attribute.</p><div class="paragraph"><p>Note that the UI displays only the actions specified in this attribute and does not show the other available actions. If you do not specify any actions and leave it as an empty array, no actions will appear in the UI.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">visibleActions: [Action.Save,Action.ShowUnderlyingData,Action.Download,Action.DownloadAsPDF]</code></pre></div></div></li><li><p>To disable an action, specify the action string in the <code>disabledActions</code> attribute. For example, to disable <strong>Download</strong> in the <strong>More</strong> menu, specify <strong>Action.Download</strong> in the <code>disabledActions</code> attribute. You can also set a tooltip for the disabled menu item in the <code>disabledActionReason</code> attribute.</p></li><li><p>To hide an action menu item, specify the action text string in the <code>hiddenActions</code> attribute. Use this attribute only if the <code>visibleActions</code> attribute is not defined.</p><div class="listingblock"><div class="content"><pre>hiddenActions: [Action.DownloadAsPDF]</pre></div></div><blockquote><p><strong>NOTE:</strong> ThoughtSpot automatically assigns an action ID based on the name you assign to a custom action. For example, if you set the name of a custom action as Send Email, ThoughtSpot sets the ID for this action as send-email by default. To disable, hide, or show a custom action in the embedded UI, specify the custom action ID in the disabledActions, hiddenActions, and visibleActions array.</p></blockquote><div class="paragraph"><p>For more information, see <a href="{{navprefix}}/{{embed-actions}}">Show or hide actions</a>.</p></div></li></ul></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Handle custom actions</strong></p></div><div class="paragraph"><p>Allows you to view the code for a custom action event. If the embedded instance has a custom action, use this checkbox to view the data payload generated after a custom action is clicked.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Use Host Event</strong></p></div><div class="paragraph"><p>Allows registering a host event. The registered event triggers an action in the embedded view when <strong>Try Event</strong> is clicked.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Apply custom styles</strong></p></div><div class="paragraph"><p>Shows the code for interface customization. You can define custom styles and define CSS variables to change the look and feel of the embedded components. For more information about CSS variables, styles, and customizations options, see <a href="{{navprefix}}/{{css-customization}}">Customize CSS</a>.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"></td></tr></tbody></table>

## Visualization

To explore the visualization embedding function:

1.  Go to **Playground** > **Visualization**.
    
2.  Select a Liveboard or visualization.
    
3.  Try using any of the following customization settings and click **Run** to preview the result.
    

<table class="tableblock frame-all grid-all stretch"><colgroup><col style="width: 100%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Set runtime filters and parameters</strong><br></p></div><div class="paragraph"><p>Enables <a href="{{navprefix}}/{{runtime-filters}}">runtime filters</a> and <a href="{{navprefix}}/{{runtime-parameters}}">Parameters</a>.</p></div><div class="paragraph"><p>To apply runtime filters, pass the <code>columnName</code>, <code>operator</code>, and <code>value</code> parameters in the <code>runtimeFilters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeFilters: [{
    columnName: 'color',
    operator: RuntimeFilterOp.EQ,
    values: ['red']
}]</code></pre></div></div><div class="paragraph"><p>To apply Parameters, pass the <code>name</code> and <code>value</code> attributes in the <code>runtimeParameters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeParameters: [{
    name: 'Date List Param',
    value: 1656914873
}]</code></pre></div></div><a href="{{previewPrefix}}/playground/search" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Modify available actions</strong></p></div><div class="paragraph"><p>Allows you to show, hide, or disable the primary buttons and menu options that appear in <strong>More</strong> <code>…​</code> or the contextual menu.</p></div><blockquote><p><strong>NOTE:</strong> Use either visibleActions or hiddenActions to show or hide actions in the UI. The SDK does not support simultaneous execution of visibleActions and hiddenActions APIs.</p></blockquote><div class="ulist"><ul><li><p>To define visible actions, specify the action strings in the <code>visibleActions</code> attribute.</p><div class="paragraph"><p>Note that the UI displays only the actions specified in this attribute and does not show the other available actions. If you do not specify any actions and leave it as an empty array, no actions will appear in the UI.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">visibleActions: [Action.Save,Action.ShowUnderlyingData,Action.Download,Action.DownloadAsPDF]</code></pre></div></div></li><li><p>To disable an action, specify the action string in the <code>disabledActions</code> attribute. For example, to disable <strong>Download</strong> in the <strong>More</strong> menu, specify <strong>Action.Download</strong> in the <code>disabledActions</code> attribute. You can also set a tooltip for the disabled menu item in the <code>disabledActionReason</code> attribute.</p></li><li><p>To hide an action menu item, specify the action text string in the <code>hiddenActions</code> attribute. Use this attribute only if the <code>visibleActions</code> attribute is not defined.</p><div class="listingblock"><div class="content"><pre>hiddenActions: [Action.DownloadAsPDF]</pre></div></div><blockquote><p><strong>NOTE:</strong> ThoughtSpot automatically assigns an action ID based on the name you assign to a custom action. For example, if you set the name of a custom action as Send Email, ThoughtSpot sets the ID for this action as send-email by default. To disable, hide, or show a custom action in the embedded UI, specify the custom action ID in the disabledActions, hiddenActions, and visibleActions array.</p></blockquote><div class="paragraph"><p>For more information, see <a href="{{navprefix}}/{{embed-actions}}">Show or hide actions</a>.</p></div></li></ul></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Handle custom actions</strong></p></div><div class="paragraph"><p>Allows you to view the code for a custom action event. If the embedded instance has a custom action, use this checkbox to view the data payload generated after a custom action is clicked.</p></div><a href="{{previewPrefix}}/playground/answer" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Use Host Event</strong></p></div><div class="paragraph"><p>Allows registering a host event. The registered event triggers an action in the embedded view when <strong>Try Event</strong> is clicked.</p></div><a href="{{previewPrefix}}/playground/answer" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Apply custom styles</strong></p></div><div class="paragraph"><p>Shows the code for interface customization. You can define custom styles and define CSS variables to change the look and feel of the embedded components. For more information about CSS variables, styles, and customizations options, see <a href="{{navprefix}}/{{css-customization}}">Customize CSS</a>.</p></div><a href="{{previewPrefix}}/playground/answer" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"></td></tr></tbody></table>

## Liveboard

To explore the Liveboard embedding SDK functions:

1.  Go to **Playground** > **Liveboard**.
    
2.  Select a Liveboard.
    
3.  Try using any of the following customization settings and click **Run** to preview the result.
    

<table class="tableblock frame-all grid-all stretch"><colgroup><col style="width: 100%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Full Height</strong></p></div><div class="paragraph"><p>Dynamically resizes the embedded Liveboard frame according to the height of the Liveboard.</p></div><div class="paragraph"><p>If the embedded Liveboard does not fit vertically within your application page, a second scroll bar may appear. When <strong>Full Height</strong> is selected, the embedded Liveboard container is automatically adjusted according to the height of the Liveboard.</p></div><a href="{{previewPrefix}}/playground/liveboard?fullHeight=true" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Customize Liveboard header</strong><br></p></div><div class="paragraph"><p>Allows customizing the Liveboard header. The following settings are available:</p></div><div class="ulist"><ul><li><p>Show or hide Liveboard title and description</p></li><li><p>Show or hide the Liveboard header</p></li><li><p>Make the Liveboard header sticky as the user scrolls page</p></li><li><p>Show or hide tab panel</p></li><li><p>Show or hide specific tabs</p></li></ul></div><a href="{{previewPrefix}}/playground/liveboard" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Set runtime filters and parameters</strong><br></p></div><div class="paragraph"><p>Enables <a href="{{navprefix}}/{{runtime-filters}}">runtime filters</a> and <a href="{{navprefix}}/{{runtime-parameters}}">Parameters</a>.</p></div><div class="paragraph"><p>To apply runtime filters, pass the <code>columnName</code>, <code>operator</code>, and <code>value</code> parameters in the <code>runtimeFilters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeFilters: [{
    columnName: 'color',
    operator: RuntimeFilterOp.EQ,
    values: ['red']
}]</code></pre></div></div><div class="paragraph"><p>To apply Parameters, pass the <code>name</code> and <code>value</code> attributes in the <code>runtimeParameters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeParameters: [{
    name: 'Date List Param',
    value: 1656914873
}]</code></pre></div></div><a href="{{previewPrefix}}/playground/liveboard" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Modify available actions</strong></p></div><div class="paragraph"><p>Allows you to show, hide, or disable the primary buttons and menu options that appear in <strong>More</strong> <code>…​</code> or the contextual menu.</p></div><blockquote><p><strong>NOTE:</strong> Use either visibleActions or hiddenActions to show or hide actions in the UI. The SDK does not support simultaneous execution of visibleActions and hiddenActions APIs.</p></blockquote><div class="ulist"><ul><li><p>To define visible actions, specify the action strings in the <code>visibleActions</code> attribute.</p><div class="paragraph"><p>Note that the UI displays only the actions specified in this attribute and does not show the other available actions. If you do not specify any actions and leave it as an empty array, no actions will appear in the UI.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">visibleActions: [Action.Save,Action.ShowUnderlyingData,Action.Download,Action.DownloadAsPDF]</code></pre></div></div></li><li><p>To disable an action, specify the action string in the <code>disabledActions</code> attribute. For example, to disable <strong>Download</strong> in the <strong>More</strong> menu, specify <strong>Action.Download</strong> in the <code>disabledActions</code> attribute. You can also set a tooltip for the disabled menu item in the <code>disabledActionReason</code> attribute.</p></li><li><p>To hide an action menu item, specify the action text string in the <code>hiddenActions</code> attribute. Use this attribute only if the <code>visibleActions</code> attribute is not defined.</p><div class="listingblock"><div class="content"><pre>hiddenActions: [Action.DownloadAsPDF]</pre></div></div><blockquote><p><strong>NOTE:</strong> ThoughtSpot automatically assigns an action ID based on the name you assign to a custom action. For example, if you set the name of a custom action as Send Email, ThoughtSpot sets the ID for this action as send-email by default. To disable, hide, or show a custom action in the embedded UI, specify the custom action ID in the disabledActions, hiddenActions, and visibleActions array.</p></blockquote><div class="paragraph"><p>For more information, see <a href="{{navprefix}}/{{embed-actions}}">Show or hide actions</a>.</p></div></li></ul></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Handle custom actions</strong></p></div><div class="paragraph"><p>Allows you to view the code for a custom action event. If the embedded instance has a custom action, use this checkbox to view the data payload generated after a custom action is clicked.</p></div><a href="{{previewPrefix}}/playground/liveboard" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Use Host Event</strong><br></p></div><div class="paragraph"><p>Allows registering a host event. The registered event triggers an action in the embedded view when <strong>Try Event</strong> is clicked.</p></div><a href="{{previewPrefix}}/playground/liveboard" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Apply custom styles</strong></p></div><div class="paragraph"><p>Shows the code for interface customization. You can define custom styles and define CSS variables to change the look and feel of the embedded components. For more information about CSS variables, styles, and customizations options, see <a href="{{navprefix}}/{{css-customization}}">Customize CSS</a>.</p></div><a href="{{previewPrefix}}/playground/liveboard" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr></tbody></table>

## Full application

To explore the full ThoughtSpot embedding function:

1.  Go to **Playground** > **Full app**.
    
2.  Select a tab to set a default page view for embedded application users.
    
3.  Try using any of the following customization settings and click **Run** to preview the result.
    

<table class="tableblock frame-all grid-all stretch"><colgroup><col style="width: 100%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Customize app navigation</strong><br>Allows customizing navigation controls. Applicable to new homepage and navigation experience only.</p></div><div class="paragraph"><p>The following settings are available:</p></div><div class="ulist"><ul><li><p>Show or hide the left navigation module and the application switcher</p></li><li><p>Show or hide the menu options in the left navigation panel</p></li><li><p>Show or hide the Org switcher</p></li><li><p>Show or hide the user profile and help icons</p></li></ul></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Customize home page modules</strong><br>Allows customizing the visibility of modules on the home page. Applicable to new homepage and navigation experience only.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Navigate to URL</strong><br></p></div><div class="paragraph"><p>Allows you to define a specific URL path for loading a ThoughtSpot application page.</p></div><div class="paragraph"><p>For example, you can set the path to a specific Liveboard page as shown here:</p></div><div class="listingblock"><div class="content"><pre>path: 'pinboard/d084c256-e284-4fc4-b80c-111cb606449a'</pre></div></div><div class="paragraph"><p>If both <code>pageID</code> and <code>path</code> attributes are defined, the <code>path</code> definition takes precedence.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Set runtime filters and parameters</strong><br></p></div><div class="paragraph"><p>Enables <a href="{{navprefix}}/{{runtime-filters}}">runtime filters</a> and <a href="{{navprefix}}/{{runtime-parameters}}">Parameters</a>.</p></div><div class="paragraph"><p>To apply runtime filters, pass the <code>columnName</code>, <code>operator</code>, and <code>value</code> parameters in the <code>runtimeFilters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeFilters: [{
    columnName: 'color',
    operator: RuntimeFilterOp.EQ,
    values: ['red']
}]</code></pre></div></div><div class="paragraph"><p>To apply Parameters, pass the <code>name</code> and <code>value</code> attributes in the <code>runtimeParameters</code> object.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-JavaScript" data-lang="JavaScript">runtimeParameters: [{
    name: 'Date List Param',
    value: 1656914873
}]</code></pre></div></div><a href="{{previewPrefix}}/playground/fullApp" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Modify available actions</strong></p></div><div class="paragraph"><p>Allows you to show, hide, or disable the primary buttons and menu options that appear in <strong>More</strong> <code>…​</code> or the contextual menu.</p></div><blockquote><p><strong>NOTE:</strong> Use either visibleActions or hiddenActions to show or hide actions in the UI. The SDK does not support simultaneous execution of visibleActions and hiddenActions APIs.</p></blockquote><div class="ulist"><ul><li><p>To define visible actions, specify the action strings in the <code>visibleActions</code> attribute.</p><div class="paragraph"><p>Note that the UI displays only the actions specified in this attribute and does not show the other available actions. If you do not specify any actions and leave it as an empty array, no actions will appear in the UI.</p></div><div class="listingblock"><div class="content"><pre class="highlight"><code class="language-Javascript" data-lang="Javascript">visibleActions: [Action.Save,Action.ShowUnderlyingData,Action.Download,Action.DownloadAsPDF]</code></pre></div></div></li><li><p>To disable an action, specify the action string in the <code>disabledActions</code> attribute. For example, to disable <strong>Download</strong> in the <strong>More</strong> menu, specify <strong>Action.Download</strong> in the <code>disabledActions</code> attribute. You can also set a tooltip for the disabled menu item in the <code>disabledActionReason</code> attribute.</p></li><li><p>To hide an action menu item, specify the action text string in the <code>hiddenActions</code> attribute. Use this attribute only if the <code>visibleActions</code> attribute is not defined.</p><div class="listingblock"><div class="content"><pre>hiddenActions: [Action.DownloadAsPDF]</pre></div></div><blockquote><p><strong>NOTE:</strong> ThoughtSpot automatically assigns an action ID based on the name you assign to a custom action. For example, if you set the name of a custom action as Send Email, ThoughtSpot sets the ID for this action as send-email by default. To disable, hide, or show a custom action in the embedded UI, specify the custom action ID in the disabledActions, hiddenActions, and visibleActions array.</p></blockquote><div class="paragraph"><p>For more information, see <a href="{{navprefix}}/{{embed-actions}}">Show or hide actions</a>.</p></div></li></ul></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Handle custom actions</strong></p></div><div class="paragraph"><p>Allows you to view the code for a custom action event. If the embedded instance has a custom action, use this checkbox to view the data payload generated after a custom action is clicked.</p></div><a href="{{previewPrefix}}/playground/fullApp" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Use Host Event</strong><br>Allows registering a host event. The registered event triggers an action in the embedded view when <strong>Try Event</strong> is clicked.</p></div><a href="{{previewPrefix}}/playground/fullApp" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr><tr><td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph"><p><strong>Apply custom styles</strong></p></div><div class="paragraph"><p>Shows the code for interface customization. You can define custom styles and define CSS variables to change the look and feel of the embedded components. For more information about CSS variables, styles, and customizations options, see <a href="{{navprefix}}/{{css-customization}}">Customize CSS</a>.</p></div><a href="{{previewPrefix}}/playground/fullApp" id="preview-in-playground" target="_blank">Try it out</a></div></td></tr></tbody></table>

## SpotterCode panel

If SpotterCode Agent for Visual Embed Playground is enabled on your instance, the Playground page displays the SpotterCode slideout panel on the right side of the Playground area. SpotterCode Agent is an AI-powered coding assistant built into the Visual SDK Playground to help developers build embedding code rapidly and iterate on embed configurations without writing boilerplate code manually.

To open SpotterCode in the Playground:

1.  Go to **Develop** > **Playground** > **Visual embed**.
    
2.  Select the component you want to embed.
    
3.  Click **SpotterCode** on the right side of the Playground to open the panel.
    
    The SpotterCode panel opens on the right. The header shows **SpotterCode** on the left and a collapse/expand control on the right.
    

### Quick starter prompts

The SpotterCode panel displays a set of quick starter prompts for each embed component by default.

 
| Embed component | Quick-starter prompts |
| --- | --- |
| 
**Search Data**

 | 

-   Embed a search view with runtime filters
    
-   Display search results in a structured table with sorting enabled
    
-   Keep the data panel collapsed for a cleaner search view
    





 |
| 

**Liveboard**

 | 

-   Embed this Liveboard with default filters
    
-   Add a custom action to send Liveboard data to Slack
    
-   Apply runtime filters to this Liveboard
    





 |
| 

**Visualization**

 | 

-   Embed a single visualization from this Liveboard
    
-   Add a custom action to send this chart data to Slack
    
-   Apply runtime filters to this visualization
    





 |
| 

**Full App**

 | 

-   Embed full app with navigation enabled
    
-   Enable Spotter in the embedded app
    
-   Change the "Edit" label to "Modify"
    





 |
| 

**Spotter**

 | 

-   Embed Spotter as an AI assistant in my app
    
-   Configure Spotter to open in a side panel
    
-   Add a button to launch Spotter in the UI
    





 |

When a user clicks a quick-starter prompt, a query is sent to SpotterCode.

### Response generation

The chat interface includes the following options:

-   To get precise results:
    
    -   Be specific about the component, configuration, and desired behavior.
        
    -   Use one prompt per change. Break complex requests into smaller sequential steps. For prompt writing tips and examples, see [SpotterCode prompting guide]({{navprefix}}/{{spottercode-prompt-guide}}).
        
    
-   To edit a request, click the edit icon to modify your prompt and resend it.
    
-   To clear a chat and reset the conversation context, click **Reset chat**.
    
-   To cancel a request or stop code generation, click the pause button in the chat prompt.
    

When SpotterCode processes your prompt, it:

1.  generates the embed code for your request.
    
2.  updates the code editor panel on the left with the generated code.
    
3.  scrolls automatically to show new content in the chat panel.
    

After SpotterCode updates the code editor:

1.  Review the generated code in the left panel. If SpotterCode detects a conflict between the generated code and the existing code in the editor, it does not update the editor. Ensure that you review the current code in the editor, clear conflicting sections, and try your prompt again.
    
2.  Click **Run** to execute the code and preview the embedded component in the preview panel.
    
3.  Iterate by entering a follow-up prompt or editing the code directly.
    

## Additional resources

For more information about the configuration settings and parameters, see the following pages:

-   [SearchViewConfig]({{navprefix}}/{{SearchViewConfig}})
    
-   [SpotterAgentEmbedViewConfig]({{navprefix}}/{{SpotterAgentEmbedViewConfig}})
    
-   [LiveboardViewConfig](#LiveboardViewConfig)
    
-   [AppViewConfig]({{navprefix}}/{{AppViewConfig}})
    

See the following pages for information on how to embed a ThoughtSpot component:

-   [Embed ThoughtSpot Search]({{navprefix}}/{{embed-search}})
    
-   [Embed Spotter]({{navprefix}}/{{embed-spotter}})
    
-   [Embed a visualization]({{navprefix}}/{{embed-a-viz}})
    
-   [Embed a Liveboard]({{navprefix}}/{{embed-pinboard}})
    
-   [Embed full application]({{navprefix}}/{{full-embed}})