SmartBrain

How SmartBrain Decides Which Product to Recommend — The Server-Side Logic Explained

2026-06-22 · conversational commerce, product recommendation engine, ecommerce automation, DM automation, Shopify AI

The short answer: the server decides, the AI just talks

When a customer sends a message like "I need a gift under €50 for a runner," SmartBrain does not ask an AI model to guess which product fits. Instead, the recommendation engine queries your live catalog first — filtering by price, stock status, and any rules you have configured — and hands a confirmed product to the AI. The AI's only job is to write a natural, personalized message around it.

This architecture matters because AI language models hallucinate. They can confidently name a product that is out of stock, discontinued, or priced incorrectly. SmartBrain eliminates that risk by keeping product selection entirely server-side, where your data is authoritative.

What "server-side product selection" means in practice

Server-side selection means the recommendation logic runs against your actual database or Shopify catalog at the moment a customer asks a question. Nothing is cached from a previous session, and no product is suggested that does not currently exist in your system with available inventory.

The flow looks like this:

The AI never has access to the full catalog. It receives a structured payload: product name, price, image URL, short description, and a link. It writes copy around what the server already decided.

Which signals does the engine actually use to filter?

Budget range

If a customer states a budget explicitly ("under €50", "around $100") or if one is inferred from context, the query applies a price ceiling and optionally a floor. Products outside the range are excluded before the AI sees anything. This is the most common filter and the one that most directly prevents the classic AI error of recommending a product the customer cannot afford.

Real-time stock status

Only products with available inventory pass the filter. If a variant is sold out, it is excluded even if it would otherwise be a perfect match. For Shopify stores with multi-location inventory, the query can be scoped to a specific warehouse or fulfillment zone.

Category and intent matching

Intent signals extracted from the conversation — "running shoes," "gift for a teenager," "vegan skincare" — map to your catalog taxonomy. SmartBrain uses your existing product tags, collections, and metafields rather than a separate AI-generated classification layer. This means your merchandising decisions carry over directly: if you have tagged a product as "gift-suitable," that tag is queryable.

Promotion and margin rules

Store owners and agencies can configure rules that exclude low-margin SKUs from recommendations, prioritize products currently on promotion, or boost items that need to move. These rules run as query modifiers on the server — they are not instructions given to an AI model, which means they are reliable and auditable.

A concrete example: the €50 gift scenario

A customer on Instagram DMs your store: "Hi, I need a birthday gift for my girlfriend, she loves yoga, budget around €50."

SmartBrain's engine extracts three signals: category = yoga/wellness, budget ceiling = €50, occasion = birthday gift. It runs a query against your Shopify catalog: products tagged "yoga" or in the "wellness" collection, priced between €20 and €50, with stock available, sorted by a configurable relevance score that you control (bestseller rank, margin, or manual curation).

The top result — say, a €44 yoga mat with a gift-packaging option — is retrieved. The server passes that product record to the AI, which writes: "Great choice for a yoga lover! This premium cork mat is €44 and we can add gift wrapping at checkout — here's the link." The AI did not pick the mat. It described the mat the server already chose.

How this compares to a pure LLM recommendation approach

Some commerce chatbots let the AI model read a product list and choose what to recommend. This approach is simpler to set up but introduces several failure modes that cost real money:

SmartBrain's architecture inverts this. The business logic is deterministic and logged. The AI is responsible only for tone and fluency — the parts where language models actually excel.

What store owners and agencies need to configure

The recommendation engine works out of the box with a standard Shopify catalog sync, but the quality of recommendations improves significantly with a few deliberate setup choices:

FAQ

Does SmartBrain work with products that have multiple variants?

Yes. The query engine operates at the variant level. If a customer specifies a size or color, the filter applies to that specific variant's stock status and price. Only available variants are surfaced.

Can I exclude certain products from ever being recommended?

Yes. You can add products or collections to a blocklist in the configuration. This is useful for clearance items you do not want to highlight, or for products with complex purchasing requirements (age verification, prescription, etc.).

What happens if no product matches the customer's filters?

The engine returns a fallback signal to the AI layer, which can then ask a clarifying question ("Would you consider a slightly higher budget?") or offer the closest available alternative. The fallback behavior is configurable per store.

Is the product selection logic visible and auditable?

Every recommendation event is logged with the query parameters used, the matched product ID, and a timestamp. This makes it straightforward to audit why a specific product was recommended in a given conversation.

Does the AI ever override the server's product selection?

No. The AI layer in SmartBrain has no write access to the recommendation output. It receives the product payload as a fixed input and generates copy around it. The separation between selection logic and language generation is enforced at the architecture level, not by instruction.

Try SmartBrain free on your store — watch it qualify a shopper and recommend the exact in-stock product, in minutes. Free plan, instant setup, no rebuild.

Start free →