Pure Chat Mailchimp Integration !full! Direct

subscriber_hash = hashlib.md5(data['visitor']['email'].lower().encode()).hexdigest()

This feature allows you to connect chat conversations (or captured leads from Pure Chat) directly to Mailchimp lists/tags for automated email marketing. Goal: 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"). pure chat mailchimp integration

Endpoint: PUT https://server.api.mailchimp.com/3.0/lists/list_id/members/subscriber_hash subscriber_hash = hashlib

"email_address": "user@example.com", "status_if_new": "subscribed", "merge_fields": "FNAME": "John", "LNAME": "Doe", "PHONE": "+1234567890" , "tags": ["pure-chat", "lead", "pricing-inquiry"] or after a custom trigger (e.g.

Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json

resp = requests.put( f"https://config['dc'].api.mailchimp.com/3.0/lists/config['list_id']/members/subscriber_hash", headers="Authorization": f"Bearer config['access_token']", json= "email_address": data['visitor']['email'], "status_if_new": "subscribed" if not config['double_opt_in'] else "pending", "merge_fields": merge_fields, "tags": ["pure-chat", data.get('agent_notes', '').lower().replace(' ', '-')] )