Share via

Duplicate emails and missing functionality from the Booking API/Graph SDK

Ross Clarke 0 Reputation points
2023-07-26T14:26:18.36+00:00

When creating a virtual appointment using the SDK i run the following code:

            BookingAppointment bookingAppointment = new BookingAppointment();
            bookingAppointment.StartDateTime = new DateTimeTimeZone { DateTime = "2023-07-26T10:00:00", TimeZone = "UTC" };
            bookingAppointment.EndDateTime = new DateTimeTimeZone { DateTime = "2023-07-26T10:15:00", TimeZone = "UTC" };
            bookingAppointment.IsLocationOnline = true;
            bookingAppointment.ServiceId = "";
            bookingAppointment.StaffMemberIds = new List<string>();
            bookingAppointment.StaffMemberIds.Add("");
            bookingAppointment.ServiceNotes = "Test append";

            bookingAppointment.Customers = new List<BookingCustomerInformationBase>();
            BookingCustomerInformationBase patient = new BookingCustomerInformationBase();
            patient.OdataType = "#microsoft.graph.bookingCustomerInformation";
            patient.AdditionalData["name"] = "Test Patient";
            patient.AdditionalData["emailAddress"] = "******@gmail.com";
            bookingAppointment.Customers.Add(patient);
            

            var result = await client.Solutions.BookingBusinesses[bookingBusinessId].Appointments.PostAsync(bookingAppointment);

The appointments gets created ok..except the service notes which has a lot of useless information (that gets appended to when I try to clear instead of overwriting?? - doesn't do this from Postman or the Graph even though the same code is being passed and the same endpoint being called).

The main problem is it sends multiple emails to the customer? When I set the OptOutCustomerEmail flag to true is still sends the first email and not the confirmation one(see image below)? How do i update this functionality to only send the confirmation email and not the first email that contains information that is not relevant to the customer and appears messy?

I also noticed when updating an appointment time through the API or SDK it seems to send a cancelled appointment email to the customer as well as an update email. These often arrive in the wrong order so the cancelled email appears as the latest email which would be confusing for the customer. Why does it send the cancelled email when i am only changing time and not cancelling?

When sending an update to the customer the "Join Meeting" button appears in the email but cannot be clicked. It works on the reminder email but not the update?

User's image

Microsoft Security | Microsoft Graph
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.