Coexistence අංකයක Node.js සහ Python හි WhatsApp AI agent එකක් ගොඩනගන්න
අංකයේ පණිවිඩ ලබාගත හැක්කේ ඔබ සත්යාපනය කරන HMAC අත්සනක් (X-EC-Signature) සහිතව යොමු කළ ආකාරයෙන් හෝ URL එකේ රහසක් සහිතව Meta webhook එකෙන් සෘජුවම ය. ඉන්පසු දැනටමත් සකස් කළ ඕනෑම message id එකක් මඟහරින්න, චැට් එකක පුද්ගලයෙක් දුරකථනයෙන් පිළිතුරු දුන් බව echo එකකින් පෙනෙන විට නිශ්ශබ්දව සිටින්න, සහ පාරිභෝගිකයාගේ අවසන් පණිවිඩයෙන් පැය 24ක් ඇතුළත පමණක් ඔබේ මොඩලයේ පිළිතුර Cloud API හරහා යවන්න.
easyCoexistence ව්යාපාරය WhatsApp Business app එකේ භාවිත කරන අංකය Meta හි Cloud API එකට සම්බන්ධ කරයි, get_api_credentials හරහා ඔබේ කේතයට එහි credentials ලබා දෙයි, සහ automations on ඇති විට පණිවිඩ Meta සිට ඔබේ server වෙත සෘජුවම හෝ අත්සන් කළ forward එකක් හරහා මාර්ගගත කරයි.
ඔබේ ඔරලෝසුව සහ අත්සනේ t අතර ඉඩ දිය හැකි උපරිම පරතරය; සෑම retry එකක්ම නව t සමඟ නැවත අත්සන් කෙරේ.
easyCoexistence retry එකක් නියම කිරීමට පෙර, යොමු කළ POST එකකට 2xx සඳහා බලා සිටින කාලය.
Meta, HTTP 200 නොලැබුණු සෘජු webhook එක නැවත උත්සාහ කරන කාලය; එය එකම පණිවිඩය දෙවරක් ලබා දිය හැක.
පරිශීලකයාගේ අවසන් පණිවිඩයෙන් පසු පාරිභෝගික සේවා කවුළුව; ඉන් පිටත Meta පිළිගන්නේ template පණිවිඩ පමණි.
WhatsApp Business app සහ Cloud API යන දෙකම භාවිතා වන අංකයක ස්ථාවර throughput එක.
Coded agent එකකට කුමන මාර්ගය භාවිත කළ යුතුද?
Forwarded යනු අංකය Automations on ප්රකාරයේ පවතී: Meta easyCoexistence වෙත ලබා දෙයි, automations තවමත් ධාවනය විය හැක, සහ සෑම Meta change එකකම අත්සන් කළ පිටපතක් ඔබේ Forward URL එකට යයි. විකල්පයකට forward අවශ්ය නොවේ: automation එකක 'Call my webhook' පියවර මගින් පණිවිඩය ඔබේ endpoint එකට POST කර, ඔබ ආපසු යවන {"reply"} තත්පර 20ක් ඇතුළත යවයි, dedupe, දුරකථන නැවතීම සහ පැය 24 පරීක්ෂාව ඔබ වෙනුවෙන් සිදු කෙරේ.
Direct යනු Meta තමන්ගේම webhook එක set_webhook_destination මගින් සකසන ලද ඔබේ endpoint එකට සෘජුවම යවයි, සහ easyCoexistence පණිවිඩ කිසිවිටක නොදකී. එම අංකය සඳහා Automations අක්රියයි, එබැවින් සෑම ආරක්ෂක පියවරක්ම ඔබේම වගකීමයි, සහ සම්බන්ධ කිරීමෙන් පැය 24ක් ඇතුළත destination සුරකින විට 6-මාසික ඉතිහාස ආනයනයද ඔබේමය. පහත නියැදි තුනම එක් පොදු core එකකින් හසුරුවයි.
| Forwarded, signed | Direct from Meta | |
|---|---|---|
| Number mode | Automations on (managed) | Direct to your server |
| Body | One Meta change: id, event, received_at, connection, value | Meta's envelope: object, entry, changes |
| Authentication | X-EC-Signature, HMAC-SHA256 with a per-number secret | A secret in the URL path |
| Acknowledge | Any 2xx within 10 seconds | HTTP 200; Meta retries other codes |
| Retries | 7 attempts over about 33 hours | Up to 7 days |
| Reply | Graph API, or {"reply"} to a Call my webhook step | Graph API |
| History import | Not requested | Requested if saved within 24 hours of connecting |
Node.js හි agent එක පණිවිඩයක් සමඟ කුමක් කරයිද?
agent.mjs හි ඇත්තේ මාර්ග දෙකම බෙදාගන්නා තර්කනයයි. එය පාරිභෝගිකයාගේ අවසන් පණිවිඩ වේලාව වාර්තා කරයි, smb_message_echoes සිදුවීමක් මගින් WhatsApp Business app එකෙන් කෙනෙකු පිළිතුරු දුන් බව පෙන්වන විට චැට් එකක පැය 4ක් ඉවත් වේ (easyCoexistence automations භාවිත කරන පෙරනිමි ආකාරය), දැනටමත් සකස් කළ message id එකක් මඟහරියි, සහ පැය 24 කවුළුව තුළ පමණක් යවයි. කවුළුව මැනෙන්නේ පණිවිඩයේම timestamp එකෙනි, ඔබ එය ලැබුණු වේලාවෙන් නොවේ, මන්ද retry කළ delivery එකක් පැය ගණනකට පසු පැමිණිය හැක.
පරිශීලකයන් BSUID (from_user_id, හෝ echo වලදී to_user_id) මගින් යතුරු කරනු ලබන අතර දුරකථන අංකය fallback ලෙස භාවිත වේ. BSUID පමණක් දන්නා පරිශීලකයෙකුට to වෙනුවට recipient සමඟ පිළිතුරු දෙයි. Model call එක ඕනෑම OpenAI-compatible chat completions API එකක් භාවිත කරයි; ඔබ කැමති නම් ඔබේ provider හි SDK එකෙන් ප්රතිස්ථාපනය කරන්න.
// agent.mjs: what the agent does with one Meta change, whichever route brought it.
const DAY = 24 * 3600 * 1000;
const PAUSE = 4 * 3600 * 1000; // quiet time after a person replies (automations default to 4 h)
const seen = new Set(); // handled ids: use Redis or your database in production
const lastInbound = new Map(); // user -> ms of their last message
const quietUntil = new Map(); // user -> ms until which a person has the chat
export function firstTime(id) {
if (seen.has(id)) return false;
seen.add(id);
return true;
}
export async function handleChange(field, value) {
if (field === "smb_message_echoes") {
// Someone answered from the WhatsApp Business app: step back on that chat.
for (const e of value.message_echoes ?? []) {
quietUntil.set(e.to_user_id ?? e.to, Number(e.timestamp) * 1000 + PAUSE);
}
return;
}
if (field !== "messages") return; // statuses ride in value.statuses: ignored here
for (const m of value.messages ?? []) {
if (!firstTime(m.id)) continue; // Meta delivered this message before
const user = m.from_user_id ?? m.from; // BSUID first, phone number as fallback
lastInbound.set(user, Math.max(Number(m.timestamp) * 1000, lastInbound.get(user) ?? 0));
if ((quietUntil.get(user) ?? 0) > Date.now()) continue; // a person has this chat
if (m.type !== "text") continue; // media: fetch it by id first (see the FAQ)
const reply = await askModel([{ role: "user", content: m.text.body }]);
if (!reply) continue;
if (Date.now() - lastInbound.get(user) >= DAY) continue; // window closed: template only
await sendText({ phone: m.from, bsuid: m.from_user_id }, reply);
}
}
// Any OpenAI-compatible chat completions API (OpenAI, OpenRouter...).
export async function askModel(turns) {
const res = await fetch(`${process.env.AI_BASE_URL}/chat/completions`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.AI_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
model: process.env.AI_MODEL,
messages: [{ role: "system", content: process.env.AI_INSTRUCTIONS ?? "Answer briefly." }, ...turns],
}),
});
if (!res.ok) throw new Error(`AI provider answered ${res.status}`);
const data = await res.json();
return data.choices?.[0]?.message?.content?.trim() ?? "";
}
// send_endpoint and access_token come from get_api_credentials.
async function sendText({ phone, bsuid }, text) {
const res = await fetch(process.env.SEND_ENDPOINT, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.WA_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
messaging_product: "whatsapp",
recipient_type: "individual",
...(phone ? { to: phone } : { recipient: bsuid }), // a BSUID-only user gets recipient
type: "text",
text: { body: text.slice(0, 4096) },
}),
});
if (!res.ok) throw new Error(`Graph API answered ${res.status}: ${await res.text()}`);
}Node.js හි events කොහොමද verify කර route කරන්නේ?
server.mjs මගින් entry point තුන නිරාවරණය කරයි. /ec/forward මගින් managed අංකවල forwards ලබා ගනී: එය X-EC-Signature raw bytes මත අංකයේ forward secret සමඟ verify කරයි, ඕනෑම වැඩකට පෙර 200 පිළිතුරු දෙයි, සහ දැනටමත් පිළිගත් delivery id එකක් මඟහරියි, මන්ද retry එකක් එකම id එක නව අත්සනක් සමඟ ගෙන යයි. Body හි event යනු Meta හි field name වන අතර value යනු Meta හි change එකයි, වෙනස් නොකර. /ec/agent මගින් Call my webhook පියවරකට පිළිතුරු දෙන අතර, එය එම automation හි Signing secret සමඟ අත්සන් කර ඉතිහාසය chat turns බවට හරවයි. /meta/:secret යනු සෘජු මාර්ගයයි: එය Meta හි GET handshake වලට raw hub.challenge මගින් පිළිතුරු දෙන අතර POST ලබා ගන්නේ secret path එකේ පමණි.
HMAC යතුර whsec_ prefix ඇතුළුව සම්පූර්ණ රහසයි, UTF-8 text ලෙස. express.raw බයිට් නොවෙනස්ව තබයි, සහ එහි 5 MB සීමාව Meta payloads 3 MB දක්වා ඉඩ තබයි.
// server.mjs: Node 18+, npm i express, then node server.mjs
import crypto from "node:crypto";
import express from "express";
import { askModel, firstTime, handleChange } from "./agent.mjs";
const app = express();
// X-EC-Signature: t=<unix>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">, keyed with the whole secret.
export function verifyEc(raw, header, secret, toleranceSec = 300) {
const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(String(header ?? "").trim());
if (!m || !Buffer.isBuffer(raw) || !secret) return false;
if (Math.abs(Date.now() / 1000 - Number(m[1])) > toleranceSec) return false; // stale or replayed
const expected = crypto.createHmac("sha256", secret).update(`${m[1]}.`).update(raw).digest();
return crypto.timingSafeEqual(expected, Buffer.from(m[2], "hex"));
}
function sameSecret(a, b) {
const x = Buffer.from(String(a)), y = Buffer.from(String(b ?? ""));
return x.length === y.length && crypto.timingSafeEqual(x, y);
}
// Route A, forwarded: a managed number's Forward URL. One Meta change per POST.
app.post("/ec/forward", express.raw({ type: "*/*", limit: "5mb" }), (req, res) => {
if (!verifyEc(req.body, req.get("X-EC-Signature"), process.env.EC_FORWARD_SECRET)) return res.sendStatus(401);
res.sendStatus(200); // acknowledge inside 10 s, then work
const d = JSON.parse(req.body.toString("utf8"));
if (!firstTime(`delivery:${d.id}`)) return; // a retry of a delivery already taken
handleChange(d.event, d.value).catch(console.error); // d.event is the Meta field name
});
// Route A, synchronous: a "Call my webhook" step. Answer {"reply"} within 20 s.
app.post("/ec/agent", express.raw({ type: "*/*", limit: "1mb" }), async (req, res) => {
if (!verifyEc(req.body, req.get("X-EC-Signature"), process.env.EC_AUTOMATION_SECRET)) return res.sendStatus(401);
const step = JSON.parse(req.body.toString("utf8"));
const turns = step.history.map((h) => ({ role: h.direction === "in" ? "user" : "assistant", content: h.text }));
while (turns[0]?.role === "assistant") turns.shift();
if (!turns.length) turns.push({ role: "user", content: step.message?.text ?? "" }); // tests carry no history
res.json({ reply: await askModel(turns) }); // step.dry_run is true on "Test it"
});
// Route B, direct: Meta's own envelope. The secret path is the credential.
app.get("/meta/:secret", (req, res) => {
if (!sameSecret(req.params.secret, process.env.PATH_SECRET)) return res.sendStatus(404);
if (req.query["hub.mode"] === "subscribe" && req.query["hub.verify_token"] === process.env.VERIFY_TOKEN) {
return res.type("text/plain").send(String(req.query["hub.challenge"]));
}
res.sendStatus(403);
});
app.post("/meta/:secret", express.json({ limit: "5mb" }), (req, res) => {
if (!sameSecret(req.params.secret, process.env.PATH_SECRET)) return res.sendStatus(404);
res.sendStatus(200); // Meta retries anything but 200
for (const entry of req.body.entry ?? []) {
for (const change of entry.changes ?? []) handleChange(change.field, change.value).catch(console.error);
}
});
app.listen(process.env.PORT ?? 3000);Python හි එම agent එක කෙසේ පෙනේද?
එකම routes තුනත් එකම rules ඇති එක Flask file එකක්. request.get_data() HMAC සඳහා raw body ලබා දෙයි, hmac.compare_digest constant-time සංසන්දනය කරයි, සහ 200 පසු වැඩ background thread එකේ ක්රියාත්මක වන බැවින් easyCoexistence හෝ Meta ඔබේ model එක සඳහා රැඳී නොසිටී. සංවර්ධන කාලයේ flask --app agent run මගින් ධාවනය කර, නිෂ්පාදනයේ gunicorn හෝ වෙනත් WSGI server එකක් පිටුපස ධාවනය කරන්න.
Memory තුළ ඇති set සහ dictionaries එක process එකකට සුදුසුය. Workers කිහිපයක් හෝ instances කිහිපයක් ඇත්නම්, ඒවා Redis හෝ ඔබේ database වෙත ගෙනයන්න, message ids සඳහා expiry සහිත set-if-absent write භාවිතයෙන්, නැතිනම් workers දෙකක් එකම පණිවිඩයට පිළිතුරු දෙයි.
# agent.py: pip install flask requests, then flask --app agent run
import hashlib, hmac, json, os, re, threading, time
import requests
from flask import Flask, abort, request
app = Flask(__name__)
DAY, PAUSE = 24 * 3600, 4 * 3600
seen, last_inbound, quiet_until = set(), {}, {} # use Redis or a database in production
lock = threading.Lock()
def verify_ec(raw: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
m = re.fullmatch(r"t=([0-9]+),v1=([0-9a-f]{64})", (header or "").strip())
if not m or not secret or abs(time.time() - int(m[1])) > tolerance:
return False
expected = hmac.new(secret.encode(), m[1].encode() + b"." + raw, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, m[2])
def first_time(key: str) -> bool:
with lock:
if key in seen:
return False
seen.add(key)
return True
def ask_model(turns: list) -> str: # any OpenAI-compatible chat completions API
r = requests.post(f"{os.environ['AI_BASE_URL']}/chat/completions", timeout=30,
headers={"Authorization": f"Bearer {os.environ['AI_KEY']}"},
json={"model": os.environ["AI_MODEL"], "messages": [
{"role": "system", "content": os.environ.get("AI_INSTRUCTIONS", "Answer briefly.")}, *turns]})
r.raise_for_status()
return (r.json()["choices"][0]["message"]["content"] or "").strip()
def send_text(phone, bsuid, text: str) -> None: # SEND_ENDPOINT and WA_TOKEN: get_api_credentials
to = {"to": phone} if phone else {"recipient": bsuid}
r = requests.post(os.environ["SEND_ENDPOINT"], timeout=15,
headers={"Authorization": f"Bearer {os.environ['WA_TOKEN']}"},
json={"messaging_product": "whatsapp", "recipient_type": "individual", **to,
"type": "text", "text": {"body": text[:4096]}})
r.raise_for_status()
def handle_change(field: str, value: dict) -> None:
if field == "smb_message_echoes": # a person answered from the app: step back
for e in value.get("message_echoes", []):
quiet_until[e.get("to_user_id") or e.get("to")] = int(e["timestamp"]) + PAUSE
return
if field != "messages":
return
for m in value.get("messages", []):
if not first_time(m["id"]): # Meta delivered this message before
continue
user = m.get("from_user_id") or m.get("from")
last_inbound[user] = max(int(m["timestamp"]), last_inbound.get(user, 0))
if quiet_until.get(user, 0) > time.time() or m.get("type") != "text":
continue
reply = ask_model([{"role": "user", "content": m["text"]["body"]}])
if reply and time.time() - last_inbound[user] < DAY: # past 24 h: template only
send_text(m.get("from"), m.get("from_user_id"), reply)
def later(field, value):
threading.Thread(target=handle_change, args=(field, value), daemon=True).start()
@app.post("/ec/forward") # route A: a managed number's Forward URL
def forward():
raw = request.get_data()
if not verify_ec(raw, request.headers.get("X-EC-Signature", ""), os.environ["EC_FORWARD_SECRET"]):
abort(401)
d = json.loads(raw)
if first_time("delivery:" + d["id"]): # skip retries of a delivery already taken
later(d["event"], d["value"])
return "", 200
@app.post("/ec/agent") # route A: a "Call my webhook" step, answer within 20 s
def agent_step():
raw = request.get_data()
if not verify_ec(raw, request.headers.get("X-EC-Signature", ""), os.environ["EC_AUTOMATION_SECRET"]):
abort(401)
step = json.loads(raw)
turns = [{"role": "user" if h["direction"] == "in" else "assistant", "content": h["text"]}
for h in step["history"]]
while turns and turns[0]["role"] == "assistant":
turns.pop(0)
turns = turns or [{"role": "user", "content": step["message"]["text"] or ""}]
return {"reply": ask_model(turns)}
@app.get("/meta/<secret>") # route B: Meta's GET handshake
def meta_handshake(secret):
if not hmac.compare_digest(secret.encode(), os.environ["PATH_SECRET"].encode()):
abort(404)
if (request.args.get("hub.mode") == "subscribe"
and request.args.get("hub.verify_token") == os.environ["VERIFY_TOKEN"]):
return request.args.get("hub.challenge", ""), 200, {"Content-Type": "text/plain"}
abort(403)
@app.post("/meta/<secret>") # route B: Meta's envelope, straight from Meta
def meta_events(secret):
if not hmac.compare_digest(secret.encode(), os.environ["PATH_SECRET"].encode()):
abort(404)
for entry in (request.get_json(silent=True) or {}).get("entry", []):
for change in entry.get("changes", []):
later(change.get("field"), change.get("value", {}))
return "", 200Duplicate පිළිතුරු කෙසේ මඟහරවාගන්නේද?
අනුපිටපත් හයක් සාමාන්ය හේතු ඇත, සහ ඉහත නියැදි පළමු පහ හසුරුවයි:
- Meta හි retries. සෘජු webhook එකක් HTTP 200 හැර වෙනත් ඕනෑම දෙයකට පසු දින 7ක් දක්වා නැවත උත්සාහ කෙරේ; message ids තබාගෙන දැනටමත් සකස් කළ ids මඟහරින්න.
- Forward retries. easyCoexistence 2xx නොලැබුණු delivery එකක් තත්පර 10ක් ඇතුළත එකම id එක සමඟ නැවත උත්සාහ කරයි; දැනටමත් පිළිගත් ids මඟහරින්න, ඉන්පසු message id මත dedupe කරන්න, මන්ද Meta නැවත යවන change එකක් නව id එකක් යටතේ නැවත forward වේ.
- මන්දගාමී පිළිගැනීම්. පළමුව පිළිතුරු දී පසුව වැඩ කරන්න; model එක බලා සිටින handler එක timeout වන අතර එම සිදුවීම නැවත පැමිණේ.
- දුරකථනයේ සිටින පුද්ගලයා.
smb_message_echoesසිදුවීමක් යනු කෙනෙකු app එකෙන් පිළිතුරු දුන් බවයි; එම චැට් එකේ පැය කිහිපයක් නිශ්ශබ්දව සිටින්න. - Workers කිහිපයක්. In-memory sets process මායිම් පසු නොකරයි; stores Redis හෝ ඔබේ database වෙත ගෙනයන්න.
- Responders දෙදෙනෙක්. AI-reply automation එකක් සහ ඔබේම agent එක එකම චැට් වලට පිළිතුරු දෙයි, සහ ඔබේ Graph API යැවීම් echoes නොවන බැවින් automations නවත්වන්නේ නැත. අංකයකට responder එකක් පමණක් තෝරන්න.
රහස්ය තොරතුරු සහ credentials කොතැනින් ලැබේද?
dashboard එකෙන් හෝ MCP connector එකෙන්, සහ ඒවා ඔබේ server එකේ environment එකේ පමණක් තිබිය යුතුය. get_api_credentials මගින් graph_api_base, waba_id, phone_number_id, send_endpoint සහ access_token ලබා දෙයි, එය ව්යාපාරයේම token එකයි; අංකයේ පිටුව Plug in your own system යටතේ එම අගයන්ම පෙන්වයි. access_token null නම්, Reconnect භාවිතයෙන් පරිගණකයකින් අංකය නැවත සම්බන්ධ කර token එකක් නිකුත් කරන්න. Token එක මුරපදයක් සේ සලකන්න, මන්ද එය දරන ඕනෑම කෙනෙකුට ව්යාපාරය වෙනුවෙන් පණිවිඩ යැවිය හැක.
සාමාන්ය වැරදි
- JSON නැවත serialize කළ දත්ත මත HMAC පරීක්ෂා කිරීම. Python හි json.dumps පෙරනිමියෙන් separators වලින් පසු spaces එකතු කරයි, එබැවින් නැවත parse කර dump කළ body එක තවදුරටත් නොගැලපේ; raw bytes verify කරන්න.
- රහස Base64 decode කිරීම හෝ whsec_ prefix අයින් කිරීම. යතුර UTF-8 text ලෙස සම්පූර්ණ string එකයි, ඔබට එක් වරක් පෙන්වූ ආකාරයටම.
- Direct route එකේ X-Hub-Signature-256 ඔබේම Meta app secret සමඟ පරීක්ෂා කිරීම. Meta easyCoexistence හි app secret සමඟ අත්සන් කරයි, එය බෙදාගෙන නැත, එබැවින් සැබෑ සිදුවීම් අසාර්ථක වේ; path secret සමඟ සත්යාපනය කරන්න.
- කවුළුව ලැබීමේ වේලාවෙන් කියවීම. පැය ගණනකට පසු retry කළ forward එකක් තවමත් Meta හි මුල් timestamp එක රඳවාගෙන සිටී; ඒ හා සංසන්දනය කරන්න, නැතිනම් agent එක පැය 24 කට පසු පිළිතුරු දෙන අතර Meta යැවීම ප්රතික්ෂේප කරයි.
සෑම අංකයක්ම පැය 24 අධීක්ෂණය කෙරේ, සම්බන්ධතාවය බිඳ වැටුණු විට අනතුරු ඇඟවීම් සහිතව. අංකයකට මාසිකව US$ 9 සිට US$ 0.75 දක්වා පහත වැටෙයි, අංක එකතු කරන විට, පළමු දින 3 නොමිලේ trial කාලය සමඟ.
නිතර අසන ප්රශ්න
Agent එකට voice notes සහ photos තේරුම් ගත හැකිද?
ඔව්, ඔබේම කේතය සමඟ. Meta payload එකේ media id එක ඇත: GET /<media-id> සහ අංකයේ token සමඟ බාගන්න, ලැබුණු URL එක එම Authorization header සමඟ ලබාගෙන, ඉන්පසු ඔබේ model සමඟ transcribe හෝ විස්තර කරන්න. Automations දකින්නේ [voice message] වැනි placeholders පමණි.
Samples වලට කුමන models භාවිත කළ හැකිද?
OpenAI-compatible chat completions endpoint එකක් පිටුපස ඇති ඕනෑම model එකක්, OpenAI හි ඒවා සහ OpenRouter හරහා ළඟා වන ඒවා ඇතුළුව. නැතහොත් askModel සහ ask_model ඔබේ provider හි SDK එකෙන් ප්රතිස්ථාපනය කරන්න. easyCoexistence කිසිවිටක AI සඳහා බිල් නොකරයි: ඔබේ provider ඔබට කෙලින්ම බිල් කරයි.
Agent එකට සංවාදයක් ආරම්භ කළ හැකිද?
අනුමත template එකක් සමඟ පමණි, එම send endpoint වෙත type template සමඟ යවන ලද. Coexistence අංකයක templates යවන්නේ API හරහා පමණි, දුරකථන app එකෙන් කිසිවිටක නොවේ, සහ Meta ඒවා ව්යාපාරයේම WhatsApp Business Account එකට පණිවිඩයකට බිල් කරයි.
එක agent එකක් අංක කිහිපයකට සේවය කළ හැකිද?
ඔව්. value.metadata.phone_number_id හෝ connection.phone_number_id අනුව route කරන්න, සහ අංකයකට send endpoint එකක්, token එකක් සහ forward secret එකක් තබාගන්න, මන්ද සෑම අංකයකටම ඒවා තමන්ගේම ය.
තවදුරටත් කියවන්න
ආරම්භ කිරීමට සූදානම්ද?
WhatsApp Coexistence මිනිත්තු කිහිපයකින් සකසන්න, මාස ගණනකින් නොව. යෙදුම දුරකථනයේ දිගටම ක්රියා කරයි.
නොමිලේ trial කාලය ආරම්භ කරන්නසත්යාපනය කළේ