Add Adaptive Cards in AI Agents (Cognigy) for Virtual Agent Hub and NiCE CXone DX Chat
Adaptive Cards let you present rich, structured content — such as text, images, and action buttons — in a conversation instead of plain text. AI Agents (Cognigy) natively supports Adaptive Cards through the Say node, so you can design one card definition and render it in any channel connected through the Virtual Agent Hub, including supported NiCE CXone DX chat channels.
Not all DX chat channels support Adaptive Cards. For example, some messaging channels such as WhatsApp may not support Adaptive cards.
This topic explains how to add a native Adaptive Card to a Say node, reference a context variable inside the card, preview the card in AI Agents (Cognigy), and test it in a NiCE CXone DX chat interaction.
Before you begin
Ensure that:
-
An AI Agents (Cognigy) project with a Flow you can edit.
-
Virtual Agent Hub configured and connected to your AI Agents (Cognigy) project. See Setup AI Agents (Cognigy) Text Bot in Virtual Agent Hub for details.
-
A NiCE CXone DX chat channel created and linked in Virtual Agent Hub.
Add a Native Adaptive Card to a Say Node
-
In AI Agents (Cognigy), select Build > Flows.
-
Select the Flow you want to edit, or select the plus (+) icon where the Say node should be added.
-
Click the Say node to open the Edit Node panel.
Under Channels, ensure the AI channel used by Virtual Agent Hub is selected. Do not select the CXone channel when creating a native Adaptive Card
-
From the Output Type drop-down list, select Adaptive Card.
-
In the JSON definition field, paste the Adaptive Card JSON for your card. A link above this field opens the Microsoft Adaptive Card Designer, a visual tool for building and previewing cards.
-
In the Adaptive Card Designer, build or paste your card layout, then select Copy card payload to copy the card's JSON.
-
Return to the Say node in AI Agents (Cognigy) and paste the copied JSON into the JSON definition field.
-
AI Agents (Cognigy) renders a live preview of the card directly below the JSON field so you can confirm it looks correct.
-
Click Save Node to save the node.
Use a Context Variable in an Adaptive Card
You can reference a context variable inside an Adaptive Card definition so the card displays dynamic data, such as a customer name or order number.
-
Ensure the context variable is populated before the Say node executes. The value can be set by a Set Context node or by another process in the Flow that populates the context.
-
Open the Say node where the Adaptive Card is configured.
-
In the card's JSON definition, reference the context variable using AI Agents (Cognigy) variable syntax at the point in the card where the value should appear.
Syntax:
{"type": "TextBlock","text": "{{context.dynamicVariable}}"}Example:
{"type": "TextBlock","text": "{{context.account_number}}"} -
Save the node and use the Interaction Panel to test that the variable value renders correctly in the card.
During preview in AI Agents (Cognigy), context variables are displayed as placeholders because no run-time value has been supplied. The actual value is substituted only when the Flow runs and the context variable is populated.
Test the Adaptive Card in NiCE CXone DX Chat
Once the Say node is configured and saved, verify the card renders correctly for end users in the NiCE CXone DX chat channel.
-
Confirm that AI Agents (Cognigy), the Virtual Agent Hub, and the NiCE CXone DX channel are fully configured and linked.
-
Confirm the Flow is configured to trigger the Say node containing the Adaptive Card (for example, when a user enters a specific keyword).
-
Open the NiCE CXone DX chat channel as an end user and send the message or keyword that triggers the card.
-
Confirm the Adaptive Card renders as expected in the chat window.
Native Adaptive Card Versus Custom JSON on the NiCE CXone Channel
The Output Type options available in a Say node depend on the channel you select. This can be a source of confusion when a Flow uses both the native AI channel (Virtual Agent Hub/ NiCE CXone DX chat) and a CXone channel.
-
AI channel (native, used by Virtual Agent Hub and NiCE CXone DX chat): the Say node offers Adaptive Card as a dedicated Output Type. Paste the raw Adaptive Card JSON directly, and AI Agents (Cognigy) shows a live preview.
-
CXone channel: the Say node does not offer an Adaptive Card option. Instead, select Custom Json as the Output Type and wrap the card definition in the NiCE CXone-specific structure, with uiComponent, data, and action fields.
-
Choose the Output Type that matches the channel selected on the Say node. A card built for the AI channel's Adaptive Card output type will not render correctly if pasted into a CXone channel's Custom Json field without adapting it to the uiComponent/data/action structure, and vice versa.
-
Existing CXone Custom Json implementations continue to work and are not being removed. However, new implementations should use the native Adaptive Card output whenever possible because it is simpler to configure, does not require the CXone-specific wrapper/header, and provides a live preview in the Say node.