SME Workflows
Learn how to create automated workflows that orchestrate your AI agents to handle complex, multi-step business processes. Workflows eliminate manual work and ensure consistency across your operations.
What are Workflows?β
A workflow is a sequence of automated steps that agents execute to accomplish a business task. Think of it as a recipe that tells your agents exactly what to do, when to do it, and in what order.
Workflow vs Single Agentβ
| Single Agent | Workflow |
|---|---|
| One task | Multiple coordinated tasks |
| Simple inquiries | Complex processes |
| Immediate response | Multi-step execution |
| Example: Answer FAQ | Example: Onboard customer (verify β create account β send welcome) |
Pre-Built Workflow Templatesβ
FAOS provides ready-to-use workflows for common SME scenarios. Start here before building custom workflows.
Customer Service Workflowsβ
Support Ticket Escalationβ
Automatically route support tickets based on urgency and complexity.
Trigger: New support ticket created Steps:
- Classify ticket urgency (low/medium/high/critical)
- Check knowledge base for similar issues
- If solution found β Send auto-response
- If complex β Escalate to human agent
- Create ticket in system
- Send confirmation to customer
Use this when: You receive 20+ support tickets per day
Setup:
1. Go to Workflows β Templates
2. Select "Support Ticket Escalation"
3. Configure:
- Connect your ticketing system (Zendesk, Freshdesk, etc.)
- Set escalation rules
- Choose notification channels
4. Activate workflow
Customer Feedback Loopβ
Collect, analyze, and act on customer feedback automatically.
Trigger: Customer completes interaction Steps:
- Wait 1 hour after interaction
- Send feedback request
- If positive β Thank customer, request review
- If negative β Create escalation ticket, notify manager
- Log feedback in CRM
Time saved: 2-3 hours per week on manual follow-ups
Sales & Lead Managementβ
Lead Qualification & Routingβ
Automatically qualify incoming leads and route to the right salesperson.
Trigger: New lead from website/form Steps:
- Verify contact information
- Enrich lead data (company size, industry, location)
- Score lead (hot/warm/cold) based on criteria
- If hot lead β Notify sales rep immediately
- If warm lead β Add to nurture campaign
- If cold lead β Add to long-term follow-up
- Create CRM record
ROI: Convert leads 30% faster with instant qualification
Proposal Follow-Upβ
Never let a proposal go cold with automated follow-ups.
Trigger: Proposal sent to prospect Steps:
- Wait 2 days
- Send friendly check-in
- If no response β Wait 3 more days
- Send second follow-up with value reminder
- If still no response β Notify sales rep
- If response received β Schedule meeting
Operations Workflowsβ
Invoice Collectionβ
Automate invoice reminders and payment follow-up.
Trigger: Invoice becomes overdue Steps:
- Send polite payment reminder
- Wait 3 days
- If unpaid β Send second reminder
- Wait 5 days
- If still unpaid β Escalate to accounts team
- Create task for human review
Result: Reduce days sales outstanding (DSO) by 25%
Employee Onboardingβ
Streamline new hire onboarding with automation.
Trigger: New employee added to HR system Steps:
- Create email account
- Add to team collaboration tools
- Assign onboarding buddy
- Send welcome package
- Schedule orientation meetings
- Create week 1 task checklist
- Send day-before reminder
Creating Custom Workflowsβ
Build your own workflows when templates don't fit your needs.
Workflow Builder Overviewβ
graph LR
A[Trigger] --> B[Step 1]
B --> C{Decision?}
C -->|Yes| D[Step 2A]
C -->|No| E[Step 2B]
D --> F[Complete]
E --> F
Step-by-Step: Build Your First Workflowβ
Let's create a "New Customer Onboarding" workflow.
Step 1: Define the Triggerβ
How does the workflow start?
Navigate to Workflows β Create New
Choose trigger type:
- Manual: Start workflow when you click a button
- Webhook: External system triggers it
- Schedule: Run on a schedule (daily, weekly)
- Event: FAOS event triggers it (e.g., new agent message)
For our example, choose Webhook (triggered when Stripe creates a new customer).
Step 2: Add First Agent Stepβ
Click + Add Step β Agent Action
Configure:
Step Name: Verify Customer Email
Agent: Customer Service Agent
Action: Send welcome email
Input:
customer_email: {{trigger.customer.email}}
customer_name: {{trigger.customer.name}}
Template: welcome-email
The {{trigger.customer.email}} syntax pulls data from the webhook that triggered the workflow.
Step 3: Add a Conditional Stepβ
Click + Add Step β Condition
Configure:
Step Name: Check Plan Type
Condition: {{trigger.customer.plan}} === "premium"
If True: Go to "Premium Onboarding"
If False: Go to "Standard Onboarding"
Step 4: Add Parallel Stepsβ
For premium customers, do multiple things at once:
Click + Add Step β Parallel
Configure:
Run simultaneously:
- Assign account manager
- Schedule kickoff call
- Send premium resources
Wait for all: Yes
Step 5: Set Workflow Settingsβ
Configure timeout and error handling:
Timeout: 300 seconds
Error Handling: Continue (don't stop entire workflow if one step fails)
Retry Policy:
Max Attempts: 3
Backoff: Exponential (2x)
Step 6: Test the Workflowβ
Before activating:
- Click Test Workflow
- Provide sample input data
- Watch step-by-step execution
- Review results
- Adjust as needed
Step 7: Activateβ
Once tested, click Activate Workflow
The workflow now runs automatically whenever triggered.
Workflow Variablesβ
Use variables to pass data between steps.
Trigger Variablesβ
Access data from the trigger:
| Variable | Description | Example |
|---|---|---|
{{trigger.payload}} | Full trigger data | {{trigger.payload.customer}} |
{{trigger.timestamp}} | When triggered | {{trigger.timestamp}} |
{{trigger.source}} | Trigger source | {{trigger.source}} |
Step Resultsβ
Reference previous step outputs:
| Variable | Description | Example |
|---|---|---|
{{step_1.result}} | Step 1's output | {{step_1.result.verified}} |
{{step_1.status}} | Step 1's status | {{step_1.status}} |
{{step_1.duration_ms}} | How long step took | {{step_1.duration_ms}} |
Workflow Metadataβ
Access workflow information:
| Variable | Description |
|---|---|
{{workflow.id}} | Workflow ID |
{{workflow.execution_id}} | Current execution ID |
{{workflow.started_at}} | Execution start time |
Advanced Workflow Patternsβ
Pattern 1: Approval Workflowβ
For actions requiring human approval:
Steps:
1. Agent processes refund request
2. If amount > $100:
- Pause workflow
- Notify manager
- Wait for approval
3. If approved β Process refund
4. Send confirmation
You'll receive a notification to approve/reject in the dashboard.
Pattern 2: Wait & Retryβ
For processes with delays (like bank transfers):
Steps:
1. Initiate transfer
2. Wait 1 hour
3. Check transfer status
4. If pending β Wait 30 more minutes, check again
5. If completed β Send confirmation
6. If failed β Notify finance team
Pattern 3: Fan-Out / Fan-Inβ
Process items in parallel, then combine results:
Steps:
1. Receive order with 5 items
2. Parallel: Check inventory for each item
3. Wait for all checks to complete
4. Combine results
5. If all available β Proceed to checkout
6. If any unavailable β Notify customer
Pattern 4: Loop / Batch Processingβ
Process multiple items one by one:
Steps:
1. Get list of overdue invoices
2. For each invoice:
- Send reminder
- Log action
- Wait 1 second (rate limiting)
3. Generate summary report
4. Email report to finance team
Monitoring Workflowsβ
Workflow Dashboardβ
Track workflow performance:
| Metric | What It Means | Good Target |
|---|---|---|
| Success Rate | % of successful completions | > 95% |
| Avg Duration | How long workflows take | Varies by workflow |
| Error Rate | % of failed executions | < 5% |
| Active Executions | Currently running | Monitor for backlogs |
Execution Historyβ
View all workflow runs:
- Go to Workflows β Select workflow
- Click Executions tab
- See list of all runs with status
Debugging Failed Workflowsβ
When a workflow fails:
- Click on the failed execution
- See which step failed
- View error message
- Check step inputs/outputs
- Fix the issue
- Retry execution
Common issues:
- Invalid data: Check data format from trigger
- Agent timeout: Increase timeout or optimize agent
- Integration error: Check third-party service status
- Permission error: Verify agent has required permissions
Workflow Best Practicesβ
1. Start Simpleβ
Begin with 3-5 steps. Add complexity gradually.
2. Name Steps Clearlyβ
Bad: "Step 1", "Step 2", "Step 3" Good: "Verify Email", "Create Account", "Send Welcome"
3. Use Error Handlingβ
Always configure what happens if a step fails:
- Continue to next step?
- Stop entire workflow?
- Retry automatically?
- Notify someone?
4. Test with Real Dataβ
Don't just test with "test@example.com". Use real-world scenarios.
5. Set Appropriate Timeoutsβ
- Simple API call: 30 seconds
- Agent processing: 60-120 seconds
- External approval: Hours or days
- Batch processing: Minutes to hours
6. Monitor Activelyβ
Check workflow dashboard weekly:
- Are success rates dropping?
- Are durations increasing?
- Are errors spiking?
7. Version Your Workflowsβ
Before making changes:
- Duplicate workflow
- Name it "v2"
- Make changes
- Test thoroughly
- Activate v2
- Keep v1 as backup
Common Workflow Examplesβ
E-commerce Order Fulfillmentβ
Trigger: New order placed
ββ Verify payment
ββ Check inventory
ββ If in stock:
β ββ Create shipping label
β ββ Notify warehouse
β ββ Send confirmation to customer
ββ If out of stock:
ββ Notify customer (backorder)
ββ Create restock task
Content Approval Pipelineβ
Trigger: Content submitted
ββ Run plagiarism check
ββ Check brand guidelines
ββ If passes both:
β ββ Notify editor
β ββ Wait for approval
β ββ If approved β Publish
ββ If fails either:
ββ Return to author with feedback
Subscription Renewalβ
Trigger: 7 days before renewal
ββ Send renewal reminder
ββ Wait 3 days
ββ If payment method expiring:
β ββ Request payment update
ββ Day of renewal:
β ββ Attempt charge
β ββ If success β Thank customer
β ββ If fails β Retry 3x, then notify
Integration with External Systemsβ
Workflows can interact with your existing tools:
Supported Integrationsβ
- CRM: Salesforce, HubSpot, Pipedrive
- Email: SendGrid, Mailchimp, Customer.io
- Payment: Stripe, PayPal
- Project Management: Jira, Asana, Trello
- Communication: Slack, Microsoft Teams
- E-commerce: Shopify, WooCommerce
Connecting an Integrationβ
- Go to Settings β Integrations
- Click Connect next to desired service
- Authorize FAOS to access your account
- Integration becomes available in workflows
Getting Helpβ
Workflow not triggering?β
- Check trigger configuration
- Verify webhook URL is correct
- Test trigger manually
Steps executing out of order?β
- Review step dependencies
- Check conditional logic
- Ensure sequential steps have
next_step_idset
Workflow too slow?β
- Use parallel steps where possible
- Optimize agent prompts
- Check for unnecessary wait steps
Next Stepsβ
- Partner Onboarding - Build solutions for clients
- Enterprise Workflows - Advanced enterprise patterns
- API Reference - Build workflows via API