AI Default Channel Formats¶
As described in Channel Output, you can send JSON-formatted output directly against your Endpoints for it to be output to the respective channels.
The AI Default Channel is special in a way that content from the Default Channel is automatically converted into the correct payloads for all other channels (see our Say Node documentation for more information).
Using a Code Node, you can also send AI Default Channel output in JSON format to the Endpoints and these will convert them to the appropriate content. We're describing the required payload formats below.
Text¶
Simply sends text to the Endpoint.


actions.output("Your text", null);
Text with Quick Replies¶
Sends text and a number of quick reply buttons.

actions.output(null, {
"type": "quickReplies",
"_cognigy": {
"_default": {
"_quickReplies": {
"type": "quick_replies",
"text": "Quick Reply Text",
"quickReplies": [
{
"id": 111,
"contentType": "postback",
"payload": "Postback 1",
"title": "Button 1",
"imageUrl": "https://www.cognigy.com/hubfs/Cognigy.svg"
},
{
"id": 112,
"contentType": "phone_number",
"payload": "+49123456",
"title": "Button 2"
},
{
"id": 112,
"contentType": "trigger_intent",
"payload": "",
"title": "Button 3",
"intentName": "Intent Name"
}
]
}
}
}
});
Gallery¶
Outputs a carousel of cards.



actions.output(null, {
"type": "gallery",
"_cognigy": {
"_default": {
"_gallery": {
"type": "carousel",
"items": [
{
"id": 111,
"title": "Cognigy.AI",
"subtitle": "Cognigy.AI is a conversational AI platform.",
"imageUrl": "https://www.cognigy.com/hubfs/AI%20Copy%205.svg",
"buttons": [
{
"id": 112,
"payload": "Postback 1",
"type": "postback",
"title": "Button 1"
},
{
"id": 113,
"payload": "",
"type": "web_url",
"title": "URL Button",
"url": "https://www.cognigy.com/products/cognigy-ai"
}
]
},
{
"id": 121,
"title": "Cognigy.VG",
"subtitle": "Cognigy Voice Gateway connects your AI to your contact center",
"imageUrl": "https://www.cognigy.com/hubfs/cognigy-vg-logo.svg",
"buttons": [
{
"id": 122,
"payload": "",
"type": "web_url",
"title": "Click me",
"url": "https://www.cognigy.com/products/voice-gateway"
}
]
}
],
"fallbackText": "Fallback text for voice channels"
}
}
}
});
Text with Buttons¶
Outputs text with a list of buttons.


actions.output(null, {
"type": "buttons",
"_cognigy": {
"_default": {
"_buttons": {
"type": "buttons",
"text": "Text with Buttons",
"buttons": [
{
"id": 111,
"payload": "Postback Value",
"type": "postback",
"title": "Postback Value Button"
},
{
"id": 112,
"payload": "",
"type": "web_url",
"title": "URL Button",
"url": "https:\\\\google.com"
},
{
"id": 113,
"payload": "+491234567",
"type": "phone_number",
"title": "Phone Number Button"
},
{
"id": 114,
"payload": "",
"type": "trigger_intent",
"title": "Intent Button",
"intentName": "Intent Name"
}
]
}
}
}
});
List¶
Outputs a list
actions.output(null, {
"type": "list",
"_cognigy": {
"_default": {
"_list": {
"type": "list",
"items": [
{
"title": "List Item 1",
"subtitle": "Subtitle",
"imageUrl": "https://www.cognigy.com/hubfs/Cognigy.svg",
"defaultActionUrl": "",
"imageAltText": "Alternate Text",
"buttons": [
{
"type": "postback",
"payload": "Postback Value",
"title": "Postback Button"
}
]
},
{
"title": "List Item 2",
"subtitle": "",
"imageUrl": "",
"defaultActionUrl": "",
"buttons": [
{
"type": "web_url",
"payload": "",
"title": "URL Button",
"url": "https:\\\\www.google.com"
}
]
},
{
"title": "List Item 3",
"subtitle": "",
"imageUrl": "",
"defaultActionUrl": "",
"buttons": [
{
"type": "phone_number",
"payload": "+491234567",
"title": "Phone Number Button"
}
]
},
{
"title": "List Item 4",
"subtitle": "",
"imageUrl": "",
"defaultActionUrl": "",
"buttons": [
{
"type": "trigger_intent",
"payload": "",
"title": "Intent Button",
"intentName": "Intent Name"
}
]
}
],
"button": {
"type": "postback",
"condition": "",
"payload": "Postback value",
"title": "Separate Button from List"
}
}
}
}
});
Audio¶
Outputs audio from a URL


actions.output(null, {
"type": "audio",
"_cognigy": {
"_default": {
"_audio": {
"type": "audio",
"audioUrl": "https://audio.test/test.wav"
}
}
}
});
Image¶
Outputs image from a URL


actions.output(null, {
"type": "image",
"_cognigy": {
"_default": {
"_image": {
"type": "image",
"imageUrl": "https://testURL.test/image.jpeg"
}
}
}
});
Video¶
Outputs video from a URL


actions.output(null, {
"type": "video",
"_cognigy": {
"_default": {
"_video": {
"type": "video",
"videoUrl": "https://www.youtube.com/watch?v=iGc3fekZQOw"
}
}
}
});