Chat — Input & Output
Output port reference, reply data schema, AI classification values, and downstream access patterns.
Output Ports
| Port | Fires When | Data Available |
|---|---|---|
| waiting | Phase 1 completes — message has been delivered and the workflow is suspended awaiting a reply. | No reply data. The message delivery timestamp is available if connected. |
| approved | A reply was received and the IChatReplyParser classified it as a positive/affirmative intent. | Full reply data object including reply_text, classification: "approved", sender, reply_time. |
| rejected | A reply was received and the IChatReplyParser classified it as a negative/refusal intent. | Full reply data object including reply_text, classification: "rejected", sender, reply_time. |
| success | A reply was received but the IChatReplyParser could not classify it as approved or rejected (classification: "unknown"). Use this port to handle ambiguous or unexpected replies. |
Full reply data object with classification: "unknown". |
| error | The timeout period elapsed with no reply, OR a channel delivery error occurred (e.g., user not found, integration offline). | Standard error object with error_message and error_code. |
Output Data Schema
The following fields are available on the approved, rejected, and success ports:
| Field | Type | Description |
|---|---|---|
reply_text |
string | The raw text of the reply as received from the channel. Preserved exactly as sent by the user, before classification. |
sender |
string | The user ID or channel handle of the person who replied. Matches one of the actor identifiers configured in the node. |
classification |
string | The IChatReplyParser classification result. One of: "approved", "rejected", "unknown". |
reply_time |
datetime (ISO 8601) | UTC timestamp of when the reply was received and processed by the BizFirstAI engine. |
channel |
string | The channel through which the reply was received (e.g., "slack", "whatsapp"). |
Output Data Examples
Approved classification (Slack "YES" reply):
{
"reply_text": "YES go ahead",
"sender": "user:jsmith-slack",
"classification": "approved",
"reply_time": "2025-03-15T14:32:11Z",
"channel": "slack"
}
Rejected classification (WhatsApp "NO" reply):
{
"reply_text": "No don't proceed, waiting for sign-off from legal first",
"sender": "user:customer-447123456789",
"classification": "rejected",
"reply_time": "2025-03-15T15:01:44Z",
"channel": "whatsapp"
}
Unknown classification (ambiguous reply via email):
{
"reply_text": "Can you send me more details about the timeline?",
"sender": "user:manager-alopez",
"classification": "unknown",
"reply_time": "2025-03-15T16:20:00Z",
"channel": "email"
}
Accessing Output in Downstream Nodes
// Access the raw reply text
$nodes.chat_deploy_confirm.reply_text
// Check the classification
$nodes.chat_deploy_confirm.classification
// Who replied and when
$nodes.chat_deploy_confirm.sender
$nodes.chat_deploy_confirm.reply_time
// Use in a Slack message
"Deployment decision from {{ $nodes.chat_deploy_confirm.sender }}: {{ $nodes.chat_deploy_confirm.reply_text }}"
Unknown classification handling: Always connect the success port (unknown classification) in production workflows. Without it, ambiguous replies will silently drop. Route the success port to a fallback step that asks the user to clarify their response with a more structured prompt.