Document toolboxDocument toolbox

14.1 sp210_employees

Each record in this table contains either personnel details of an engineer/operative, or details of a crew.


 

Table Definition

Field
Type
Default
Nullable
employee_no  number(9) (error)
employee_ref varchar2(25)  (tick)
typenumber(1) (error)
namevarchar2(50) (tick) 
surnamevarchar2(50) (error)
job_titlevarchar2(24) (tick)
efficiencynumber(3)100(error)
address1varchar2(50) (tick)
address2varchar2(50) (tick)
address3varchar2(50) (tick)
address4varchar2(50) (tick)
postcodevarchar2(30) (error)
region_nonumber(9) (error)
region_refvarchar2(26) (error)
phone1varchar2(40) (tick)
phone2varchar2(40) (tick)
pagervarchar2(20) (tick)
call_signvarchar2(6) (tick)
hand_held1varchar2(10) (tick)
hand_held2varchar2(10) (tick)
current_hand_heldnumber(1) (tick)
schedulablenumber(1) (tick)
max_overtimenumber(4) (error)
printervarchar2(10) (tick)
inform_lead_timenumber(4) (tick)
work_region_nonumber(9) (tick)
work_postcodevarchar2(30) (tick)
tz_typenumber(1) (tick)
tz_nonumber(2) (tick)
earmarked_jobs_maxnumber(2) (tick)
default_start_locnumber(1)0(error)
default_start_loc_postcodevarchar2(30) (tick)
default_end_locnumber(1)0(error)
default_end_loc_postcodevarchar2(30) (tick)
default_LK_centre_locnumber(1)0(error)
default_LK_centre_loc_postcodevarchar2(30) (tick)
default_start_loc_region_nonumber(9) (tick)
default_end_loc_region_nonumber(9) (tick)
default_LK_centre_loc_region_nonumber(9) (tick)
TOTBnumber(4) (tick)
TOTAnumber(4) (tick)
vehicle_capacitynumber(9) (tick)
frozen_lead_daysnumber(2) (tick)
frozen_day_trigger_timevarchar2(4) (error)
show_operative_statusnumber(1) (tick)
travel_statusnumber(1) (error)
travel_status_timedate (tick)
travel_api_timedate (tick)
last_moving_timedate (tick)
current_loc_typevarchar2(5) (tick)
geo_fence_namevarchar2(25) (tick)
last_stopped_overnightdate (tick)
last_stopped_customerdate (tick)
last_stopped_okdate (tick)
last_moving_timedate (tick)

Keys 

primary key (employee_no) 
unique (employee_ref) 
foreign key (type) references 14.1 sp291_employee_types (type) 
foreign key (region_no, region_ref) references /wiki/spaces/SCH141/pages/27068047 (region_no, region_ref) 
foreign key (current_hand_held) references sp292_current_hht (current_hand_held) 
foreign key (work_region_no) references sp057_regions (region_no) 
foreign key (tz_no) references /wiki/spaces/SCH141/pages/27100425 (tz_no) 
foreign key (default_start_loc) references /wiki/spaces/SCH141/pages/27066920 (location) 
foreign key (default_end_loc) references sp271_start_end_locations (location) 
foreign key (default_start_loc_region_no) references sp057_regions (region_no) 
foreign key (default_end_loc_region_no) references sp057_regions (region_no) 
foreign key (default_LK_centre_loc) references sp271_start_end_locations(location) 
foreign key (default_LK_centre_region_no) references sp057_regions (region_no)

Primary Key Referenced From

 

Column Descriptions

FieldDescription
employee_noServiceOptimizer-generated unique identifier. 
employee_refEnd users' unique identifier. 
type

The employee type:

0 - person

1 - crew

nameThe employee's name as it is to be displayed in the user interface.
surnameThe employee's surname (required only to allow sorting).
job_titleThe employee's job title.
efficiencyThe employee's efficiency rating, as a percentage.
address1The employee's home address ...
addess2 
addess3 
addess4 
postcode... and postcode.
region_noIdentifier of the region in which the employee's home address is located.
region_refRegion reference for the employee's home address.
phone1

Telephone number.

phone2

Telephone number.

pagerPager number.
call_signUnused.
hand_held1Address of the employee's hand held terminal.
hand_held2Address of the employee's 2nd hand held terminal.
current_hand_heldIndicator showing which hand held terminal is currently in use (1 or 2).
schedulable

A flag indicating whether or not the employee can be used by the schedulers:

0 - The employee is not schedulable

1 - The employee is schedulable

max_overtimeThe maximum number of minutes authorised overtime that the employee can work in any one shift period.
printerEmployee's print location.
inform_lead_timeThe inform lead time, in minutes, for this employee. If the value is null, the lead time for the employee's responsibility unit (recorded in sp213_scheduler_parameters), or if this is NULL, the system lead time (recorded in sp083_system_parameters) is used.
work_region_noA standard start or finish region other than home or depot.
work_postcodeA standard start or finish postcode other than home or depot - used rather than work_region_no.
earmarked_jobs_maxThe maximum number of jobs to be auto-earmarked at any given time for this operative. Overrides parameter setting in sp213/sp083 for disp_earmarked_jobs_max for this operative. The count only applies to jobs auto-eamarked. Those earmarked by batch dispatch or user-earmarked do not count towards earmarked_jobs_max, and once a job is no longer earmarked, e.g. it has passed on into the contacted state, it no longer counts either.

tz_type

Flag determining how the "local" time zone for an employee is determined:

0 - Use time zone specified in tz_no field.

1 - Use time zone of employee's home address

If this field is null, sp083 'tz_Default' is used.

tz_noAn employee may, through a working day, move between different time zones. The employee's schedule for the day could be represented in terms of the time zone of the location in which s/he is in at any given time, but it is more sensible to assume that the employee has a watch and is working to his/her own "local" time zone.
This field is only used if the tz_type field is set to 0.
If tz_type is 0 and this field is null, the server time zone is used.
default_start_loc

The location of the operative at the start of his shift:

0 - Home

1 - Work

2 - Depot

3 - Specified

default_start_loc_postcode, default_start_loc_region_noThe location of the operative (postcode and region) at the start of his shift when default_start_loc (above) is 'Specified'.

default_end_loc

The location of the operative at the end of his shift:

0 - Home

1 - Work

2 - Depot

3 - Specified

default_end_loc_postcode, default_end_loc_region_no

The location (postcode and region) of the operative at the end of his shift when default_end_loc (above) is 'Specified'.
default_LK_centre_loc

Identifies the location from which range local knowledge is calculated:

0 - Home

1 - Work

2 - Depot

3 - Specified

default_LK_centre_postcode, default_LK_centre_region_noLocation (postcode and region) from which range local knowledge is calculated when default_LK_centre_loc is 'Specified'.
TOTBMaximum before shift travel (in minutes). If NULL, the value for the FRU used instead.
TOTAMaximum after shift travel (in minutes). If NULL, the value for the FRU used instead.
vehicle_capacityThe total amount of space available in the employee's vehicle for Pickups and Deliveries; in user-defined units.
frozen_lead_daysThe number of days, starting from 'Today', that should be frozen. If this value is 0 then today does not get frozen until now is later then the frozen_day_trigger_time. If its value is 1 then today will be frozen, and tomorrow will be frozen once it is later than frozen_day_trigger_time – and so on.Takes account of non-working days (ref: sp013_non_working_days).
frozen_day_trigger_timeThis is a SP_Time that represents the time at which the next day should be frozen. The time is determined by appending this time to today's date, and is interpreted to be in employee local time.
show_operative_statusWhen this value is 0 neither the operative status or travel status for this operative is displayed. When it is 1 just the operative status is displayed. When it is 2 just the operative travel status is displayed.When it is 3 then both the operative status and the operative travel status are displayed.
travel_statusThe current travel status as set by an EmpChangeTravelStatus API call. Typically this is the status reported to ServiceOptimizer that represents the vehicle's current state, i.e.: Stopped, Stationary, Moving and Unknown.If travel status is not enabled for this operative or this operative has not yet had a travel status supplied on the EmpChangeTravelStatus API then this will be 0.
travel_status_timeThis is the date and time at which the travel_status was last changed. This is the current time and not the timestamp supplied on the EmpChangeTravelStatus API call. This is stored in FRU timezone.
travel_api_timeThis is the date and time at which the travel_status was last changed according to the timestamp parameter of the EmpChangeTravelStatus API call. This is stored in FRU timezone.
last_moving_timeThis is the time that the travel status was last known to be moving, significant when the current travel status is not moving. This will be stored in FRU timezone. This has no meaning outside ServiceOptimizer.
current_loc_typeIf the current travel status is Stopped then this value further qualifies the location type. See sp561_geofence_location_types. This is used to select the type of stopped icon on the ServiceGANTT.
geo_fence_nameDescriptive name for the location. This is an optional field and if present it is displayed on the ServiceGANTT's tooltip.
last_stopped_overnightThis is the time that the travel status was last known to be stopped at a location in the overnight class (see sp561_geofence_location_types.location_class). This is stored in FRU timezone. This has no meaning outside ServiceOptimizer.
last_stopped_customerThis is the time that the travel status was last known to be stopped at a location in the customer class (see sp561_geofence_location_types.location_class). This is stored in FRU timezone. This has no meaning outside ServiceScheduling.
last_stopped_okThis is the time that the travel status was last known to be stopped at a location in the stopped OK class (see sp561_geofence_location_types.location_class). This is stored in FRU timezone. This has no meaning outside ServiceScheduling.