Part 1: Setting up tasks
The objective of this part is to make a Planner task available in Dime.Scheduler for planning as soon as the task has been created by a user.
This is the first post in the guide on how to integrate Dime.Scheduler with Microsoft Planner through the Power Platform:
- Part 1: Tasks
- Part 2: Processing appointments
In this post, you will learn:
- How to set up a Power Automate flow
- Convert a Planner task to a Dime.Scheduler task
This tutorial assumes the Power Platform connector and webhook connector have already been set up and configured. If you haven't done so, make sure to check out the Excel tutorial.
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.
In this tutorial, we are going to schedule Planner tasks that employees create in a plan. We'll use a simple Kanban board that is often used in teams to effectively collaborate and streamline their efforts.
The data model of a task in Dime.Scheduler is quite compatible with that of Microsoft Planner because it consists of two levels: jobs and tasks. A job is the high-level entity that can be best compared to a plan in Microsoft Planner: 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.
Step 2: Create a new flow
Let's create a new flow in Power Automate, and choose the 'When a new task is created' trigger.
Before creating the flow, you must already have created a plan in Planner first.
Step 3: Inserting tasks
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 Planner task available in Dime.Scheduler, we need to invoke two actions in the flow. Specifically, we need to create a job, followed by the task at hand. Every time this flow runs, it should ensure the existence of the job, and add the new task to the list in Dime.Scheduler.
When you expand either action in the Power Automate, 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 Planner entry 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 Planner task that passes through this flow, we will know that its original data source is a Planner list and specifies the work type is 'CONTENT' (as this board keeps track of the content that needs to be added to this documentation platform). The scope of this flow is limited to a single board, so we can also define a fixed JobNo
field.
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 plan is fairly lightweight when it comes to metadata of the project. At the time of writing, the Planner connector on the Power Automate is fairly limited, so there's not a huge amount of things we can do here. In contrast, there are a few neat things that we can do with the tasks. For instance, the labels could be linked to the visual indicators in Dime.Scheduler. Just like our planning solution, a Planner task has a Priority field that indicates the importance of the task, so this field could be used as well.
For the sake of completeness, we've added the Planner task's ID value in one of the FreeText fields of the task. We'll use this information when we've planned the task in Dime.Scheduler.
Save the flow and test it by creating a new Planner task. 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 open task list, you should see a new record appear that refers to the Planner task. 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 tasks to Dime.Scheduler and are ready to plan them! Take any task, look for an available resource, drag and drop it on the right date and time and you're done!