Appointments Booking - Use Case - How to Set Up User Time Credit


Use Case – How to set up user time credit.

Back to User Guides

Note: This guide requires:


Introduction

CM Appointments Booking Pro allows you to manage and display multiple calendars with open spots for visitors to book. Starting since the version 2.2.0 it is possible to set up Time Credit for specific registered users.

Note: Currently booking appointments using Time Credits doesn't support Multiple Bookings Choice.

Use Case Front-End

Spending Time Credit for booking appointment:

Not enough Time Credit for booking appointment:

Use Case Assumptions

Want to Learn From The Start?

If you still haven't configured your first calendar, check this use case: 

Appointments Booking - Use Case - How to Create a Calendar Booking System in WordPress

In this example use case guide, we'll cover how to set up Time Credit for specific users, how to create a user dashboard for them and how this feature works for the user side. 

We consider that you have already bought the  CM Appointments Booking Pro plugin, but not installed yet. 

It follows:


Installing The plugin

The process is the same for all CM plugins and add-ons.

  • Download the plugin from your customer dashboard
  • Log in to WordPress and navigate to the WordPress Admin → Plugins settings
  • Click on Add New
  • Activate it and add the license

Learn more: Getting Started - Plugin Overview


Setting Up Calendars Recap

How This Feature Works

The user will be able to book the appointments only for definite amount of time according to defined for him limit. The admin can add or deduct Time Credit. The user has a dashboard, where he can view available Time Credit, view all admin operations with adding and deducting Time Credit, view all his Time Credit Bookings and reject them. Rejecting the appointment returns to the user the Time Credit that was spent for it.

Now let's consider configuring and how it all works step by step.

Setting Up Allowed Time for Rejection

First thing we need to configure is the time before the Time Credit Booking when the user is able to reject it. To do this, navigate to Admin Dashboard → CM Appointments Booking Pro → Options.

Head to the Plugin Options tab.

Find there the option Send email to reject booked credit time before [hours]. In this field you need to put the amount of hours that the user will have before the beginning of an appointment to reject it. We will talk about the rejection further in this guide.

When you configured this option, click the button Save Changes on the bottom of the page. 

Enabling Time Credit for Specific Users

Time Credits are enabled and defined individually for chosen registered users. To do this, navigate to Admin Dashboard → Users → All Users.

Hover on needed user and click Edit.

Find there the section Time Credits User Control and enable the option Allow Credit Time for User. There will appear a few new options.

  • Enter Time (minutes) - Choose the amount of minutes that you want to add or deduct from the user. You can choose between 15, 30, 45, 60 or 90 minutes.
    • Add Time To Credit - Click this button to add chosen amount minutes to the user.
    • Deduct Time From Credit - Click this button to deduct chosen amount minutes from the user.
  • Time Credit Amount (minutes) - This field shows total amount of time that was added to the user. This value increases when the admin adds minutes, and decreases when the admin deducts minutes.
  • Time Balance (minutes) - This field shows the amount of time that is currently available for the user. This value increases when the admin adds minutes, and decreases when the admin deducts minutes or when the user spends this time for booking appointments.

When you finished operations with the Time Credits, click the button Update User on the bottom of the page.

Note

When the admin adds Time Credits for the first time, when the user hasn't used that time for bookings yet, the values Time Credit Amount and Time Balance will be equal. But when the user starts booking the appointments and spend his Time Credits, the value Time Balance will be, consequently, less than Time Credit Amount.

User Dashboard

Logged in users with enabled Time Credits can access the dashboard with detailed info about all actions.

Creating a Page With the User Dashboard

The User Dashboard page can be generated in two ways:

  1. When you install and activate the plugin, the User Dashboard page is generated automatically.
  2. You can create your own page and place there the shortcode [cm_user_credit_time_stat_report].

TIP: Add User Dashboard to the Menu

For the convenience of your users, you can add the page to the menu of your site:

Front-end:

User Dashboard - User View

The user dashboard can access only users with turned on Time Credits feature.

The dashboard consists of two parts:

  1. Upper part - General info about the user and info about his Time Credits. There the user can see:
    1. User Login 
    2. User Email
    3. User roles 
    4. Current credit - Total amount of Time Credits that was added by the admin.
    5. Current balance - Available amount of Time Credits that the user can spend for booking.
  2. Lower part - Two tabs Bookings and Credits.

Bookings Tab

In the Bookings tab the user can see all bookings he made using Time Credits:

There are 4 columns in the table:

  • Event Date/Time - The date and time of the booked appointment.
  • Duration (minutes) - The duration of the booked appointment.
  • Event Status - The status of the booked appointment. Can be either Accepted, PassedRejectedtrash (when the appointment is deleted) and other.
  • Event Reject Link - This column contains the Reject link. The link won't be displayed in three cases:
    • If the appointment is already rejected or deleted.
    • If the time when the user could reject the appointment has passed. The time before the appointment when the user is able to reject it is defined by the admin in plugin settings.
    • If the appointment date and time has already passed.

      After rejecting the appointment, the user will be added the amount of minutes that were spent for this booking. We will talk about the reject link more detailed lower in this guide.

Credits Tab

In the second tab Credits the user can see all information about admin operation with adding and deducting Time Credits to the user.

Above the table there are two lines with general information about Time Credits:

  • Total of Credits - Total amount of Time Credits that was added by the admin.
  • Current Balance - Available amount of Time Credits that the user can spend for booking.

The columns in the table are:

  • Date / Time - The date and time of the transaction.
  • Operation - The operation that the admin has committed - either Added minutes or Removed minutes.
  • Amount (minutes) - The amount of minutes that was added or deducted.
  • Credit (minutes) - Total amount of minutes that the user received from the admin.
  • Balance (minutes) - Available amount of minutes that the user can spend for booking.

Reject Booking - Admin View

When the user clicks the Reject link, the link will be replaced by the message "Rejection in progress".

The admin gets an email notification that the user wants to reject the appointment. The admin can also see that message on the booking editing page.

TIP: Change the Email Template

The admin can change the subject and body of the email notification in plugin settings in the Email Templates tab. Learn more about it in this guide: Appointments Booking - Appointments - Email Notifications To User and Admin

There are two ways how the admin can reject the booking.

  1. To reject the appointment, the admin need to click the Reject button in the metabox Status and click the Update button.
  2. In the list of all booking the admin can use either the button Quick Edit while hovering on needed booking or the relevant button Reject.

As a result, the status of the booking will be changed on the User Dashboard, and the user will be added the amount of minutes that were spent for this booking.

Booking - User View

When the user tries to book an appointment, there can be two cases.

First case, when the user has enough Time Credits for a booking. Under the submitting form the user can see:

  • The amount of minutes that will be spent for this booking. 
  • Current amount of minutes that he can spend.
  • The amount of minutes that will left after making this booking.

Second case, when the user doesn't have enough Time Credits for a booking. Under the submitting form the user can see a message that he doesn't have enough Time Credits to book an appointment:

End Result

Following instructions found in the plugin and guides, you should be able to set up Time Credit for specific registered users.

Front-End Use Case:

Spending Time Credit for booking appointment:

Not enough Time Credit for booking appointment:


More information about the Appointments Booking Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us