A new CommunityStore package: AppointmentStore

I am currently fiddling a new package that builds on top of CommunityStore. I would love to get feedback from more experienced developers and @mesuva

What it does:
AppointmentStore simply said - allows you to “sell” appointment slots out of your (external, CalDAV) Calendar.

For example:

  1. You create a “Support Call” Product in CommunityStore
  2. You create “Support Call” Appointments in you CalDAV-accessible Calendar
  3. You create a different Calendar or Categories for “booked Appointments”
  4. You connect your Calendar with AppointmentStore
  5. The Appointments Task synchronizes with your Calendar

Now the Product “Support Call” will show all the available Slots which are present in your Calendar. If a Customer adds the product to the Cart, the related Slot will be blocked for 30 Minutes. If the Customer goes through Checkout and completes the Order, the Slot will be - depending on your setting - either moved to the “booked appointments Calendar” or changed the Calendar Category from Available to Booked (you have to set the Categories in your Calendar)

The story behind this is, that whenever a customer who sells “timeslots” in 1:1 setups (Support people, personal instructors ecc) want to use CommunityStore, they have to maintain their available slots in different places and manually juggle the confirmed/paid/available slots. This package should handle it.

Have a look:

Hey this sounds great. Managing appointments and events can be tricky, so nice work tackling it.

I’ve never used a CalDAV server as such (or at least knowingly).
Do you have any suggestions for a CalDAV service or way to set that up?

Hi, CalDAV ist just the protocol, most cloud-based calendars have some kind of endpoint for it. I have currently tested it with self-hosted calendars like mailcow (https://mailcow.email/ highly recommended workware) or nextcloud.

Current Authentication is Password-based, so any Calendar Server that does that will work.

I’ve just seen that GoogleCal nowadays only accepts OAuth2.0, so that will not work at the moment, but it could be a worthwhile next step.

I just found out that Mailcow offers a public testing instance:

https://demo.mailcow.email/

Username: demo@440044.xyz

Password: moohoo

How to set it up:
Login with Credentials

Go to the preferences (Wrench Symbol top right)

Go to the tab “App Passwords”

Create an App Password with permissions for CalDAV / CardDAV and save it

Go back to Test Interface with a click on Apps > Stable Demo

Select Calendars (top row, first symbol)

Create a new Calendar, choose an appropriate color for it

Once created, click on the three dots on the right side of that Calendar

Go to “Links to this Calendar”

Copy the first URL (Authenticated Users - CalDAV)

insert that URL, Username and App-Password to AppointmentStore.

If you want to use two separate Calendars for “Available” and “Booked”, repeat the creation of the Calendar for the second Calendar. If you prefer using Categories, one Calendar is enough but the Categories must mtch the existing ones.

Now you can add availability slots in the Calendar and Sync them with the built-in task.

Of course, the usecase is not to work with a browser based, calendar, but normally you’d sync that CalDAV Calendar with your everyday-carry-devices so you can see your booked slots directly where you look at everyday :slight_smile:

I think using two calendars is more robust because Clients Apps display categories very differently.