Select the specific Mailchimp list (Audience) where you want new chat contacts to be sent. Deep Optimization Strategies
log_sync(data, resp.status_code, resp.json()) return "status": "processed", 200
Choose "New Visitor" or "New Finished Chat" in Pure Chat. Action: Choose "Add/Update Subscriber" in Mailchimp. pure chat mailchimp integration
Find Mailchimp in the list of available services and click Add Integration .
@app.route('/webhooks/purechat/mailchimp', methods=['POST']) def purechat_webhook(): data = request.json config = get_config_for_account(data['account_id']) if not data['visitor']['email']: return "status": "skipped", "reason": "no email", 200 Select the specific Mailchimp list (Audience) where you
Enable a pre-chat form in Pure Chat that requires an email address. This ensures you capture the lead even if the visitor leaves the site quickly.
Automatically add chat users (who provide email/name) to a Mailchimp audience when a chat ends, or after a custom trigger (e.g., agent tags the chat as "lead"). Find Mailchimp in the list of available services
Chat visitor provides email ↓ Agent ends chat (or triggers "save as lead") ↓ Pure Chat sends webhook to your integration endpoint ↓ Your backend validates & formats data ↓ Calls Mailchimp API (PUT /lists/list_id/members/subscriber_hash) ↓ Mailchimp stores/updates member + adds 'Pure Chat' tag ↓ Return status to Pure Chat (visible in logs)
Bridge the gap between "one-off" support chats and recurring brand engagement through automated customer journeys.
subscriber_hash = hashlib.md5(data['visitor']['email'].lower().encode()).hexdigest()
"event": "chat_ended", "visitor": "email": "user@example.com", "name": "John Doe", "phone": "+1234567890" , "agent_notes": "interested in pricing", "chat_transcript_url": "https://purechat.com/chat/123", "custom_fields": "product_interest": "mailchimp integration"