Skip to main content

End-to-end quickstart

This guide walks you through populating a fresh Dime.Scheduler instance from code. By the end, you'll have:

  • A handful of resources to plan against.
  • A filter group with values, assigned to both resources and tasks so planners can filter by skill, region, or whatever you choose.
  • A category and a time marker to color-code appointments.
  • A job with a couple of tasks under it, with the indicators applied.

The samples below use the .NET SDK. The same flow works with the JavaScript SDK, the CLI, or the raw REST API. Order matters: parents (jobs, filter groups, indicators) must exist before their children (tasks, filter values, assignments).

Prerequisites

  • An API key for your Dime.Scheduler instance.
  • The .NET SDK installed - see installation.
  • A target environment. The samples below default to production; pass Environment.Sandbox to the client constructor if you want to use the sandbox first.

1. Set up the client

using Dime.Scheduler;
using Dime.Scheduler.Entities;
using TaskModel = Dime.Scheduler.Entities.Task;

const string apiKey = "YOUR_API_KEY";
const string sourceApp = "QUICKSTART";
const string sourceType = "DEMO";

var client = new DimeSchedulerClient(apiKey);

SourceApp and SourceType identify where the data came from. Reuse the same pair across every record in this guide so the relationships line up. The TaskModel alias avoids the clash with System.Threading.Tasks.Task.

Every call below returns a Result<T> - check result.IsFailure and inspect result.Error if you want to handle problems inline. The samples skip that for brevity.

2. Create resources

A resource is anyone or anything that gets planned - technicians, sales reps, vehicles, rooms.

Resource[] resources =
[
new() { SourceApp = sourceApp, SourceType = sourceType, ResourceNo = "TECH-001", ResourceName = "Alex Doe", DisplayName = "Alex Doe" },
new() { SourceApp = sourceApp, SourceType = sourceType, ResourceNo = "TECH-002", ResourceName = "Jamie Roe", DisplayName = "Jamie Roe" },
new() { SourceApp = sourceApp, SourceType = sourceType, ResourceNo = "TECH-003", ResourceName = "Sam Park", DisplayName = "Sam Park" },
];

await client.Resources.CreateAsync(resources);

See the Resource API reference for the full field list.

3. Create a filter group and values

A filter group is a category planners can filter resources and tasks by - Skill, Region, Certification. Values are the options inside that group.

await client.FilterGroups.CreateAsync(new FilterGroup { Name = "Skill" });

FilterValue[] skillValues =
[
new() { Group = "Skill", Value = "HVAC" },
new() { Group = "Skill", Value = "Electrical" },
new() { Group = "Skill", Value = "Plumbing" },
];

await client.FilterValues.CreateAsync(skillValues);

See the Filter API reference for details on filter groups and values.

4. Create a category and a time marker

Categories drive the background color of an appointment on the planning board. Time markers drive the colored bar below it. Together they let planners see status or type at a glance.

await client.Categories.CreateAsync(new Category
{
Name = "INPROGRESS",
DisplayName = "In Progress",
Color = "#6e64b5",
});

await client.TimeMarkers.CreateAsync(new TimeMarker
{
Name = "URGENT",
Color = "#e63946",
});

See the Indicator API reference for categories, time markers, and pins.

5. Create a job with indicators applied

A job groups tasks - typically a service order, project, or case. Indicators set on the job propagate to the appointments planners create from its tasks.

await client.Jobs.CreateAsync(new Job
{
SourceApp = sourceApp,
SourceType = sourceType,
JobNo = "JOB-1001",
ShortDescription = "Quarterly maintenance - Customer XYZ",
Category = "INPROGRESS",
TimeMarker = "URGENT",
});

See the Job API reference for the full field list.

6. Create tasks under the job

Tasks are the schedulable units inside a job. A job can have many.

TaskModel[] tasks =
[
new()
{
SourceApp = sourceApp,
SourceType = sourceType,
JobNo = "JOB-1001",
TaskNo = "TASK-1",
ShortDescription = "Inspect HVAC unit",
},
new()
{
SourceApp = sourceApp,
SourceType = sourceType,
JobNo = "JOB-1001",
TaskNo = "TASK-2",
ShortDescription = "Replace filters",
},
];

await client.Tasks.CreateAsync(tasks);

See the Task API reference.

7. Assign filter values to resources

Now wire up which resources are qualified for which work - Alex does HVAC, Jamie handles Electrical, Sam covers Plumbing.

ResourceFilterValue[] resourceSkills =
[
new() { ResourceNo = "TECH-001", FilterGroup = "Skill", FilterValue = "HVAC" },
new() { ResourceNo = "TECH-002", FilterGroup = "Skill", FilterValue = "Electrical" },
new() { ResourceNo = "TECH-003", FilterGroup = "Skill", FilterValue = "Plumbing" },
];

await client.ResourceFilterValues.CreateAsync(resourceSkills);

8. Assign filter values to tasks

Tag each task with the skills required to perform it. Planners can then filter the open tasks list down to work that matches a resource's skills.

TaskFilterValue[] taskSkills =
[
new() { SourceApp = sourceApp, SourceType = sourceType, JobNo = "JOB-1001", TaskNo = "TASK-1", FilterGroup = "Skill", FilterValue = "HVAC" },
new() { SourceApp = sourceApp, SourceType = sourceType, JobNo = "JOB-1001", TaskNo = "TASK-2", FilterGroup = "Skill", FilterValue = "HVAC" },
];

await client.TaskFilterValues.CreateAsync(taskSkills);

Verify

Open the planning board and confirm:

  • The three resources appear in the resource list.
  • The two tasks show up in the open tasks grid under job JOB-1001.
  • Filtering on Skill = HVAC narrows the tasks (and resources) accordingly.
  • Drag a task onto a resource - the resulting appointment uses the In Progress background color and shows the Urgent time marker bar.

If anything's missing, check the transactions view for errors against the records you sent.

Next steps