Entrada Pedidos
Este flujo representa la arquitectura de un agente conversacional diseñado para asistir en procesos de venta y gestión de pedidos, integrando herramientas de consulta y escritura sobre bases de datos tipo Airtable.
Entrada Pedidos
🧩 Overview
This workflow defines an automated sales assistant that helps users select products and manage order registration. It receives user queries, consults real-time inventory data, and provides advice based on product availability and pricing. Before registering an order, it presents a summary for user confirmation and only proceeds to update stock and log the order in the database after receiving explicit approval. The final response is delivered to the user through a chat interface, maintaining a professional and helpful tone throughout the interaction.
⚙️ Main Features
- Provides real-time product information by querying an inventory database.
- Guides users through product selection and advises on quantities based on stock levels.
- Presents a detailed order summary and requires explicit user confirmation before processing.
- Automatically updates product stock levels and creates new order records in the database upon confirmation.
- Ensures data integrity by validating all required order information is complete before saving.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Captures the initial user query or message. | User message text | User Message |
| Agent | The core conversational AI that orchestrates the sales process. It interprets the user's intent, uses tools to fetch data, provides advice, and manages the order confirmation and registration logic. | User Message, Language Model, Database Tools | Agent Response |
| Gemini Model | Provides the underlying language model powering the agent's reasoning and conversational abilities. | Model configuration | Language Model |
| Airtable (Read) | Serves as a tool for the agent to retrieve current product information from the inventory database. | Database query parameters | Product Data |
| Airtable (Update) | Serves as a tool for the agent to reduce product stock levels in the inventory after an order is confirmed. | Record ID, updated stock value | Update Result |
| Airtable (Create) | Serves as a tool for the agent to create a new order record in the orders database. | Order details (product, quantity, buyer info, etc.) | Create Result |
| Chat Output | Delivers the agent's final response back to the user interface. | Agent Response | Formatted Message |
🧠 Notes
- The workflow is designed for a conversational interface and maintains context across interactions.
- The agent is instructed to always check real-time inventory before providing product advice and never to invent data.
- A strict security rule prevents any database writes (stock updates or order creation) without an explicit "yes" from the user.
- The agent validates that all necessary fields for an order record are complete before attempting to save it.
- The workflow assumes a pre-configured connection to an Airtable base containing
ProductosandPedidostables.