CRM Workflow
๐งโ๐ผ Integrate a CRM Workflow with WhatsApp
This tutorial guides you through integrating a CRM system with Lipachat to allow operators to respond to WhatsApp messages in real time. It includes logic for handling both 24-hour session replies and template-based messages.
๐ช Step 1: Set Up Webhook
Set your webhook endpoint in the Lipachat Dashboard โ Settings. This allows Lipachat to notify your CRM when a customer sends a WhatsApp message.
Example:
When a message is received, a POST request will be made to this URL with the message details.
๐ฅ Step 2: Receive and Display Incoming Messages
Sample webhook payload:
Display the message in your CRMโs chat interface and associate it with the appropriate customer profile.
๐ง Step 3: Determine Session Status
Check whether the 24-hour session window is still valid. If the current timestamp is before session_expires_at
, respond with a free-form message. Otherwise, use a pre-approved template.
๐ Step 4A: Respond Within 24-Hour Session (Free Form)
๐งพ Step 4B: Respond Outside Session (Template Message)
End-to-End Flow Summary
Customer sends message โ webhook sends to CRM
CRM operator sees message and session info
If the session is active โ send a reply
If the session expired โ send the approved template
With this setup, your CRM team can interact with customers compliantly and in real time via WhatsApp.
Last updated