Building Workflows
Learn advanced workflow patterns and best practices for CommFlow AutoFlow.
Building Workflows#
Learn how to design effective workflows with advanced patterns, branching logic, and real-world examples.
Workflow Architecture#
Single Path Workflows#
Linear execution from trigger to action:
TRIGGER → CONDITION → ACTION → ACTION → ACTION
Best for simple automations with predictable outcomes.
Branching Workflows#
Different paths based on conditions:
┌→ [High Priority Path]
TRIGGER → CONDITION ├→ [Normal Priority Path]
└→ [Low Priority Path]
Best for routing and classification.
Multi-Action Workflows#
Multiple actions in sequence or parallel:
┌→ [Assign to Team]
TRIGGER → ─── ├→ [Send Notification] (parallel)
└→ [Add Label]
↓
[Send Reply] (sequential)
Building Blocks#
Creating a Workflow#
- Navigate to AutoFlow
- Click "New Workflow"
- Name your workflow descriptively
- Add trigger, conditions, and actions
Workflow Settings#
| Setting | Description |
|---|---|
| Name | Descriptive workflow name |
| Description | Purpose and logic explanation |
| Status | Active or Inactive |
| Run mode | Sequential or Parallel |
| Stop on error | Continue or stop on failure |
Adding Steps#
- Click + Add Step
- Choose step type:
- Trigger (first step only)
- Condition
- Action
- Branch
- Delay
Branching Logic#
If/Else Branches#
Create conditional paths:
IF: Priority = "Urgent"
THEN: [Urgent workflow]
ELSE IF: Priority = "High"
THEN: [High priority workflow]
ELSE:
THEN: [Default workflow]
Switch/Case#
Multiple conditions on same field:
SWITCH: ticket.category
CASE "Billing": → [Billing team actions]
CASE "Technical": → [Technical team actions]
CASE "Sales": → [Sales team actions]
DEFAULT: → [General support actions]
Parallel Branches#
Run multiple paths simultaneously:
PARALLEL:
Branch 1: [Send email notification]
Branch 2: [Post to Slack]
Branch 3: [Update CRM]
↓
CONTINUE after all complete
Delay & Timing#
Fixed Delays#
Wait a specific duration:
Action: Wait
Duration: 30 minutesBusiness Hours Delays#
Wait during business hours only:
Action: Wait
Duration: 4 business hours
Business Hours: Mon-Fri 9am-6pmWait Until#
Wait for a condition:
Action: Wait Until
Condition: customer_replied = true
Timeout: 48 hours
On Timeout: [Send follow-up]Scheduled Execution#
Run at specific times:
Action: Schedule
Run At: next Monday 9:00 AM
Action: [Send weekly summary]Error Handling#
Retry Logic#
Retry failed actions:
Action: Send Webhook
URL: https://api.example.com/notify
Retry:
Attempts: 3
Delay: 5 minutes
On Failure: [Log error and continue]Fallback Actions#
Alternative when action fails:
Action: Assign to User
User: sarah@company.com
Fallback:
If Unavailable: Assign to support-team
If Error: Add to unassigned queueError Notifications#
Alert on workflow failures:
On Error:
Notify: admin@company.com
Include: Error message, Workflow name, Trigger dataWorkflow Patterns#
Auto-Assignment Pattern#
Route tickets to the right team:
Name: Smart Ticket Router
Trigger: Ticket Created
Conditions:
Branch "Billing":
If: subject contains "billing" OR subject contains "invoice"
Actions:
- Assign to Billing Team
- Add label "billing"
Branch "Technical":
If: subject contains "bug" OR subject contains "error"
Actions:
- Assign to Engineering Team
- Add label "technical"
- Set priority "High"
Branch "Default":
Actions:
- Assign Round-Robin to Support TeamSLA Management Pattern#
Escalate before breach:
Name: SLA Escalation Workflow
Trigger: SLA at 75%
Actions:
- Send notification to assignee:
"⚠️ Ticket {{ticket.id}} approaching SLA breach"
- Add label "sla-warning"
---
Trigger: SLA at 90%
Actions:
- Escalate to team lead
- Send urgent notification
- Add label "sla-critical"
---
Trigger: SLA Breached
Actions:
- Notify manager
- Reassign if no response
- Create escalation ticketFollow-Up Pattern#
Automated customer follow-ups:
Name: Customer Follow-Up
Trigger: Ticket status changed to "Pending"
Actions:
- Wait 24 hours (business)
- Check: Has customer replied?
- Yes: End workflow
- No: Continue
- Send follow-up email:
"Hi {{customer.name}},
We're checking in on your ticket.
Do you have any updates for us?"
- Wait 48 hours (business)
- Check: Has customer replied?
- Yes: End workflow
- No: Continue
- Send final follow-up:
"We'll close this ticket if we don't hear back."
- Wait 24 hours (business)
- Check: Has customer replied?
- Yes: End workflow
- No: Close ticket with auto-close reasonVIP Detection Pattern#
Identify and prioritize VIP customers:
Name: VIP Detection
Trigger: Ticket Created
Conditions:
If ANY:
- customer.plan = "Enterprise"
- customer.lifetime_value > 10000
- customer.email domain in [vip-list]
Actions:
- Set priority "Urgent"
- Add label "VIP"
- Assign to Senior Support
- Send notification to #vip-support
- Add internal note: "VIP customer - priority handling required"After-Hours Pattern#
Handle messages outside business hours:
Name: After Hours Handler
Trigger: Ticket Created
Conditions:
If: Outside business hours (Mon-Fri 9am-6pm)
Actions:
- Send auto-reply:
"Thanks for reaching out! We received your message
but our team is currently offline.
Business hours: Monday-Friday, 9am-6pm EST
We'll respond first thing next business day."
- Add label "after-hours"
- Add internal note: "Received outside business hours"Feedback Collection Pattern#
Request feedback after resolution:
Name: Satisfaction Survey
Trigger: Ticket Resolved
Conditions:
If: Has customer interaction
AND: Not sent survey in last 30 days
Actions:
- Wait 2 hours
- Send satisfaction survey:
"How was your support experience?
⭐⭐⭐⭐⭐
We'd love your feedback!"
- Wait 7 days
- Check: Survey completed?
- No: Send reminderTesting Workflows#
Test Mode#
Enable test mode to verify without executing:
- Open workflow
- Enable Test Mode
- Trigger runs but actions only log
- Review logs
- Disable test mode when ready
Manual Testing#
Test with sample data:
- Click Test Workflow
- Enter or select sample ticket
- Click Run Test
- View step-by-step execution
- Verify each action
Test Scenarios#
Create test cases:
| Scenario | Expected Result |
|---|---|
| Urgent billing ticket | Assign to Billing + High priority |
| Normal technical ticket | Assign to Engineering |
| VIP customer ticket | VIP label + Senior Support |
| After-hours ticket | Auto-reply + Label |
Monitoring & Debugging#
Workflow Logs#
View execution history:
Workflow: Smart Ticket Router
Run ID: wf_12345
Status: Completed
Duration: 2.3 seconds
Steps:
✓ Trigger: Ticket #5678 created
✓ Condition: Subject contains "billing" = true
✓ Action: Assigned to Billing Team
✓ Action: Added label "billing"
Error Logs#
Debug failed workflows:
Workflow: SLA Escalation
Run ID: wf_12346
Status: Failed
Error: User not found: sarah@company.com
Steps:
✓ Trigger: SLA at 75%
✗ Action: Assign to sarah@company.com
Error: User does not exist
Retry: Scheduled in 5 minutes
Performance Metrics#
Monitor workflow health:
| Metric | Description |
|---|---|
| Runs | Total executions |
| Success Rate | % completed successfully |
| Avg Duration | Average run time |
| Errors | Failed executions |
Best Practices#
Naming Conventions#
Good:
- "Auto-assign Billing Tickets"
- "SLA Warning at 75%"
- "VIP Customer Detection"
Avoid:
- "Workflow 1"
- "New workflow"
- "Test"
Documentation#
Add descriptions to workflows:
Name: Smart Ticket Router
Description: |
Automatically assigns incoming tickets based on subject keywords.
Routing rules:
- "billing" or "invoice" → Billing Team
- "bug" or "error" → Engineering
- Default → Support Team round-robin
Owner: support-ops@company.com
Last updated: 2026-01-15Performance Tips#
- Specific triggers - Don't run on everything
- Early conditions - Filter fast, act later
- Minimal actions - Only what's needed
- Avoid loops - Check for circular triggers
Common Mistakes#
| Mistake | Solution |
|---|---|
| Infinite loops | Add "created by automation" condition |
| Too broad triggers | Add specific conditions |
| Missing error handling | Add fallbacks |
| No documentation | Add descriptions |
| Not testing | Always test first |
Next Steps#
- Triggers & Actions - Full reference
- AutoFlow Overview - Return to overview
Was this page helpful?
Let us know if you found what you were looking for.