flows:
intelligent_service_flow:
name: "Intelligent Service Router"
description: "AI-powered service routing based on user intent"
nlu_trigger:
intents:
- intent: "general_inquiry"
- intent: "need_help"
steps:
- id: "collect_user_request"
collect: "user_request"
collect_type: "string"
description: "How can I help you today? Please describe what you need."
next: "analyze_request"
- id: "analyze_request"
next:
- semantic_if: "user wants to renew or extend documents"
then: "renewal_services"
- semantic_if: "user wants information about documents or status"
then: "information_services"
- semantic_if: "user wants to check violations or fines"
then: "violation_services"
- semantic_if: "user needs help with applications or forms"
then: "application_services"
else: "clarify_request"
- id: "renewal_services"
response: "I understand you need renewal services. Let me help you with that."
next: "collect_renewal_type"
- id: "collect_renewal_type"
collect: "document_type"
collect_type: "string"
description: "What document do you want to renew? (iqama, passport, license)"
next: "process_renewal"
- id: "information_services"
response: "I'll help you get the information you need."
next: "collect_info_type"
- id: "collect_info_type"
collect: "info_requested"
collect_type: "string"
description: "What information do you need? (personal details, status, requirements)"
next: "provide_information"
- id: "violation_services"
response: "I'll help you check for violations or fines."
next: "collect_plate_or_iqama"
- id: "application_services"
response: "I'll assist you with applications and forms."
next: "collect_application_type"
- id: "clarify_request"
collect: "clarification"
collect_type: "string"
description: "I want to help but need more details. Could you please be more specific about what service you need?"
next: "analyze_clarification"
- id: "analyze_clarification"
next:
- semantic_if: "user provided clearer information about their needs"
then: "analyze_request"
- semantic_if: "user still unclear or confused"
then: "offer_menu"
else: "general_assistance"
- id: "offer_menu"
response: "Let me show you our available services. Please choose from: 1) Document Renewal 2) Information Lookup 3) Violation Check 4) Applications"
next: "collect_menu_choice"
- id: "collect_menu_choice"
collect: "menu_choice"
collect_type: "string"
description: "Which service would you like? (1, 2, 3, or 4)"
next: "route_menu_choice"
- id: "route_menu_choice"
next:
- if: "slots.menu_choice == '1'"
then: "renewal_services"
- if: "slots.menu_choice == '2'"
then: "information_services"
- if: "slots.menu_choice == '3'"
then: "violation_services"
- if: "slots.menu_choice == '4'"
then: "application_services"
else: "invalid_choice"
# Placeholder completion steps
- id: "process_renewal"
response: "Processing your slots.document_type renewal request..."
next: END
- id: "provide_information"
response: "Here's the slots.info_requested information you requested..."
next: END
- id: "collect_plate_or_iqama"
collect: "identifier"
description: "Please provide your plate number or Iqama number"
next: "check_violations"
- id: "check_violations"
response: "Checking violations for slots.identifier..."
next: END
- id: "collect_application_type"
collect: "application_type"
description: "What type of application do you need help with?"
next: "assist_application"
- id: "assist_application"
response: "I'll help you with your slots.application_type application..."
next: END
- id: "general_assistance"
response: "I'm here to help! You can ask me about document renewals, checking information, violations, or applications."
next: END
- id: "invalid_choice"
response: "Please choose a valid option (1, 2, 3, or 4) or describe what you need in your own words."
next: "collect_menu_choice"