Syntax
setAppState(xAppTemplateId, xAppTemplateData)
Description
Updates the state of the xApp Session for the current conversation. Only works if an xApp Session was started beforehand. Parameters:xAppTemplateId:string— the URL to a hosted xApp template,generic-html, ornull.- If a URL is provided, the xApp template is loaded from that URL.
- If
generic-htmlis provided, the xApp Page SDK is loaded from the host, and the HTML code defined inxAppTemplateData.htmlis displayed. - If
nullis provided, the active xApp Page is closed.
xAppTemplateData:Record<string, unknown>— the data payload for the xApp Page.
void
Examples
Load an xApp Template
Load an xApp Template
Load a Generic HTML xApp Page
Load a Generic HTML xApp Page
Close an Active xApp Page
Close an Active xApp Page