From Chatbots to Expert Advisors: Implement a 24/7 Sales Agent with Memory and Strategy

Jan 13, 2026 · automatización, cafe

From Chatbots to Expert Advisors: Implement a 24/7 Sales Agent with Memory and Strategy

Have you ever wondered why most e-commerce chatbots feel like talking to a brick wall? What we usually see is a block of messages with buttons that supposedly guide the user where we want, but in the end result in conversations that never turn into sales. In a world saturated with options, sending a generic product list is no longer enough to convert.

Imagine walking into your favorite coffee shop and the person serving you doesn’t just ask what you want today, but remembers that you come back often and always order that coffee with chocolate notes you love so much. That was our starting point: how could we bring that expert-level personalization and human warmth into the digital world using artificial intelligence?

In our case, the answer was to create an AI Coffee Expert — a conversational system that runs on Telegram, pulls the catalog in real time from Shopify, and recommends the ideal coffee based on each user’s preferences.

Here we explain how we built a 24/7 agent.

The Bridge Between Technology and Emotion

To make sure Zyntha wasn’t just another bot, we had to build it a “nervous system” using n8n. And here’s the key insight: this architecture isn’t just for coffee — it’s a blueprint for any business that wants to stop being a fulfillment machine and become a true advisor.

  • Its Eyes (Shopify): We connected the agent directly to our real inventory. If a product runs out, it knows instantly. This works just as well for a shoe store, a travel agency, or any product-based business.
  • Its Memory (Simple Memory): We gave it the ability to remember. When a customer comes back, the agent doesn’t ask “How can I help you?”, but instead says “Shall we look for something similar to the Bourbon Pasiflora you bought last time?”.
  • Its Filter (JavaScript): Like any true expert, the agent must be impeccable. We use custom code to ensure responses are delivered without technical errors — always clean and professional.

Benefits of an AI Assistant for Any Business

Even though our example is coffee, the benefits apply to any e-commerce.

Key Advantages

  • 24/7 customer support without increasing staff.
  • Reduced operational load for support and sales teams.
  • Personalized recommendations based on user intent.
  • Automatic scalability as the catalog grows.
  • Higher conversion rates thanks to reduced friction.

The logic is simple:
If the system understands what the customer is looking for, it can recommend the right product — regardless of the industry.

Here’s a step-by-step breakdown of how it works.

System Architecture: How This AI Agent Works

n8n Architecture Zyntha Coffee

This flow was built using n8n, integrating Telegram, Shopify, and OpenAI.

1. Node: Telegram as a Universal Conversational Channel

The user starts the conversation. No boring forms — just a chat interface everyone already knows how to use.

Telegram acts as a direct and flexible channel, although the architecture can be adapted to other platforms.

Function

  • The node receives the user’s message and, most importantly, captures their unique Chat ID.
  • This ID allows long-term memory to work, since it never changes for that user.

2. Node: JavaScript Code

Imagine our chatbot as a barista who, despite being a coffee expert, sometimes gets overwhelmed by technical information and starts speaking in binary code or confusing language that a regular customer wouldn’t understand.

To prevent this, we use nodes we call the “Translator and Quality Supervisor.” This acts as a real-time safety filter, intercepting the chatbot’s response before it reaches the customer. If it detects a technical or faulty message, it instantly translates it into a friendly, human sentence.

Thanks to these nodes, we ensure the user experience is always smooth and professional, hiding any technical failure behind flawless customer service.

Function:

JavaScript 1

  • Prepares the incoming Telegram text so the AI agent understands it without technical noise.
  • Ensures the chat_id is passed correctly to subsequent nodes to preserve user context.

JavaScript 2

  • Validates that the AI response is a proper JSON.
  • If the AI fails, this node triggers a fallback message so the user never sees an error.

3. Shopify API: Recommendations with Live Data

Instead of giving the AI a static product list, the flow connects directly to our store. If we add a new product tomorrow, the bot knows instantly — no reprogramming needed.

Function: Real-time inventory.

  • Pulls the updated list of coffees directly from your store.
  • Allows the bot to give exact product names and real prices instead of inventing information.

🔑 Key Factor: Live Data

This agent does not rely on pre-written responses.

If you add a new product to Shopify tomorrow:

  • The bot knows it automatically.
  • It can recommend it without manual adjustments.
  • The flow itself does not change.

4. Node: AI Agent (The Brain)

We call it the “strategic brain” because, unlike a traditional automated system that only repeats predefined responses, this technology can analyze, reason, and personalize every interaction in real time based on the customer’s needs.

Function: Logic and Personality.

  • System Message: This is where the instruction to ask for the user’s name and remember their preferences lives.
  • It coordinates Shopify data with the conversation history stored in Postgres.

5. Node: Postgres Chat Memory

This node manages long-term memory. To give our chatbot professional and secure recall capabilities, we use Supabase, a high-level database platform (Postgres) where every interaction is stored in an organized way.

Its role is divided into three pillars of user experience:

  • Persistent Identity Recognition: Supabase assigns a unique key to each user based on their Telegram ID.
  • Preference and Taste History: This node stores specific details from the conversation.
  • Continuity Across Sessions: Postgres memory ensures data is protected and available 24/7.

In short, this node allows the chatbot to stop being a robot that “doesn’t know who you are” and become a personal barista who knows your story, your tastes, and makes you feel at home every time you return.

6. Node: Telegram — The Customer Experience Counter (Final Response)

This node ensures the technology is invisible. The customer never sees code, databases, or complex processes — only a friendly, fast, and intelligent barista who:

  1. Greets them by name.
  2. Recommends the perfect coffee based on saved preferences.
  3. Gives them the confidence to choose the right product.

In summary, the Telegram node turns a data flow into a real, long-lasting business relationship.

When you analyze this architecture, its power becomes clear: it guarantees complete inventory knowledge without pricing errors, builds relationships through recognition, and protects your brand identity with consistently professional responses. The result is a smooth experience that turns casual conversations into real, lasting sales.

⚠️ Key Success Point: If your business is not coffee-related, the most important step is adapting the System Prompt to your business model. This is where you define the agent’s personality, domain knowledge, and sales rules — without this, the logic won’t truly connect with your customers.

Launch Requirements

  • n8n: the platform where orchestration and automation happen.
  • OpenAI: API credentials to power the agent’s intelligence and reasoning.
  • Supabase.com: free signup to create persistent chat memory.
  • Telegram: a bot created with BotFather to interact with users.
  • Inventory (API): connection to your store or product database.

🚀 Ready-to-Deploy Solution: The Architectural Blueprint

By loading this file into your own instance, you immediately get the full technical architecture: persistent Postgres memory nodes, the intelligent JavaScript safety filter, and all platform connections. This reduces weeks of development to just minutes of credential setup, allowing you to focus entirely on refining the prompt so your agent sells under your brand’s identity.

Want to implement this flow in your business?

Download n8n Flow