xApp: Init Session - Cognigy Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Description

This Node initializes a new xApp session.After the execution of this Node, you can access the xApp in two different ways:

Without PIN

To require only a URL to access an xApp session, you can share a Session URL. This URL is available via the xApp Session URL token. The xApp Session URL token provides a URL, which is also accessible via input.apps.url in the input object. With the provided link, a user can access the xApp page without requiring a PIN.

With PIN

To allow users to access the xApp session via a PIN, share both a PIN and a PIN Page URL with the users. This functionality is available via the xApp PIN Page URL token and the xApp: Get Session PIN Node. The Get Session PIN Node generates a PIN, which is accessible via the xApp Session PIN token or input.apps.session.pin in the input object. The xApp PIN Page URL token provides a URL, which is also accessible via input.apps.baseUrl in the input object. With the provided link, a user can access the PIN page and enter their provided PIN to gain access to the xApp.

Parameters

Style Customization

Parameter Type Description
Background Color CognigyScript A color that is displayed in the background of all Shell Page Screens. You can use CSS background-color values such as hex, hsl+a, and rgb+a.
Text Color CognigyScript A color that is used for textual content on all Shell Page Screens. You can use CSS color values such as hex, hsl+a, and rgb+a. Make sure that the text color has high contrast with the background color.
Logo List You can choose to show the default logo, not any logo, or a custom logo. If you select the custom logo option, specify the Custom Logo URL.
Custom Favicon URL CognigyScript An image URL for the custom favicon.
Page Title CognigyScript A text shown as a tab or window title. The title is displayed on all Shell Page Screens.

xApp Screens

Parameter Type Description
’Loading’ Text CognigyScript Specify messages displayed to the user when the xApp page is loading
’Launch Error’ Text CognigyScript Specify messages displayed to the user when the xApp page fails for some reason
’xApp Error’ Text CognigyScript Specify messages displayed to the user when the xApp page encounters an error or is halted

Intermediate Screen The intermediate screen appears on the xApps page while the xApp is inactive, for example, after you have submitted data in the xApp and no other xApp is triggered.

Parameter Description
Customization Type Sets whether and how to customize the intermediate screen. Select one of the following options:
- No customization — displays Nothing to do... on the intermediate screen. This option is selected by default.
- Customized Texts — displays custom text on the intermediate screen.
- Replace with xApps — displays a custom page on the intermediate screen, optionally, with custom data. This option provides flexibility because you can create a page using HTML, CSS, and JavaScript and handle custom data dynamically.
Text Override This parameter appears when you select Customized Texts in the Customization Type field. Enter the custom text to be displayed on the intermediate screen.
xApp Template This parameter appears when you select Replace with xApps in the Customization Type field. Enter the URL to the custom page to be displayed on the intermediate screen.
xApp Template Data This parameter is optional. It appears when you select Replace with xApps in the Customization Type field. Enter custom data in JSON format to be sent to the custom page. For example, you can use a CognigyScript expression in a JSON object, such as {"name": "{{profile.firstname}}"}, to fetch data from the Profile object and use it on the intermediate screen as a personalized message with the end user’s name.

Connection Screen The connection screen appears while the browser is establishing the connection to the xApp page.

Parameter Description
Customization Type Sets whether and how to customize the connection screen. Select one of the following options:
- No customization — displays Connecting... on the connection screen. This option is selected by default.
- Customized Texts — displays custom text on the connection screen.
- Replace with xApps — displays a custom page on the connection screen, optionally, with custom data. This option provides flexibility because you can create a page using HTML, CSS, and JavaScript and handle custom data dynamically.
Text Override This parameter appears when you select Customized Texts in the Customization Type field. Enter the custom text to be displayed on the connection screen.
xApp Template This parameter appears when you select Replace with xApps in the Customization Type field. Enter the URL to the custom page to be displayed on the connection screen.
xApp Template Data This parameter is optional. It appears when you select Replace with xApps in the Customization Type field. Enter custom data in JSON format to be sent to the custom page. For example, you can use a CognigyScript expression in a JSON object, such as {"name": "{{profile.firstname}}"}, to fetch data from the Profile object and use it on the connection screen as a personalized message with the end user’s name.

More Information