Auto Reply WA Terintegrasi CRM
Cara integrasikan auto reply WhatsApp dengan CRM. HubSpot, Salesforce, Zoho, custom. Sync data customer otomatis!
WhatsApp + CRM = Sales powerhouse!
Integrasi auto reply dengan CRM memastikan setiap lead ter-track dan tidak ada yang terlewat.
Kenapa Integrasi CRM Penting?
❌ TANPA INTEGRASI:
- Data customer di WA terpisah dari CRM
- Manual input = double work
- Lead bisa terlewat
- Tidak ada tracking journey
✅ DENGAN INTEGRASI:
- Auto-sync ke CRM
- Single source of truth
- Setiap lead ter-capture
- Full customer journeyPopular CRM Integrations
1. HubSpot
javascript
const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({
accessToken: process.env.HUBSPOT_TOKEN
});
async function syncToHubSpot(waData) {
const properties = {
phone: waData.phone,
firstname: waData.name?.split(' ')[0],
lastname: waData.name?.split(' ').slice(1).join(' '),
wa_last_message: waData.lastMessage,
lead_source: 'WhatsApp'
};
// Search existing or create new
const searchResponse = await hubspotClient.crm.contacts.searchApi.doSearch({
filterGroups: [{
filters: [{
propertyName: 'phone',
operator: 'EQ',
value: waData.phone
}]
}]
});
if (searchResponse.results.length > 0) {
await hubspotClient.crm.contacts.basicApi.update(
searchResponse.results[0].id,
{ properties }
);
} else {
await hubspotClient.crm.contacts.basicApi.create({ properties });
}
}2. Google Sheets (Simple CRM)
javascript
const { GoogleSpreadsheet } = require('google-spreadsheet');
async function syncToSheets(waData) {
const doc = new GoogleSpreadsheet(SHEET_ID);
await doc.useServiceAccountAuth(creds);
await doc.loadInfo();
const sheet = doc.sheetsByTitle['Leads'];
await sheet.addRow({
Phone: waData.phone,
Name: waData.name,
LastContact: new Date().toISOString(),
Message: waData.lastMessage,
Source: 'WhatsApp'
});
}Integration in Bot
javascript
client.on('message', async msg => {
// Process and reply
const response = await processMessage(msg);
await msg.reply(response);
// Sync to CRM (background, don't wait)
syncToCRM({
phone: msg.from.replace('@c.us', ''),
name: await getCustomerName(msg.from),
lastMessage: msg.body
}).catch(err => console.error('CRM sync error:', err));
});Best Practices
✅ DO:
- Sync in background
- De-duplicate by phone
- Log key events only
❌ DON'T:
- Block reply for sync
- Sync every message
- Store full chat historyFAQ
CRM mana paling mudah?
HubSpot free tier bagus. Google Sheets paling simple untuk mulai.
Perlu sync setiap message?
Tidak. Sync key events: new contact, lead qualified, order placed.
Kesimpulan
WhatsApp + CRM = Complete visibility!