offdataai
Salesforce · data model template

Salesforce Field Service Analytics data model

Kimball warehouse for Salesforce Field Service (WorkOrder, WorkOrderLineItem, ServiceAppointment, ServiceResource, ServiceTerritory, WorkType, Asset). Accumulating-snapshot work-order and appointment facts with dispatch milestones, a parts/labour line fact, and a daily resource-utilization snapshot for field-operations performance.

Salesforce Field Service (FSL) migrated to a cloud warehouse: work orders, service appointments, parts/labour lines, and technician utilization over conformed SCD2 Account, Service Resource, and Asset dimensions plus service-territory and work-type dimensions for first-time-fix, SLA attainment, travel-vs-wrench time, and resource utilization analytics. It is a Kimball dimensional model: fact tables at a declared grain surrounded by conformed dimensions, ready for BI tools and a semantic layer.

KimballSalesforceGDPR
11
tables
119
columns
14
relationships
1
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: Snowflake). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

work_ordersdispatchworkforceconformed_dimensions

Design decisions

  • Work Order and Service Appointment as separate accumulating snapshots

    FSL splits the 'what' (WorkOrder: scope, parts, cost) from the 'when/who' (ServiceAppointment: scheduling, dispatch, arrival); each has its own milestone sequence, so each gets its own accumulating snapshot.

  • Dispatch milestones for travel-vs-wrench time

    Scheduled → dispatched → arrived → completed timestamps on the appointment fact separate travel time from on-site wrench time and measure arrival-window punctuality, the core FSL efficiency metrics.

  • Daily resource-utilization snapshot

    Utilization, idle time, and capacity are per-resource-per-day measures used for scheduling optimisation and headcount planning, independent of any single appointment, so they live in a periodic snapshot.

  • Asset as a conformed SCD2 dimension

    Repeat service against the same installed Asset drives reliability and warranty analytics; versioning the Asset dimension preserves its state (status, warranty) as of each job.

Tables in the Salesforce Field Service Analytics model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Fact tables (4)

fct_work_order

Grain: one row per WorkOrder (accumulating snapshot across the job lifecycle)

Accumulating-snapshot work-order fact for SLA attainment, first-time-fix, and cost-to-serve.

ColumnTypeKeys
work_order_keybigintPK
account_keybigint
asset_keybigint
service_territory_keybigint
work_type_keybigint
created_date_keybigint
scheduled_date_keybigint
completed_date_keybigint
closed_date_keybigint
work_order_idvarchar
work_order_numbervarchar
case_idvarchar
statusvarchar
priorityvarchar
sla_due_date_keybigint
total_pricedecimal
total_costdecimal
duration_minutesinteger
is_sla_metboolean
is_first_time_fixboolean
is_closedboolean
work_order_countsmallint

fct_service_appointment

Grain: one row per ServiceAppointment (accumulating snapshot across dispatch)

Accumulating-snapshot appointment fact for dispatch performance, punctuality, and travel-vs-wrench time.

ColumnTypeKeys
service_appointment_keybigintPK
account_keybigint
service_resource_keybigint
service_territory_keybigint
work_type_keybigint
asset_keybigint
scheduled_date_keybigint
dispatched_date_keybigint
arrived_date_keybigint
completed_date_keybigint
appointment_idvarchar
work_order_idvarchar
statusvarchar
scheduled_duration_minutesinteger
actual_duration_minutesinteger
travel_minutesinteger
arrival_window_minutesinteger
reschedule_countsmallint
is_within_arrival_windowboolean
is_completedboolean
appointment_countsmallint

fct_work_order_line

Grain: one row per WorkOrderLineItem (part or labour line)

Transaction-grain work-order lines for parts consumption, labour, and margin per job.

ColumnTypeKeys
work_order_line_keybigintPK
product_keybigint
date_keybigint
work_order_idvarchar
work_order_line_idvarchar
line_typevarchar
quantitydecimal
unit_pricedecimal
total_pricedecimal
total_costdecimal
is_billableboolean
line_countsmallint

fct_resource_utilization_snapshot

Grain: one row per service resource per day (periodic snapshot)

Daily resource-utilization snapshot for scheduling efficiency and capacity planning.

ColumnTypeKeys
date_keybigint
service_resource_keybigint
service_territory_keybigint
scheduled_minutesinteger
worked_minutesinteger
travel_minutesinteger
idle_minutesinteger
capacity_minutesinteger
utilization_pctdecimal
appointments_assignedsmallint
appointments_completedsmallint

Dimension tables (4)

dim_date

Grain: one row per calendar day

ColumnTypeKeys
date_keybigintPK
full_datedateBK
month_numbersmallint
quartersmallint
yearsmallint
day_of_weeksmallint
is_weekendboolean
is_business_dayboolean

dim_account

Grain: one row per Salesforce Account (customer) per SCD2 version

SCD type 2

ColumnTypeKeys
account_keybigintPK
salesforce_idvarcharBK
account_namevarchar
service_tiervarchar
billing_countryvarchar
service_regionvarchar
is_under_contractboolean

dim_service_resource

Grain: one row per ServiceResource (technician) per SCD2 version

SCD type 2

ColumnTypeKeys
service_resource_keybigintPK
salesforce_idvarcharBK
resource_namevarcharPII
resource_typevarchar
primary_territoryvarchar
skill_setvarchar
is_capacity_basedboolean
hourly_costdecimal
is_activeboolean

dim_asset

Grain: one row per serviced Asset per SCD2 version

SCD type 2

ColumnTypeKeys
asset_keybigintPK
salesforce_idvarcharBK
asset_namevarchar
product_familyvarchar
serial_numbervarchar
install_datedate
warranty_end_datedate
statusvarchar

Lookup tables (3)

dim_service_territory

Grain: one row per ServiceTerritory

ColumnTypeKeys
service_territory_keybigintPK
salesforce_idvarcharBK
territory_namevarchar
territory_typevarchar
regionvarchar
countryvarchar
operating_hours_namevarchar
timezonevarchar

dim_work_type

Grain: one row per WorkType (standard job definition)

ColumnTypeKeys
work_type_keybigintPK
salesforce_idvarcharBK
work_type_namevarchar
categoryvarchar
estimated_duration_minutesinteger
requires_partsboolean

dim_product

Grain: one row per Product2 (parts catalogue)

ColumnTypeKeys
product_keybigintPK
salesforce_idvarcharBK
product_codevarchar
product_namevarchar
product_familyvarchar
is_serializedboolean
list_pricedecimal

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • fct_work_order.account_key → dim_account (many-to-one)
  • fct_work_order.asset_key → dim_asset (many-to-one)
  • fct_work_order.service_territory_key → dim_service_territory (many-to-one)
  • fct_work_order.work_type_key → dim_work_type (many-to-one)
  • fct_service_appointment.account_key → dim_account (many-to-one)
  • fct_service_appointment.service_resource_key → dim_service_resource (many-to-one)
  • fct_service_appointment.service_territory_key → dim_service_territory (many-to-one)
  • fct_service_appointment.work_type_key → dim_work_type (many-to-one)
  • fct_service_appointment.asset_key → dim_asset (many-to-one)
  • fct_work_order_line.product_key → dim_product (many-to-one)
  • fct_work_order_line.date_key → dim_date (many-to-one)
  • fct_resource_utilization_snapshot.date_key → dim_date (many-to-one)
  • fct_resource_utilization_snapshot.service_resource_key → dim_service_resource (many-to-one)
  • fct_resource_utilization_snapshot.service_territory_key → dim_service_territory (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time