Atonom
DocumentationAPI Reference
Webhooks

Web Chat

Learn how to use the web chat webhook to integrate your Cloud Employee with your existing systems

Atonom offers several kinds of web chat event types that can be sent to your webhook URLs.

To learn how to specify webhook URLs for your cloud employees in the Atonom app, please see the webhook URLs configuration step in the quickstart guide.

Below you will find an example of the data structure for web chat events.

Web Chat Structure

Event Types:

  • conversation-start: Triggered when a new web chat conversation begins
  • conversation-closed: Triggered when a web chat conversation ends

Webhook Response Structure

When a web chat event occurs, Atonom will send a webhook response with the following structure:

{
    "event": "conversation-closed",
    "chat": {
        "transcript": "...",
        "meeting_event": {
            "id": 123,
            "name": "...", 
            "agent_name": "...",
            "date": "1972-01-01",
            "duration_minutes": 120,
            "lead_time_minutes": 10
        },
        "user_emails": {
            "last_routed": "[email protected]",
            "last_routed_user_id": 1,
            "closed_conversation": "[email protected]", 
            "closed_conversation_user_id": 2,
            "meeting_scheduled": "[email protected]",
            "meeting_scheduled_user_id": 3
        },
        "human_routed": true,
        "human_responded": false,
        "referrer": "Direct",
        "source_type": "Direct Traffic",
        "traffic_source": "Source",
        "traffic_campaign": "Campaign"
    },
    "contact": {
        "participant_id": 123124124,
        "tenant_id": 1,
        "first_name": "John",
        "last_name": "Smith",
        "middle_name": "Robert",
        "preferred_name": "Johnny",
        "name": "John Smith",
        "honorific": "Mr.",
        "phone": "+1 (555) 123-4567",
        "home_phone": "+1 (555) 987-6543",
        "mobile_phone": "+1 (555) 234-5678",
        "other_phone": "+1 (555) 876-5432",
        "email": "[email protected]",
        "other_email": "[email protected]",
        "birthdate": "1985-06-15T00:00:00Z",
        "description": "Senior Software Engineer with 10+ years of experience",
        "title": "Senior Software Engineer",
        "lead_source": "Website Form",
        "lead_score": 85,
        "created_by_user_id": 123,
        "company_name": "TechCorp Inc.",
        "company_website": "https://techcorp.example.com",
        "company_industry": "Technology",
        "company_employee_count": "500-1000",
        "company_revenue": "$10M-$50M",
        "enriched_fields": ["company_name", "title", "linkedin_handle"],
        "enriched_timestamp": "2024-03-20T15:30:00Z",
        "city": "San Francisco",
        "state": "CA",
        "country": "United States",
        "bio": "Experienced software engineer specializing in cloud architecture and microservices",
        "role": "Senior Software Engineer",
        "seniority": "Senior",
        "linkedin_handle": "johnsmith",
        "company_sector": "Enterprise Software",
        "company_phone": "+1 (555) 555-5555",
        "company_description": "Leading provider of cloud-based enterprise solutions",
        "company_location": "San Francisco, CA",
        "company_timezone": "America/Los_Angeles",
        "company_twitter_handle": "techcorp",
        "company_tech": ["Python", "AWS", "Docker", "Kubernetes", "React"],
        "company_linkedin_handle": "techcorp-inc",
        "avatar_url": "https://example.com/avatars/john-smith.jpg",
        "company_avatar_url": "https://example.com/company-logos/techcorp.png",
        "facebook_handle": "john.smith.123",
        "twitter_handle": "johnsmith",
        "instagram_handle": "johnsmith",
        "domain": "example.com",
        "source": "form",
        "source_id": 456,
        "traffic_source": "Google",
        "persona_id": 789,
        "custom_fields": {
            "department": "Engineering",
            "project_interest": "Cloud Migration",
            "budget_range": "$50,000-$100,000",
            "timeline": "Q2 2024"
        }
    }
}

Key Fields

FieldDescription
eventThe type of web chat event (conversation-start or conversation-closed)
chat.transcriptThe full conversation transcript
chat.meeting_eventDetails about any scheduled meeting during the chat
chat.user_emailsInformation about users involved in the conversation
chat.human_routedtrue when a visitor was routed to a human agent and that agent replied
chat.human_respondedtrue when a human agent replied without being routed in
contactContact information if the chat was with a known contact
contact.participant_idVisitor participant ID for the conversation

On this page