5 min read

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#

  1. Navigate to AutoFlow
  2. Click "New Workflow"
  3. Name your workflow descriptively
  4. Add trigger, conditions, and actions

Workflow Settings#

SettingDescription
NameDescriptive workflow name
DescriptionPurpose and logic explanation
StatusActive or Inactive
Run modeSequential or Parallel
Stop on errorContinue or stop on failure

Adding Steps#

  1. Click + Add Step
  2. 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 minutes

Business Hours Delays#

Wait during business hours only:

Action: Wait
Duration: 4 business hours
Business Hours: Mon-Fri 9am-6pm

Wait 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 queue

Error Notifications#

Alert on workflow failures:

On Error:
  Notify: admin@company.com
  Include: Error message, Workflow name, Trigger data

Workflow 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 Team

SLA 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 ticket

Follow-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 reason

VIP 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 reminder

Testing Workflows#

Test Mode#

Enable test mode to verify without executing:

  1. Open workflow
  2. Enable Test Mode
  3. Trigger runs but actions only log
  4. Review logs
  5. Disable test mode when ready

Manual Testing#

Test with sample data:

  1. Click Test Workflow
  2. Enter or select sample ticket
  3. Click Run Test
  4. View step-by-step execution
  5. Verify each action

Test Scenarios#

Create test cases:

ScenarioExpected Result
Urgent billing ticketAssign to Billing + High priority
Normal technical ticketAssign to Engineering
VIP customer ticketVIP label + Senior Support
After-hours ticketAuto-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:

MetricDescription
RunsTotal executions
Success Rate% completed successfully
Avg DurationAverage run time
ErrorsFailed 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-15

Performance Tips#

  1. Specific triggers - Don't run on everything
  2. Early conditions - Filter fast, act later
  3. Minimal actions - Only what's needed
  4. Avoid loops - Check for circular triggers

Common Mistakes#

MistakeSolution
Infinite loopsAdd "created by automation" condition
Too broad triggersAdd specific conditions
Missing error handlingAdd fallbacks
No documentationAdd descriptions
Not testingAlways test first

Next Steps#

Was this page helpful?

Let us know if you found what you were looking for.