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";

DimeSchedulerClient client = new(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.

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" },
];

foreach (Resource resource in resources)
{
await client.Import.ProcessAsync(resource, TransactionType.Append);
}

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.

FilterGroup skillGroup = new() { Name = "Skill" };
await client.Import.ProcessAsync(skillGroup, TransactionType.Append);

string[] skills = ["HVAC", "Electrical", "Plumbing"];
foreach (string skill in skills)
{
FilterValue value = new() { Group = "Skill", Value = skill };
await client.Import.ProcessAsync(value, TransactionType.Append);
}

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.

Category inProgress = new()
{
Name = "INPROGRESS",
DisplayName = "In Progress",
Color = "#6e64b5",
};
await client.Import.ProcessAsync(inProgress, TransactionType.Append);

TimeMarker urgent = new()
{
Name = "URGENT",
Color = "#e63946",
};
await client.Import.ProcessAsync(urgent, TransactionType.Append);

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.

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

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",
},
];

foreach (TaskModel task in tasks)
{
await client.Import.ProcessAsync(task, TransactionType.Append);
}

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.

(string resourceNo, string skill)[] resourceSkills =
[
("TECH-001", "HVAC"),
("TECH-002", "Electrical"),
("TECH-003", "Plumbing"),
];

foreach ((string resourceNo, string skill) in resourceSkills)
{
ResourceFilterValue assignment = new()
{
ResourceNo = resourceNo,
FilterGroup = "Skill",
FilterValue = skill,
};
await client.Import.ProcessAsync(assignment, TransactionType.Append);
}

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.

(string taskNo, string skill)[] taskSkills =
[
("TASK-1", "HVAC"),
("TASK-2", "HVAC"),
];

foreach ((string taskNo, string skill) in taskSkills)
{
TaskFilterValue assignment = new()
{
SourceApp = sourceApp,
SourceType = sourceType,
JobNo = "JOB-1001",
TaskNo = taskNo,
FilterGroup = "Skill",
FilterValue = skill,
};
await client.Import.ProcessAsync(assignment, TransactionType.Append);
}

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