Skip to main content
Updated in 4.75
xApp Show HTML Node configuration panel

Description

The xApp page can be built by providing custom HTML code. Once this Node is executed, this xApp page is displayed in the xApp Session. You can access the xApp page SDK through a global SDK variable. To submit a result back to the Flow, call SDK.submit({ name: "John" });. The submitted payloads need to be serializable JSON objects. The following example renders a button that submits on click: <button type="button" onclick="SDK.submit({ variant: 'button1' })">button 1</button>. To view submitted data, use the Interaction panel. You can access submitted data in the data object by clicking INFO > Input, or in the chat by adding a Say Node and specifying Submit payload: {{JSON.stringify(input.data)}} or Submit payload: {{JSON.stringify(ci.data)}}. To access session data from within the HTML Code, use CognigyScript {{JSON.stringify(cc.someContextKey)}}. As an alternative, for more customization, you can create your own Node by implementing and uploading an Extension.

Parameters

To wait for a user input, for example, when the user clicks Submit on the Ordering page, activate the Waiting Behavior option. You can store the input result in the Context and use the data in the other Nodes.
By default, an xApp page opens in a separate browser tab. If you are using Webchat v3, you can override this behavior to open your xApp pages directly in Webchat v3. The pages are presented in the format of screens.The table lists the parameters for configuring xApp screens in the Webchat v3 interface.
When hosted within Cognigy.AI, the xApp page or any generic HTML xApp can load the xApp page SDK using a fixed URL: <script src="/sdk/app-page-sdk.js"></script>. Loading this file exposes the xApp page SDK as a global instance called SDK. To access its methods, call SDK.someExampleMethod() after loading the SDK file. The SDK code isn’t loaded asynchronously.

More Information

Last modified on June 15, 2026