WhatsApp multi-agent chat link
One link that sends each visitor to one of several team numbers in turn.
FreeRuns in your browserNo signupUpdated 2026-11-05
Team (3)
People in the rotation
3
all numbers valid
Method
Random
evens out over many visitors
| Person | Share of chats | Direct link |
|---|---|---|
| Asha | 33% | wa.me/919876543210 |
| Omar | 33% | wa.me/971501234567 |
| Priya | 33% | wa.me/919123456789 |
https://www.example.com/whatsapp.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>Opening WhatsApp…</title>
<style>body{font:16px/1.5 system-ui,sans-serif;max-width:32rem;margin:15vh auto;padding:0 1rem;text-align:center}a{color:#128c7e}</style>
</head>
<body>
<p>Opening WhatsApp…</p>
<p id="fallback"></p>
<noscript>
<p>Choose who to chat with:</p>
<p><a href="https://wa.me/919876543210?text=Hi%20Asha%2C%20I%20found%20you%20through%20your%20website%20and%20have%20a%20question.">Asha</a></p>
<p><a href="https://wa.me/971501234567?text=Hi%20Omar%2C%20I%20found%20you%20through%20your%20website%20and%20have%20a%20question.">Omar</a></p>
<p><a href="https://wa.me/919123456789?text=Hi%20Priya%2C%20I%20found%20you%20through%20your%20website%20and%20have%20a%20question.">Priya</a></p>
</noscript>
<script>
(function () {
var agents = [
{ name: "Asha", number: "919876543210", weight: 1 },
{ name: "Omar", number: "971501234567", weight: 1 },
{ name: "Priya", number: "919123456789", weight: 1 }
];
var message = "Hi {name}, I found you through your website and have a question.";
var sticky = true;
var key = "wa-agent";
function pickAgent() {
if (sticky) {
try {
var saved = localStorage.getItem(key);
for (var i = 0; i < agents.length; i++) if (agents[i].number === saved) return agents[i];
} catch (e) {}
}
var total = 0;
for (var j = 0; j < agents.length; j++) total += agents[j].weight;
var r = Math.random() * total;
var pick = agents[agents.length - 1];
for (var k = 0; k < agents.length; k++) {
r -= agents[k].weight;
if (r < 0) { pick = agents[k]; break; }
}
if (sticky) { try { localStorage.setItem(key, pick.number); } catch (e) {} }
return pick;
}
function chatUrl(agent) {
var text = message.replace(/\{name\}/g, agent.name);
return "https://wa.me/" + agent.number + (text ? "?text=" + encodeURIComponent(text) : "");
}
var agent = pickAgent();
var url = chatUrl(agent);
var link = document.createElement("a");
link.href = url;
link.textContent = "Tap here to chat with " + agent.name;
var p = document.getElementById("fallback");
p.appendChild(document.createTextNode("If WhatsApp does not open, "));
p.appendChild(link);
window.location.replace(url);
})();
</script>
</body>
</html>Random picking needs no server, but it only evens out over many visitors: three people in a row can reach the same person. For strict turns, use the PHP option.
About this tool
How it works and how to read the result.
Need this done for you?
AI agents & chatbots
AI assistants that answer, act and hand over when needed.
See the serviceWhat it does
A WhatsApp link opens a chat with one number. When several people handle enquiries, you want one link on your website, ads and printed material that shares the chats between them. This tool writes that link for you as code you host, because a static link cannot choose between numbers by itself.
There are three outputs. A standalone page (whatsapp.html) picks a person and forwards the visitor to WhatsApp; upload it anywhere and use its address as your link. A button script does the same inside a page on your existing site. A PHP file keeps a small counter on your server and gives each new visitor the next person in turn, which needs hosting that runs PHP.
How to use it
- Add each person's name and WhatsApp number. Weight sets their share: a weight of 2 gets twice as many chats as a weight of 1.
- Write the opening message.
{name}is replaced with the person's name, so the customer sees "Hi Omar, …". - Choose how it picks: static page, button script or PHP file.
- Enter your website address so the tool can show the final link, or the button text for the script.
- Download the file, upload it, then open the link a few times to check every number works.
How to read the result
The table shows each person's share of chats and a direct link for testing. A red badge means the number is missing its country code or has the wrong number of digits; that person is left out of the code until it is fixed.
"Method" tells you what to expect. Random picking is fair over hundreds of visitors, but over ten it can easily send four to one person and two to another. If fairness over short runs matters, for example on commission, use the PHP file. Its counter is a small text file next to the script, so the folder must be writable by PHP.
"Send a returning visitor to the same person" is on by default. Turn it off if you would rather spread every click.
For a single-number link, use the WhatsApp link generator. This approach shares chats across separate phones. If you would rather have one business number answered by a team, with the conversation history in one place, that is a shared inbox on the WhatsApp Business Platform, often with an AI assistant answering first. We set those up as part of our AI agent and chatbot work.
Questions
Frequently asked.
Can one wa.me link rotate between numbers on its own?
No. A wa.me link always opens a chat with the single number inside it. To share chats between people, something has to choose the number when the visitor clicks. That is what the code from this tool does, on a page or file you host yourself.
Why is the static option random rather than in strict turns?
Taking turns needs a counter that every visitor shares, and a plain HTML page runs separately in each visitor's browser, so it cannot keep one. Random picking with weights evens out over many visitors. If you need strict turns, use the PHP option, which keeps the counter on your server.
What does sending returning visitors to the same person do?
It remembers which person a visitor was given, in their browser for the page and button options or in a cookie for the PHP option, and sends them to the same number next time. Customers then carry on with the person they spoke to before instead of starting again with someone new.
More in Links & embeds
Related tools.
Your next move
Like what you see? Tell us about it.
A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.
India · Working with clients worldwide