Skip to main content
Your AI agents answer from two kinds of input. Operational Rules tell an agent how to behave. The Knowledge Base gives the agent facts about your store. This page tells you where to put each instruction and how to fix a wrong answer. To set up an agent, see WhatsApp agent and Onsite agent.

Rules or knowledge base: where to put an instruction

The agent reads your Operational Rules and Brand info in every reply. For Q&A, web pages and documents, the agent searches for the entries that match the customer’s question. It uses only the best matches.

Fix a wrong answer from the AI agent

You can correct an AI answer from the conversation where it happened.
  1. Open the conversation in the Inbox.
  2. Under the AI reply, click Why this answer?. A short explanation shows the sources that the agent used. Click a source to open it.
  3. If a source has wrong or old information, edit or delete it in the Knowledge Base.
  4. To teach the correct answer, put the pointer on the AI reply and click Revise answer.
  5. Write the correct reply in Expected response and click Update Answer. TextYess adds a Q&A with this answer to your knowledge base.
  6. If the problem is a behavior, such as tone or an offer, add a rule in Operational Rules.
  7. Ask the same question in the test chat on the agent page.
Why this answer? shows only when the reply used sources from your knowledge base or catalog.

Write operational rules that the AI agent follows

Operational Rules are on the Instructions tab of each agent page. The agent reads them in every reply.
  • Write one rule for one situation. Use the format “If the customer asks about X, do Y.”
  • To let the AI format a rule for you, click Add rule, describe the rule, and click Generate.
  • Put facts, such as prices, times and policies, in the Q&A tab of the Knowledge Base. Put behavior in the rules.
  • Make sure that two rules do not say different things. If two rules conflict, the WhatsApp agent follows the more specific rule.
  • Click Publish. Customers get answers with the new rules only after you publish.
Some limits always apply, whatever your rules say. For example, the agent never confirms or promises a refund, and it never invents product details.

The AI agent does not follow a rule

If the AI agent ignores one of your Operational Rules, do these checks:
  1. Make sure that you clicked Publish after you changed the rule.
  2. Ask the question in the test chat on the agent page.
  3. In the Inbox, click Why this answer? under the reply. A Q&A or a web page can say something different from the rule. Fix or delete that source.
  4. Make sure that no other rule says the opposite.
  5. Use the correct setting for the topic: Escalation rules for handovers to your team, Discount codes for codes, Order Tracking for order questions.
Some limits always apply. For example, the agent never confirms a refund, never invents product details, and shares only the discount codes that you allow.

Fix a product that the AI says is available when it is not

The AI agent reads stock from your product catalog in TextYess. TextYess updates the stock when your store reports that a product went out of stock or came back in stock. If your store does not report a change, the catalog keeps the old stock.
  1. Open the Product Catalog tab of Agents → Knowledge Base.
  2. Search for the product and click it. Look at Inventory and AI Recommendation.
  3. If the data is different from your store, click Resync. TextYess reads the product again from your store.
  4. If many products are wrong, click Resync Catalog. You can do this once a day.
The agents recommend only products that are active and in stock. Before the WhatsApp agent sends a checkout link, TextYess checks the product in your Shopify store. If the product is out of stock, the agent does not send the link. The AI agent takes product links from your product catalog in TextYess. For your home page, it uses the website address in your settings. The agent is told to send only these links and never to build a link itself. A product link can be old in these cases:
  • You changed the web address (handle) of the product in Shopify. A product update from your store does not change the saved link.
  • You deleted, archived or unpublished the product, and your store did not report the change.
To fix a link, open the product in the Product Catalog tab of Agents → Knowledge Base and click Resync. Click View Product URL to open the saved link.

Make the AI agent share your discount codes

The AI agents do not read the discounts on your website. They share only the codes that you allow on the agent page.
  1. Open Agents → WhatsApp Agent or Agents → Onsite Agent, and select the Tools tab.
  2. Turn on Discount codes.
  3. Shopify stores: in Allowed discounts, select the codes. The list shows your active Shopify discount codes. Automatic discounts have no code, so they are not in the list.
  4. Other stores: write the code and when to offer it in Behavior rules (optional).
  5. Click Publish.
The agent does not check the codes in your store each time. If a discount ends in Shopify, it shows as Unavailable in Allowed discounts. Remove it there. See WhatsApp agent.

Why the AI agent gives different answers to the same question

The AI agent writes each reply new, so the words can change from one conversation to the next. The facts come from your rules, Brand info, Q&A, web pages, documents and product catalog. For each question, the agent searches your knowledge base and uses the entries that match best. If two entries say different things, the answers can be different. To get the same facts every time:
  • Keep one Q&A for each topic. Delete old or duplicate Q&As.
  • Make sure that your web pages and documents agree with your Q&As and rules.
  • Use Revise answer in the Inbox to save the correct answer as a Q&A.