Workflow Visualization
Step-by-Step Execution Flow
1. Inquiry Data Collection
The workflow begins with user input via one of two channels.Path A: AI Assistant (Unstructured)- Interface: AI Assisted Inquiry
- Input: Free-text (e.g., “Ship 20ft container from Shanghai to Koper”).
- Process: AI parses text to extract schema fields.
- Decision Point:
- If data missing → Clarification Loop (System asks follow-up questions).
- If data complete → Proceed to Submission.
- Endpoint:
POST /api/public/chat
- Interface: Standard Inquiry
- Input: Validated form fields (Origin, Destination, Goods, Service).
- Process: Direct validation against schema.
- Result: Immediate progression to Submission.
2. Submission & Route Scanner
Upon validation, the system performs immediate logistics calculations before handing off to the automation engine.Immediate Actions:- Endpoint:
POST /api/public/submit-inquiry - Route Optimization:
- Calls Route Scanner to calculate optimal path and distance.
- Output: Injected into the automation payload.
3. Dual Automation Triggers
The system triggers two parallel automation flows to handle business logic.Endpoint:POST /api/v1/flows/execute-commandA. Send Quote Flow
Responsibility: Customer Engagement & Data persistence.- Flow ID:
pYmNCmrDNyS9pxyCmasuk - Actions Executed:
- CRM Storage: Saves record to
db_ai-loop_CRM_Inquiries(Lead). - Task Creation: Generates follow-up task in
db_ai-loop_V3_Tasks. - Confirmation Email: Sends “We received your request” email to user.
- CRM Storage: Saves record to
B. Cost Calculation Flow
Responsibility: Internal Pricing Logic.- Flow ID:
H32euZDGg3i3vD8TdEfsx - Actions Executed:
- Pricing Engine: Calculates estimated logistics costs based on route/goods.
- Internal Update: Updates the inquiry record with cost data.
Key Outputs
At the completion of this workflow, the following artifacts are generated:CRM Record
db_ai-loop_CRM_Inquiries
Full inquiry details with ‘Lead’ status.
Full inquiry details with ‘Lead’ status.
Operational Task
db_ai-loop_V3_Tasks
Task assigned for sales follow-up.
Task assigned for sales follow-up.
User Communication
Email Dispatch
Confirmation email sent via automation flow.
Confirmation email sent via automation flow.
Cost Calculation
Internal Pricing
Estimated shipment cost attached.
Estimated shipment cost attached.
APIs Involved
POST /chat
AI analysis and data extraction.
POST /submit-inquiry
Main submission & trigger initiator.
POST /route-scanner
Logistics path calculation.
POST /execute-command
Triggers “Send Quote” & “Cost Calc” flows.