- An AI agent that only answers from a knowledge base is useful; one that can act inside your systems (book, look up, record) saves real work.
- In Klamna you connect the AI agent on WhatsApp and on voice calls to your own systems through "API actions": each action has a description, inputs and a URL in your system.
- Every action has a mode: automatic, needs approval, or off.
- Once you create a signing secret, every request Klamna sends is signed, so your system can verify it really came from us and was not altered.
Most companies that tried a chatbot hit the same wall: it answers general questions well, but the moment a customer says "I want to book" or "where is my order?" it replies "let me transfer you to an agent". The reason is simple: the bot cannot see your systems. That is what it means to connect AI to your own systems: the AI agent talks directly to your booking system, order system or ERP and completes the request instead of passing it on.
This guide explains what API actions are in Klamna, how they work in WhatsApp chats and voice calls, what your developer needs to prepare, and how to set up security and approvals so the AI never does something you did not intend. The feature itself is described on the AI agent API actions page.
What does connecting AI to your own systems mean?
You give the AI agent a set of "actions". Each action is one specific thing it may do in your system: "book an appointment", "show order status", "create a ticket", "register a lead". For each action you define:
- A name and clear description: when the agent should use it, e.g. "when the customer asks to book a check-up".
- Required inputs: name, mobile number, branch, date and time, order number. The agent collects them naturally before acting.
- The URL in your system: an HTTPS endpoint that receives a JSON request and returns the result.
- The mode: automatic, needs approval, or off.
When the agent needs an action, Klamna sends the request to your system, your system returns the result ("booked, reference X" or "that slot is taken, these are free"), and the agent phrases the answer for the customer. The same actions work with the AI chat agent and with the AI voice receptionist.
Practical examples
A clinic with its own appointment system
Many clinics already run a health information or appointment system and do not want a second one. Define two actions, "list free slots" and "book appointment". A patient writes on WhatsApp at 11 p.m. "I need a dentist next week"; the agent asks for the branch and preferred time, fetches the slots from your system and books. If you use Klamna's own appointments, that works without any code.
A restaurant taking table bookings
"Do you have a table for six on Thursday at nine?" One action checks availability, a second confirms and returns the reference. If the restaurant is full, the agent offers the nearest free time.
A car service centre
A customer calls to book a routine service. The voice agent asks for the car model and plate, checks the workshop schedule and books, and a WhatsApp confirmation follows the call.
A real-estate company arranging viewings
A lead from an ad wants to see a flat. The agent registers the lead in your system and books a viewing with the rep responsible for the project. Approval mode fits well here: the rep confirms before the booking is final.
Stores and distributors: where is my order?
The most repeated question in customer service. An "order status" action sends the order or mobile number to your system and returns the status and expected delivery. See order status on WhatsApp for the full walk-through.
Creating a ticket or record
A complaint? The agent collects the details, opens a ticket in your support system and gives the customer the number. The same goes for leads, quote requests or return requests.
Modes: automatic, needs approval, off
- Automatic for low-risk actions such as order lookups or listing free slots.
- Needs approval: the agent prepares the full request and a member of your team approves or rejects it. Use it for important bookings, cancellations, refunds or anything with a financial commitment.
- Off: the action exists but is not used, handy during testing or busy periods.
We recommend running every new action in "needs approval" for a week or two, reviewing what the agent sends, and switching to automatic once you are comfortable.
Security: signed requests and limited scope
- Every request is signed (once you create a signing secret in settings) with an HMAC signature computed from a secret shared between you and Klamna. Your system recomputes it and rejects anything that does not match.
- The agent only sees what you give it: an action sends only the inputs you defined, and your system returns only what the customer should know.
- A log of every call with inputs, result and approver, for review and audit.
- Data in the Kingdom: chats and calls are stored on servers in Saudi Arabia, aligned with NCA cybersecurity requirements and the PDPL. More on the trust page.
What your developer needs to prepare
- An HTTPS endpoint that accepts a JSON POST request.
- Signature verification before any processing; reject wrong or stale signatures.
- A short, fast answer the agent can understand, such as "booked" plus a reference, or a plain reason ("slot not available", "order not found"). Speed matters most on voice calls, where the customer is waiting on the line.
- Readable error messages instead of technical errors, so the agent can explain or hand over.
To pull data from Klamna or receive its events (such as the end of every call), use the API and webhooks; call webhooks are covered in call webhooks and live routing.
Test before going live
Send a test request from inside Klamna, check what your system returns and that the signature verifies. Then run a full conversation as a customer: ask in different ways, mistype the order number, request a taken slot. Review the log and refine the action description where needed. Specific descriptions work best: "book a dental check-up at a Riyadh branch" beats "booking".
Limits to know
- The agent only runs the actions you defined.
- If your system does not answer or returns an error, the agent apologises and hands over to a person instead of guessing.
- Keep sensitive decisions on "needs approval".
- Customers can ask for a human at any time; the conversation moves with full context to the shared inbox.
Frequently asked questions
Do actions work on voice calls or only on WhatsApp?
Both: WhatsApp and other chat channels with the AI agent, and phone calls with the AI voice receptionist.
Do I need to change my current system?
No. You only need an endpoint that receives the request and returns the result; your system remains the source of truth.
How do I know a request came from Klamna?
Each request carries an HMAC signature made with a shared secret. Your system verifies it and rejects anything that does not match.
Can a staff member approve before the action runs?
Yes. Set the action to "needs approval" and the agent waits for your team's decision.
What if my system is down?
The agent tells the customer the request could not be completed and hands over to an agent; the attempt is logged for review.
Want your AI agent to book and act inside your own systems? Talk to us and our well-equipped team will set up and test your first action with you, or sign up now, build your own package and see the price before you pay.
