Skip to main content

Practice Management on Embodia - Part 2: Scheduling

The actions described in this lesson require a Manager permission on your clinic.

Nerd alert: This guide will include some technical jargon:

  • POST request: is a type of web request
  • JSON: short for JavaScript Object Notation, is a standardized way data can be shared between 2 applications

A webhook is one of the ways two applications can communicate with each other. If you use another application that can listen to webhooks, you can configure your Embodia account to send a webhook with the relevant information when a certain event happens on Embodia. For example, if you use Zapier, you can use the Webhooks by Zapier Integrations to pair your Embodia account with the multitude of applications that connect to Zapier.

If you would like to learn more about what webhooks are, Zapier has a great article that explains webhooks in further details.

To get started, navigate to Consults > Export > Webhooks:

Webhooks on Embodia

On the webhooks page, you will see all the events that can trigger a webhook on Embodia. At this time, we support sending a webhook when:

  • A consult is scheduled, updated, or cancelled
  • An invoice/package is created, updated, or deleted
  • A patient joins a course or a webinar (only applicable for Clinic Academy)
  • A patient starts or cancels a membership

If you would like to receive webhooks for other events, please reach out to us at support@embodiaapp.com.

To configure your webhook parameters, click on Configure. In the pop-up form:

  • Enter the URL: this is the URL address where Embodia will send a POST request with the relevant information.
  • Select which events should trigger sending the webhook request to the specified URL
  • Select which data (in JSON format) to include in the webhook request

 

Sending a webhook when a consult is scheduled, updated, or cancelled

Depending on your configuration, Embodia will send a webhook for the following events:

  • Consult is scheduled: The webhook will be triggered when a new consult is created for a patient, or when a patient is added to an existing group consult/class. The JSON data sent to the specified URL will include an "event" key with the value of "participant.added" (more info below).
  • Consult is updated: The webhook will be triggered when a consult is updated (such as the start time, or duration). The JSON data sent to the specified URL will include an "event" key with the value of "consult.updated" (more info below).
  • Consult is cancelled: The webhook will be triggered when a consult is cancelled, or when a patient is removed from a group consult/class. The JSON data sent to the specified URL will include an "event" key with the value of "participant.removed" (more info below).

The JSON data sent in the request will be an array with one or more of the following JSON objects:

{
  event: String - ("participant.added", "consult.updated", or "participant.removed"),
  consult: {
    id: Integer - unique ID of the consult on Embodia,
    start_time: Time - the start time of the consult,
    end_time: Time - the end time of the consult,
    duration: Number - the consult duration in minutes,
    cancelled: Boolean - indicates if the consult has been cancelled,
  },
  service: {
    id: Integer - unique ID of the service on Embodia,
    name: String - the name of the service,
  },
  practitioner: {
    id: Integer - unique ID of the practitioner account on Embodia,
    name: String - the name of the practitioner,
    email: String - the email of the practitioner,
  },
  participant: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "practitioner" and "participant" information will only be included in the JSON data if the configuration of the webhook was set to include the practitioner and patient information, respectively.

 

Sending a webhook when an invoice/package is created, updated, or deleted

Depending on your configuration, Embodia will send a webhook for the following events:

  • When an invoice is created: The webhook will be triggered when a new invoice/package/gift certificate is created for a patient. The JSON data sent to the specified URL will include an "event" key with the value of "invoice.created" (more info below).
  • When an invoice is updated: The webhook will be triggered when the invoice/package/gift certificate is updated. The JSON data sent to the specified URL will include an "event" key with the value of "invoice.updated" (more info below).
  • When an invoice is deleted: The webhook will be triggered when the invoice/package/gift certificate is deleted. The JSON data sent to the specified URL will include an "event" key with the value of "invoice.deleted" (more info below).

The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("invoice.created", "invoice.updated", or "invoice.deleted"),
  invoice: {
    type: String - ("patient_invoice", "clinic_package", "clinic_package_membership", or "clinic_package_gift_certificate"),
    status: String - ("draft", "partially_paid", "paid_in_full", "paid", "over_paid", "no_payment_needed", "partially_refunded", or "refunded"),
    invoice_number: String - unique invoice number of the invoice/clinic package on Embodia,
    invoice_date: Date - the invoice date,
    currency: String - a 3 digit representation of the currency (such as "cad", "usd", "eur"),
    subtotal: Number - The subtotal of the invoice,
    taxes: Number - The taxes of the invoice,
    total: Number - The total of the invoice,
    unpaid_subtotal_balance: Number - The unpaid balance of the invoice of the invoice (only applicable for type "patient_invoice"),
    line_items: (Array) [
      {
        id: Integer - unique ID of the line item,
        description: String - the description of the line item,
        unit_price: Number - the unit price of the line item,
        units: Integer - the number of units of the line item,
        subtotal: Number - the subtotal of the line item,
        taxes: Number - the taxes of the line item,
        total: Number - the total of the line item,
      },
    ],
    payments: (Array) [
      {
        id: Integer - unique ID of the payment,
        payment_method: String - the payment method used for the payment,
        subtotal: Number - the subtotal of the payment,
        taxes: Number - the taxes of the payment,
        total: Number - the total of the payment,
        status: String - ("draft", "paid", "partially_refunded", or "refunded"),
        from_package: Boolean - indicating if the payment was made from a clinic package,
      },
    ],
  },
  practitioner: {
    id: Integer - unique ID of the practitioner account on Embodia,
    name: String - the name of the practitioner,
    email: String - the email of the practitioner,
  },
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "practitioner" and "client" information will only be included in the JSON data if the configuration of the webhook was set to include the practitioner and patient information, respectively.

 

Sending a webhook when a patient joins a course or a webinar

Depending on your configuration, Embodia will send a webhook for the following events:

  • When a patient joins a course: The webhook will be triggered when a patient joins a course. The JSON data sent to the specified URL will include an "event" key with the value of "course_participant.added" (more info below).
  • When a patient joins a webinar: The webhook will be triggered when a patient joins a webinar. The JSON data sent to the specified URL will include an "event" key with the value of "webinar_participant.added" (more info below).

The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("course_participant.added", or "webinar_participant.added"),
  resource: {
    type: String - ("course", or "webinar"),
    name: String - the name of the course/webinar,
    id: Integer - unique ID of the course/webinar,
  },
  payment: {
    subtotal: Number - the subtotal of the payment,
    taxes: Number - the taxes of the payment,
    total: Number - the total of the payment,
  },
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "client" information will only be included in the JSON data if the configuration of the webhook was set to include the patient information.

 

Sending a webhook when a patient starts or cancels a membership

Depending on your configuration, Embodia will send a webhook for the following events:

  • When patient starts a membership: The webhook will be triggered when a patient starts a membership. The JSON data sent to the specified URL will include an "event" key with the value of "membership.started" (more info below).
  • When a patient cancels a membership: The webhook will be triggered when a patient cancels a membership. The JSON data sent to the specified URL will include an "event" key with the value of "membership.cancelled" (more info below).

The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("membership.started", or "membership.cancelled"),
  membership: {
    type: String - ("clinic_package_membership", or "academy_membership"),
    id: Integer - unique ID of the membership of Embodia,
    name: String - name of the package/academy membership option,
    membership_id: Integer - unique ID of the package/academy membership option,
    recurrence_interval: String - ("day", "week", "month", "year"),
  },
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "client" information will only be included in the JSON data if the configuration of the webhook was set to include the patient information.

Back
© 2024 Embodia