WordPress 如何用 Webhook、CRM 和聊天機械人促成家居服務訂單
WordPress Lead Automation That Actually Books Jobs: Webhooks, CRM, and Chatbots
作者分享一套面向家居服務承辦商的 WordPress 潛在客戶自動化流程,將聊天機械人收集的服務、地點和時間資料經 Webhook 傳至 CRM。流程要求兩分鐘內發送 SMS,並在 30 分鐘及 24 小時仍未聯絡客戶時自動跟進;Webhook 失敗則記錄錯誤並通知管理員。CRM 加 SMS 每月約 $100–300,並可用來源標記和通話追蹤核算聊天機械人帶來的估價預約及成交。
WordPress Lead Automation That Actually Books Jobs: Webhooks, CRM, and Chatbots
Most WordPress "lead automation" I see is a contact form that emails the site owner and dies there. The email gets buried, the prospect waits, and by morning they've called whoever answered first.
Here's the stack I actually deploy for home-service contractors (pool builders, HVAC, roofers) — the ones where a missed after-hours call is a $5,000 job walking away. Every piece is boring, proven tech. No AI hype required, though there's a chatbot at the front door.
The architecture
Visitor → AI chatbot (qualify + capture) → WordPress → Webhook → CRM → Follow-up sequence
↓
Call tracking + attribution
Four layers. Each one does exactly one job.
Layer 1: The chatbot (front door)
The chatbot isn't there to be clever. It does three things:
- Greets every visitor (proactive — not a passive bubble waiting to be clicked)
- Asks 3 qualifying questions: service needed, location, timeline
- Captures name + phone, then hands off
The key technical decision: the chatbot must be trained on the site's own content — services, service areas, pricing pages — not running off a generic script. A generic bot answering "we do plumbing" when the visitor asked about trenchless sewer line replacement in Plano is worse than no bot.
On WordPress this is usually a single script tag in the footer. The bot posts its captured lead to a webhook endpoint — which brings us to layer 2.
Layer 2: WordPress receives and routes (the webhook)
Don't let form/chatbot data sit in a plugin's database. The moment a lead arrives, WordPress should push it out via webhook. In your theme's functions.php or a small custom plugin:
add_action('wp_ajax_nopriv_chatbot_lead', 'route_chatbot_lead');
add_action('wp_ajax_chatbot_lead', 'route_chatbot_lead');
function route_chatbot_lead() {
$lead = array(
'name' => sanitize_text_field($_POST['name']),
'phone' => sanitize_text_field($_POST['phone']),
'service' => sanitize_text_field($_POST['service']),
'location' => sanitize_text_field($_POST['location']),
'source' => 'website-chatbot',
'received' => current_time('mysql'),
);
// Push to CRM webhook — fail loudly, never silently
$response = wp_remote_post('https://your-crm.com/webhook/leads', array(
'headers' => array('Content-Type' => 'application/json'),
'body' => wp_json_encode($lead),
'timeout' => 15,
));
if (is_wp_error($response)) {
// Log it AND notify — a lead that vanishes is revenue lost
error_log('Lead webhook failed: ' . $response->get_error_message());
wp_mail(get_option('admin_email'), 'LEAD WEBHOOK FAILED', print_r($lead, true));
wp_send_json_error('retry');
}
wp_send_json_success('received');
}
Two things most implementations get wrong:
- No silent failures. If the webhook fails, the lead must go somewhere loud (email fallback + error log), not into the void. I've seen agencies lose weeks of leads to a 401 they never noticed.
-
Timestamp everything at capture.
receivedis your attribution anchor later — it's how you prove the chatbot sourced the job, not the follow-up call three days later.
Layer 3: CRM + the follow-up sequence
The CRM gets a clean JSON payload. What happens next is a sequence, not a single notification:
- Instant SMS to the prospect (under 2 minutes): "Thanks [name] — got your request about [service] in [location]. We'll call you shortly."
- Instant notification to the owner/CSR with the full transcript attached — nobody re-asks the visitor questions they already answered.
- If no contact in 30 minutes: automated follow-up text.
- If no contact in 24 hours: second touch, different angle (review link, financing info, whatever fits the trade).
- Unsent estimates get their own sequence. This is the money most contractors leave on the table — the estimate went out, nobody followed up, the homeowner went with whoever called back.
Nothing here needs "AI." It's webhooks, a CRM with automation (GoHighLevel, HubSpot, even a well-set-up FluentCRM on WordPress itself), and an SMS provider. The chatbot at the front is the only AI piece, and its job is just structured capture.
Layer 4: Measure it or it didn't happen
Put a call-tracking number on the chatbot handoff and a different one on the plain contact form. Tag every lead with source = website-chatbot in the CRM. Then the math is simple:
- Chatbot leads in → estimates booked → jobs closed
- Cost of the stack vs. revenue from chatbot-sourced jobs
If you can't draw that line, you don't have automation — you have a chatbot-shaped decoration.
What this costs in practice
- Chatbot: varies wildly; the build matters more than the tool. A well-trained bot on your own content beats an expensive generic one.
- CRM + SMS: roughly $100–300/month depending on volume.
- The WordPress side: a few hours of dev time. The snippet above is 80% of it.
The expensive part was never the software. It's the discipline: answering fast, following up on unsent estimates, and actually reading the attribution.
The unsexy truth
Contractors don't have a traffic problem — they have a response-time problem. The job goes to whoever responds first, and most of the inquiries arrive after hours when nobody's at the desk. This stack exists for one reason: make sure the 11 PM website visitor becomes a morning phone call instead of a competitor's customer.
I build exactly these systems for home-service contractors at Nfinity IT Media — WordPress sites, local SEO, and the automation layer that turns the traffic into booked jobs. The chatbot on our own site is the same one we deploy for clients; it eats its own cooking.
Stack notes: WordPress + a lightweight custom plugin for the webhook layer, any CRM with inbound webhooks + SMS automation, call tracking with source tagging. Total new dependencies: basically none you don't already have.
來源:DEV Community · dev.to