Configure a basic xApp flow
- Create a new flow in Cognigy and name it
Basic xApp Tutorial. - In the flow editor, add an xApp: Init Session node to initialize the xApp session.
- Below the xApp: Init Session node, add an xApp: Show Adaptive Card node to update the initialized xApp session with a new adaptive card-based xApp page.
- In the AdaptiveCard Definition field, paste the following JSON:
- Click Save Node.
- Below the xApp: Show Adaptive Card node, add a Question node. Use this node to prompt the user, via the primary channel, to provide data through the xApp. The node then waits for the xApp’s submit input before the flow continues.
- In Question Type, select xApp so that the node accepts only data from the xApp as a valid answer.
- Select the Text with Buttons output type to display a button with the xApp URL.
- Configure the prompt message to instruct users to enter their email using the xApp. In the Text field, paste the following text:
- Click Add Button. Fill in the following fields:
- Button Title — enter
Open xApp. - Select Button Type — select URL from the list.
- URL — click
and select the xApp Session URL token. - URL Target — select Open URL in a new tab.
- Button Title — enter
- Click Save.
- If a user types anything in the chat, inform them that they need to use the xApp URL to enter their email. To do that, go to the Reprompt Options section and paste the following reprompt message:
- Click Save Node.
- Below the Question node, add an If node to your flow and set the condition to:
This lets you update the xApp session with a different xApp based on the user’s selection.
- Click Save Node.
- In the Then branch, add an xApp: Show Adaptive Card node to update the initialized xApp session with a new adaptive card-based xApp page.
- In the AdaptiveCard Definition field, paste the following JSON:
This asks the user to provide their name, date of birth, and email address.
- Click Save Node.
- Repeat the same node for the Else branch and paste the following JSON:
This asks the user to log in via their username and password.
- Click Save Node.
- Below the Then and Else branches, add a Wait for Input node. This node waits for the xApp input.
- Click Save Node.
- At the end, add a Say node.
- In the Text field, paste the following text:
- Click Save Node.
Test the app via the interaction panel
- Open the Interaction Panel and enter a message like
Hito trigger the flow. - In the Interaction Panel, click Open xApp to access the xApp session. You can also check the Info tab to see the xApp’s URL in the
input.apps.urlinput object.

- Open the URL in a new tab to view the xApp with the adaptive card and select your customer status.

- When you select New Customer and submit the action, a new page loads.

- You can submit data in the entry fields and observe the behavior, for example,
Dan Schneider,01.01.1999, anddan@cognigy.com. - Check the input result via the Interaction Panel.
