No mail notification of cancellation; no automatic updates to google calendar.

Hi, I've almost set up my appointments configuration. There are two issues left so far:

1 No mail notification of cancellations: after I remove a previously made appointment, there's no mail notification to the admin or service provider.

2 No automatic update of appointments: I made a few test appointments however, they don't show up in the Google calendar until I synchronize it manually. So the synchronization works, it only doesn't update the calendar on itself.

The support access is still activated.

----
I'll also tell something about how I made it work so far for other users. You can see the appointments page on http://www.schoolofmusic.nl/afspraak-plannen. (It's a Dutch site but I guess you'll figure out how to read it).
I use appointments for a school of music (also with the name School of Music :slight_smile: ) I work with 15 independent music teachers. Some of them work on 2 locations on different days of the week.

The first issue I came across was in combining the service providers with specific locations on different days of the week. It's possible to combine a service or a service provider with a specific location but that wouldn't solve it with a mix of services, providers and locations. The option to make dummy providers would only work with one email address to forward to. Also, the shortcodes gave me some unpredicted outcomes so I was trying to create a way around using to much coding.
I decided to combine service and location in one service in which all services have the address added to it. This way I'm able to combine a single location to a service. If this gives too much services I could decide to split the appointments page into different pages for each instrument with the direct links described here: https://premium.wpmudev.org/forums/topic/service-providers-filtered-by-location.
There are also some service providers who work on different locations. With the normal settings it's not possible to create a timetable for different locations within one user profile. Therefore I created extra user profiles for each location, in order to set the correct workschedule for each location. The only problem here is that you can't set up multiple user accounts with the same email address.

Another thing was creating neat emails to the customers. In the standard settings Gmail removes all layout, even when changing the php in order to produce html mails so the only thing that seems to work here is creating tables. (It should also be possible by using another plugin but I didn't try that yet).
My customers need the following information:
Address of the location: when added to the service name this is displayed in the mail
Telephone number of the service provide: I add this to the name of each service provider.
A short instruction about how to get to the location. (I still have to figure this out).

When adding the calendar settings, I noticed that other users have to have their own API ID's and keys in order for this to work. Besides that, I seems to be that the settings for other users only can be set by logging in as the user you want to edit. I was told that this can be achieved by using a switch user plugin.

In summary, Appointments seems to be a very sophisticated plugin with a lot of options and it's the first one I came accross that actually does synchronize with Google calendar. I think there's still some work to create room for some more (but sometimes very needed) variables, but it's already good to use, even for multiple providers and services.

Hopefully you can use some of my experience. If you have tips on how to work around some issues described here, please let me know.

Cheers, Coen

  • Vinod Dalvi

    Hi Coen,

    Thank you for your question and sharing your experience with other members.

    1 No mail notification of cancellations: after I remove a previously made appointment, there's no mail notification to the admin or service provider.

    Are you talking about the mail sent on cancelling appointment or removing the appointment?

    Are other Appointments +/WordPress mails working fine?

    2 No automatic update of appointments: I made a few test appointments however, they don't show up in the Google calendar until I synchronize it manually. So the synchronization works, it only doesn't update the calendar on itself.

    I logged in to your site using support staff access and found the following error messages in the Appointments + log.

    [30 december 2014 01:49] Error calling GET https://www.googleapis.com/calendar/v3/calendars/hofp72qjvn8u9iairfouf8c7c4@group.calendar.google.com/events?timeMin=2014-12-30T01%3A49%3A05%2B00%3A00&timeMax=2015-01-13T01%3A49%3A05%2B00%3A00&singleEvents=true&maxResults=500&orderBy=startTime: (401) Invalid Credentials
    [30 december 2014 01:49] The insert did not create a real result we can work with

    I set the Appointments + option "Appointments will be sent to Google Calendar for" to All in the Google Calendar API Settings and now i am not getting any error message on clicking the "Test Connection" link to test Google Calendar appointments.

    Could you please check it now?

    Kind Regards,
    Vinod Dalvi

  • Coen

    Hello Vinod,

    1. It doesn't send emails when using the cancellation link in an email, nor when an appointment is removed otherwise. It also doesn't seem to delete appointments from the google calendar when deleted.

    2. The automatic updates are working now, thanks. I thought this setting meant that all appointments would be sent to the default calendar but this solves it. I noticed that appointments are also automatically sent to my personal calendar, is it possible to turn this off or happens this only for logged in users?

  • Jack Kitterhing

    Hi there @Coen,

    Hope you're well today and thanks for your questions.

    1: By default a admin doesn't receive notification of a cancelled appointment, add this code to the functions.php of your active theme to send the admin an email of a cancelled appointment.

    function my_app_email_on_appointment_cancelled ($app_id) {
    	global $appointments;
    	$to = $appointments->get_admin_email();
    	wp_mail($to, 'An appointment has been cancelled', "An appointment with ID {$app_id} has just been cancelled.");
    }
    add_action('app-appointments-appointment_cancelled', 'my_app_email_on_appointment_cancelled');

    Are you using the two way sync? Can you check in your wp-admin > appointments that they are correctly showing as removed there?

    2: It should only be adding them to the secondary calendar which is require for the Gcal synchronization, though there can be unexpected behaviour if using your primary calendar.

    3: This could be possible with some custom code, by adding new user meta to the service providers and then sending this in the email.

    Can you let me know how many service providers you have in total please and we'll try and get that working :slight_smile:

    Thanks!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.