Skip to main content

Tutorial: Booking

The objective of this part is to make an appointment in Microsoft Booking available in Dime.Scheduler. We'll take it one step further than the typical planning process as we can directly push the appointment onto the planning board instead of having to go through the typical planning process.

Step 1: What constitutes a task

Dime.Scheduler is all about planning resources and tasks. Both are concepts that can refer to anyone or anything: a resource is an entity that is able to carry out work, while a task is that unit of work that needs to be executed by a resource.

With Booking appointments, however, the scope of Dime.Scheduler changes somewhat as the planning has already been done beforehand. To maintain a complete overview of your workforce's schedule, you may decide to link the appointments generated in Booking to Dime.Scheduler, which is what we'll do in this tutorial.

As with all other tutorials in this area, this example is rather simple and unstructured, and as we shall see next, the data model of a task in Dime.Scheduler is able to cope with more complicated business scenarios because it consists of two levels: jobs and tasks. A job is the high-level entity that can be best compared to a project: it is a collection of activities (or tasks) that need to be completed to reach a certain outcome. They bundle common information that apply to all underlying tasks, such as customer info, billing details, address, etc. For a complete overview of a job's properties, check out the API reference. A task, on the other hand, is the actual unit of work that needs to be carried out. A task always belongs to a job while it uniquely identifies an item of work that will ultimately appear in the open task list, and subsequently, in the planning board when scheduled. For a complete overview of a task's properties, check out the API reference.

With this data model, there are many ways to organize your work. In this tutorial, we will work with a demonstration booking page, so it makes sense to accommodate all instances of this booking type (in Booking lingo, this is called a service) under the same job. Since demonstrations are typically free of charge, there's no need for a more granular design.

This use case introduces a third entity: the appointment. An appointment is the assignment of a resource to a task to be carried out on a given date and time. Put simply: Appointment = Task + Resource + Date & Time. By invoking this API in the Power Platform connector, we can push appointments directly on to the planning board.

Step 2: Create a new flow

First things first: your booking page. This is not a tutorial on how to make a Booking page, but we wanted to make you aware of a crucial piece of information that you'll need to progress.

When you've created the page, on several locations you'll be able to copy the link to the booking page. It would typically look like this: https://outlook.office365.com/owa/calendar/DimeSchedulerdemo@dime-software.com/bookings/s/s_umXVExTECHTgc3QyIybw2

Copy the email address in this URI, and we'll use it in the trigger of a new flow in Power Automate. Choose the 'When a appointment is Created' trigger. Paste the email address in the booking page address field:

Step 3: Inserting appointments

As mentioned earlier, a plannable task in Dime.Scheduler consists of two levels: jobs and tasks. A job contains the high-level properties such as customer and billing info, while a task is merely concerned with the actual work that needs to be performed. To make a Booking appointment available in Dime.Scheduler, we need to invoke two actions in the flow. Specifically, we need to create a job, followed by a single task for this job. When you expand either action, you'll find an extensive list of fields that we can use to alter the behavior of Dime.Scheduler. To dig deeper, make sure to check out the Job API reference and Task API reference.

For most actions in the Dime.Scheduler connector for the Power Platform, the first field is usually a Yes/No field that asks you whether to append the record or remove it. To append is to create or update a record; and is idempotent: if a record already exists with that external identifier, it will update that record. When set to false, Dime.Scheduler will attempt to remove the record with the external identifier (JobNo or TaskNo) that you provide in the action. For this tutorial, set append to true.

What makes the Power Platform so fantastic is that you can simply click your workflows together. Inside an action, Power Automate will tell you what fields are in scope. We simply need to look for the right field in Dime.Scheduler and populate it with the info that a Booking appointment provides:

For the source app and source type fields, we've set static values that apply to all data that pass through this flow. For each Booking appointment that passes through this flow, we will know that its original data source is a Booking item and specifies a generic 'Demo' type. If you have multiple services in your booking page, you could use this info to distinguish between the different types of services in Dime.Scheduler as well.

When creating a task, not only do you need to provide a unique external identifier in the TaskNo field, you also need to add a reference to a job using the job's unique external identifier in the JobNo field. Hence, the value of the Job No field in both actions need to be the same (and so do the Source App and Source Type fields, for that matter).

A Booking appointment contains a lot of information. We're going to adopt a 1:N relationship between a job and a task, so we'd need to place customer information on the task level (otherwise, you would lose data since job information would be overridden every time a new prospect books a meeting). If you want to keep track of each appointment individually, you can always use a 1:1 approach, which will enable you to place customer information on the job level.

The last step involves the creation of the appointment. This action is very similar to the others as you need to specify the source app, source type, job no and task no, so the application knows to which task this appointment belongs. As you can expect, these fields should refer to the same values as specified in previous steps. In addition, we need to specify a start and end time, and the resource number that has been assigned to the Booking appointment:

Save the flow and test it by creating a new Booking appointment.

To follow up on the status of this flow, proceed to the 'Run history' section of the flow and click on the last run:

When you navigate to the planning board, you should see a new appointment on the planning board that holds the exact same information as the Booking appointment. If nothing appears, you may want to check the status of the step in the Power Platform, or the logs in Dime.Scheduler.

Congratulations, you've just added a new appointment to Dime.Scheduler!