Portal Community

When to Use

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 message to the assigned actor via the BizFirst chat/inbox system
  • Workflow suspends; pending port fires immediately
  • Timeout countdown begins if timeout_minutes is 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

SettingRequiredDescription
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

PortWhen It Fires
pendingPhase 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.
successPhase 2 completion. Fires when the assigned actor sends a reply. The reply text, replier identity, and timestamp are available as output fields.
errorFires 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:

FieldTypeDescription
reply_textstringThe full text content of the actor's reply message.
replied_bystringThe user ID of the actor who replied. May differ from assigned_to if a role was used and a different member replied.
replied_atstringISO 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

ExpressionValue
{{ $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

PolicyRationale
Always set timeout_minutes for business-critical workflowsA 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 fieldInstruct 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 routingDo 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 insteadThe 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 complianceChat-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