A+ Google Calendar Integration Issue

Hi,

I have a site setup that uses A+ to manage bookings for a single service provider but with multiple services offered to different geographic regions setup through dummy service providers.

We've setup the Google Calendar API integration, as we need our service provider to be able to go into her Google Calendar and block out times she is unavailable and have those times not be selectable for bookings on the site.

For some reason, three of the dummy service providers are working in this fashion, but one of them isn't and so when our service provider updates her GCal, it affects the availability on the site for some of the services but not others.

Can anyone suggest what might be causing this?

Thanks!

-R

  • PC

    Hello R,

    Greetings and thanks for posting on the forums.

    If 3 are working fine, and one is not, it indicates an issue with the gcal account or may be some problem with the way settings are entered in the plugin.

    Have you double checked that ?

    PS : I see that you are using an Old version of the plugin and as I remember, you have got a customized version on your site right ?

    If that is the case, can you please test this on a test site with the latest version of the plugin installed and the same settings as you have right now ?

    Please advise.

    Cheers, PC

  • junction

    Hi PC,

    I've double checked every setting and as far as I can tell everything is correct.

    The A+ plugin we're using hasn't been customized, though the MP plugin has been, so I don't see how that could be an issue here.

    Setting up a test site and going through all the steps to configure the GCal integration would be unreasonably onerous and time consuming at this point (The GCal integration setup is like 17 step process), so is there nothing you can offer me here that doesn't require me to spend hours testing something that should by all rights be working?

    Thanks,

    -R

  • junction

    Hey Steve,

    I don't actually have each service provider assigned to a single unique service. I'm going to test that now though to see if it makes any difference.

    The capacity of each service does match the number of service providers though, as there is 1 service provider assigned to each service and the capacity of each service is set to 1.

    I've attached a screenshot of the service providers tab too.

    I'll follow up shortly as to wether or not assigning a single service provider to each service worked.

    Cheers,

    -R

  • junction

    @pxwm

    Preliminary testing here isn't looking good. For some reason the services that worked before still work, but even though I've created new service providers for each for the services and assigned them correctly, the same service's calendars still aren't getting updated when change is made in GCal.

    One other thing I thought might be an issue is that on the pages where the services' calendars are correctly being updated the users are prompted to select their region (Which are each in turn actually service providers which allows us to have different availability at varying times of the day in different regions) where on the pages that aren't working we aren't getting to do this as these are services that are delivered remotely so we don't care what their region is.

    Example of the code:

    Working

    [app_service_providers select="
    <h2>Step 1 - Select Your Location</h2>
    " autorefresh="1"]
    <h2>Step 2 - Select A Time</h2>
    [app_schedule service="1"]
    [app_pagination]
    [app_confirmation]
    [app_paypal]
    <h2>Step 3 - Pay For Your Order</h2>

    Not working

    <h2>Step 1 - Select A Time</h2>
    [app_schedule service=8]
    [app_pagination]
    [app_confirmation]

    I don't know that this should make any difference though. Please respond as soon as you are able, I need to get this fixed ASAP.

    Thanks,
    -R

  • pxwm

    Hi,

    I've checked your settings in the latest screenshot and read your latest post a number of times and I'm not sure if you have created additional service providers or the service providers in the latest screenshot are dummy service providers assigned to Helen.

    The reason I ask is that the earlier screenshots shows all dummy service providers where assigned to 'Helen'.

    The problem you are experiencing is difficult to assess remotely and it may be the right time if I checked the settings on you wordpress site than keep asking you to post screenshots.

    If you are happy for me to have Admin access to your dashboard then suggest you create a temporary Admin user profile and send me the log-in details to steve.billington@pxwm.co.uk.

    Also could you confirm if this is a live or demo site and the url of the 'make an appointment' page.

    Please let me know if you wish me to review the settings and if so when you have set up the temporary Admin access and sent me the details.

    Regards
    SteveB

  • PC

    Hey Steve,

    Thanks for being on top of it while I was away for the weekend.

    @junction : I have tagged our lead developer on this post and requested his urgent presence for helping us out.

    I can have a closer look at the settings and replicate them on my lab site as the current tests I did on my lab site, worked fine.

    You can use the contact form , mark the email to my attention, include a link to this thread and include the login details.

    Please select, I have a different question from the list when filling the form.

    Cheers, PC

  • Vladislav

    Hello,

    The problem as described sounds a bit like we're hitting some sort of limit just before this one calendar gets synced. Just to make sure we covered the basics, I see that the "Appointments upper limit" setting is empty, which means that the default days limit should be at the default, 365. Just to make sure, are you perhaps changing this by hooking up to "app_limit" filter?

    Also, can you please check the amount of the appointments that get synced? Currently, A+ will cap at 500 Google Calendar events, that's the maximum amount it will request from GCal on synchronisation. It's a long shot, but can you please check if we're perhaps reaching this cap in total?

  • pxwm

    Hi - Vladislav,

    This is SteveB not @juntion

    I was extremely interested in your feedback about the imposed limits and would appreciate if you could confirm the following:-

    Are the limits only imposed on syncronization from google calendar to A+ and not when A+ is 'pushing' an event to google?

    Also I would appreciate if you could confirm how the limit works because our client will be modifying 'confirmed' appointments using the google calendar and not the backend. They will only be using the backend if they need to delete an appointment.

    Where is the limit calculated from as we have set the default days to 365 and there will multiple appointments per day and I need to understand how far ahead they can make appointments?

    Qu1 - If there are more than 500 'active' appointments and an appointment within the first 500 is modified will this be synchronized correctly?

    Qu2 - Likewise if the 'active' appointment is outside the first 500 and it is modified will this be synchronised?

    Qu3 - Are the first 500 appointments calculated from how close they are to the current date or in the order which they were booked?

    Regards
    SteveB

  • pxwm

    Hi - Vladislav,

    Further to my previous post I've read the rules and conditions on the google site about api limits and quota:

    https://developers.google.com/analytics/devguides/config/mgmt/v3/limits-quotas

    If I've understood this correctly it states:-

    General Quota Limits (All APIs) - 50,000 requests per project per day – can be increased

    Management API - Data Upload - 500 upload operations per project per day

    I've reviewed the limits stated in each of the service providers api quotas through their google account and the limits it quotes are:-

    10,000 per day and 5 per second.

    I would appreciate if you could confirm what causes the 500 limit based on the above?

    If you would prefer I open a new topic please let me know

    Regards
    SteveB

  • junction

    @pxwm - Have created you a login, you should receive a notification via email, feel free to look around and get back to me if you notice anything.

    I have created dummy service providers that are assigned to Helen, as she is the operator of the business, and our requirement here is that we have a single calendar where she can manage her appointments, and without using dummies there no other way we could do this.

    @pc - Have created you a login as well, and sent the details to you via the contact for since I don't have an email for you.

    @Vladislav - I don't think this would likely be any kind of limit issue, as the calendar is quite new and there are at most 25 total appointments on both the calendar and the site at present.

    Please let me know ASAP if any of you can figure this out. We've had so many issues with both A+ and MP to this point that we're very seriously considering flat out abandoning the dozens of hours I've dumped into this and moving to another solution as frankly it just doesn't seem that A+ and MP integration works as advertised and at every turn something it seems it ought to be able to do breaks and causes me a ton more headaches and I just can't keep going through this.

    Awaiting your replies eagerly.

    Thanks,

    -R

  • pxwm

    Hi @junction,

    I've checked all your settings and I have a few questions.

    In your original post you state "For some reason, three of the dummy service providers are working in this fashion, but one of them isn't"

    It appears you have 10 Dummy Service providers with the majority assigned one service each and set up pointing to Helen.
    Could you please list which ones appear work and which don't?

    Is there any particular reason you haven't set Helen as a Service provider and assigned one of the Services and set the working hours?

    I just wonder if this is causing you the problem!

    When I've assigned a Dummy to a 'real' Service provider I have always assigned the 'real' Service Provider at least one Service.

    May be worth a try.

    Please keep me updated

    Regards
    SteveB

  • junction

    Hey all,

    Sorry for wasting your time here but I've figured out a solution. I didn't really even need to use dummy service providers for a number of the services on our site, so I've assigned the majority of the services directly to our main service provider (The user Helen) not as a dummy and now the integration works.

    Thanks for all your support though, I wouldn't have had the idea to do this without you guys.

    Cheers,

    -R

  • Vladislav

    Hello,

    @junction I'm really happy to hear you managed to resolve the problem. @pxwm (SteveB), thank you very much for your assistance. As for the questions you had, the plugin is currently setting up two limits when fetching events *from* the Calendar. The first limit is the lookahead days (how far ahead the Gcal events will be fetched) - this is controlled by the mentioned "Appointments upper limit" setting and/or "app_limit" filter result. The second limit is the actual number of events that will be pulled from Gcal, and it's currently (as of v1.2.8) hardcoded to 500 (as set up in includes/class.gcal.php, AppointmentsGcal::import_and_update_events() method). Exposing this upper limit for filtering and/or changes via a define isn't a problem, however, I'd just like to point that juggling 500+ events around between the servers is quite a lot, regardless of the Google service limits. At some point, the script execution times and even the overall performance could perhaps become an issue with this kind of volumes.

  • junction

    @pxwm @PC @vladislav

    Hi again,

    Turns out my issue is definitely not fixed. I'm not sure what happened, as I must have changed some small thing but I cannot now get the integration to work as it did yesterday if indeed it was working at all.

    This is what I want. Please for the love of god and my bloody sanity somebody just tell me how to make this plugin do what I want it do so I can stop stressing out about this every single day.

    We have ONE physical person who provides all services in person and online.

    We have two services we provide in person, each service can occur in one of three regions in our city. We have created three service providers, one for each region, and assigned those service providers as dummies to the the two services and used the service provider selector on the appropriate pages to get users to select their region.

    We have 7 other services we provide via Skype/Telephone. I've assigned all these services to Helen as a non dummy service provider.

    ALL I WANT, is for Helen, who's super non-tech savvy, to be able to go into the GCal I've created for her and to be able to block out times she is unavailable to provide services (Due to other appointments/whatever), and have those blocked out times be reflected in all the services on the site so that clients can't book times when she is unavailable...

    HOW DO I DO THIS? It shouldn't be this hard. Using WMPMUDEV plugins has turned into a nightmare for me and I need it to stop.

    Thanks,

    -R

  • pxwm

    Hi,

    Sorry to hear you are still having problems.

    Hope you don't mind but I've just logged in using the temporary admin access you gave me.

    I've just checked your settings and the first thing I notice is that you have set Helen as a 'Dummy' Service Provider.

    Can you please go to the 'Service provider' tab and uncheck the 'Dummy' check box for Helen so she is assigned as a 'real' Service provider and leave the other three set as Dummy Service providers. This is because you must have at least one 'real' Service Provider

    I've checked all the other settings in all the tabs and they look fine so hopefully making this change will fix the problem.

    If it does work you may wish to consider setting 'Use Built-In Cache' to Yes in the Advanced settings section in the General tab as this should speed up loading times when making an appointment

    Could you please check if this now works and let me know the results.

  • junction

    @pxwm

    I'd tried that already honestly. I've tried having her set as a dummy, I've tried having her set as not a dummy. It still doesn't work. I'm only getting the connection to work for the two services assigned to the three region based dummy service providers.

    I've tried having her set as not a dummy assigned to a single service and creating a dummy service provider for the other six. I've tried assigning all the services to another dummy service provider. I've tried bloody everything. All possible combinations I can think of here.

    And nothing is working. Frustration level = infinite. It should work. But it doesn't.

    I've blocked out in GCal Monday May 27th thru June 2nd so none of those times should be available, but all of the seven non in person services appointment pages on the site are still showing availability.

    Please let me know if you can come up with anything else.

    Thanks,

    -R

  • pxwm

    Hi,

    I thought it would be helpful if I tried to block out times using GCAL.

    I don't quite have the same settings as you as I don't have any dummy service providers set up and I have two service providers and they have their own google calendars but suggest this should not be an issue to test out.

    These are my findings:-

    1. I created a google calendar event for SP1 blocking out a sequential set of dates.
    2. I logged in to SP1 in the Wordpress backend to immediately syncronchise A+ with google calendar and this worked fine and showed the dates as unavailable in the A+ appointment calendar
    3. I then did the same for SP2 but this time it didn't show the times were unavailable in the A+ appointment calendar. However out of interest I tried to make an appointment for SP2 for a time within the blocked out times and it showed a message saying 'sorry' this time slot wasn't available therefore it clearly had worked and I suspected it was taking time to show the times as unavailable so I left it 15 mins and sure enough it showed the times as unavailable.

    Observations:-

    Suggest you carryout further tests as you did before.
    That is: You block out the times for Helen in the google calendar.
    Then check in the A+ appointment calendar
    If the times are still showing as available try making an appointment and see if it indicates unavailable as a pop up message.
    If it does then wait at least 15 mins and check again. Hopefully now it will show as unavailable.
    Likewise if you delete a block of times directly in the google calendar I suggest you wait at least 15 mins to see if it has made the times available in the A+ calendar.
    I appreciate you can 'force' synchronisation by logging in to the relevant service provider Wordpress user profile but suggest you wait for the standard 15 min synchronisation.

    IMPORTANT - If you make an appointment or block out times in the google calendar these will be recorded in the backend in the 'reserved by GCAL'
    Assuming you are only using the google calendar to block out times then the only thing you need to be sure of is that the setting is correct for the 'Disable pending appointments after (mins)'field in the 'General' tab as this determines when a 'pending' or 'reserved by GCAL' appointment is removed but not deleted.
    I've checked your settings and currently it is at default which is 60 mins.
    However reading the note alongside the field it seems to imply that if the starting time has passed for 'pending' appointments and 'reserved by GCAL' these will be removed which may cause a problem so I'm going to test this in our site.

    I hopeful it will work based on the above findings.
    Please let me know how you get on.

    Note for @vladislav

    I did identify one possible bug which is:-

    If you create an event direct form the google calendar and say name the subject as 'Closed for Appointments' when it is recorded in the backend in the 'reserved for GCAL' tab the actually subject name is the first service id
    e.g. If the 1st service id is id=3 and is named 'eye make-up' this will show as the subject name in the 'reserved by GCAL' tab.

    Regards
    SteveB

  • pxwm

    Hi,

    Further update.

    I can confirm after testing that blocking time out via google calendar will be opened up after the start of the block has passed even if the block is still current.

    The only way to ensure the block is maintained is to log-in to the A+ backend and go to the 'reserved by GCAL' tab and check the checkbox on the left of the appointment and then change the status to 'confirmed'.

    The reason you have to do it this way is that you cannot auto-confirm GCAL appointments and if you select an individual appointment when in the 'reserved by GCAL' tab you will notice you cannot amend the status.

    So this would mean Helen reserving the block via google calendar and then someone logging in to the A+ backend to change the status of the appointment to 'confirmed' to maintain the block.

    Hope this helps
    Regards
    SteveB

  • junction

    @pxwm @Vladislav

    Hi Steve,

    Thanks for your efforts here. Unfortunately it's not looking like any of what you're suggesting is working.

    I've tried adding blocked out time's via GCal and then confirming those times in the Reserved by GCal tab in A+, but for some reason even after they have been confirmed those times are still showing as available in the A+ calendar on the site for the services assigned to Helen.

    You're welcome to log into the site and see for yourself.

    This is really frustrating as I keep going through these situations where things that should by all rights be working aren't.

    Can one of the developers please comment? I'm really under the gun here with a very frustrated client and am very close to having abandon A+ entirely which would result in me having wasted dozens and dozens of hours. Which would suck. A lot.

    Please let me know if you can come up with anything else.

    Thanks,

    -R

  • pxwm

    Hi,

    I think I may have identified the problem.

    You have a main calendar set up in A+ 'Google calendar' tab and you have the setting 'Allow Service Providers for Google Calendar API Integration' set to 'No' meaning that the google api synchronization is going to occur between A+ and a single main google calendar.

    Therefore when you block a time out via google calendar you are blocking out against the A+ main calendar and so A+ doesn't know that you are trying to block out time for the 'real' service provider.

    With this setup it will work fine from A+ to Google calendar but not the other way round.

    Is it possible you could try the following:-

    Before doing this you may wish to take a full backup of the site and if you have live appointments you may wish to make a note of them and recheck after the changes.

    You are going to remove the main google calendar settings in the A+ 'Google calendar' tab and use the unique keys etc to create a google calendar api for 'Helen'

    Log-in to the Wordpress backend as admin
    Go to the A+ 'Google calendar' tab and set 'Allow Service Providers for Google Calendar API Integration' set to 'Yes'

    Then save a copy of the following fields:-

    'Key file name'
    'Service account email address'
    'Calendar to be used'
    'Event summary (name)'
    'Event description'

    Make sure you have a safe copy of the data then remove this from the fields.

    Then set the field 'Integration Mode' to Integration disabled

    Now log-out of Wordpress admin and log-in as Helen. You have to be logged in as the 'real' user to make the following changes.

    Once logged-in as 'Helen' select the Wordpress 'Profile' (not A+) on the left hand and scroll down and you should see the same fields as you had in the 'Google Calendar' tab

    Now copy the data you have saved into the relevant fields

    Then set the field 'Integration Mode' to 'A+<-> GCal (Syncronization)'

    This should now have set up Helen as the main Google calendar.

    Could you then click the 'test connection' in Helen's profile page to ensure you receive a success message.
    Could you then check that this test has been received in the Google calendar

    If all appears to be working could you first make an appointment from the A+ appointment calendar for the services Helen is assigned to and also at least one appointment for a service that is assigned to a dummy service provider and confirm they are received in Helen's Google calendar.

    If all working correctly could you then try and block out a date as per my previous post.

    I'm hopeful this will work and not only block out Helen's time but also those of the dummy service providers as they are assigned to Helen.

    Please let me know how you get on.

    Regards
    SteveB

  • PC

    Hey Ryan,

    Thanks for the details.

    I see that Steve is working on the issue with you and he is doing a great job with the same. While It should be me as a staff who should be on top of it but it seems that he has already posted a few great suggestions and I just wanted to make sure that you have tried them out before we dig deeper.

    Steve, I just sent a few rep points your way for being awesome :slight_smile:

    Please advise.

    Cheers, PC

  • pxwm

    Hi,

    Yes that's correct.

    To confirm:-

    >log-in as admin

    >select A+ settings then select 'Google Calendar' tab

    >Then set 'Allow Service Providers for Google Calendar API Integration' to 'Yes'

    >Then set 'Integration Mode' to 'Integration disabled'

    >This should then make the google calendar fields visible in Helen's Wordpress profile.

    >Once you have saved all the data in the fields as detailed in the previous post then log-out of admin

    >Then log-in as Helen's into the Wordpress dashboard.
    >You have to do this to change Helen's details.

    >Once logged in you should see 'Profile' in the left hand vertical menu.
    >To confirm this is Helen Wordpress profile not A+

    >Click on this and scroll down and you should see the GCAL fields the same as in the main 'Google Calendar' tab.

    >Hope you don't mind but I temporarily changed the settings as above and I can confirm Helen's profile displays the GCAL fields.

    To confirm I have changed the settings back so you can make the changes as detailed above.

    Hope all goes well and this resolves your problems.

    Regards
    SteveB

  • junction

    @pxwm

    So I've setup Helen's GCal settings in her profile and tested and the two services that had been setup with the three dummy service providers we're still not integrating properly.

    I logged into each profile and added the GCal integration information to each though and they now appear to be working.

    Can you foresee any issues with this setup? It looks like this problem is finally licked but I want to ensure that as there is regular service provider and two dummies associated to the same GCal that its not going to cause any problems.

    Thanks!

    -R

  • PC

    Can you foresee any issues with this setup? It looks like this problem is finally licked but I want to ensure that as there is regular service provider and two dummies associated to the same GCal that its not going to cause any problems.

    If the dummy providers are attached to Helen, then even if we don't use a Gcal for them, and simply allow users to book appointments, it should go to the Gcal of Helen as ultimately that appointment will go to her calendar and make the slot busy.

    Let me check with @Vladislav if that is how it should go.

    Cheers, PC

  • pxwm

    Hi @junction,

    Great news.

    I am surprised though that you needed to setup the GCAL for each of the dummy service providers as @PC says as the dummies are assigned to Helen I would have expected the GCAL to have integrated fully by only setting up GCAL to Helen.

    Hope you don't mind but thought it would be easier if I logged in for the final time just to check the GCAL settings as it may also help @Vladislav with his response.

    I can confirm that you have setup Helen and all the dummies with the same unique private key etc.

    This would normally cause a problem if they were 'real' service providers.

    Could I ask you to check one final thing which should confirm if there is any conflict with using the same GCAL unique private key:-

    >Could you log-in to Helen's Wordpress user profile and click on her Wordpress profile and scroll down to the bottom of the page and click 'test connection' and confirm that you receive a success message at the top of the page.
    >Could you then log in to the google calendar and confirm you receive a test appointment.
    >If you do could you then do the same for each dummy service provider. To confirm you will have to log-in to each dummy service provider profile to click on the 'test connection'

    If this works correctly then I would suggest there isn't any conflict with the fact that you have used the same unique private key across the 'real' and 'dummy' service providers.

    Hopefully @Vladislav will agree and you and your client can enjoy the great features of the plug-in.

    All the best and don't forgot to remove my temporary admin access.

    Regards
    SteveB

  • PC

    Hiya,

    Greetings and thanks for being a great community member.

    We haven't heard from you on this one for long and I am doing a regular followup to see if there is still something we can assist you on this thread.

    Just to manage the support issues more efficiently, I am marking this thread as resolved for now however this is not being done to avoid your questions in any ways.

    Please feel free to mark this is "Not resolved" in case you have further questions and we would be back on it.

    Thanks a lot for being with WPMU DEV.

    Cheers
    PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.