> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Time Slot Selection Viewed

> Event payload details and trigger documentation for Time Slot Selection Viewed data from Morf

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/morf.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=ae6978dd2d8b4d3a340944239283af5c" alt="images/morf.svg" width="40" height="40" data-path="images/morf.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Time Slot Selection Viewed event payload from Morf.

* `Time Slot Selection Viewed`

<RequestExample>
  ```json Example theme={null}
  {
    "application": "HEALTHIE",
    "appointment_type": {
      "id": null,
      "length_minutes": null,
      "name": null
    },
    "end_date": "2025-01-07",
    "event_data": {
      "referrer_domain": "example.com",
      "referrer_url": "https://example.com/schedule-appointment"
    },
    "hours_until_next_available_timeslot": 24,
    "insurance_payer": {
      "geographically_scoped_insurance_payer": {
        "geographic_locale": null,
        "insurance_payer": {
          "ehr_id": null,
          "id": null,
          "name": null
        }
      },
      "insurance_payer": {
        "ehr_id": null,
        "id": null,
        "name": null
      }
    },
    "internal_tags": [
      "high_priority",
      "new_patient"
    ],
    "licensed_geographic_locales": [
      "CA",
      "NY"
    ],
    "num_timeslots_in_range": 42,
    "num_timeslots_on_viewed_date": 7,
    "profile_customer_id": "02afaa5f-9f26-43dc-a1f8-92d3d4f7a097",
    "profile_email_address": "joe@bloggs.com",
    "providers_viewed": [
      {
        "name": "Dr. Jane Smith",
        "provider_id": {
          "id": null,
          "id_type": null
        }
      }
    ],
    "specialties": [
      "Cardiology",
      "Pediatrics"
    ],
    "start_date": "2025-01-01",
    "view_type": "BASIC_VIEW",
    "viewed_date": "2025-01-03"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "application": "The scheduling application being used",
    "appointment_type": {
      "id": null,
      "length_minutes": null,
      "name": null
    },
    "end_date": "End date of the viewed calendar range",
    "event_data": "(Optional) Data associated with the event, *not* automatically stored on the Morf Profile",
    "hours_until_next_available_timeslot": "Hours until the next available timeslot in the calendar date-range",
    "insurance_payer": {
      "geographically_scoped_insurance_payer": {
        "geographic_locale": null,
        "insurance_payer": {
          "ehr_id": null,
          "id": null,
          "name": null
        }
      },
      "insurance_payer": {
        "ehr_id": null,
        "id": null,
        "name": null
      }
    },
    "internal_tags": "Internal tags associated with the timeslot selection",
    "licensed_geographic_locales": "List of US state codes where the provider is licensed",
    "num_timeslots_in_range": "Number of available timeslots in the viewed date range",
    "num_timeslots_on_viewed_date": "Number of available timeslots on the viewed date",
    "profile_customer_id": "The customer ID sent to the scheduling application from the form for the person viewing the scheduling availability, e.g. the Formsort responder_uuid or Feathery user_id",
    "profile_email_address": "The email address sent to the scheduling application for the person viewing the scheduling availability",
    "providers_viewed": {
      "name": "The name of the provider",
      "provider_id": {
        "id": null,
        "id_type": null
      }
    },
    "specialties": "List of provider specialties",
    "start_date": "Start date of the viewed calendar range",
    "view_type": "The type of view being used",
    "viewed_date": "The date the user clicked on to see available time slots"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Time Slot Selection Viewed" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="application" type="scheduling.v1.SchedulingApplication" required>
      The scheduling application being used

      ```json CEL theme={null}
      application
      ```

      ```json Example theme={null}
      scheduling.v1.SchedulingApplication.HEALTHIE
      scheduling.v1.SchedulingApplication.ACUITY
      ```
    </ResponseField>

    <ResponseField name="view_type" type="scheduling.v1.SchedulingApplicationViewType" required>
      The type of view being used

      ```json CEL theme={null}
      view_type
      ```

      ```json Example theme={null}
      scheduling.v1.SchedulingApplicationViewType.BASIC_VIEW
      scheduling.v1.SchedulingApplicationViewType.PROVIDERS_VIEW
      scheduling.v1.SchedulingApplicationViewType.PROVIDER_PROFILE
      ```
    </ResponseField>

    <ResponseField name="appointment_type" type="object" required>
      Appointment type information, the ID, name (title), and default length in minutes

      ```json CEL theme={null}
      appointment_type
      ```

      ```json Example theme={null}
      {
      "id": null,
      "length_minutes": null,
      "name": null
      }
      ```
    </ResponseField>

    <ResponseField name="appointment_type.id" type="string" required>
      *Description coming soon*

      ```json CEL theme={null}
      appointment_type.id
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="appointment_type.name" type="string" required>
      *Description coming soon*

      ```json CEL theme={null}
      appointment_type.name
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="appointment_type.length_minutes" type="uint64" required>
      *Description coming soon*

      ```json CEL theme={null}
      appointment_type.length_minutes
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="licensed_geographic_locales" type="[]string" required>
      List of US state codes where the provider is licensed

      ```json CEL theme={null}
      licensed_geographic_locales
      ```

      ```json Example theme={null}
      [
      "CA",
      "NY"
      ]
      ```
    </ResponseField>

    <ResponseField name="specialties" type="[]string" required>
      List of provider specialties

      ```json CEL theme={null}
      specialties
      ```

      ```json Example theme={null}
      [
      "Cardiology",
      "Pediatrics"
      ]
      ```
    </ResponseField>

    <ResponseField name="internal_tags" type="[]string" required>
      Internal tags associated with the timeslot selection

      ```json CEL theme={null}
      internal_tags
      ```

      ```json Example theme={null}
      [
      "high_priority",
      "new_patient"
      ]
      ```
    </ResponseField>

    <ResponseField name="start_date" type="values.v1.Date" required>
      Start date of the viewed calendar range

      ```json CEL theme={null}
      start_date
      ```

      ```json Example theme={null}
      "2025-01-01"
      ```
    </ResponseField>

    <ResponseField name="end_date" type="values.v1.Date" required>
      End date of the viewed calendar range

      ```json CEL theme={null}
      end_date
      ```

      ```json Example theme={null}
      "2025-01-07"
      ```
    </ResponseField>

    <ResponseField name="viewed_date" type="values.v1.Date" required>
      The date the user clicked on to see available time slots

      ```json CEL theme={null}
      viewed_date
      ```

      ```json Example theme={null}
      "2025-01-03"
      ```
    </ResponseField>

    <ResponseField name="num_timeslots_on_viewed_date" type="uint64" required>
      Number of available timeslots on the viewed date

      ```json CEL theme={null}
      num_timeslots_on_viewed_date
      ```

      ```json Example theme={null}
      7
      ```
    </ResponseField>

    <ResponseField name="num_timeslots_in_range" type="uint64" required>
      Number of available timeslots in the viewed date range

      ```json CEL theme={null}
      num_timeslots_in_range
      ```

      ```json Example theme={null}
      42
      ```
    </ResponseField>

    <ResponseField name="hours_until_next_available_timeslot" type="uint64" required>
      Hours until the next available timeslot in the calendar date-range

      ```json CEL theme={null}
      hours_until_next_available_timeslot
      ```

      ```json Example theme={null}
      24
      ```
    </ResponseField>

    <ResponseField name="providers_viewed" type="[]object" required>
      List of providers whose schedules were viewed

      ```json CEL theme={null}
      providers_viewed
      ```

      ```json Example theme={null}
      [
      {
      "name": "Dr. Jane Smith",
      "provider_id": {
      "id": null,
      "id_type": null
      }
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="providers_viewed.map(x, x.provider_id)" type="[]bool" required>
      Mapped array of: The unique identifier of the provider for the scheduling application

      ```json CEL theme={null}
      providers_viewed.map(x, x.provider_id)
      ```

      ```json Example theme={null}
      [
      {
      "id": null,
      "id_type": null
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="provider_id.id_type" type="scheduling.v1.SchedulingApplication" required>
      Mapped array of: The unique identifier of the provider for the scheduling application

      ```json CEL theme={null}
      provider_id.id_type
      ```

      ```json Example theme={null}
      scheduling.v1.SchedulingApplication.HEALTHIE
      scheduling.v1.SchedulingApplication.ACUITY
      ```
    </ResponseField>

    <ResponseField name="providers_viewed.map(x, x.name)" type="[]string" required>
      Mapped array of: The name of the provider

      ```json CEL theme={null}
      providers_viewed.map(x, x.name)
      ```

      ```json Example theme={null}
      [
      "Dr. Jane Smith"
      ]
      ```
    </ResponseField>

    <ResponseField name="profile_customer_id" type="string">
      The customer ID sent to the scheduling application from the form for the person viewing the scheduling availability, e.g. the Formsort responder\_uuid or Feathery user\_id

      ```json CEL theme={null}
      profile_customer_id
      ```

      ```json Example theme={null}
      "02afaa5f-9f26-43dc-a1f8-92d3d4f7a097"
      ```
    </ResponseField>

    <ResponseField name="insurance_payer" type="object">
      Insurance payer used in filtering availability (optional)

      ```json CEL theme={null}
      insurance_payer
      ```

      ```json Example theme={null}
      {
      "geographically_scoped_insurance_payer": {
      "geographic_locale": null,
      "insurance_payer": {
      "ehr_id": null,
      "id": null,
      "name": null
      }
      },
      "insurance_payer": {
      "ehr_id": null,
      "id": null,
      "name": null
      }
      }
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.insurance_payer" type="object">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.insurance_payer
      ```

      ```json Example theme={null}
      {
      "ehr_id": null,
      "id": null,
      "name": null
      }
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.insurance_payer.id" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.insurance_payer.id
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.insurance_payer.name" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.insurance_payer.name
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.insurance_payer.ehr_id" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.insurance_payer.ehr_id
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.geographically_scoped_insurance_payer" type="object">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.geographically_scoped_insurance_payer
      ```

      ```json Example theme={null}
      {
      "geographic_locale": null,
      "insurance_payer": {
      "ehr_id": null,
      "id": null,
      "name": null
      }
      }
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.geographically_scoped_insurance_payer.insurance_payer" type="object">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.geographically_scoped_insurance_payer.insurance_payer
      ```

      ```json Example theme={null}
      {
      "ehr_id": null,
      "id": null,
      "name": null
      }
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.geographically_scoped_insurance_payer.insurance_payer.id" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.geographically_scoped_insurance_payer.insurance_payer.id
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.geographically_scoped_insurance_payer.insurance_payer.name" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.geographically_scoped_insurance_payer.insurance_payer.name
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.geographically_scoped_insurance_payer.insurance_payer.ehr_id" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.geographically_scoped_insurance_payer.insurance_payer.ehr_id
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="insurance_payer.geographically_scoped_insurance_payer.geographic_locale" type="string">
      *Description coming soon*

      ```json CEL theme={null}
      insurance_payer.geographically_scoped_insurance_payer.geographic_locale
      ```

      ```json Example theme={null}
      null
      ```
    </ResponseField>

    <ResponseField name="profile_email_address" type="string">
      The email address sent to the scheduling application for the person viewing the scheduling availability

      ```json CEL theme={null}
      profile_email_address
      ```

      ```json Example theme={null}
      "joe@bloggs.com"
      ```
    </ResponseField>

    <ResponseField name="event_data" type="object">
      `HI` `PII` (Optional) Data associated with the event, *not* automatically stored on the Morf Profile

      ```json CEL theme={null}
      event_data
      ```

      ```json Example theme={null}
      {
      "referrer_domain": "example.com",
      "referrer_url": "https://example.com/schedule-appointment"
      }
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
