Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 76 Next »

Schedule Metadata

K2AServiceLibraryMeta is an endpoint that shows metadata for the other endpoints. For example, this displays the Appointment endpoint. The K2AServiceLibraryMeta endpoint URL can be found in Schedule > installLog.txt in the line Test service with URL: http://yourserver:port/KEY2ACTServiceLibrary/api/K2AServiceLibraryMeta Copy the URL and paste it into your web browser. Firefox will display the JSON file appropriately. Chrome has extensions that can be added to format the JSON display.

If the value you are seeking is not currently present in the metadata, the value would have to be added by the development team as it requires a data model change. This is not a file that can be customized outside of development.

Grid Configuration

There are many grids in Schedule. A few examples of the primary grids are:

  • Unscheduled/Unassigned Appointments
  • Service Calls
  • Equipment
  • Location Contacts
  • Maintenance Contracts
  • Jobs


Each of these grids has a columns .json file that indicates the fields of data that can be displayed and the order, as well as the label for the field. There are some restrictions in some grids, where the first few fields are required to be present and in a certain location. Those restrictions are noted in the json files.

You can pick from these column values to tailor Schedule for your users.

Adding a Column to a Grid

  1. Open K2AServiceLibraryMeta in your browser.  Locate the endPoint and objectProperties. Within each endPoint, objectProperties have been added that lists the properties associated with the endPoint with a method of GET by the object name, which are used in our JSON files. This does not list the unvalidated user-defined fields (UDF).
  2.  Open the columns.json file located in web client install location \Schedule\WebsiteFiles\Scripts\K2A\. Inside each of the grid folders, you will find the columns.json file. Open this file with a text editor. 

    Only the grid folders that contain the columns.json file are customizable. If there isn't a columns.json file then the grid will only have the columns displayed.
  3. Locate the position where you want the column to display. For example, as the last column. 

    Required columns and/or their required location are noted in the file.
  4.  Copy the information from the current last column, including the curly brackets { }, and paste this directly below.
  5. Add a comma ',' to the closing curly bracket } of the former last column.
  6. Edit the following:
    • "label": The information within the quotation marks displays as the column header.
    • "id": Enter the field name exactly as it appears in the endPoint in K2AServiceLibraryMeta. 
  7. Save the columns.json file.
  8. Launch Schedule and view the column that was just added. If the column doesn't display, you may need to reset the grid. Resetting the grid will reset the existing columns to their original location in the grid.  
    To reset a grid, choose Menu and then choose About, choose the grid name from the Reset Grid drop-down and then choose Reset.

For example, to add the Service Call Creation Date to the Unscheduled Grid on the Schedule Board, add the following in the UnscheduledGrid\columns.json file:

{    
"label": "SC Created",
"width": "150",
"type": "dhxcalendar",
"align": "left",
"sort": "date",
"id": "callCreationDate"
}

Grid Column Formatting

This section describes the columns.json file.

Label

Actual label that will be displayed on the header of the column.

Width

The width in pixels of the column. To make a column hidden set the size to 0.

Types

Defines the type of field the column contains.

  • "rotxt": Read only text field.
  • "ron": Read only numeric field
  • "dhxCalendar": Date field
Align

Defines the alignment for the column, including the header.

  • "left": Left aligned.
  • "center": Center aligned.
  • "right": Right aligned.
Sort

Defines the type of sorting for the column.

  • "str": Text sorting.
  • "date": Date sorting.
  • "int": Number sorting
  • "na": No sorting

Column Filtering

This section describes how filtering works in the filter boxes on the grid.

  • Text Filter: A column type of "rotxt" will use a text filter. Retrieves values which contain mask defined through text field.
  • Numeric Filter: A column type of "ron" will use a text filter that allows using comparison operators in it. Retrieves values which contain mask defined through text field.

The possible comparison operators are:

=Equal to
>Greater than
<Less than
?Less or equal to
>=Greater or equal to
n1..n2A range of values

Example: List of endPoints

See  http://yourserver:port/KEY2ACTServiceLibrary/api/K2AServiceLibraryMeta.

Appointment
AppointmentHistory
AppointmentStatus

Attachment
callCreationDate
Company

Customer
CustomerSearch
Division
Equipment
ERPUser
Job
JobCostCode
K2AServiceLibraryMeta
K2ASettings
LaborGroup
LocationContact

LocationContract 
Location
Note
PricingMatrix
ResourceActivity
ResourceBranch
Resource
ResourceExtension
ResourceInventorySite
ResourceReport
ResourceServiceArea
ResourceShift
ResourceSkillSet
ResourceTeam
Role
RolePermission
Salesperson

ServiceArea
ServiceOptions
SkillLevel
Subcontractor
Tasks
TimeStamp
TimeZone
User
UserRoles
ValidatedUserDefined
WorkOrder
WorkOrderProblem
WorkOrderReport
WorkOrderResolution
WorkOrderType 

User-Defined Field Configuration

In Schedule setup, you have the capability to mark the fields to display in specific windows. If your company has utilized any of the user-defined fields (UDF) in Service Management that are  not listed , you can add those fields to display as options in the Settings window, and then mark the check box to show the field(s). Conversely, if you do not want UDF fields to display in the Settings window, you can update this information.

The UDF files are found in  your install location\Schedule\WebServiceFiles\UDF.

The files are:

  • AppointmentUDF.json : Can be displayed on Service, Job, and/or Resource appointment window.
  • CustomerUDF.json : Can be displayed on a Customer window.
  • LocationUDF.json : Can be display on a Location window.
  • WorkOrderUDF.json : Can be display on a Service Call window.

Example: for Location you could add User_Defined_9a as follows. Append the following to the LocationUDF.json file:

{
"Column": "Service_User_Define_9",
"Length": 0,
"Label": "This is my label to display",
"Type": "Date",
"IsUsed": true,
"wsiParameterName": ""
} 

If IsUsed is not set to true, the field will not show up in settings for you to add to the displayed fields.

Setting up a Field to Display in Schedule Service Call & Appointment Form Fields Settings

For Service Appointments, Job Appointments and Technician Activities:

  1. To display an appointment UDF field, open the AppointmentUDF.json file in a program that allows you to edit the file (example: Notepad). Edit the following fields within a set of braces { }.
    • "Label": User defined label that displays for the property.
    • "IsUsed": To display the field, change the  IsUsed  value to  true .
  2. Save the AppointmentUDF.json file.

For the Service Call form:
Once values are added into the WorkOrderUDF.json file, they become immediately available to add to the forms from the Schedule Settings window.

  1. To display a service call UDF field, open the WorkOrderUDF.json  file in a program that allows you to edit the file (example: Notepad++). Edit the following fields within a set of braces { }.
    • "Label": User defined label that displays for the property.
    • "IsUsed": To display the field, change the  IsUsed  value to   true  .
  2. Save the WorkOrderUDF.json file.

Adding the User-Defined Field to the Schedule Appointment Window

  1. Open Schedule, go to Settings > Service Call & Appointment Form Fields.
  2. Choose the appropriate tab(s) and mark the check box next to the field(s) that you added to update the windows.
  3. Choose Save.

Appointment Label and Tooltip Configuration

Appointment panel labels and tooltip labels are defined in a similar manner using JSON files. These files are in: Install location\Schedule\WebsiteFiles\Scripts\K2A\SchedulerControl folder.

The files are:

  • eventContent.json : Appointment panel labels
  • tooltipContent.json : Appointment tooltip labels

Below is an example of the file structure. Each section within the curly brackets { } represents an appointment property that you will see on the schedule board. The order that your fields appear in the configuration file is the order that they will show in on the schedule board.

  • "id"Appointment property and must be one of these valid case-sensitive values: Appointment Property List .
  • "label"User-defined label that displays for the property.
  • "apptType"Appointment type to display the label for. The available appoint types are: "WorkOrder", "Job", and "Technician".

Adding Appointment Description to Mouse-Over Tooltip

(x86)\Signature\Schedule\{*}WebsiteFiles{*}\Scripts\K2A\SchedulerControl

{
    "id": "description",
    "label": "App Desc: ",
    "apptType": [ "ServiceCall", "Job" ]

  }


Adding Cost Code Alias to the Tooltip or Job Appointment Bar

Add this to the tooltipContent.json and eventContent.json:

{

  "id": "costCodeAlias",

  "label": "Cost Code: ",

  "apptType": "Job"

},

Adding Service Call Description with a Label

 (Not sure job needs to be in the apptType list though as job appointments don’t have service call descriptions.)

  {
    "id": "workOrderDescription",
    "label": "Service Desc: ",
    "apptType": [ "ServiceCall", "Job" ]
  },   

Adding Service Call Description Without a Label

{
   "id": "workOrderDescription",
    "label": "",
    "apptType": [ "ServiceCall", "Job" ]
  },

Example: Appointment Property List


start_date
end_date
number
estimateHours
resourceName
customerName
locationName
costCode
costCodeAlias

actualHours
technicianStatus
appointmentStatus
appointmentPriority
group
skillLevel
completionDate
modifiedDate
modifiedUser

division
affiliate
region
branch
serviceArea
workOrderType
workOrderProblem
workOrderPriority

Example: Additional User-Defined Fields

In addition to the above fields any user-defined fields in the SV00301 table are available to include such as:

Service_User_Define_1
Service_User_Define_2
Service_User_Define_3

Altering the Resource Data Shown in the Timeline View

This example shows you how to set the Resource box to display only the Tech ID and Primary Skill Level in the Schedule Grid when using the Timeline View.

  1. Go to the folder where the schedulerControl.js file is installed. For a base installation, using the installation defaults, it would be here: Program Files (x86)\Signature\Schedule\WebsiteFiles\Scripts\K2A\ScheduleControl.

  2. Make a copy of the current schedulerControl.js file and paste it into the same folder, for backup purposes.
  3. Edit the schedulerControl.js file with Notepad++.
  4. Go to this part of the code (possibly at the end of the script): 
    resourceColumnData: function (resource, label) {return "<div id='headerLabel-" + resource.key + "' data-resourceID='" + resource.key + "' class='resourceHeaderDetail' style='height: 100% !important;'  ondblclick='COMMON.showResourceDetail(" + resource.key + ")'>\ <div class='resourceDataDetail'>" + label + "</div><div class='resourceDataDetail'>" + resource.resource + "</div><div class='resourceDataDetail'>" +  resource.skillLevel + " </div><div class='resourceDataDetail'>" + resource.team + "</div></div>";
  5. Replace this area of the script with this text:
    <div class='resourceDataDetail'>" + resource.resource + "</div><div class='resourceDataDetail'>" + resource.skillLevel + "</div></div>";
  6. Save changes to the file.
  7. Launch Schedule.
  8. CTRL-F5 to update the configuration files.


Example: Modified schedulerControl.js

This is what the schedulerControl.js file will look like AFTER you modify it:

Results in Schedule should look like this:


  • No labels