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 resourcesResourceAn entity that can carry out work - a person, vehicle, tool, or room - that you schedule on the planning board. to plan against.
  • A filter groupFilter groupA configurable set of fields used to filter resources and tasks on the planning board. with values, assigned to both resources and tasks so planners can filter by skill, region, or whatever you choose.
  • A categoryCategoryA visual indicator (a color) applied to appointments to classify or label them. and a time markerTime markerA visual indicator on an appointment, separate from its category, used to flag a status or condition at a point in time. to color-code appointments.
  • A jobJobA high-level container, comparable to a project, that bundles related tasks together with common information such as customer, billing, and address. with a couple of tasksTaskA unit of work that belongs to a job. It appears in the open task list until it is scheduled to a resource. 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).

Try it first​

Walk through the same sequence of API calls below, one step at a time. Paste your API keyAPI keyA credential that authenticates calls to the Dime.Scheduler API. The preferred way to integrate over the deprecated JWT flow. and pick an environment, and each step gives you a ready-to-run curl command you can copy straight into your terminal. The panel at the bottom shows what the full flow builds up.

Your key never leaves the browser - the commands are not run from this page, and the responses shown are samples.

Your key stays in your browser - the commands below are never run from this page. Copy one and run it in your own terminal.

Step 1 of 70/7 steps done

Resources are who or what gets planned: technicians, vehicles, rooms. Start by sending three.

POSThttps://sandbox.api.dimescheduler.com/resource
Request
curl -X POST 'https://sandbox.api.dimescheduler.com/resource' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "sourceApp": "QUICKSTART",
    "sourceType": "DEMO",
    "resourceNo": "TECH-001",
    "displayName": "Alex Doe"
  },
  {
    "sourceApp": "QUICKSTART",
    "sourceType": "DEMO",
    "resourceNo": "TECH-002",
    "displayName": "Jamie Roe"
  },
  {
    "sourceApp": "QUICKSTART",
    "sourceType": "DEMO",
    "resourceNo": "TECH-003",
    "displayName": "Sam Park"
  }
]'
What this flow builds
Resources
empty
Filters
empty
Indicators
empty
Jobs
empty
Tasks
empty
Qualifications
empty

The rest of this guide reproduces the exact same flow with the SDKs.

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 sandboxSandboxThe separate Dime.Scheduler environment where upcoming features arrive before the production release. It has its own API host, sandbox.api.dimescheduler.com, so API clients target it explicitly. 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 boardPlanning boardThe main graphical scheduling surface where dispatchers drag tasks onto resources across a timeline.. 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 tasksOpen taskA task that has not been scheduled yet. It waits in the open task list to be placed on the planning board. 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​