# 📆 Appointment Service vNext ## 🥇 MVP - Visibility to fitter's schedule - View SF appointments - Add follow-up appointments to SF from fitter-cockpit ## ✍️ Must-Haves - Canonical Appointment Model - REST Endpoint parity w/ current appointment service (OLS) - Wire this up to roger sales ## 🤞 Nice-to-Haves - Automate SF appointment creation from PAOF/fitter-cockpit - Post to AS API and it will deal with Roger Sales - View fitter's calendar in SalesForce - Schedule the call in SalesForce and we handle it from there ## ❓ Questions - Are there any customer journey diagrams we could look at? - ~~We'd like to see Specifically, what is the process for scheduling the tech setup call and when does it happen in the customer journey?~~ - It is scheduled two days before the initial appointment. - Have we looked at Calendly? - Yes, it is not hippa compliant - ## 💡 Ideas - If lead to opportunity conversion... - Customer schedules their own appointment w/consultant based on consultant availability - Else if initial appointment... 1. The consultant schedules the tech setup appointment based on tech setup team availability 1. The tech setup person schedules the fitting appointment based on fitter availability - Else... - The consultant or fitter schedules the follow up appointment based on fitter availability ## ⚙️ Appointment Models ### Canonical ```json { "calendar": { "id": "CALENDAR_ID", "name": "NAME", }, "created_at": "2021-05-21T07:46:31.000Z", "date_end": "2021-05-21T13:30:00.000Z", "date_start": "2021-05-21T12:30:00.000Z", "description": "DESCRIPTION", "guests": [ { "first_name": "FIRST_NAME", "id": "CUSTOMER_ID", "last_name": "LAST_NAME", "timezone": "America/New_York", ... } ], "id": "248dd2b0-7410-40e5-829d-99415c6837a2", "meta": { "salesforce": { "appointment_gid": "APPOINTMENT_GID", "opportunity_gid": "OPPORTUNITY_GID", "customer_gid": "CUSTOMER_GID", }, "type": "INITIAL|FOLLOW_UP|TECH_SETUP", ... }, "name": "NAME", "status": "INITAL|RESERVED|BOOKED|CANCELLED|RESCHEDULED", "updated_at": "2021-05-21T07:46:31.000Z", } ``` ### Opportunity Lifecycle Service ```json { "appointment_gid": "0Q09E0000012r7ZSAQ", "created_at": "2021-05-21T07:46:31.000Z", "customer_gid": "", "date_v2": "2021-05-25T05:55:00.000Z", "date": "2021-05-25T07:55:00.000Z", "id": "248dd2b0-7410-40e5-829d-99415c6837a2", "opportunity_gid": "0069E00000HbsUrQAJ", "status": "unknown-status", "type": "HEARING AID EVALUATION", "updated_at": "2021-05-21T07:46:31.000Z", } ``` ### iCal ```ical BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:America/Denver LAST-MODIFIED:20201011T015911Z TZURL:http://tzurl.org/zoneinfo-outlook/America/Denver X-LIC-LOCATION:America/Denver BEGIN:DAYLIGHT TZNAME:MDT TZOFFSETFROM:-0700 TZOFFSETTO:-0600 DTSTART:19700308T020000 END:DAYLIGHT BEGIN:STANDARD TZNAME:MST TZOFFSETFROM:-0600 TZOFFSETTO:-0700 DTSTART:19701101T020000 RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTAMP:20210907T203953Z UID:jane@hear.com DTSTART;TZID=America/Denver:20210907T120000 DTEND;TZID=America/Denver:20210907T123000 SUMMARY:Hear.com Consultation w/Jane URL:https://hear.com/fittings/abc-123 END:VEVENT END:VCALENDAR ``` ### Blueprint ```json { "appointment_id": "10999_0", "birthdate": "1977-05-25", "busy": true, "contactVerified": false, "end_time": "2015-09-02 19:30:00 GMT", "eventTypeId": 1, "location_id": 1, "location": "Weatherfield", "notes": "This is a note.", "onlineBookingSecret": "C1JG2I4HWF", "patient_id": 15, "patient_name": "Skywalker, Luke", "provider_id": 50, "provider": "Darth Vader", "start_time": "2015-09-02 19:00:00 GMT", "status": 7, "summary": "Skywalker, Luke", } ``` ### Calendly [More details...](https://calendly.stoplight.io/docs/api-docs/c2NoOjM3Ng-event) ```json { "created_at": "2019-01-02T03:04:05.678Z", "end_time": "2019-08-24T14:15:22Z", "event_guests": [ { "created_at": "2019-08-24T14:15:22Z", "email": "user@example.com", "updated_at": "2019-08-24T14:15:22Z" } ], "event_memberships": [ { "user": "https://api.calendly.com/users/GBGBDCAADAEDCRZ2" } ], "event_type": "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2", "invitees_counter": { "active": 0, "limit": 0, "total": 0 }, "location": { "location": "string", "type": "physical" }, "name": "15 Minute Meeting", "start_time": "2019-08-24T14:15:22Z", "status": "active", "updated_at": "2019-01-02T03:04:05.678Z", "uri": "https://api.calendly.com/scheduled_events/GBGBDCAADAEDCRZ2" } ``` ### Timekit [More details...](https://developers.timekit.io/reference#bookingsid) ```json { "attributes": { "event_info": { "description": "The lightning strikes at 10:04 PM exactly! I need you to be there Doc!", "end": "1955-11-12T22:15:00-07:00", "start": "1955-11-12T21:30:00-07:00", "what": "Catch the lightning", "where": "Courthouse, Hill Valley, CA 95420, USA" } }, "available_actions": [], "calendar": { "backgroundcolor": "#FFFFFF", "created_at": "2016-02-15T13:21:42+0100", "description": "Througout time, Marty and I really need to meet in order for the world not to collapse into Biffy cazyness.", "display_name": "Important encounters with Marty", "foregroundcolor": "#000000", "id": "bfa0b9fa-36aa-4ae6-8096-f3b20fbed1d2", "name": "Important encounters with Marty", "updated_at": "2016-02-15T13:21:42+0100" }, "completed": true, "created_at": "2016-02-11T12:39:45+0100", "customers": [ { "email": "marty.mcfly@timekit.io", "id": "a728e860-99c7-4009-8843-7d9ac5d7f53f", "name": "Marty McFly", "phone": "(916) 555-4385", "timezone": "America/Los_Angeles", "voip": "McFly" } ], "graph": "confirm_decline", "id": "58190fc6-1ec0-4ebb-b627-7ce6aa9fc703", "state": "confirmed", "updated_at": "2016-02-11T13:12:01+0100" } ``` ### OnSched [More details...](https://docs.onsched.com/docs/appointments-overview) ```json { "bookedBy": "dr_emmet_brown@outlook.com", // Email of the user who booked (if booked internally) "calendarId": "", // ID of of the Calendar, defaults to main "customerId": "23", // ID of the Customer "email": "marty@mcfly.com", // Email of the Customer "endDate": "2021-12-31", // End of the date range, defaults to the end of time "lastname": "Mcfly", // Last name of the Customer "locationId": "", // ID of the Location, defaults to Primary Location "resourceId": "5", // ID of the Resource "serviceAllocationId": "234", // ID of the Service Allocation (if applicable) "serviceId": "6", // ID of the Service "startDate": "2021-12-25", // Beginning of the date range, defaults to first appiointment "status": "BK", // The Status of the appointment (https://docs.onsched.com/docs/appointments-overview#appointment-status) } ```