Skip to main content

Part 1: Setting up tasks

The objective of this part is to make the To Do item available in Dime.Scheduler for planning as soon as the task has been created by a user.

info

This is the first post in the guide on how to integrate Dime.Scheduler with Microsoft To Do 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 To Do item to a Dime.Scheduler task
caution

This tutorial assumes a Power Platform connection for the Dime.Scheduler has already been created. 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 plan To Do items that employees create in their Outlook calendars. This is a workflow that salespeople and consultants may execute to have an overview of the work that comes out of emails from customers and coworkers. 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. For simplicity's sake, we will adopt a 1:1 relationship between jobs and tasks. In other words, for each To Do item we will create a job and a task. Hence, each To Do item will be treated independently from other To Do items in Dime.Scheduler. However, you may want to consider grouping tasks if you want to know how many hours your consultants have worked on a given project, or get a detailed report how much budget there is left on a fixed-budget project.

Step 2: Create a new flow

Let's create a new flow in Power Automate, and choose the 'When a new to-do in a specific folder is created' trigger. To make this example usable for multiple users, we'll listen to a specific folder to which said users have access to, allowing us to use a single Power Automate flow to gather all new To Do items:

Before creating the flow, you must already have created a To Do list.

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 To Do item 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 To Do 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 To Do item that passes through this flow, we will know that its original data source is a To Do list and specifies a generic 'Task' type. You could consider using a source type to distinguish between departments and refer to a To Do item from the sales department as SALES, consulting services as SERVICE, etc. Of course, there is no obligation to do it this way, but it is a way to organize your work and add flexibility to your solution, which may come in handy when you want to process appointments differently once they are planned in Dime.Scheduler.

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).

For the sake of simplicity of this flow, we've set the following conversion:

To DoDime.Scheduler
TitleDescription (Job/Task)
TitleShort Description (Job/Task)
StatusStatus (Task)
Due DateExpected Response Date (Task)
BodyBody (Task)
IdFree text field #1

The jobNo variable truncates the To Do item's Id value, which is longer than the allowed character count for the Job No field in Dime.Scheduler. That's why we specify the full To Do item's id value in a Free Text field. We'll use this value in the next part to write appointment information back to the original To Do item.

note

If you're following along, this is how the jobNo variable is set: TODO_ + if(greater(length(triggerOutputs()?['body/title']),45),substring(triggerOutputs()?['body/title'], 0, 45), triggerOutputs()?['body/title']).

Save the flow and test it by creating a new To Do item in the specified folder.

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 To Do item. 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!