Google Calendar sync not working

I just setup Google Calendar sync yesterday and it does not seem to be working. Can someone have a look? I granted support access.

Thanks

  • Vinod Dalvi

    Hi STEVE,

    Thanks for posting on the forum.

    I logged in to your site using support staff access and found in the Appointments+ logs the following error message gets displayed.

    https://www.googleapis.com/calendar/v3/calendars/igne93hou2i8r4q7p53duhqk3s@group.calendar.google.com/events: (400) Invalid attendee email.
    [02/07/2015 12:17 pm] The insert did not create a real result we can work with

    Could you please make sure the email address used by attendee is valid email address?

    Is the test GCal appointment working fine for you on clicking the link "Test Connection"?

    Try clicking the links "Import and Update Events from GCal Now " and "Export and Update Events to GCal Now" as shown in the attached screenshot to update it manually.

    Regards,
    Vinod Dalvi

  • Michelle Shull

    Hi, Steve!

    Sorry for the delay here.

    The attendee is the person setting the appointment. If the person making the appointment has an invalid email address, you will see the error mentioned above.

    The strict standards message you see isn't an error or warning, just a note to keep developers up to date on PHP.

    Ultimately, the issues you're seeing here sound like a plugin conflict. I think another plugin, or plugins, may not be playing nicely with Appointments here, so critical information is not being sent. Can you please do a quick test to confirm this by briefly deactivating all your plugins and trying the various gCal related links in Appointments+?

    Thanks!

  • STEVE

    So we are having some trouble with the Google Calendar sync again. I decided to reopen this thread. My previous issue wasn't ever really resolved, it just started working on it's own. And it was working ever since, but now we are having another Google Calendar sync issue. And we haven't installed any plugins or updates or made any changes that might have caused this. This new issue just started on it's own.

    So here is the issue.

    We offers 2 services. The 2 services are listed as "New Patient Visit" and "Return Patient Visit".
    When a patient makes an appointment via Appointments+ the time slot they booked is no longer available on the "New Patient Visit" calendar or the "Return Patient Visit" calendar. This is correct behavior, as the service provider can't provide service to more than one person at a time.

    However, when we sync appointments made on Google Calendar into Appointments+ the times reserved are only removing time slots on the "Return Patient Visit" calendar; not both calendars like I described above. This causes a problem because if a Google Calendar reserved time slot only removes availability on one calendar and not the other, if someone sees the times slot as available and selects it, we will have 2 people booked for the same time.

    As I was researching this I noticed that all of the appointments reserved by Google Calendar listed in the Appointments+ back-end are associated with the "Return Patient Visit" calendar. See the attached screenshot. I'm not sure how they are being associated with that service, but regardless it should still be blocking out those time slots from all calendars the way Appointments+ reserved appointments does. I also noticed that the Google Calendar reserved appointments aren't associating the appointments with any particular service provider, they are associating the appointments with "Our staff". I don't know if this might have something to do with the problem. Maybe the appointments need to be associated with the appropriate service provider? I don't know. We have one service provider that is only available Mondays and another service provider that is only available Tuesdays through Fridays.

    Who can help resolve this issue?

    Thanks

  • Ash

    Hello @STEVE

    I hope you are well today.

    Well, this is kinda default behavior. When you have multiple services, the system can't determine which calendar it should book.

    I am tagging an available developer @Jose from second level support line in this thread for his valuable opinion on this issue. Please note that, developer response might be slower than usual staff response, so we appreciate your patience on this.

    Cheers
    Ash

  • Jose

    Hi there @STEVE,

    Before continuing with the troubleshooting process, I need to ask you to update Appointments+ to the latest version.
    According to the information in our system, you are running version 1.4.6 and the current version is 1.4.8.

    While I don't think that the update would fix the problem here, it is always recommended to be up to date. Also, it would be better to apply any necessary fix after the update.

    The issue here sounds weird to me. Still didn't look into the code but -if I recall correctly- the timeslot is expected to be set as busy even when the provider is 'Our Staff'.
    Could you please grant support access so that I can take a closer look at your settings? I suspect that there might be something interfering with the 'capacity' value.

    Cheers,
    José

  • STEVE

    Updating to the latest version is not really an option right now. There were a lot of customizations made to the code that we don't have time to replicate for each new version that is released. It was working fine, now it's not.

    I will grant you support access, but please do not attempt to update Appointments+ or any other plugin. And please remember that this is a live site. All of the plugins that are activated serve a very particular purpose.

    Thanks

  • Michael Bissett

    Hey @STEVE, Michael here! :slight_smile:

    While the first available service would be assigned upon importing an appointment from Google Calendar (due to how the system works presently), I would want to try changing the capacity to 0 (as I see that you've got it set presently to 1).

    If that doesn't work, then I would try taking a different approach to things here. Instead of having the Google Calendar integration be set up in the main settings area, I would instead set "Allow Service Providers for Google Calendar API Integration" to "Yes", and set up a separate calendar for each provider.

    In your case, what you could do, would be to use the same key and service account email address for both providers, but just have a different calendar for each provider (you'd need to create a second calendar inside of your Google account, and assign the one you've got set up in the main settings area to your first provider).

    That way, both calendars are still available inside of your Google Account (so your providers don't have to set this up on their own), yet it's all still properly imported.

    How's that sound? :slight_smile:

    Please advise,
    Michael

  • STEVE

    Hi, I'm sorry for the delay. I was out of town for a while. So I was reading over your solutions. I tried your first idea and it didn't help. Now before I go ahead and try the second solution I need to ask you this. When making an appointment in Google Calendar (with the intention of syncing that appointment into Appointments+) how do we instruct Appointments+ to associate the appointment with a specific Service? For example, regardless of the service provider, we only offer two services, a 90 minute "New Patient Visit" service and a 60 minute "Return Patient Visit" service; both only allowing a capacity of 1. Right now when Google Calendar syncs an appointment into Appointments+ it is automatically associating that appointment with the "Return Patient Visit" service; regardless if the appointment is scheduled for 90 or 60 minutes on the Google Calendar. It is consistent and never associates the appointment with the other service. I have attached a screenshot of these two services as they are set up in Appointments+. You will notice that the "Return Patient Visit" service has an ID of "2". So somehow Google Calendar is telling Appointments+ to add an appointment and associate the appointment with service number 2. How can we change this behavior so that there is control over which of the two services the appointment should be associated with?

    Thanks

  • Michael Bissett

    Hey @STEVE,

    When making an appointment in Google Calendar (with the intention of syncing that appointment into Appointments+) how do we instruct Appointments+ to associate the appointment with a specific Service?

    ...You will notice that the "Return Patient Visit" service has an ID of "2". So somehow Google Calendar is telling Appointments+ to add an appointment and associate the appointment with service number 2. How can we change this behavior so that there is control over which of the two services the appointment should be associated with?

    At the moment, this is something that would require custom development, as what you're running into here is something previously explained by the developer (though I note with curiosity that the "Return Patient Visit" service is being chosen, rather than the "New Patient Visit" service, as the latter is the one with a lower ID):

    https://premium.wpmudev.org/forums/topic/how-to-properly-create-appointments-in-gcal-for-integration#post-667223

    Given the situation though, one idea that comes to mind would be to have a separate provider, with a separate calendar for each provider.

    Example: Service provider "Bob" has two users set up on the site, one for the first service, and one for the 2nd service.

    We do have the "Service provider names" add-on, which would allow you to choose what name is displayed to clients making an appointment, so even though Bob's two users would have different usernames, he could have the same display name set up for both users.

    As for setting up the Google Calendar integration for each user... for Bob, our test service provider, he could still use the same Google service account for both WordPress users, the only difference here is that he would have to make sure that two separate Google calendars are set up for each user of his (one calendar for "Return Patient Visit", and one for "New Patient Visit"), and that each WordPress user is set to only sync with it's calendar.

    How's this sounding so far? :slight_smile:

    Please advise,
    Michael

  • STEVE

    In the example you described above how would this work on the front end of the site for patients scheduling appointments? Right now we use the name of the location as the service provider name because there is really only one provider but she provides services in 2 locations. So the way I set up the front end of Appointments+ for paitents, they are able to choose from four links that lead to 1 of 4 calendars.
    - Location 1 return patient visit
    - Location 1 new patient visit
    - Location 2 return patient visit
    - Location 2 new patient visit

    When they click on one of those links I present them with a calendar that is preassigned to the appropiate location (aka service provider) and service (new or return visit). Since the 2 service providers (locations) both provide both the 2 services, even if the patient chooses a link that leads to, lets say, the new patient visit calendar, they should still see unavailable time slots for where either of the 2 services has already been scheduled.

    I think the problem with the method you are describing is that I would be splitting the services away from each other so that they exisit on different calendars. How would that work on the front end? For example I need to make sure patients can NOT schedule a time slot that has been booked for either a new patient or return patient service, so these time slots need to be on the same calendar.

    The current business schedule is Mondays at Location 1, providing new and return patient services at this location by one service provider. Tuesdays to Fridays at Location 2, providing new and return patient services at this location by one service provider.

    Considering all of this, how can we make sure this works as needed?

    Thanks in advance.

  • Michael Bissett

    Hey @STEVE, thanks for your patience! :slight_smile:

    Given the situation you've described here, it looks like we're back to the custom development side of things, as that'd be what's required to get this all working the way you're wanting to.

    I'd advise posting a job for this on our Jobs Board, and having one of our Pros cook up a solution for you:

    https://premium.wpmudev.org/wordpress-development/

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.