AI Workflows
Create structured conversation flows for consistent handling of specific scenarios.
What are Workflows?
Workflows define how your AI agent handles specific situations:
Customer: "I want to return my order"
↓
Return Workflow Triggered
↓
• Check order eligibility
• Collect return reason
• Generate return label
• Confirm with customer
Creating Workflows
Natural Language Definition
Define workflows in plain English:
When a customer asks about returns:
1. Ask for their order number or email
2. Look up the order
3. Check if it's within 30-day return window
4. If eligible:
- Ask for return reason
- Generate return label
- Send confirmation
5. If not eligible:
- Explain the policy
- Offer alternatives
Fyncall converts this to an executable workflow.
Visual Builder
Use the drag-and-drop builder:
- Add trigger conditions
- Build decision trees
- Configure actions
- Set fallback paths
Workflow Components
Triggers
What starts the workflow:
| Trigger Type | Example |
|---|---|
| Intent | "return", "refund", "send back" |
| Keyword | "track order", "order status" |
| Event | Order placed, shipping update |
| Manual | Agent triggers workflow |
Conditions
Decision points in the flow:
IF order.created_at > 30 days ago
THEN explain_policy
ELSE IF order.status = "delivered"
THEN start_return
ELSE
THEN explain_status
Actions
What the workflow does:
| Action | Description |
|---|---|
| Send Message | Reply to customer |
| Ask Question | Collect information |
| Call API | Fetch or update data |
| Create Task | Assign follow-up |
| Escalate | Transfer to human |
Variables
Store and use data:
{{customer.name}}
{{order.number}}
{{product.name}}
{{custom.return_reason}}
Example Workflows
Order Status Workflow
Trigger: Intent matches "order status" or "track order"
Steps:
1. Ask: "Could you provide your order number or email?"
2. Collect: order_identifier
3. Look up order in system
4. If found:
- Display order status card
- Show tracking if available
5. If not found:
- Ask for verification
- Offer alternatives
Return Request Workflow
Trigger: Intent matches "return" or "refund"
Steps:
1. Identify customer
2. Find recent orders
3. Let customer select order
4. Check return eligibility
5. Collect return reason
6. Generate return label
7. Send confirmation email
8. Create return case
Appointment Booking Workflow
Trigger: Intent matches "book appointment" or "schedule"
Steps:
1. Ask for preferred date/time
2. Check availability
3. Present available slots
4. Confirm selection
5. Collect contact info
6. Create appointment
7. Send confirmation
Workflow Best Practices
Keep Flows Simple
- Limit to 5-7 steps
- Avoid deep nesting
- Provide escape routes
Handle Errors Gracefully
IF api_call fails
THEN apologize and escalate
Provide Context
Give AI enough context at each step:
"We're helping {{customer.name}} with order #{{order.number}}"
Test Thoroughly
- Test happy path
- Test edge cases
- Test error scenarios
- Test with real data
Managing Workflows
Workflow Status
| Status | Description |
|---|---|
| Draft | Not yet active |
| Active | In production use |
| Paused | Temporarily disabled |
| Archived | No longer needed |
Version Control
- Workflows are versioned
- Roll back to previous versions
- Compare version differences
Analytics
Track workflow performance:
| Metric | Description |
|---|---|
| Trigger Rate | How often triggered |
| Completion Rate | Successful completions |
| Escalation Rate | Handoffs to human |
| Avg Duration | Time to complete |
Debugging Workflows
Test Mode
Run workflows in test mode:
- Open workflow
- Click Test
- Simulate conversation
- View step-by-step execution
Logs
Review workflow execution logs:
- Input received
- Conditions evaluated
- Actions taken
- Errors encountered