Atencion al Cliente Ecommerce
Flujo de Atención al Cliente con sistema de nivelación para integrarse con un ecommerce
+3
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ChatInput-larrt[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-larrt stroke:#a170ff
GoogleGenerativeAIModel-hrflu[Gemini]
style GoogleGenerativeAIModel-hrflu stroke:#a170ff
GoogleGenerativeAIEmbeddings-fnjt0[Google Generative AI Embeddings]
style GoogleGenerativeAIEmbeddings-fnjt0 stroke:#a170ff
APIRequest-78xr1[API Request]
style APIRequest-78xr1 stroke:#a170ff
TelegramMessage-zvrp9[Telegram Message]
style TelegramMessage-zvrp9 stroke:#a170ff
ChatOutput-16z2g[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-16z2g stroke:#a170ff
ChatOutput-0vfib[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output2]
style ChatOutput-0vfib stroke:#a170ff
ChatOutput-7h910[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output3]
style ChatOutput-7h910 stroke:#a170ff
GoogleGenerativeAIEmbeddings-mn2ew[Google Generative AI Embeddings2]
style GoogleGenerativeAIEmbeddings-mn2ew stroke:#a170ff
SplitText-xm92m[<div><img src="/_astro/scissors-line-dashed.CajsPhTx.svg" style="height: 20px !important;width: 20px !important"/></div>Split Text]
style SplitText-xm92m stroke:#a170ff
GDriveFilesComponent-q2n9y[<div><img src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Google Drive File Manager]
style GDriveFilesComponent-q2n9y stroke:#a170ff
ParseData-dpd2k[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Parse Data]
style ParseData-dpd2k stroke:#a170ff
AdvancedAgent-zbpzj[Agent4]
style AdvancedAgent-zbpzj stroke:#a170ff
AdvancedAgent-aazz1[Agent]
style AdvancedAgent-aazz1 stroke:#a170ff
AdvancedAgent-hs2r4[Agent5]
style AdvancedAgent-hs2r4 stroke:#a170ff
ParseData-2g4fn[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Parse Data2]
style ParseData-2g4fn stroke:#a170ff
ParseData-mrvuk[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Parse Data3]
style ParseData-mrvuk stroke:#a170ff
ParseData-z8755[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Parse Data4]
style ParseData-z8755 stroke:#a170ff
DeepseekModel-7c7w4[Deepseek2]
style DeepseekModel-7c7w4 stroke:#a170ff
DeepseekModel-juyng[Deepseek3]
style DeepseekModel-juyng stroke:#a170ff
DeepseekModel-ova3h[Deepseek4]
style DeepseekModel-ova3h stroke:#a170ff
SmartRouter-kldld[Agent Router]
style SmartRouter-kldld stroke:#a170ff
RetrieverTool-65vrx[<div><img src="/_astro/langchain-icon.BXtvU_nA.svg" style="height: 20px !important;width: 20px !important"/></div>RetrieverTool]
style RetrieverTool-65vrx stroke:#a170ff
AstraDB-bdkzn[Astra DB]
style AstraDB-bdkzn stroke:#a170ff
AstraDB-xlv27[Astra DB2]
style AstraDB-xlv27 stroke:#a170ff
ParseData-dpd2k -.- SplitText-xm92m
linkStyle 0 stroke:#a170ff
GDriveFilesComponent-q2n9y -.- ParseData-dpd2k
linkStyle 1 stroke:#a170ff
AdvancedAgent-zbpzj -.- ChatOutput-16z2g
linkStyle 2 stroke:#a170ff
AdvancedAgent-aazz1 -.- ChatOutput-7h910
linkStyle 3 stroke:#a170ff
APIRequest-78xr1 -.- AdvancedAgent-aazz1
linkStyle 4 stroke:#a170ff
AdvancedAgent-hs2r4 -.- ChatOutput-0vfib
linkStyle 5 stroke:#a170ff
TelegramMessage-zvrp9 -.- AdvancedAgent-hs2r4
linkStyle 6 stroke:#a170ff
ParseData-2g4fn -.- AdvancedAgent-zbpzj
linkStyle 7 stroke:#a170ff
ParseData-mrvuk -.- AdvancedAgent-aazz1
linkStyle 8 stroke:#a170ff
ParseData-z8755 -.- AdvancedAgent-hs2r4
linkStyle 9 stroke:#a170ff
DeepseekModel-7c7w4 -.- AdvancedAgent-zbpzj
linkStyle 10 stroke:#a170ff
DeepseekModel-juyng -.- AdvancedAgent-aazz1
linkStyle 11 stroke:#a170ff
DeepseekModel-ova3h -.- AdvancedAgent-hs2r4
linkStyle 12 stroke:#a170ff
ChatInput-larrt -.- SmartRouter-kldld
linkStyle 13 stroke:#a170ff
GoogleGenerativeAIModel-hrflu -.- SmartRouter-kldld
linkStyle 14 stroke:#a170ff
SmartRouter-kldld -.- ParseData-2g4fn
linkStyle 15 stroke:#a170ff
SmartRouter-kldld -.- ParseData-mrvuk
linkStyle 16 stroke:#a170ff
SmartRouter-kldld -.- ParseData-z8755
linkStyle 17 stroke:#a170ff
RetrieverTool-65vrx -.- AdvancedAgent-zbpzj
linkStyle 18 stroke:#a170ff
SplitText-xm92m -.- AstraDB-bdkzn
linkStyle 19 stroke:#a170ff
GoogleGenerativeAIEmbeddings-mn2ew -.- AstraDB-bdkzn
linkStyle 20 stroke:#a170ff
AstraDB-xlv27 -.- RetrieverTool-65vrx
linkStyle 21 stroke:#a170ff
GoogleGenerativeAIEmbeddings-fnjt0 -.- AstraDB-xlv27
linkStyle 22 stroke:#a170ff
Atencion al Cliente Ecommerce
🧩 Overview
This workflow automates customer service for an e-commerce platform by intelligently routing incoming queries to the most appropriate resolution path. It uses a Large Language Model (LLM) to classify the customer's intent and then directs the query to one of three specialized AI agents, each designed to handle a specific type of request. This system streamlines support by providing automated, context-aware responses for general information, order status inquiries, and escalations requiring human intervention.
⚙️ Main Features
- Automatically classifies customer messages into three distinct support levels based on intent.
- Routes queries to specialized agents: one for general company information, one for database-driven order/product inquiries, and one for handling escalations.
- Integrates a Retrieval-Augmented Generation (RAG) system to provide accurate answers based on internal company documentation.
- Connects to external systems like APIs for real-time data and Telegram for human agent notifications.
- Includes a separate, configurable pipeline for building and populating a vector database from company documents.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Receives the initial customer query from the user interface. | User Message | Customer Message |
| Agent Router | Analyzes the customer's message to classify its intent into one of three categories (nivel1, nivel2, nivel3). | Customer Message, Language Model | Classification Result |
| Parse Data | Converts the structured classification result from the router into a plain text message for the next agent. | Classification Data | Formatted Message |
| Advanced Agent (Level 1) | A RAG-powered agent that answers general questions about the company using information retrieved from a vector database. | Formatted Message, Language Model, Retrieval Tool | AI Response |
| Advanced Agent (Level 2) | An agent equipped with an API tool to query business systems for specific data like order status or product inventory. | Formatted Message, Language Model, API Tool | AI Response |
| Advanced Agent (Level 3) | An agent designed to manage escalations, using a notification tool to alert a human employee via Telegram. | Formatted Message, Language Model, Notification Tool | AI Response |
| Chat Output | Displays the final AI-generated response back to the customer in the chat interface. | AI Response | Displayed Message |
🧠 Notes
- The workflow relies on pre-configured credentials for external services like Google Generative AI, Deepseek, AstraDB, and Telegram.
- The Level 1 agent's knowledge is limited to the information contained within the pre-built vector database; it cannot access external web sources.
- The system prompt for the Level 1 agent instructs it to strictly use its retrieval tool and not to invent information.
- The vector database creation pipeline (involving Google Drive, text parsing, chunking, and embedding) is depicted as a separate, preparatory process.
- The effectiveness of the routing depends on the accuracy of the LLM-based classifier and the clarity of the defined intention categories.