Getting Started

Use Cases & Examples

Overview

This guide showcases real-world use cases for KiviCare Webhooks, complete with configuration examples and sample payloads. Use these as templates for your own integrations.


๐Ÿ”” Communication & Notifications

1. Slack Notifications for New Appointments

Use Case: Notify your team in Slack whenever a new appointment is booked.

Event: kc_appointment_book

Configuration:

Endpoint: https://hooks.slack.com/services/YOUR/WEBHOOK/URL
Method: POST
Authentication: None

Payload:

{
  "text": "๐Ÿฅ New Appointment Booked!",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Patient:* {{patient_name}}\n*Doctor:* {{doctor_name}}\n*Date:* {{appointment_date}} at {{appointment_start_time}}\n*Clinic:* {{clinic_name}}\n*Phone:* {{patient_contact_number}}"
      }
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "View Details"
          },
          "url": "https://yoursite.com/appointments/{{appointment_id}}"
        }
      ]
    }
  ]
}

Result: Team receives instant Slack notification with appointment details and action button.


2. SMS Reminders via Twilio

Use Case: Send SMS appointment reminders to patients.

Event: kc_appointment_book

Configuration:

Endpoint: https://api.twilio.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json
Method: POST
Authentication: Basic Auth
  Username: YOUR_ACCOUNT_SID
  Password: YOUR_AUTH_TOKEN
Content-Type: application/x-www-form-urlencoded

Payload (Form Data):

To={{patient_contact_number}}
From=YOUR_TWILIO_PHONE_NUMBER
Body=Hi {{patient_name}}, your appointment with Dr. {{doctor_name}} is confirmed for {{appointment_date}} at {{appointment_start_time}}. See you at {{clinic_name}}!

Result: Patient receives SMS confirmation immediately after booking.


3. Email Notifications via SendGrid

Use Case: Send professional email confirmations to patients.

Event: kc_appointment_book

Configuration:

Endpoint: https://api.sendgrid.com/v3/mail/send
Method: POST
Authentication: Bearer Token
  Token: YOUR_SENDGRID_API_KEY

Payload:

{
  "personalizations": [{
    "to": [{"email": "{{patient_email}}", "name": "{{patient_name}}"}],
    "subject": "Appointment Confirmation - {{clinic_name}}"
  }],
  "from": {
    "email": "{{clinic_email}}",
    "name": "{{clinic_name}}"
  },
  "content": [{
    "type": "text/html",
    "value": "<h2>Appointment Confirmed</h2><p>Dear {{patient_name}},</p><p>Your appointment with Dr. {{doctor_name}} is confirmed for {{appointment_date}} at {{appointment_start_time}}.</p><p>Location: {{clinic_address}}</p><p>If you need to reschedule, please contact us.</p><p>Best regards,<br>{{clinic_name}}</p>"
  }]
}

Result: Professional HTML email sent to patient’s inbox.


4. Microsoft Teams Alerts

Use Case: Alert staff in Microsoft Teams about appointment cancellations.

Event: kc_appointment_status_change (when status = cancelled)

Configuration:

Endpoint: YOUR_TEAMS_WEBHOOK_URL
Method: POST
Authentication: None

Payload:

{
  "@type": "MessageCard",
  "@context": "https://schema.org/extensions",
  "summary": "Appointment Cancelled",
  "themeColor": "FF0000",
  "title": "โš ๏ธ Appointment Cancelled",
  "sections": [{
    "facts": [
      {"name": "Patient:", "value": "{{patient_name}}"},
      {"name": "Doctor:", "value": "{{doctor_name}}"},
      {"name": "Date:", "value": "{{appointment_date}}"},
      {"name": "Time:", "value": "{{appointment_start_time}}"},
      {"name": "Clinic:", "value": "{{clinic_name}}"}
    ]
  }]
}

Result: Teams channel receives cancellation alert with details.


๐Ÿ’ผ CRM Integration

5. HubSpot Contact Creation

Use Case: Automatically create contacts in HubSpot when patients register.

Event: kc_patient_add

Configuration:

Endpoint: https://api.hubapi.com/contacts/v1/contact
Method: POST
Authentication: API Key
  Location: Query Parameter
  Name: hapikey
  Key: YOUR_HUBSPOT_API_KEY

Payload:

{
  "properties": [
    {"property": "email", "value": "{{patient_email}}"},
    {"property": "firstname", "value": "{{patient_name}}"},
    {"property": "phone", "value": "{{patient_contact_number}}"},
    {"property": "clinic_id", "value": "{{clinic_id}}"},
    {"property": "lifecyclestage", "value": "patient"},
    {"property": "registration_date", "value": "{{current_date}}"}
  ]
}

Result: New HubSpot contact created automatically with patient data.


6. Salesforce Lead Update

Use Case: Update lead status in Salesforce when appointments are booked.

Event: kc_appointment_book

Configuration:

Endpoint: https://YOUR_INSTANCE.salesforce.com/services/data/v52.0/sobjects/Lead/{{patient_id}}
Method: PATCH
Authentication: Bearer Token
  Token: YOUR_SALESFORCE_ACCESS_TOKEN

Payload:

{
  "Status": "Appointment Scheduled",
  "LastActivityDate": "{{current_date}}",
  "Description": "Appointment with {{doctor_name}} on {{appointment_date}}"
}

Result: Salesforce lead automatically updated with appointment info.


๐Ÿ“Š Analytics & Tracking

7. Google Analytics Event Tracking

Use Case: Track appointment bookings in Google Analytics.

Event: kc_appointment_book

Configuration:

Endpoint: https://www.google-analytics.com/mp/collect?measurement_id=YOUR_MEASUREMENT_ID&api_secret=YOUR_API_SECRET
Method: POST
Authentication: None

Payload:

{
  "client_id": "{{patient_id}}",
  "events": [{
    "name": "appointment_booked",
    "params": {
      "doctor": "{{doctor_name}}",
      "clinic": "{{clinic_name}}",
      "appointment_date": "{{appointment_date}}",
      "value": 1
    }
  }]
}

Result: Appointment events tracked in Google Analytics for reporting.


8. Mixpanel User Tracking

Use Case: Track patient journey in Mixpanel.

Event: kc_appointment_book

Configuration:

Endpoint: https://api.mixpanel.com/track
Method: POST
Authentication: None

Payload:

{
  "event": "Appointment Booked",
  "properties": {
    "distinct_id": "{{patient_id}}",
    "token": "YOUR_MIXPANEL_TOKEN",
    "appointment_id": "{{appointment_id}}",
    "doctor_id": "{{doctor_id}}",
    "clinic_id": "{{clinic_id}}",
    "appointment_date": "{{appointment_date}}",
    "time": "{{current_date_time}}",
    "$insert_id": "{{appointment_id}}"
  }
}

Result: Patient behavior tracked for analytics and insights.


๐Ÿ”„ Automation Platforms

9. Zapier Webhook Trigger

Use Case: Trigger complex Zapier workflows from KiviCare events.

Event: Any event

Configuration:

Endpoint: YOUR_ZAPIER_WEBHOOK_URL
Method: POST
Authentication: None

Payload:

{
  "event_type": "appointment_booked",
  "patient": {
    "id": "{{patient_id}}",
    "name": "{{patient_name}}",
    "email": "{{patient_email}}",
    "phone": "{{patient_contact_number}}"
  },
  "appointment": {
    "id": "{{appointment_id}}",
    "date": "{{appointment_date}}",
    "time": "{{appointment_start_time}}",
    "doctor": "{{doctor_name}}"
  },
  "clinic": {
    "name": "{{clinic_name}}",
    "email": "{{clinic_email}}"
  }
}

Result: Zapier workflow triggered, connecting to 5000+ apps.


10. Make (Integromat) Scenario

Use Case: Build complex automation scenarios with Make.

Event: kc_payment_add

Configuration:

Endpoint: YOUR_MAKE_WEBHOOK_URL
Method: POST
Authentication: None

Payload:

{
  "event": "payment_received",
  "payment": {
    "id": "{{payment_id}}",
    "amount": "{{payment_amount}}",
    "method": "{{payment_method}}",
    "date": "{{payment_date}}"
  },
  "patient": {
    "name": "{{patient_name}}",
    "email": "{{patient_email}}"
  },
  "bill": {
    "id": "{{bill_id}}",
    "number": "{{bill_number}}"
  }
}

Result: Make scenario processes payment and triggers follow-up actions.


๐Ÿ“ˆ Business Operations

11. Google Sheets Logging

Use Case: Log all appointments to Google Sheets for reporting.

Event: kc_appointment_book

Configuration:

Endpoint: YOUR_GOOGLE_APPS_SCRIPT_URL
Method: POST
Authentication: None

Payload:

{
  "patient_name": "{{patient_name}}",
  "patient_email": "{{patient_email}}",
  "patient_phone": "{{patient_contact_number}}",
  "doctor_name": "{{doctor_name}}",
  "appointment_date": "{{appointment_date}}",
  "appointment_time": "{{appointment_start_time}}",
  "clinic_name": "{{clinic_name}}",
  "status": "{{appointment_status}}",
  "created_at": "{{current_date_time}}"
}

Result: New row added to Google Sheet with appointment data.


12. Accounting Software Integration

Use Case: Sync payments with QuickBooks/Xero.

Event: kc_payment_add

Configuration:

Endpoint: https://api.quickbooks.com/v3/company/YOUR_COMPANY_ID/payment
Method: POST
Authentication: Bearer Token
  Token: YOUR_QUICKBOOKS_ACCESS_TOKEN

Payload:

{
  "TotalAmt": "{{payment_amount}}",
  "CustomerRef": {
    "value": "{{patient_id}}"
  },
  "PaymentMethodRef": {
    "value": "{{payment_method}}"
  },
  "TxnDate": "{{payment_date}}",
  "PrivateNote": "Payment for Bill #{{bill_number}}"
}

Result: Payment automatically recorded in accounting software.


๐Ÿฅ Healthcare-Specific

13. Patient Portal Updates

Use Case: Update patient portal when medical records are added.

Event: kc_medical_record_add

Configuration:

Endpoint: https://your-portal.com/api/records
Method: POST
Authentication: API Key

Payload:

{
  "patient_id": "{{patient_id}}",
  "record_type": "medical_record",
  "encounter_id": "{{encounter_id}}",
  "doctor": "{{doctor_name}}",
  "date": "{{encounter_date}}",
  "notify_patient": true
}

Result: Patient notified of new medical record availability.


14. Prescription to Pharmacy

Use Case: Send prescriptions directly to pharmacy system.

Event: kc_prescription_add

Configuration:

Endpoint: https://pharmacy-api.com/prescriptions
Method: POST
Authentication: API Key

Payload:

{
  "prescription_id": "{{prescription_id}}",
  "patient": {
    "name": "{{patient_name}}",
    "dob": "{{patient_dob}}",
    "contact": "{{patient_contact_number}}"
  },
  "prescriber": {
    "name": "{{doctor_name}}",
    "license": "{{doctor_license_number}}"
  },
  "medications": "{{prescription_details}}",
  "date": "{{current_date}}"
}

Result: Prescription sent to pharmacy for fulfillment.


๐ŸŽฏ Multi-Purpose Examples

15. Discord Community Updates

Use Case: Post clinic updates to Discord community.

Event: Multiple events

Configuration:

Endpoint: YOUR_DISCORD_WEBHOOK_URL
Method: POST
Authentication: None

Payload:

{
  "content": "New Patient Registered! ๐ŸŽ‰",
  "embeds": [{
    "title": "Patient Details",
    "color": 5814783,
    "fields": [
      {"name": "Name", "value": "{{patient_name}}", "inline": true},
      {"name": "Email", "value": "{{patient_email}}", "inline": true},
      {"name": "Phone", "value": "{{patient_contact_number}}", "inline": true},
      {"name": "Clinic", "value": "{{clinic_name}}", "inline": true}
    ],
    "timestamp": "{{current_date_time}}"
  }]
}

Result: Discord channel updated with patient registration.


๐Ÿ’ก Tips for Success

Best Practices

โœ… Start Simple

  • Begin with one webhook
  • Test thoroughly
  • Gradually add more

โœ… Use Descriptive Names

  • “Slack – New Appointments”
  • “HubSpot – Patient Sync”
  • “SendGrid – Confirmations”

โœ… Monitor Regularly

  • Check execution logs
  • Review success rates
  • Fix failures promptly

โœ… Secure Your Webhooks

  • Always use authentication
  • Use HTTPS endpoints
  • Rotate credentials regularly

โœ… Test Before Production

  • Use test endpoints first
  • Verify data format
  • Check error handling

Suggestions & Improvements

Your email address will not be published. Required fields are marked *