Skip to main content

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:

  1. Add trigger conditions
  2. Build decision trees
  3. Configure actions
  4. Set fallback paths

Workflow Components

Triggers

What starts the workflow:

Trigger TypeExample
Intent"return", "refund", "send back"
Keyword"track order", "order status"
EventOrder placed, shipping update
ManualAgent 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:

ActionDescription
Send MessageReply to customer
Ask QuestionCollect information
Call APIFetch or update data
Create TaskAssign follow-up
EscalateTransfer 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

StatusDescription
DraftNot yet active
ActiveIn production use
PausedTemporarily disabled
ArchivedNo longer needed

Version Control

  • Workflows are versioned
  • Roll back to previous versions
  • Compare version differences

Analytics

Track workflow performance:

MetricDescription
Trigger RateHow often triggered
Completion RateSuccessful completions
Escalation RateHandoffs to human
Avg DurationTime to complete

Debugging Workflows

Test Mode

Run workflows in test mode:

  1. Open workflow
  2. Click Test
  3. Simulate conversation
  4. View step-by-step execution

Logs

Review workflow execution logs:

  • Input received
  • Conditions evaluated
  • Actions taken
  • Errors encountered