Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/geremyjampiersalasgarcia-eng/Caso_Practico_Semillero_IA/llms.txt

Use this file to discover all available pages before exploring further.

The Sales Process Agent (agente_proceso_ventas) is the authoritative source for how Patito S.A.’s sales pipeline works. When the LangGraph classifier detects the intent proceso_ventas, it routes the query to this agent. The agent retrieves the most relevant chunks from the col_proceso_ventas ChromaDB collection — populated from 03_Proceso_Ventas_CRM.txt — and generates structured answers that walk sales reps through funnel stages, CRM data requirements, and opportunity-closing criteria. Whenever the agent describes pipeline stages it presents them in the canonical order: Prospecto → Contacto → Calificación → Propuesta/Cotización → Negociación → Cierre (Ganada o Perdida).

Agent properties

PropertyValue
nameagente_proceso_ventas
collection_namecol_proceso_ventas
system_prompt_pathbackend/app/prompts/proceso_ventas_prompt.md
Knowledge document03_Proceso_Ventas_CRM.txt
Intent triggerproceso_ventas

Source class

from app.agents.base_agent import BaseAgent
import os


class ProcesoVentasAgent(BaseAgent):
    """
    Agente de Proceso de Venta y CRM.
    Responsable de responder sobre etapas del embudo,
    registro en el CRM y requisitos para cerrar una venta.
    """

    @property
    def name(self) -> str:
        return "agente_proceso_ventas"

    @property
    def description(self) -> str:
        return (
            "Responde consultas sobre etapas del embudo de ventas, "
            "registro en el CRM y requisitos para cerrar una venta."
        )

    @property
    def collection_name(self) -> str:
        return "col_proceso_ventas"

    @property
    def system_prompt_path(self) -> str:
        return os.path.join(
            os.path.dirname(__file__), "..", "prompts", "proceso_ventas_prompt.md"
        )
Like all RAG agents, ProcesoVentasAgent inherits the full retrieve→prompt→LLM→result pipeline from BaseAgent and only needs to declare the four properties.

Example queries

1. CRM requirements before marking an opportunity as won
¿Qué información debo registrar en el CRM antes de marcar una oportunidad como ganada?
Expected answer: the full list of required data (see CRM data requirements for closing below), citing 03_Proceso_Ventas_CRM.txt. 2. Funnel stages overview
¿Cuáles son las etapas del embudo de ventas de Patito S.A.?
Expected answer: ordered list — Prospecto → Contacto → Calificación → Propuesta/Cotización → Negociación → Cierre (Ganada o Perdida). 3. CRM data entry best practices
¿Qué buenas prácticas debo seguir al registrar una oportunidad nueva en el CRM?
Expected answer: guidance on timing, required fields, and how to keep pipeline data accurate and up to date. 4. Post-sale follow-up
¿Qué pasos debo seguir después de cerrar una venta como ganada?
Expected answer: post-sale and delivery steps defined in the process manual, including delivery date confirmation and invoicing data.

CRM data requirements for closing

Before a sales rep can mark an opportunity as Ganada (won), the following data points must all be recorded in the CRM:
  • Purchase order or signed contract from the client
  • Complete billing data (company name, tax ID, billing address)
  • Products, quantities, and final prices — with discount applied and authorization documented
  • Payment condition — cash (contado) or credit (crédito), including term if credit (30, 60, or 90 days)
  • Total sale amount in USD
  • Close date of the opportunity
  • Committed delivery date agreed with the client
If any of these fields are missing, the opportunity cannot be closed. The Action Agent (agente_accion) enforces a parallel validation when it collects data before registering a new opportunity.
For mixed-intent queries (intent mixta), the orchestrator runs agente_proceso_ventas in parallel alongside agente_catalogo and agente_politicas. All three partial answers are merged by the consolidation step. This is particularly useful for queries like: “A new client wants 50 units of Patito Pro 2026 on credit with a special discount — what’s the price, what discount and credit terms can I offer, and what do I register in the CRM?”

Build docs developers (and LLMs) love