Skip to main content

Source Types

Throughout the docs, we've made it abundantly clear that the Source App and Source Type fields are essential. It is quite likely that you've worked with the Source App field already since it's required to establish a connection between BC and Dime.Scheduler. The Source Type field has been flying under the radar so far, which is about to change in a minute. But first, let's recap briefly what the meaning is of the Source App and Source Type fields.

Definitions

Dime.Scheduler is a centralized planning application. One of its key tenets is the ability to accommodate data from different origins. For instance, it is perfectly acceptable to plan work orders from Business Central, CRM, imported Excel sheets, etc., and Dime.Scheduler won't break a sweat because of the existence of the Source App and Source Type fields in the data model.

Source App

When the planner creates an appointment for a resource or task, Dime.Scheduler knows which system to notify. Through the connector setup, Dime.Scheduler will find a matching SourceApp and subsequently send the appointment to the corresponding URI.

The source app field is a unique identifier that identifies a back-office instance such as a tenant of Business Central, a test environment, an instance of CRM cloud, or any other application you wish to use to feed data into Dime.Scheduler.

Source Type

The SourceType is used inside the back-office system itself. A source type represents a distinct entity such as a service order, production order, assembly order, etc.

The standard connectors that Dime Software provides make it possible to plan different types of resources and tasks. When Dime.Scheduler posts an appointment to a standard connector, it ends up in a staging table, which is then processed by the connector to ensure the appointment produced in Dime.Scheduler is traced back to the original record using the externally identifiable fields (JobNo, TaskNo, ResourceNo) that identify the record.

How it works

In the standard connector for Dime.Scheduler in Business Central, source types are created by the FastTrack wizard or the Dime.Scheduler setup page. Whenever you enable a module, a new entry will be created in the Dime.Scheduler Source Types list.

Connector Setup

tip

Hit ALT + Q and look for Dime.Scheduler Source Types in the search bar to locate this table.

A source type simply identifies a coherent area in Business Central. The standard connector identifies the following types and associates them with the corresponding BC tables:

Source TypeTable(s) used
Resource156
Service5900, 5901
Job167, 1001, 1003
Assembly900
Production99000754, 99000758, 5405, 5409, 99000754, 99000758
Sales36, 37
HR5206, 5207

These source types are provided out of the box, as well as the code units that handle incoming appointment information, but it is easy to create your own source types and link them to a custom table in Business Central. A single source type may be linked to multiple tables in Business Central. For instance, a 'Job' might identify the job header, a job task, job planning lines, and any other level you can think of. In the end, a source type is just a magic string that serves in the routing mechanism when a new appointment hits the Dime.Scheduler Appointments table.

Each task that needs to be planned is identified by:

  • Source App: A unique string that describes which administration/system owns this record. The source app is used to find matching backoffice systems to send appointment information back to. There can be multiple connectors for a single source app. A common pattern is to send data back to BC, but also invoke a webhook to send out emails, run Power Automate flows, etc.
  • Source Type: A unique string that indicates which table the record comes from. This is to prevent duplicate numbers. For instance, 'ORDER002' may show up in multiple tables. By decorating a task with an additional source type property, we can distinguish between the different tables in the system. Two records with 'ORDER002' can coincide, as long as they have different types in the system (e.g. SALES ORDER002 and SERVICE ORDER002).
  • Job No: Typically the No. field on the header level of the order.
  • Task No: The No. field of the level that the customer wants to plan. When planning at the header level, the Task No will be identical to the Job No. in Dime.Scheduler.

This is mostly metadata as far as the user is concerned, but it becomes crucial when the planner schedules a task on the planning board. That's when Dime.Scheduler will try to make contact with the systems that want to be notified of the planning data. Specifically, connectors that match the job's 'Source App' will be contacted.

Not all systems will need to use the 'Source Type' when the appointment comes in. For instance, our standard Exchange connector has no use for this metadata as appointments just need to be synchronized with the resource's Outlook calendar. However, it is an essential part of the integration with Business Central, as we want to write back to the right table.

For example, when a user plans a task in Dime.Scheduler that is tied to a...

  • ...service item line, you may want to process the appointment as a resource allocation.
  • ...job task, you may want to process the appointment as a job planning line.
  • ...cause of absence, you may want to process the appointment as an employee absence registration.
  • ...custom table, you'll probably want to process the appointment into a custom table as well.

The standard extension for Dime.Scheduler in Business Central contains workflows for the supported source types listed above. For each entry in the source types table, you can specify a code unit that will be executed for each incoming appointment with the same source type. When it finds a match, it will execute that particular code unit.

This leaves the door wide open for custom development. You can override the handling logic while maintaining the default source types, or you can override it altogether and use your own source types and handling code units.

Connector Setup

In the example above, for the incoming appointment, code unit no. 2087646 will be used to write back appointment information to the job with the default functionality that is shipped in our standard extension.

Source Types table

The table is quite simple, but its contents have a profound impact on how planning data produced in Dime.Scheduler are processed in Business Central.

Field, tab or groupDescription
Source Table No.Enter the table number or select it from the list for each table that is sent to Dime.Scheduler (e.g., 5901, Service Item Line or 1001, Job Task).
Source TypeDefine the identifier of the source type. Use a concise and descriptive value (max. 10 characters) like 'SERVICE', 'JOB', 'TRANSPORT', etc.
Processing Codeunit No.Enter the number of the codeunit that processes planning data coming from Dime.Scheduler into Business Central.
Appointment Template CodeIn Dime.Scheduler, you can define custom fields on an appointment card. You can have different fields based on the type of task using an appointment template. Specify the appointment template code for the task, based on the source type. For more information about appointment templates refer to this doc.
Action Report No.The report to run when the user selects an action URI for this source type. Leave 0 (zero) to use the standard report DS Action Launch. The report parses the parameters passed by Dime.Scheduler as field filters and then launches the defined codeunit (see below)
Action New DescriptionAction new is the URI shown when the user opens the context menu in the planning board. The description or caption is shown to the user.
Action New Codeunit No.The codeunit executed by the report defined in Action Report No.
Action Edit DescriptionAction Edit is the URI shown when the user opens the context menu of an appointment with matching source app and source type fields. The description or caption is shown to the user.
Action Edit Codeunit No.The codeunit executed by the report defined in Action Report No.

The action or command button "Send Action URI" generates and sends the ActionURI to Dime.Scheduler for both 'Action New' and 'Action Edit' if a value is entered in the respective description field.

Diagram

To summarize the integration framework between Dime.Scheduler and Business Central, check out the diagram below.

It all starts with Business Central where users create orders that need to be planned in Dime.Scheduler. Each record that is sent from BC is decorated with a Source App and Source Type field. The Source App will always be the same and is taken from the configuration item in the FastTrack wizard, while the Source Type will most likely be different for the various tables that can be used.

When an appointment is planned, Dime.Scheduler will send back this information to whatever system that wants to be notified. This setup is done in Dime.Scheduler in the Connectors page. Once Dime.Scheduler has deposited the appointment info to the backoffice system, it's that system's responsibility to process this information. The standard connectors for Dime.Scheduler that Dime Software has developed can be used, or you can use your own logic.

The standard connector for Dime.Scheduler in Business Central supports multiple tables, which is where the Source Type comes into play. Dime.Scheduler posts all planning lines in the Dime.Scheduler Appointments table in Business Central, and triggers a workflow that looks up a matching source type and invokes the corresponding code unit to write back to the desired table.