WhatsApp සංවාද ස්වයංක්රීයව CRM එකට යවන්න
WhatsApp සංවාද ස්වයංක්රීයව CRM එකට යැවීමට, ඇතුළට එන පණිවිඩ ඔබේ backend එකට හෝ workflow tool එකකට අත්සන් කළ webhook එක ලෙස යවන්න. දුරකථන අංකය අනුව contact එක සොයා ගන්න හෝ සාදන්න, සහ පණිවිඩය එම contact එකේ activity එකක් ලෙස සටහන් කරන්න. WhatsApp message id එක activity එකේ unique key ලෙස භාවිතා කරන්න, එවිට නැවත උත්සාහ කළ delivery එකක් දෙවන record එකක් නොසාදා, එම record එකම යාවත්කාලීන කරයි.
easyCoexistence ඔබ යෙදුමේ තබාගන්නා WhatsApp Business අංකය Coexistence හරහා Meta හි Cloud API වෙත සම්බන්ධ කරයි.
forward කළ POST හි header එකේ delivery id, එම delivery එකේ සෑම retry එකකම එකම වේ.
forward උත්සාහ 7 හි පරාසය, මිනිත්තු 1, 5, 30, 120, 360 සහ 1,440 පමණ පසුව.
Call my webhook step එක ඔබේ URL එක එක් වරක් ඇමතේ; timeout හෝ දෝෂයක් run එක අසාර්ථක කර ඔබට email එකක් යවයි.
Business-scoped user ID, උදා: US.13491208655302741918, user_id සහ from_user_id හි දුරකථන අංකය අසලින් හෝ එය වෙනුවට යවයි.
Automation run log එක trigger කළ පණිවිඩය, පිළිතුර සහ සෑම step එකම කොපමණ කාලයක් තබා ගනීද.
ඇති සිදුවීම් CRM වෙත යා යුත්තේ මොනවාද?
Coexistence අංකයක සංවාදයක් කොටස් තුනකින් සමන්විත වන අතර, මාර්ග දෙකක් ඒවා රැගෙන යයි. අංකයකට වෙන්ව සකසන Forward URL එක, ගනුදෙනුකරුවන් ලියන දේ සහ ඔබේ කණ්ඩායම WhatsApp Business යෙදුමේ ටයිප් කරන දේ, Meta හි මුල් events ලෙස යවයි; CRM එක පිළිතුරු දෙන තුරු නැවත උත්සාහ කරයි. Automations මගින් යවන පිළිතුරු API හරහා Meta වෙත යන අතර, ඒවා පෙළ නොමැති delivery status ලෙස පමණක් වාර්තා කරයි. ඒවායේ වචන සටහන් කිරීමට automation එක Call my webhook step එකකින් අවසන් කරන්න, එහි history එකේ run එක යැවූ පිළිතුර අඩංගු වේ. එක endpoint එකකටම දෙකම ගත හැක: X-EC-Event header එක step සඳහා automation.step ද, forward සඳහා Meta හි field name ද කියවයි.
WhatsApp යවන්නා CRM contact එකට ගැලපෙන්නේ කෙසේද?
දුරකථන අංකය අනුව, සාමාන්යකරණය කර. WhatsApp රට කේතය සහිත ඉලක්කම් ඉදිරි plus ලකුණක් නොමැතිව යවයි, උදා: 5511987654321, forward වල messages[].from හි සහ webhook step හි contact.wa_id හි. මිනිසුන් ටයිප් කළ CRM වාර්තා +55 11 98765-4321 හෝ (11) 98765-4321 දරයි, එබැවින් ඉලක්කම් පමණක් අඩංගු ආකාරයෙන් වෙනම property එකක් තබාගෙන එය මත සොයන්න. ගැලපීමක් නොමැති නම්, WhatsApp profile නම සහ අංකය සමඟ contact එක සාදන්න.
ඔබේ WhatsApp username සහිත, දින 30 ක් ඔබේ අංකය හා සම්බන්ධ නොවූ පරිශීලකයෙකු එන්නේ from_user_id සහ contacts[].user_id හි BSUID පමණක් සමඟ විය හැක. Forward වලට එය ඇත; webhook step එකට දුරකථන අංකය ඇත. එබැවින් business-scoped user ID එකද තබා ගන්න.
සෑම CRM වාර්තාවකම කුමක් තිබිය යුතුද?
Identifiers සහිත contact එකක්, සහ පණිවිඩයකට එක activity එකක්, direction, පෙළ, වේලාව සහ unique key සහිතව. පහත සිතියම දෙමාර්ගයේම එක් එක් අගය පිහිටන ස්ථානය පෙන්වයි. Forward වල පණිවිඩ වේලාවන් Meta වෙතින් Unix seconds ය; webhook step ISO දිනයන් යවයි. මාධ්ය forward වල type සහ id ලෙසත්, webhook step හි [image] වැනි placeholder සහ caption ලෙසත් පැමිණේ, එබැවින් ගොනුව ගබඩා කිරීමට උත්සාහ නොකර කෙටි label එකක් සටහන් කරන්න.
| Forwarded event (value is Meta's) | Call my webhook step | |
|---|---|---|
| Contact phone | messages[].from | contact.wa_id |
| Contact name | contacts[].profile.name | contact.name |
| BSUID | contacts[].user_id, messages[].from_user_id | Not sent |
| Activity text | text.body, or the media type | message.text and history[].text |
| Direction | messages = in, smb_message_echoes = out | history[].direction: in, out or echo |
| Time | timestamp, Unix seconds | message.at and history[].at, ISO 8601 |
| Unique key | messages[].id (wamid) | message.id; run_id for history entries |
නැවත යැවීම් අනුපිටපත් සාදනවා වළක්වන්නේ කෙසේද?
වේගයෙන් පිළිතුරු දෙන්න, ඉන්පසු සෑම දෙයක්ම යතුරු කරන්න. තත්පර 10 ඇතුළත 2xx නොලැබෙන forward එකක් එකම X-EC-Delivery id සමඟ උපරිම උත්සාහ 7 දක්වා නැවත යවනු ලැබේ; තත්පර 12 ගන්නා CRM ඇමතුමක් එබැවින්, activity එක wamid මත upsert කර නොතිබේ නම් දෙවරක් ධාවනය වේ. පළමුව 200 පිළිතුර දී, CRM වැඩ queue එකක හෝ background job එකකින් කරන්න.
Webhook step එක නැවත යවන්නේ නැත, සහ Meta හි තමන්ගේම නැවත එවීම් automation ධාවනයට පෙර පෙරා දමයි; එබැවින් එය පණිවිඩයකට උපරිම වශයෙන් එක් වරක් ඔබට ඇමතේ. එහි history ඇතුළත් වලට message id නැත: ස්වයංක්රීය පිළිතුරු run_id සහ ඒවායේ පිහිටීම මත යතුරු කරන්න. Try it වෙතින් පරීක්ෂා dry_run true සහ නියැදි contact 15550000000 සමඟ පැමිණේ; ඒවා මඟහරින්න, එවිට පරීක්ෂා ධාවන කිසිදා CRM වාර්තා නොසාදයි.
Node.js හි receiver එක කෙසේ පෙනේද?
එක Express route එකකින් events වර්ග දෙකම ගැනේ. එය raw body කියවා, X-EC-Event header අනුව රහස් යතුර තෝරා, X-EC-Signature සත්යාපනය කර, වහාම 200 පිළිතුරු දෙන අතර වැඩ background function එකට භාර දෙයි. crm object එක ඔබේ CRM හි API client එක නියෝජනය කරයි: digits-only දුරකථන අංකය මත contact එකේ upsert එකක් සහ එහි unique key මත activity එකේ upsert එකක්. එම ආකෘතියම n8n workflow එකකටද වැඩ කරයි, අත්සන සඳහා Code node එකක් සහ ඉන් පසු ඔබේ CRM හි nodes සමඟ.
import express from "express";
import crypto from "node:crypto";
const FORWARD_SECRET = process.env.EC_FORWARD_SECRET; // the number's, shown once with the Forward URL
const STEP_SECRET = process.env.EC_STEP_SECRET; // the automation's Signing secret
function signed(req, secret) {
const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(req.get("X-EC-Signature") || "");
if (!m || Math.abs(Date.now() / 1000 - Number(m[1])) > 300) return false;
const mac = crypto.createHmac("sha256", secret).update(m[1] + "." + req.body).digest();
return crypto.timingSafeEqual(mac, Buffer.from(m[2], "hex"));
}
const app = express();
app.post("/whatsapp/crm", express.text({ type: "application/json" }), (req, res) => {
const kind = req.get("X-EC-Event"); // automation.step, or Meta's field name for a forward
if (!signed(req, kind === "automation.step" ? STEP_SECRET : FORWARD_SECRET)) return res.status(401).end();
res.json({}); // no reply field: nothing is sent to the customer
handle(kind, JSON.parse(req.body)).catch(console.error);
});
async function handle(kind, body) {
if (kind === "messages") {
for (const m of body.value.messages ?? []) { // statuses are skipped
const c = (body.value.contacts ?? []).find((x) => x.wa_id === m.from);
const contact = await crm.upsertContact({ phone: m.from, bsuid: m.from_user_id, name: c?.profile?.name });
await crm.upsertActivity({ key: m.id, contact, direction: "in", text: m.text?.body ?? "[" + m.type + "]", at: new Date(m.timestamp * 1000) });
}
} else if (kind === "smb_message_echoes") {
for (const m of body.value.message_echoes ?? []) {
const contact = await crm.upsertContact({ phone: m.to, bsuid: m.to_user_id });
await crm.upsertActivity({ key: m.id, contact, direction: "out", text: m.text?.body ?? "[" + m.type + "]", at: new Date(m.timestamp * 1000) });
}
} else if (kind === "automation.step" && !body.dry_run) {
const contact = await crm.upsertContact({ phone: body.contact.wa_id, name: body.contact.name });
const sentAfter = body.history.filter((h) => h.direction === "out" && h.at >= body.message.at);
for (const [i, h] of sentAfter.entries()) {
await crm.upsertActivity({ key: body.run_id + ":" + i, contact, direction: "out", text: h.text, at: new Date(h.at) });
}
}
}
app.listen(3000);CRM එකට AI ඉගත් දේ අනුව lead යාවත්කාලීන කළ හැකිද?
ඔව්, ඔබේ workflow එකේ. Call my webhook step එකක් සමඟ පැමිණෙන chat එකේ ඔබේ AI විමසූ ප්රශ්න සහ ගනුදෙනුකරුගේ පිළිතුරු ඇත, එබැවින් n8n හි model node එකක් හෝ ඔබේ backend හි call එකක් need, budget, timing හෝ location උපුටා ගෙන lead හි fields වලට ලිවිය හැකි අතර පසුව එහි stage එක ගෙන යා හැක. පිළිතුරක් ආපසු නොයවන්න, මන්ද ගනුදෙනුකරුට දැනටමත් AI හි පණිවිඩය ඇත. Workflow එක lead එකක් call කිරීමට වටින බව තීරණය කළ විට, විකුණුම්කරුවෙකුට task එකක් සාදා හෝ කණ්ඩායමට අනතුරු ඇඟවීමක් යවයි. නැතහොත් උපුටා ගැනීම easyCoexistence ටම භාර දෙන්න: agent එකක් හෝ an AI saves details step එකක් need, budget සහ timing contact හි fields වලට ලියයි, සහ Call an API step එකකට ඒවා එහි body එකේ {{contact.budget}} වැනි tokens සමඟ ඔබේ CRM වෙත post කළ හැක. Lead qualification පිටුවේ එම සැකසුම සඳහා interview උපදෙස් සහ payload ඇත.
එය සකසන ආකාරය
- Send the number's messages through easyCoexistenceOn the number's page, the Where incoming messages go card must be set to Through easyCoexistence; choose it if it shows Straight to your system.
- Deploy the receiverPublish the endpoint or n8n workflow on public HTTPS, with the CRM upserts keyed on the phone and the message id.
- Save the Forward URLPaste the receiver's URL into Forward URL (optional), click Save forward URL and store the signing secret shown once.
- Log automated repliesIn each automation that replies, add Call my webhook as the last step with the same URL, save, and copy that automation's Signing secret.
- Check one real conversationWrite to the number from another phone, let the automation answer, reply from the app, and confirm three activities on the contact: in, automated out and phone out.
සාමාන්ය වැරදි
- නිදහස් පෙළ දුරකථන field එකෙන් CRM හි සොයා බැලීම. WhatsApp හි ඉලක්කම් පමණක් ඇති ආකෘතිය බොහෝ විට පුද්ගලයෙකු ටයිප් කළ දෙයට නොගැලපෙන අතර, සෑම නොගැලපීමක්ම අනුපිටපත් contact එකක් සාදයි; සාමාන්යකරණය කළ ඉලක්කම් පමණක් property එකෙන් සොයන්න.
- Forward එකට පිළිතුරු දීමට පෙර CRM ඇමතීම. තත්පර 10 ට වඩා ගත වන CRM එකක් නිසා easyCoexistence නැවත උත්සාහ කරයි, සහ wamid මත upsert නොමැතිව activity එක දෙවරක් සටහන් වේ.
- Forward පමණක් සටහන් කර ස්වයංක්රීය පිළිතුරු එහි අපේක්ෂා කිරීම. API යැවීම් පෙළ නැති statuses ලෙස ආපසු එයි; පිළිතුරෙන් පසු Call my webhook step එකක් වචන රැගෙන යයි.
- පරීක්ෂා CRM වෙත යාමට ඉඩ දීම. Try it සැබවින්ම dry_run true සහ නියැදි contact 15550000000 සමඟ ඔබේ URL එක ඇමතේ; කිසිම upsert එකකට පෙර එම events අත්හරින්න.
එහි Forward URL එක ගනුදෙනුකරු පණිවිඩ සහ දුරකථන පිළිතුරු Meta හි මුල් events ලෙස ඔබේ CRM වෙත යවන අතර, අංකයකට වෙන්ව අත්සන් කර, CRM එක බිඳ වැටුණු විට පැය 33 ක් පමණ නැවත උත්සාහ කරයි; Call my webhook step එක ස්වයංක්රීය පිළිතුරු එකතු කරයි. Forwarding සහ automations සැලසුමට ඇතුළත් වේ. අංකයකට මාසිකව US$ 9 සිට US$ 0.75 දක්වා, අංක එකතු කරන විට පහත වැටෙයි, පළමු දින 3 නොමිලේ.
නිතර අසන ප්රශ්න
මේ වැඩ කරන CRM මොනවාද?
API ඇති ඕනෑම CRM එකක්, ඔබේම backend එක හරහා හෝ n8n, Make හෝ Zapier වැනි workflow tool එකක් හරහා, එයට nodes ඇති විට. HubSpot හි Communications object එකක් ඇති අතර, මෙම පණිවිඩ සටහන් කිරීමට ගොඩනගන ලද WhatsApp channel type එකක් ඇත; HubSpot පිටුවේ ඇමතුම පෙන්වයි.
ගනුදෙනුකරුවන්ට CRM එකෙන් මගේ කණ්ඩායමට පිළිතුරු දිය හැකිද?
CRM එක Meta හි Cloud API හරහා, අංකයේ send endpoint සහ get_api_credentials වෙතින් token එක සමඟ යැවුවොත් පමණි: ගනුදෙනුකරුගේ අවසාන පණිවිඩයෙන් පැය 24 තුළ නිදහස් පෙළ, ඉන් පසු අනුමත template එකක්. එම පණිවිඩ යෙදුමේ දුරකථනයේ chat thread එකේද දිස් වේ.
පැරණි සංවාද CRM වෙත පැටවිය හැකිද?
Meta හි history import හරහා පමණි, එය සම්බන්ධ කිරීමෙන් පැය 24 ඇතුළත ගබඩා කළ direct webhook destination එකකට එක්-එක් chats මාස 6 දක්වා යවයි, සම්බන්ධතාවයකට එක් වරක්. Through easyCoexistence ලෙස සැකසූ අංකයක් forwarding ආරම්භ වූ මොහොතේ සිට පමණක් සටහන් කරයි.
easyCoexistence මාර්ගය දිගේ කුමක් තබාගනීද?
Forward කළ වෙනස්කම් නැවත උත්සාහ සඳහා පෝලිමේ තබා දින 7 කට පසු ඉවත් කෙරේ. easyCoexistence හරහා යන අංකයක, පණිවිඩ පෙළ Conversations සහ AI සන්දර්භය සඳහා ඔබ තෝරන කාලය, දින 30, 90 හෝ 365 ක් ද රැඳේ, run logs දින 30 ක් තබාගනී. ස්ථිර වාර්තාව CRM එකේ ඇත.
තවදුරටත් කියවන්න
ආරම්භ කිරීමට සූදානම්ද?
WhatsApp Coexistence මිනිත්තු කිහිපයකින් සකසන්න, මාස ගණනකින් නොව. යෙදුම දුරකථනයේ දිගටම ක්රියා කරයි.
නොමිලේ trial කාලය ආරම්භ කරන්නසත්යාපනය කළේ