ChatTrigger NodeTypeCode: chat-trigger
Send a chat message to an assigned actor and suspend the workflow until they reply. Two-phase: the workflow suspends on the "pending" port after the message is sent and resumes on "success" when a reply is received.
When to Use
- Quick manager confirmation via chat: Rather than a full approval form, send a manager a direct message asking "Do you approve Sarah's overtime request? Reply YES or NO." The workflow suspends until the reply arrives, then routes based on the response text.
- Collecting a missing piece of information mid-workflow: A customer onboarding workflow discovers a required field is missing. The ChatTrigger sends a message to the assigned account manager asking for the missing detail, then resumes once they reply.
- Escalation acknowledgment: When a critical alert fires, the ChatTrigger messages the on-call engineer asking them to acknowledge the alert. The workflow records the acknowledgment time and replier identity for SLA tracking.
- Lightweight survey or feedback collection: After a support ticket is resolved, send the customer a chat message asking to rate their experience (1–5). The reply value routes to satisfaction scoring and CRM update nodes.
- Deadline confirmation: Send a project manager a chat message asking to confirm a delivery date before an automated PO is raised. The workflow waits for the confirmed date in the reply before proceeding.
CRITICAL — Two-phase suspension: The ChatTrigger workflow suspends at the
pending port after the message is sent. It will remain suspended until a reply is received or the timeout expires. Always configure timeout_minutes for time-sensitive processes to prevent indefinite suspension.
Two-Phase Execution
Phase 1 — Message Dispatch
Send & Suspend
- Creates an EngageSession for this execution
- Sends the configured
messageto the assigned actor via the BizFirst chat/inbox system - Workflow suspends; pending port fires immediately
- Timeout countdown begins if
timeout_minutesis set
Phase 2 — Reply Received
Resume & Continue
- Actor opens their inbox and reads the message
- Actor types and sends a reply
- Workflow engine resumes execution
- Reply text, replier identity, and timestamp become output data
- success port fires with the reply context
Configuration
| Setting | Required | Description |
|---|---|---|
message |
Required | The text message to send to the assigned actor. Supports BizFirst expressions to embed dynamic values. Example: "Please confirm the delivery date for order {{ $output.orderNode.orderId }}. Reply with the date in YYYY-MM-DD format." |
assigned_to |
Required | The recipient of the chat message. Format: user:<userId> for a specific user (e.g. user:john.smith), or role:<roleName> for any member of a role (e.g. role:team-lead). Supports BizFirst expressions for dynamic assignment. |
timeout_minutes |
Optional | Integer. Default 0 (no timeout). When set to a positive integer, the workflow automatically routes to the error port if no reply is received within this many minutes. Strongly recommended for any time-sensitive process to prevent indefinite suspension. |
Output Ports
| Port | When It Fires |
|---|---|
pending | Phase 1 completion. Fires immediately after the chat message is sent and the workflow suspends. Use this port to log the pending state or notify a supervisor that a chat is awaiting reply. |
success | Phase 2 completion. Fires when the assigned actor sends a reply. The reply text, replier identity, and timestamp are available as output fields. |
error | Fires if the message cannot be sent (invalid actor, system error) or if timeout_minutes is exceeded without a reply. |
Output Fields
These fields are available on the success port after a reply is received:
| Field | Type | Description |
|---|---|---|
reply_text | string | The full text content of the actor's reply message. |
replied_by | string | The user ID of the actor who replied. May differ from assigned_to if a role was used and a different member replied. |
replied_at | string | ISO 8601 timestamp of when the reply was received by the platform. |
Sample Configuration
{
"nodeType": "chat-trigger",
"settings": {
"message": "Hi {{ $output.managerLookup.managerFirstName }}, please confirm approval for the overtime request submitted by {{ $output.formNode.form_data.employeeName }}. Reply APPROVED or REJECTED with any comments.",
"assigned_to": "user:{{ $output.managerLookup.managerUserId }}",
"timeout_minutes": 240
}
}
Sample Output
Success Port — Reply Received
{
"messageId": "msg_trigger_abc789",
"channelId": "channel_support",
"channelName": "support-general",
"text": "!ticket I need help with invoice #45921",
"from": {
"userId": "usr_customer_001",
"name": "Alice Chen",
"email": "alice@acmecorp.com"
},
"timestamp": "2025-03-15T09:22:00Z",
"threadId": null,
"attachments": [],
"metadata": {
"platform": "bizfirst_chat",
"workspaceId": "ws_001"
}
}
Expression Reference
| Expression | Value |
|---|---|
{{ $output.chatTrigger.reply_text }} | The full text of the actor's reply. Use IfCondition or CodeExecute to parse this for keywords like "APPROVED" or "REJECTED". |
{{ $output.chatTrigger.replied_by }} | The user ID of who replied — useful for audit logging and generating personalized follow-up messages. |
{{ $output.chatTrigger.replied_at }} | ISO timestamp of the reply, useful for SLA tracking (time from message sent to reply received). |
Node Policies & GuardRails
| Policy | Rationale |
|---|---|
Always set timeout_minutes for business-critical workflows | A ChatTrigger with no timeout will suspend indefinitely if the actor never replies. For any process with an SLA or business deadline, configure a timeout and handle the error port with an escalation notification. |
Use structured reply instructions in the message field | Instruct actors to reply in a specific format (e.g., "Reply YES or NO" or "Reply with the date in YYYY-MM-DD format"). Downstream text parsing in CodeExecute or IfCondition nodes depends on predictable reply formats. |
Parse reply_text with a CodeExecute node before routing | Do not use reply_text directly in routing conditions without normalization. Apply .trim().toUpperCase() before keyword comparison to handle whitespace and case variations in human replies. |
| For formal approvals, use the Approval node instead | The ChatTrigger is designed for lightweight, text-based confirmations. For tracked, auditable approval decisions with multiple actors and escalation support, use the Approval node with its structured decision paths. |
Log replied_by and replied_at for audit compliance | Chat-based confirmations in regulated processes must be attributable. Persist these fields to an audit log table immediately after the success port fires. |
Pattern Examples
Pattern 1 — Manager Overtime Confirmation via Chat
A workflow sends the direct manager a quick chat message asking to approve or reject an overtime request. Reply parsing routes the workflow to approval or rejection branches.
// ChatTrigger settings
{
"message": "Overtime request from {{ $output.empLookup.employeeName }} ({{ $output.formNode.form_data.overtureHours }} hours on {{ $output.formNode.form_data.overtureDate }}). Reply APPROVE or REJECT with comments.",
"assigned_to": "user:{{ $output.empLookup.managerId }}",
"timeout_minutes": 480
}
// Downstream CodeExecute on 'success' port — normalize reply
var reply = reply_text.trim().toUpperCase();
var approved = reply.startsWith("APPROVE");
var comments = reply_text.substring(reply_text.indexOf(" ") + 1);
result = { approved: approved, comments: comments };
// Downstream IfCondition: route on approved === true
Pattern 2 — On-Call Engineer Acknowledgment for Incident
When a critical service alert fires, the workflow messages the on-call engineer asking for an acknowledgment. Timeout after 15 minutes triggers escalation to the secondary on-call.
// ChatTrigger settings
{
"message": "CRITICAL ALERT: {{ $output.alertNode.serviceName }} is DOWN (since {{ $output.alertNode.detectedAt }}). Reply ACK to acknowledge. Timeout in 15 minutes — auto-escalating to secondary on-call.",
"assigned_to": "user:{{ $var.primaryOnCallUserId }}",
"timeout_minutes": 15
}
// On 'success' port: record acknowledgment time
{
"VariableName": "ackTime",
"ValueExpression": "{{ $output.chatTrigger.replied_at }}"
}
// On 'error' port (timeout): assign to secondary on-call and repeat ChatTrigger