13.Hints and tips

13.1Slots backend overview

In the TeamBooking's dashboard you can see a Slots tab that is convenient if you want to take a brief look at all your availability slots from now on (past slots won't be shown).

Administrators will see all the Service Providers slots, while a Service Provider will see only his own slots.

This is particularly convenient for Event Service slots containing one or more reservations. Under the Actions column you can have access to a list of the reservations for that slot and export a list, or even inspect each reservation's details.

By default, all the slots until a year from now are listed. You can change the time frame up to three years from now, and even filter by service and by service provider. You can also filter the slots by availability status or choose to list only the slots with one or more reservations.

13.2Business workflows

TeamBooking is designed to make a team of service providers to work together, but of course it can work very well also if you're alone.

Essentially, there are two "actors":

  • Administrator. You, the one who runs the business, creates the services, manages the plugin and so on.

  • Coworker. The service provider, he plans his availabilities for the services, and uses his own Google Calendar to do that.

The administrator can be also a service provider (coworker), and that's the case when you're running your business alone.

Ok, but how does that have anything to do with the WordPress roles?

All the WordPress administrators are also administrators in TeamBooking, and they have the ability to act as service providers too.

You can specify which additional WordPress role is allowed to act as service provider (coworker) in TeamBooking, via the Core Settings tab.

But let's make some examples.

13.2.1Working alone

I am the administrator, and I am the service provider.

The typical use case is a professional (e.g. a dentist) who wants to let the customers to book appointments through his own website.

In this case, the administrator and the service provider (coworker) are the same thing. He creates and configures the services, he plans the availabilities in his Google Calendar.

You don't need to allow any other WordPress role to be a service provider.

13.2.2Working with a team

I am the business head, having a team of service providers. They should be able to plan their availabilities via their personal Google Calendars.

The typical use case is: you run a business (e.g. a clinic) offering services, and you have a team of service providers (e.g. medics) planning availabilities for that services.

So you are the Administrator of the WordPress site, and the service providers are WordPress users with a certain role (e.g. Contributor, or Author)

Nothing prevents you to be a service provider too (a medic, in our example), as we previously said Administrators can always be service providers if they need to.

So, just choose the WordPress roles you want to make service providers (coworkers) under the Roles allowed to be Coworkers setting.

The unckecked roles won't be able to see the TeamBooking settings page in their WordPress dashboards.

13.2.3Dealing with Shared Google Calendars

And what if a service provider shares his Google Calendar with me, so I can plan and control his availability through my Google Account?

You can't use shared Google Calendars like that, let's see why.

Let's suppose one@gmail.com is the Service Provider, which gave the authorization to TeamBooking and have a Google Calendar where to place availabilities on. Then, he share his Google Calendar with your Google Account (two@gmail.com). What happens when you start to create availability events on that shared calendar?

When you create events in a shared Google Calendar that you don't own, you will still be considered as the creator of those events. So the situation will be:

  • Google Calendar owned by the service provider's Google Account (one@gmail.com in our example)
  • events on it, created by your Google Account (two@gmail.com in our example)

In this particular circumstance, TeamBooking is only allowed to read those events, rather than edit them. Which means that the frontend calendar will be ok, but when someone tries to book one of those slots, they can't because the slots will be in read-only mode. If you are logged in as Administrators or as a Service Provider, you can see those read-only slots appearing with an advice:

which is quite descriptive, as it states that the plugin can't edit the event because its owner is not the same as the owner of the calendar.

With old TeamBooking's version (or if, for some reasons, the read-only mode fails) the customer is able to submit the reservation, but the attempt will return the following error:

Cannot make the reservation! Sorry, you should contact the administrator providing these informations: Google API error: Error calling PATCH https://www.googleapis.com/calendar/v3/calendars/{YOURCALENDAREVENTSTRING}: (403) The operation can only be performed by the creator of the event.

Unfortunately, at this stage and due to Google security policies, there is nothing you can do about it. So you can still use shared Google Calendars with TeamBooking, but the creator of the availability events on them must be the Google Account that owns the Calendars.

13.3Query parameters

Query parameters are a useful way to a further customization of your frontend calendar pages.

At the moment, TeamBooking recognizes the following query parameters:

  • tbk_date

    Used to skip the calendar and show directly the slots list of a given date. The value can be almost any readable date, for example 12august. If some elements are omitted, like the year, the plugin assumes the current value of it.

    Example: if the frontend calendar shortcode is on the http://mysite.com/booknow page, you can visit http://mysite.com/booknow?tbk_date=12august to go directly to the slots list of 12th August of the current year. If you have more than one calendar shortcode in the same page, all the instances will react to the query parameter.

  • tbk_month

    Used to force the calendar to point at the specified month. The value can be almost any readable month value, for example september or 09. If the combination of month and year points to the past, the current month at the current year will be shown instead.

    Example: if the frontend calendar shortcode is on the http://mysite.com/booknow page and the current month is january, you can visit http://mysite.com/booknow?tbk_month=september to go directly to September of the current year.

  • tbk_year

    Used to force the calendar to point at the specified year. The value can be almost any readable year value, for example 2019 or 19. If the combination of month and year points to the past, the current month at the current year will be shown instead.

    Example: if the frontend calendar shortcode is on the http://mysite.com/booknow page and the current year is 2018, you can visit http://mysite.com/booknow?tbk_year=2019 to go directly to the current month in 2019.

  • tbk_timezone

    Used to force the calendar using the specified timezone, for example America/New_York.

    Example: the frontend calendar shortcode is on the http://mysite.com/booknow page. By visiting http://mysite.com/booknow?tbk_timezone=America/New_York the default calendar timezone will be America/New_York.

13.3.1Combination of query parameters

Query parameters can be combined.

For example, you can combine the tbk_month and the tbk_year parameters to point to a specific month of a specific year: http://mysite.com/booknow?tbk_month=september&tbk_year=2019

Note: the first query parameter of the URL must be appended with a question mark ?, while the others must be appended with an ampersand &, keep this in mind when combining query parameters or when your URL already contains other query parameters.

For example, if your page URL is http://mysite.com/booknow and you want to add the tbk_date query parameter, then you must append it with the question mark ? so it will be http://mysite.com/booknow?tbk_date=12august.

If you want to combine the tbk_date and the tbk_timezone query parameters, then you should append the first with a question mark ? and the second with an ampersand & so it will be http://mysite.com/booknow?tbk_date=12august&tbk_timezone=America/New_York.

If your page URL is in the form of http://mysite.com/?p=27, which is a common WordPress permalink structure, then it already has a query parameter in it. So if you want to use, for example, the tbk_date parameter with this kind of URL, just append it with an ampersand & so it will be http://mysite.com/?p=27&tbk_date=12august.

13.4Custom form field meta_keys

TeamBooking is able to prefill some form fields based upon the current user profile data (you can toggle this feature in the Core settings). Those standard fields are: the first name, the last name, the website address and the e-mail address.

If you have some custom user meta data (for example the phone number, or every custom metadata that can be added by third party plugins) and you know the meta_data key of it, you can just go to the Service reservation form editor, create or edit a custom form field and put the meta_data key inside the Pre-fill meta_key (optional) field.

By doing that, TeamBooking will pre-fill the field with your custom meta data (if present).