SpotterAgentEmbed

SpotterAgentEmbed

Create a conversation embed, which can be integrated inside chatbots or other conversational interfaces.

Version : SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl

import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';

const conversation = new SpotterAgentEmbed({
 worksheetId: 'worksheetId',
});

const { container, error } = await conversation.sendMessage('show me sales by region');

// append the container to the DOM
document.body.appendChild(container); // or to any other element

Constructors🔗

new SpotterAgentEmbed(viewConfig: SpotterAgentEmbedViewConfig ) : SpotterAgentEmbed

Function Parameters

viewConfig

Returns

Methods🔗

sendMessage🔗

sendMessage(userMessage: string ) : Promise< {container: undefined , error: any , viz?: undefined = …​} | {container: HTMLDivElement , error: undefined , viz?: ConversationMessage = …​} >

Function Parameters

userMessage
  • userMessage: string

Returns

Promise< {container: undefined , error: any , viz?: undefined = …​} | {container: HTMLDivElement , error: undefined , viz?: ConversationMessage = …​} >