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-html
is provided, the xApp Page SDK is loaded from the host, and the HTML code defined inxAppTemplateData.html
is displayed. - If
null
is 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