How to set up your first AI sales agent on WhatsApp
A step-by-step walkthrough of connecting WhatsApp Business and training an agent to handle product questions and orders.
Getting your WhatsApp Business account connected to Opsfly takes about 15 minutes. First, make sure you have a verified WhatsApp Business API number — this is different from the regular WhatsApp Business app. Once you have that, head to Opsfly Builder, open the Connectors tab, and select WhatsApp. You'll be asked to paste in your phone number ID, business account ID, and API token from the Meta developer dashboard. Opsfly will send a test message to confirm the connection is live.
The next step is writing your agent's system prompt — this is the instructions that tell the AI how to behave. Think of it as writing a job description for a very literal employee. You want to specify: what products you sell, your pricing, your delivery areas, what happens if a product is out of stock, and how to handle complaints. The more specific you are here, the fewer mistakes the agent will make. A good starting prompt is 3–5 paragraphs, covers your most common customer questions, and ends with a fallback instruction for anything the agent can't answer.
Once your prompt is set, run a few test conversations before going live. Try asking it things your real customers ask — product availability, delivery time to specific areas, payment methods, return policies. Look for any answers that are wrong, outdated, or too generic, and update your system prompt accordingly. When you're satisfied, flip the agent to 'Live' in Builder. From that point, every message your customers send to your WhatsApp number will be handled by the agent first, with full conversation logs available in your Opsfly Console.
A few things to keep in mind after you go live: check your Console inbox daily for the first week to catch any conversations the agent mishandled. Set up a handoff rule so that if a customer says 'agent' or 'human', the conversation gets flagged for you to take over manually. Your automation rate — visible in Console analytics — should stabilize around 80–90% within the first two weeks as the agent learns your common patterns.