0% found this document useful (0 votes)
236 views

OfficeCore OfficeTrack API Reference

OfficeCore OfficeTrack API Reference
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views

OfficeCore OfficeTrack API Reference

OfficeCore OfficeTrack API Reference
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

LBS API Reference

LBS API Reference


The software described in this book is furnished under a license agreement and may be used only in
accordance with the terms of the agreement.

Documentation version 5 (Jul-2012)

Copyright Notice
Copyright © 2012 OfficeCore.
All rights reserved.
Any technical documentation that is made available by OfficeCore is the copyrighted work of OfficeCore and
is owned by OfficeCore.
NO WARRENTY. The technical documentation is being delivered to you AS-IS, and OfficeCore makes no
warranty as to its accuracy or use. Any use of the technical documentation or the information contained
therein is at the risk of the user.
Documentation may include technical or other inaccuracies or typographical errors. OfficeCore reserves the
right to make changes without prior notice.
No part of this publication may be copied without the express written permission of OfficeCore.

Trademarks
OfficeCore, the OfficeCore logo, SMSCenter are trademarks of OfficeCore.
Microsoft, Windows, Office, Outlook, Excel, Office logo and Windows logo are registered trademarks of
Microsoft Corporation.
Other brands and product names mentioned in this manual may be trademarks or registered trademarks of
their respective companies and are hereby acknowledged.
3

Document Changes

Date Change Description


26-March-2007  Added support for sending the location of a task
17-April-2007  Added support for sending the location of the employee who created an
Employee Timesheet Entry
07-November-2007  Changes the secured web service documentation to a WSE 3 sample
22-September-2008  Changed the find address return values to comply with version 4.00 of the
server
29-December-2008  Added new fields to the customer notifications
05-March-2009  Added an option on the create task to send a notification to the mobile
27-May-2009  Added HiddenData1 to the task API
04-August-2009  Added GetVehicleHistoricInputsRequest
 Added EmployeeImport
15-November-2009  Added coordinate system conversion to location responses
13-January-2010  Added Entry types list to the remote updates table
24-January-2010  Added Wgs84 support for web service coordinates
18-Febuary-2010  Added Location Accuracy and Task-Entry Distance to Customer
Notifications
09-August-2010  Added support for sending inputs in a Remote location update
 Added different handling methods for unlisted employees when importing
employees
15-September-2010  Added Data8..Data15 to tasks information
03-Febuary-2011  Added Email to employee import column mapping
07-Febuary-2011  Added Max Discount to employee import column mapping
15-Febuary-2011  Added task notes token to customer notifications
 Added AdditionalInfoXml to the task web service
28-April-2011  Added LOC_PN token to the customer notifications
15-May-2011  Added SomeRowsSkipped return value to the import employees web
method
 Added Catalog web services
 Added LimitCatalogCategoriesSelectionToCodes and
LimitCatalogItemsSelectionToCatalogNumbers to task import
31-May-2011  Added MS_TurnMobileAppOn and MS_TurnMobileAppOff to the entry types
table
03-Aug-2011  Added MustBeBilled to the catalog import
01-Sep-2011  Added UserData16..20 to tasks
 Added task CoordinationPhone2
26-Sep-2011  Added the customer notifications XML option
09-Oct-2011  Changes to the customer notifications retry mechanism
16-Nov-2011  Added option to specify the manager when importing employees
17-Apr-2012  Added dates as ddmmyyyyhhmmss to the customer notifications XML
14-Jun-2012  Added PreviousRelatedEntries to the customer notifications XML
04-Jul-2012  Added serial number import to catalog
4

Document Changes ............................................................................................................................................. 3


Purpose of this document .................................................................................................................................... 5
Terms used in the document ............................................................................................................................... 5
Web Services ....................................................................................................................................................... 6
The AddressImprovement Web Service .......................................................................................................... 7
ImproveAddress Web Method.................................................................................................................... 7
FindAddressCoords Web Method .............................................................................................................. 8
The RemoteUpdates Web Service .................................................................................................................. 9
AddEmployeeTimeSheetEntry Web Method ............................................................................................. 9
VerifyEmployeeNumbers Web Method .................................................................................................... 13
The SMS Web Service ................................................................................................................................... 14
SendSMSToEmployee Web Method ....................................................................................................... 14
The TaskManagement Web Service .............................................................................................................. 15
CreateOrUpdateTask Web Method.......................................................................................................... 15
The Employees Web Service ......................................................................................................................... 18
GetList Web Method ................................................................................................................................ 18
ImportEmployees Web Method ................................................................................................................ 19
The MobileLocations Web Service ................................................................................................................ 21
GetMobileDeviceCurrentLocation Web Method ....................................................................................... 21
GetMobileDeviceHistoricLocation Web Method ....................................................................................... 22
The Vehicles Web Service ............................................................................................................................. 24
GetHistoricInputs Web Method ................................................................................................................ 24
The Catalog Web Service .............................................................................................................................. 26
ImportCatalog Web Method ..................................................................................................................... 26
ImportEmployeeCatalog Web Method ..................................................................................................... 28
Calling a web service using WSE .................................................................................................................. 30
Customer Notification System ........................................................................................................................... 31
Server Response ........................................................................................................................................... 31
Errors while sending a notification ................................................................................................................. 31
GET Tokens ................................................................................................................................................... 31
The Data tag............................................................................................................................................. 34
The EntryTemplate tag ............................................................................................................................. 34
The EntryLocation tag .............................................................................................................................. 34
The Employee tag and the ReportedByEmployee tag ............................................................................. 35
The Files tag............................................................................................................................................. 35
The CatalogItems tag ............................................................................................................................... 36
The PreviousRelatedEntries tag .............................................................................................................. 36
The Task tag ............................................................................................................................................ 37
Event Types ................................................................................................................................................... 38
Entry Types .................................................................................................................................................... 38
Task Statuses ................................................................................................................................................ 38
Appendix A – Input types and their related message types .............................................................................. 39
Appendix B – Task additional information ......................................................................................................... 40
5

Purpose of this document


The OfficeCore LBS system accepts incoming requests to create entries in the LBS server. This document will
list these requests and list some of the ways the server can accept incoming requests

Terms used in the document


The following terms are used inside the document
Term Description
Customer A company who has registered to the LBS service. The company has mobile
devices and Employees associated with it.
Mobile Device A unit that can send its location to the LBS server. The unit might also be able to
send Employee information and/or telemetry.
Employee An employee of the company. The employee usually has a Mobile Device
associated with him. The employee uses the Mobile Device to send information to
the LBS server.
Employee Time Sheet An entry usually made by the employee using the Mobile Device to indicate a status
(ETS) Entry change for the employee. Typical entries are Sign In, Sign Out. These entries do
not include location entries of the employee.
Task A task which is associated with an employee. The employee can report entries
about the task as the status of the task changes.
6

Web Services
The web server exposes a few Web Services to in order to receive data from external sources, as well as to
allow external applications to query the server. Some of these Web Services require the use of Web Service
Extensions (WSE) for enhanced security.

Below is a list of all the Web Services exposed by the server and a general description of each Web Service.
A more detailed explanation about each Web Service is given below.

Web Service Name Description Requires


WSE
AddressImprovement.asmx Allows running street address related functions like finding
addresses similar to a given text or finding an address
coordinates.
RemoteUpdates.asmx Allows adding employee time sheet entries to the server
SMS.asmx Allows sending SMS messages to employees
TaskManagement.asmx Allows creating or updating employee tasks on the server
MobileLocations.asmx Allows querying the server about the current or historic location of 
a Mobile Device.
Catalog.asmx Allows updating the item catalog on the server 

To improve usability and compatibility with other development languages, all of the Web Methods in these
web services accept only a single parameter "Request" which holds a XML document that represents the
request from the web method.
7

The AddressImprovement Web Service


This Web Service allows running street address related functions. The web service exposes these web
methods:

ImproveAddress Web Method


This web method allows improving a text based address to a format that the internal addressing algorithms of
the server will recognize. A typical usage of this web method would be to improve an address typed by the
user so that you can take the improved address and then find it's coordinates.

The web method accepts a single parameter request which needs to be a XML document in this format
<ImproveAddressRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserName></UserName>
<Password></Password>
<City></City>
<Street></Street>
</ImproveAddressRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
City String (Required) The city name that needs to be improved
Street String (Optional) The street name that needs to be improved

The web method will return this object


<ImproveAddressResponse xmlns="Trackem.Web.Services">
<ImproveAddressResult>
<ResultCode></ResultCode>
<ResultDataset></ResultDataset>
</ImproveAddressResult>
</ImproveAddressResponse>
Parameter Description
Result Code The result of the Address search. The code can be one of the following:
NoMatchFound – No match or similar match was found for the given City and/or
Street
ExactMatchFound – The exact name of the City and Street was found
ApproximateMatchesFound – An exact match was not found but a few possible
addresses where found
InvalidUsernameOrPassword – The supplied username and password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed

ResultDataset This parameter holds the suggestions for addresses found by the server. The
parameter holds a dataset made of two fields City and Street.
8

FindAddressCoords Web Method


This web method allows finding the coordinates on a given address.

The web method accepts a single parameter request which needs to be a XML document in this format
<FindAddressCoordinatesRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserName></UserName>
<Password></Password>
<City></City>
<Street></Street>
<HouseNumber></HouseNumber>
</FindAddressCoordinatesRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
City String (Required) The city name
Street String (Optional) The street name
HouseNumber Int16 (Optional) The house number

The web method will return this object


<FindAddressCoordsResponse xmlns="Trackem.Web.Services">
<FindAddressCoordsResult>
<ResultCode></ResultCode>
<E></E>
<N></N>
<W></W>
<S></S>
</FindAddressCoordsResult>
</FindAddressCoordsResponse>

Parameter Description
Result Code The result of the Address search. The code can be one of the following:
NoMatchFound – Address not found
FullRequestFound– Exact match found for City, Street and House Number. The
coordinate results hold the exact location of the requested address.
PartialRequestFound– The address was partially found. The coordinate results
holds the boundaries of the found object.
InvalidUsernameOrPassword – The supplied username and password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed

E East coordinate. The value of this parameter can change according to the Result
Code. See the result codes for more details.
N North coordinate. The value of this parameter can change according to the Result
Code. See the result codes for more details.
S South coordinate. The value of this parameter can change according to the Result
Code. See the result codes for more details.
W West coordinate. The value of this parameter can change according to the Result
Code. See the result codes for more details.
9

The RemoteUpdates Web Service


This Web Service allows remote applications to create employee time sheet entries on the server. A typical
user for this web service would be an IVR machine that will accept incoming entries from employees (for
example an employee sign in).

AddEmployeeTimeSheetEntry Web Method


This web method adds an time sheet entry for the given employee. The web method supports adding an entry
for single or multiple employees on a single call as well as specifying the employee who reported on behalf of
all the employees.

The web method does not validate the Employee Numbers if they were supplied. The server will ignore
entries for invalid employee numbers. You can use the VerifyEmployeeNumbers web method to validate the
employee numbers before calling this web method.

If you are sending Input values, you must filter them to avoid sending duplicate data to the server. Only
send an input value when it's changed.

The web method accepts a single parameter request which needs to be a XML document in this format
<AddETSRequest xmlns:xsd = "http://www.w3.org/2001/XMLSchema" xmlns:xsi =
"http://www.w3.org/2001/XMLSchema-instance" >
<UserName></UserName>
<Password></Password>
<ReportingEmployeeMSISDN></ReportingEmployeeMSISDN>
<EntryType></EntryType>
<TimeStampMinuteDiff></TimeStampMinuteDiff>
<Description></Description>
<EntrySource></EntrySource>
<EmployeeNumbers>
<string></string>
<string></string>
</EmployeeNumbers>
<LocationSamplingMethod></LocationSamplingMethod>
<Location>
<East></East>
<North></North>
<Address></Address>
<CoordinateIsInWgs84></CoordinateIsInWgs84>
<Speed></Speed>
<Heading></Heading>
</Location>
<Inputs>
<InputValue>
<InputType></InputType>
<ConvertedMessageType></ConvertedMessageType>
<Value></Value>
<ValueConverted></ValueConverted>
<CalculatedValue></CalculatedValue>
</InputValue>
</Inputs>
</AddETSRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
ReportingEmployeeMSISDN String (Required) The phone number of the reporting
employee (e.g. The employee who actually
makes the IVR call)
EntryType Enumerator The entry type that should be entered into
(Required) the employee time sheet (See Entry Types
under the Customer Notification System for
possible values)
TimeStampMinuteDiff Int64 (Required) The age in minutes of the entry as it should
exist in the employee time sheet. (e.g. if the
entry was made 10 minutes ago in the IVR
system then the value of this parameter
should be -10)
10

Description String (Optional) A string representing an additional value


the employee may enter in the external
system (e.g. task number). If the EntryType
parameter is a task related type than this
parameter must hold the task number
EntrySource Enumerator The source of the employee time sheet
(Required) entry. Can be one of the following:
IVR
SMS
WAP
Web
EmployeeNumbers String Array If the parameter is supplied then the entry is
(Optional) made in the employee time sheet for the
employee numbers provided in the array. If
the parameter is not supplied then the entry
is made to the Reporting Employee only.
LocationSamplingMethod Enumerator Specifies how to sample the location of the
(Required) reporting employee mobile. valid values
are:
Auto – Decides automatically how to
sample the location of the reporting
employee mobile.
DoNotSampleLocation – does not sample
the location of the reporting employee
mobile. if a Location object was supplied
with the request then the entry would be
associated with that location. If not Location
object was supplied then the entries would
be logged in the employee time sheet
without any location.
SampleLocation – Makes the server
sample the location of the reporting
employee mobile unless the Location object
was supplied in which case it will be used
as the location of the mobile.
Location Object (Optional) An optional object of the location of the
mobile device. If included it will be
registered as the location of the employee
reporting
Location.East Double The east coordinate of the reporting
(Required) employee mobile
Location.North Double The north coordinate of the reporting
(Required) employee mobile
Location.Address String (Optional) The text address of the reporting employee
mobile. if omitted the server will calculate
the address based on the East and North
coordinates
Location.Speed Double The speed in Km/h
(Optional)
Location.Heading Int16 (Optional) The Heading as obtained from the GPS (0
is north, 90 is east, 180 is south, 270 is
west)
Location.CoordinateIsInWgs84 Boolean Set to "true" if the coordinates supplied in
(Optional) the east and north fields are in Wgs84
Inputs Collection An optional collection of the object
(Optional) InputValue. The collection holds inputs from
the unit (e.g. ignition, temperature)
Inputs InputValue Object An object representing one input from the
mobile unit
Inputs.InputValue.InputType Enumerator The type of the input (e.g. Ignition,
11

(Required) Temperature). See Appendix for the list of


supported input types.
12

Inputs.InputValue.ConvertedMessageType Enumerator The specific type of message for the input


(Required) type (e.g. turn ignition on or turn ignition
off). See Appendix for the list of supported
message types
Inputs.InputValue.Value Double The value of the input. For digital inputs the
(Required) value must be 1 or 0. For analog inputs the
value can be any number
Inputs.InputValue.ValueConverted Boolean Set to false if the value needs to be
(Required) converted by the server. Otherwise set to
true.
Inputs.InputValue.CalculatedValue Double A value holding a calculated value for the
(Optional) input (e.g. if the input is Fueling (vehicle is
fueling), the Calculated value can hold the
amount fueled)

The web method will return one of the following values


Parameter Description
OK Entry or Entries where accepted by the server
InvalidUserNameOrPasswordOrIPAddress The supplied username and password are not valid
InvalidEmployeeMSISDN The reporting employee mobile number is invalid
MSISDNIsNotAssociatedWithEmployee The reporting employee mobile is not associated with an
employee
UnknownErrorHasOccurred An unknown error has occurred
InvalidRequest request XML could not be parsed
13

VerifyEmployeeNumbers Web Method


This web method allows verifying an array of employee numbers and finding which employee numbers exist
and which do not exist.

The web method accepts a single parameter request which needs to be a XML document in this format
<ValidateEmployeeNumbersRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserName>y</UserName>
<Password>x</Password>
<ReportingEmployeeMSISDN>x</ReportingEmployeeMSISDN>
<EmployeeNumbers>
<string></string>
<string></string>
</EmployeeNumbers>
</ValidateEmployeeNumbersRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
ReportingEmployeeMSISDN String (Required) The phone number of the reporting employee (e.g. The
employee who actually makes the IVR call)
EmployeeNumbers String Array The employee numbers that need to be verified.
(Required)

The web method will return this object


<VerifyEmployeeNumbersResponse xmlns="Trackem.Web.Services">
<VerifyEmployeeNumbersResult>
<Result></Result>
<EmployeeNumberValid>
<boolean></boolean>
<boolean></boolean>
</EmployeeNumberValid>
</VerifyEmployeeNumbersResult>
</VerifyEmployeeNumbersResponse>

Parameter Description
Result The result of the verification process. The code can be one of the following:
OK – Employee numbers validated. See the EmployeeNumberValid parameter for
results
InvalidEmployeeMSISDN - The reporting employee mobile number is invalid
MSISDNIsNotAssociatedWithEmployee - The reporting employee mobile is not
associated with an employee
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed

EmployeeNumberValid An array of Booleans specifying for each provided Employee Number if it exists or
not on the server. The order of the Booleans is the same order of the provided
employee numbers.
14

The SMS Web Service


This Web Service allows sending SMS messages to employees from remote applications. A typical user for
this web service would be a back office application that needs to notify the employee of new tasks.

SendSMSToEmployee Web Method


This web method allows sending a SMS message to a single employee based on his employee number.

The web method accepts a single parameter request which needs to be a XML document in this format
<SendSMSToEmployeeRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserName></UserName>
<Password></Password>
<EmployeeNumber></EmployeeNumber>
<SMSType> </SMSType>
<Data></Data>
<BillingType></BillingType>
</SendSMSToEmployeeRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
EmployeeNumber String (Required) The employee number that the SMS will be sent to
SMSType Enumerator The Type of the SMS message. Can be one of the
(Required) following:
Text – A regular text message
Binary – A binary message
WapPush – A WAP message
Data String (Required) The contents of the SMS to send. If the SMSType is
WapPush then the data should be made of a link
description and a link and formatted like
<description>$<link>
BillingType Enumerator The server needs to know the type of message so it can
(Required) (on some cases) send the message under different billing
charges. The value can be one for the following:
TextMessage – The SMS is a regular text message.
TaskMessage – The SMS is a task related message.
DeviceSpecificControlMessage – The SMS is used to
control the behavior of the receiving mobile device.
LocationRequest – The SMS is used to sample the
location of the device (used in cases where the mobile
device needs to get an SMS to send it's location back to
the server)
SystemErrorMessage – The SMS is a server error
message
SystemGeneratedResponse – The SMS is a SMS that is
automatically generated by the server.
AlertMessage – The SMS is an alert generated by the
server.

The web method will return one of the following values


Parameter Description
OK Entry or Entries where accepted by the server
InvalidUserNameOrPasswordOrIPAddress The supplied username and password are not valid
InvalidEmployeeNumber The recipient employee number is invalid
EmployeeDoesNotHaveMobile The recipient employee does not have a mobile device
associated with him
UnknownErrorHasOccurred An unknown error has occurred
InvalidRequest The request XML could not be parsed
InvalidDataFormat The Data has an invalid format according to the SMS Type
15

The TaskManagement Web Service


This Web Service allows creating or updating tasks on the server so employees can report task related entries
to the server.

CreateOrUpdateTask Web Method


This web method allows creating or updating a task on the server.

The web method accepts a single parameter request which needs to be a XML document in this format
<CreateOrUpdateTaskRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserName></UserName>
<Password></Password>
<Operation></Operation>
<TaskNumber></TaskNumber>
<CustomerNumber></CustomerNumber>
<EmployeeNumber></EmployeeNumber>
<DueDateAsSecondsFromEpoch></DueDateAsSecondsFromEpoch>
<Duration></Duration>
<TaskName></TaskName>
<Description></Description>
<Status></Status>
<CoordinationPhone></CoordinationPhone>
<CoordinationPhone2></CoordinationPhone2>
<ContactName></ContactName>
<TaskCategoryCode></TaskCategoryCode>
<CustomerName></CustomerName>
<Location>
<East></East>
<North></North>
<Address></Address>
<CoordinateIsInWgs84></CoordinateIsInWgs84>
</Location>
<Data1></Data1>

<Data20></Data20>
<HiddenData1></HiddenData1>
<ExternalCreationDateAsSecondsFromEpoch></ExternalCreationDateAsSecondsFromEpoch >
<Options></Options>
<AdditionalInfoXml></AdditionalInfoXml>
<LimitCatalogCategoriesSelectionToCodes></LimitCatalogCategoriesSelectionToCodes>
<LimitCatalogItemsSelectionToCatalogNumbers></LimitCatalogItemsSelectionToCatalogNumbers>
</CreateOrUpdateTaskRequest>
Parameter Data Type Description
UserName String A valid username for using this web
(Required) method
Password String A valid password for using this web
(Required) method
Operation Enumerator The operation the server is required to
(Required) do. Available options are:
Create – The server is required to create
a task
Update – The server is required to
update a task with the same Task
Number
AutoSelect – The server will check if the
task number provided exists. If the task
number exists then the server will update
the task if the task number does not exist
the server will create a task with the
provided task number.
TaskNumber Int64 The number of the Task
(Required)
CustomerNumber String The number of the customer in the
(Optional) server
EmployeeNumber String The number of the employee that will be
16

(Required) associated with the task.


DueDateAsSecondsFromEpoch Double The due date of the task as seconds
(Required) from epoch. The epoch is defined as
1/1/1970 12:00:00 AM UTC.
Duration Double The duration in hours of the task. for two
(Required) and a half hours set the value to 2.5
TaksName String The name of the task
(Required)
Description String The description of the task
(Optional)
Status Enumerator The status of the task. can be one of the
(Required) following:
NewTask – Task is a new task
SMSSent – An SMS was sent to the
employee who is assigned to the task
Acknowledged – The task was
acknowledged
InProgress – The task is in progress
Closed – The task is closed
Canceled – The task is Canceled
DontChange – Instructs the server not
to change the status of the task if the
task is being updated

CoordinationPhone, CoordinationPhone2 String The coordination phones. Used if the


(Optional) Customer Number parameter is not
given.
ContactName String The contact name. Used if the Customer
(Optional) Number parameter is not given.
CustomerName String The Customer name. Used if the
(Optional) Customer Number parameter is not
given.
TaskCategoryCode String The code of the task category as set on
(Optional) the server
Location Object An optional object of the location of the
(Optional) task.
Location.East Double The east coordinate of the task
(Required)
Location.North Double The north coordinate of the task
(Required)
Location.Address String The text address of the task.
(Required)
Location.CoordinateIsInWgs84 Boolean Set to "true" if the coordinates supplied
(Optional) in the east and north fields are in Wgs84
Data1..20 String Data fields for custom use
(Optional)
HiddenData1 String Data fields for custom use. Unlike Data
(Optional) 1..20 this field is only used for the
Customer Notification System and is not
displayed on any UI (see this document
for more information about the Customer
Notification System)
ExternalCreationDateAsSecondsFromEpoch Double A creation date for the task that is from
(Required) an external source (e.g. The client's back
office) expressed as seconds from
epoch. The epoch is defined as 1/1/1970
12:00:00 AM UTC.
Options Enumerator Sets various options:
(Optional) SendNotificationToMobile– sends a
17

notification to the mobile device


associated with the employee assigned
to the task. the notification is only send
when creating a new task
AdditionalInfoXml String An optional XML representing additional
(Optional) info about the task that will be displayed
to the employee. See Appendix B for a
sample of the XML.
Note: The XML in this tag should
be Url Encoded
LimitCatalogCategoriesSelectionToCodes String Limits the catalog that will be displayed
(Optional) to the employee when making entries for
this task to catalog categories specified
in this list. The list is expressed as a
comma separated value list and should
include the catalog category codes. See
the ImportCatalog Web Method for
details on creating the item catalog
LimitCatalogItemsSelectionToCatalogNumbers String Limits the items that will be displayed to
(Optional) the employee when making entries for
this task to catalog items specified in this
list. The list is expressed as a comma
separated value list and should include
the catalog number of the items. See the
ImportCatalog Web Method for details on
creating the item catalog

The web method will return one of the following values


Parameter Description
OK Task was created or updated successfully
InvalidUserNameOrPasswordOrIPAddress The supplied username and password are not valid
InvalidEmployeeNumber The employee number provided does not exist on the server
InvalidCustomerNumber The customer number provided does not exist on the server
TaskNumberNotFound The task number provided does not exist on the server
TaskCategoryCodeNotFound The task category provided does not exist on the server
TaskNumberAlreadyExists The task number already exists on the server
InvalidRequest The request XML could not be parsed
UnknownErrorHasoccurred An unknown error has occurred
18

The Employees Web Service


This Web Service allows remote administration of the employees on the server.

GetList Web Method


This web method returns the list of employees with the specified status(es).

The web method accepts a single parameter request which needs to be a XML document in this format
<GetEmployeeListRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserName>x</UserName>
<Password>y</Password>
<StatusMask>Enabled Disabled Deleted</StatusMask>
</GetEmployeeListRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
StatusMask Enumerator The statuses of employees to include on the result. Can
(Required) be one or more of the following:
Enabled
Disabled
Deleted

The web method will return this object


<GetEmployeeListResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ReturnValue>OK</ReturnValue>
<EmployeeCollection></EmployeeCollection>
</GetEmployeeListResult>

Parameter Description
Result The result of the verification process. The code can be one of the following:
OK – Employee numbers validated. See the EmployeeNumberValid parameter for
results
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed

EmployeeCollection An array of Employees matching the status criteria on the request.


19

ImportEmployees Web Method


This web method imports employees from an attached excel file. Employees on the server will be created,
updated or disabled according to the attached file.

The web method accepts a single parameter request which needs to be a XML document in this format
<ImportEmployeesRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserName>x</UserName>
<Password>y</Password>
<Data></Data>
<DataFormat>Xls</DataFormat>
<FirstRowHasColumnNames>true</FirstRowHasColumnNames>
<ColumnMapping>&lt;Mapping MobileNumber="MobileNumberColumn" /&gt;</ColumnMapping>
<UnlistedEmployeeHandling>&lt;Handling Method="Disable" Group="" /&gt;</UnlistedEmployeeHandling>
</ImportEmployeesRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
Data Byte array Base64 encoding of the bytes of the data file
(Required)
DataFormat Enumerator Specifies the type of file the data bytes are. Possible
(Required) values are:
Xls
Xlsx
Ods
CsvCommaDelimited_Ansi
CsvSemicolonDelimited_Ansi
CsvTabDelimited_Ansi
CsvCommaDelimited_Utf8
CsvSemicolonDelimited_Utf8
CsvTabDelimited_Utf8

When using Csv, if the file is not in Utf8 use Ansi. In this
case the file should be in the server's default ANSI code
page.
FirstRowHasColumnNames Boolean If set to true, the ColumnMapping tag should hold
(Required) mapping to names appearing on the first row. If set to
false, the ColumnMapping tag should hold mapping to
column numbers (the first column is 0)
ColumnMapping XML String Maps the columns of the file to properties of the
(Required) employee. The mapping is an XML string with a single tag
"Mapping". Each mapping is expressed as an attribute.
MobileNumber - optional
EmployeeNumber - required
FirstName - required
LastName - optional
WorkPhone - optional
HomePhone - optional
Address - optional
Mobile - optional
Remarks - optional
GroupName – optional
UniqueID – optional
Email – optional
MaxDiscount – optional. Note: 2.5% should be expressed
as 2.5
ManagingEmployeeNumber – optional. If set make sure
the manager employee record appears before any records
of employees he manages.
20

UnlistedEmployeeHandling XML String Defines what to do with employees already on the server
(Optional) that have not been listed in the import file.

The Method attribute can be either


Disable – Employees will be disabled (default)
KeepEnabledMoveToGroup – Employees will be moved
to another group
Group – the name of the group to move the employees to
in the Method selected was KeepEnabledMoveToGroup

The web method will return this object


<ImportEmployeesResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ReturnValue>OK</ReturnValue>
</ImportEmployeesResult>

Parameter Description
Result The result of the import process. The code can be one of the following:
OK – Employees imported successfully.
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed
InvalidDataFile – the data file could not be opened
InvalidColumnMapping – the mapping XML is not valid
SomeRowsSkipped – some of the imported rows were skipped because of missing
required data
21

The MobileLocations Web Service


This Web Service allows remote applications to pull the current or historic location of a mobile device.
Because of the privacy and security issues that this web service has, data retrieval from this web service
requires the use of WSE.

GetMobileDeviceCurrentLocation Web Method


This web method allows retrieval of the current location of a mobile device. The web method can also queue
the mobile device for location sampling.

The web method accepts a single parameter request which needs to be a XML document in this format
<GetMobileDeviceCurrentLocationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MSISDN></MSISDN>
<AutoSampleThreshold></AutoSampleThreshold>
<CoordSystem></CoordSystem>
</GetMobileDeviceCurrentLocationRequest>

Parameter Data Type Description


MSISDN String (Required) The mobile device number that the web method
caller wants to retrieve it's location
AutoSampleThreshold Int16 (Required) The maximal acceptable age in minutes of the result.
If the returned location is older that this value then
the device is queued for location sampling. Use the
value 0 to prevent the server from sampling the
location of the mobile device
CoordSystem String (Optional) Converts the returned location coordinate system.
Possible values are:
Default – uses the default coordinate system
Wgs84 – converts the returned coordinate to Wgs84

The web method will return this object


<GetMobileDeviceCurrentLocationResponse xmlns="Trackem.Web.Services.Secure">
<GetMobileDeviceCurrentLocationResult>
<Result></Result>
<E></E>
<N></N>
<TimeStamp></TimeStamp>
<Address></Address>
<Accuracy></Accuracy>
<TimeStampAge></TimeStampAge>
</GetMobileDeviceCurrentLocationResult>
</GetMobileDeviceCurrentLocationResponse>

Parameter Description
Result The result of the call to the web method. The code can be one of the following:
OK – Result is returned
OKMobileDeviceQueuedForSampling – Result is returned but the result
timestamp is greater than the maximal age so the device is queued for location
sampling
MobileDevicePositionIsUnknownQueuedForSampling – The server does not
have a valid location for the mobile device. The mobile device is queued for
sampling
MobileDevicePositionIsUnknown – The server does not have a valid location for
the mobile device
InvalidMSISDN – The requested MSISDN is invalid
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed

E East coordinate of the location of the mobile device


N North coordinate of the location of the mobile device
TimeStamp Timestamp of the location of the mobile device
22

Address Address of the location of the mobile device


Accuracy The Accuracy of the location of the mobile device. Can be one of the following:
NotSet – Accuracy is unknown
GPS – Accuracy is a GPS accuracy or this is the best accuracy of the device. For
example a mobile device that can be only cell sampled will have the Accuracy set
to GPS although it was cell sampled because cell is the best location the device
can have.
Cell – The location returned is the location of the antenna
CellDerived – Accuracy is worse than GPS but is better than a Cell location.
SameCell – The device is a GPS capable device which has lost it's GPS signal and
is still in the same cell as the last GPS location it had. In this case it's better to
assume the device is at the GPS location than at the cell location

TimeStampAge The age in seconds of the TimeStamp (can be used by any web method clients
who do not support parsing the TimeStamp parameter)

GetMobileDeviceHistoricLocation Web Method


This web method allows retrieval of a historic location of a mobile device. Because the time of a location
sampling of a mobile device can vary, the web method allows specifying a timeframe for the historic location
and also specify the point in time closest to which the sampling is required.

The web method accepts a single parameter request which needs to be a XML document in this format
<GetMobileDeviceHistoricLocationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MSISDN></MSISDN>
<FromDate></FromDate>
<ToDate></ToDate>
<ClosestToDate></ClosestToDate>
<CoordSystem></CoordSystem>
</GetMobileDeviceHistoricLocationRequest>

Parameter Data Type Description


MSISDN String (Required) The mobile device number that the web method
caller wants to retrieve it's location
FromDate Int64 (Required) The minimal date expressed as the difference in
seconds from the request time (DateTime.Now in
.NET)
ToDate Int64 (Required) The maximal date expressed as the difference in
seconds from the request time (DateTime.Now in
.NET)
ClosestToDate Int64 (Required) The required location sampling date expressed as
the difference in seconds from the request time
(DateTime.Now in .NET)
CoordSystem String (Optional) Converts the returned location coordinate system.
Possible values are:
Default – uses the default coordinate system
Wgs84 – converts the returned coordinate to Wgs84

The web method will return this object


<GetMobileDeviceCurrentLocationResponse xmlns="Trackem.Web.Services.Secure">
<GetMobileDeviceCurrentLocationResult>
<Result></Result>
<E></E>
<N></N>
<TimeStamp></TimeStamp>
<Address></Address>
<Accuracy></Accuracy>
<TimeStampAge></TimeStampAge>
</GetMobileDeviceCurrentLocationResult>
</GetMobileDeviceCurrentLocationResponse>
Parameter Description
Result The result of the call to the web method. The code can be one of the following:
OK – Result is returned
MobileDevicePositionIsUnknown – The server does not have a valid location for
23

the mobile device


InvalidMSISDN – The requested MSISDN is invalid
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed

E East coordinate of the location of the mobile device


N North coordinate of the location of the mobile device
TimeStamp Timestamp of the location of the mobile device
Address Address of the location of the mobile device
Accuracy The Accuracy of the location of the mobile device. Can be one of the following:
NotSet – Accuracy is unknown
GPS – Accuracy is a GPS accuracy or this is the best accuracy of the device. For
example a mobile device that can be only cell sampled will have the Accuracy set
to GPS although it was cell sampled because cell is the best location the device
can have.
Cell – The location returned is the location of the antenna
CellDerived – Accuracy is worse than GPS but is better than a Cell location.
SameCell – The device is a GPS capable device which has lost it's GPS signal and
is still in the same cell as the last GPS location it had. In this case it's better to
assume the device is at the GPS location than at the cell location
TimeStampAge The age in seconds of the TimeStamp (can be used by any web method clients
who do not support parsing the TimeStamp parameter)
24

The Vehicles Web Service


This Web Service allows remote applications to pull information about vehicles in the system. Because of the
privacy and security issues that this web service has, data retrieval from this web service requires the use of
WSE.

GetHistoricInputs Web Method


This web method allows retrieval of inputs logged by the server.

The web method accepts a single parameter request which needs to be a XML document in this format
<GetVehicleHistoricInputsRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FromDate></FromDate>
<ToDate></ToDate>
<InputTypes>
<UnitInputTypes>AlarmCounter</UnitInputTypes>
<UnitInputTypes>Odometer</UnitInputTypes>
</InputTypes>
</GetVehicleHistoricInputsRequest>
Parameter Data Type Description
FromDate Int64 (Required) The minimal date expressed as the difference in
seconds from the request time (DateTime.Now in
.NET)
ToDate Int64 (Required) The maximal date expressed as the difference in
seconds from the request time (DateTime.Now in
.NET)
InputTypes Array (Required) An array of the types of inputs required by the remote
system. For the current list of available values
contact technical support.

The web method will return this object (the element Inputs contain an array of the element
VehicleHistoricInput)
<VehicleHistoricInputsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Result>OK</Result>
<Inputs>
<VehicleHistoricInput>
<EntryType>MS_OdometerValue</EntryType>
<TimeStamp>2009-07-29T11:24:24.177</TimeStamp>
<SensorValue>123456</SensorValue>
<VIN>79-258-61</VIN>
<VehicleGUID>f1ea135a-4320-48d6-9f1c-370ed7423334</VehicleGUID>
<CalculatedValue xsi:nil="true" />
</VehicleHistoricInput>
<VehicleHistoricInput>
<EntryType>MS_OdometerValue</EntryType>
<TimeStamp>2009-03-10T14:55:00</TimeStamp>
<SensorValue>86.5</SensorValue>
<VIN>20-234-82</VIN>
<Address>Main Street</Address>
<VehicleGUID>118d9589-7bf3-4d00-91dc-7cbdb05eaea2</VehicleGUID>
<CalculatedValue xsi:nil="true" />
</VehicleHistoricInput>
</Inputs>
</VehicleHistoicInputsResponse>
25

Parameter Description
Result The result of the call to the web method. The code can be one of the following:
OK – Result is returned
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed
EntryType The entry type for the specified input
TimeStamp Timestamp of the input
SensorValue The value of the input
VIN The Vehicle Identification Number (VIN) of the vehicle associated with this input
entry
VehicleGuid For internal use
CalcualtedValue If the input is a complex input, this value will hold an additional value associated
with the input
26

The Catalog Web Service


This Web Service allows remote administration of the item catalog on the server.

ImportCatalog Web Method


This web method imports the item catalog from an attached excel file. Catalog items on the server will be
created, updated or deleted according to the attached file.

The web method accepts a single parameter request which needs to be a XML document in this format
<ImportCatalogRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserName>x</UserName>
<Password>y</Password>
<Data></Data>
<DataFormat>Xls</DataFormat>
<FirstRowHasColumnNames>true</FirstRowHasColumnNames>
<ColumnMapping>&lt;Mapping CategoryName="CategoryNameColumn" /&gt;</ColumnMapping>
</ImportCatalogRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
Data Byte array Base64 encoding of the bytes of the data file
(Required)
DataFormat Enumerator Specifies the type of file the data bytes are. Possible
(Required) values are:
Xls
Xlsx
Ods
CsvCommaDelimited_Ansi
CsvSemicolonDelimited_Ansi
CsvTabDelimited_Ansi
CsvCommaDelimited_Utf8
CsvSemicolonDelimited_Utf8
CsvTabDelimited_Utf8

When using Csv, if the file is not in Utf8 use Ansi. In this
case the file should be in the server's default ANSI code
page.
FirstRowHasColumnNames Boolean If set to true, the ColumnMapping tag should hold
(Required) mapping to names appearing on the first row. If set to
false, the ColumnMapping tag should hold mapping to
column numbers (the first column is 0)
ColumnMapping XML String Maps the columns of the file to properties of the catalog.
(Required) The mapping is an XML string with a single tag "Mapping".
Each mapping is expressed as an attribute.
CategoryName - required
CategoryCode - optional
ItemName - required
ItemCatalogNumber - required
Description - optional
Notes - optional
Price - optional
UnitsInStock - optional
MaxDiscount – optional. Note: 2.5% should be expressed
as 2.5
MustBeBilled – optional. Indicates for items if they must
be billed (Value 1 on the column1) or the employee can
select whether they are billed (any other value).
RequiresSN – optional. Indicates for items if they require a

1 The value can be any of the following: 1, Y, Yes, True, T, On


27

serial number (see values on the MustBeBilled field


above)
AllowAnySN – optional. Indicates if the catalog item
requires a serial number, setting this value will allow the
employee to write any custom text into the serial number
field. (see values on the MustBeBilled field above)

The web method will return this object


<ImportCatalogResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ReturnValue>OK</ReturnValue>
</ImportCatalogResult>

Parameter Description
Result The result of the import process. The code can be one of the following:
OK – catalog imported successfully.
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed
InvalidDataFile – the data file could not be opened
InvalidColumnMapping – the mapping XML is not valid
SomeRowsSkipped – some of the imported rows were skipped because of missing
required data
28

ImportEmployeeCatalog Web Method


This web method imports the employee item catalog from an attached excel file. Catalog items for each
employee on the server will be created, updated or deleted according to the attached file.

The web method accepts a single parameter request which needs to be a XML document in this format
<ImportEmployeeCatalogRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserName>x</UserName>
<Password>y</Password>
<Data></Data>
<DataFormat>Xls</DataFormat>
<FirstRowHasColumnNames>true</FirstRowHasColumnNames>
<ColumnMapping>&lt;Mapping EmployeeNumber="EmployeeNumberColumn" /&gt;</ColumnMapping>
</ImportEmployeeCatalogRequest>

Parameter Data Type Description


UserName String (Required) A valid username for using this web method
Password String (Required) A valid password for using this web method
Data Byte array Base64 encoding of the bytes of the data file
(Required)
DataFormat Enumerator Specifies the type of file the data bytes are. Possible
(Required) values are:
Xls
Xlsx
Ods
CsvCommaDelimited_Ansi
CsvSemicolonDelimited_Ansi
CsvTabDelimited_Ansi
CsvCommaDelimited_Utf8
CsvSemicolonDelimited_Utf8
CsvTabDelimited_Utf8

When using Csv, if the file is not in Utf8 use Ansi. In this
case the file should be in the server's default ANSI code
page.
FirstRowHasColumnNames Boolean If set to true, the ColumnMapping tag should hold
(Required) mapping to names appearing on the first row. If set to
false, the ColumnMapping tag should hold mapping to
column numbers (the first column is 0)
ColumnMapping XML String Maps the columns of the file to properties of the catalog.
(Required) The mapping is an XML string with a single tag "Mapping".
Each mapping is expressed as an attribute.
EmployeeNumber - required
ItemCatalogNumber - required
UnitsInStock – optional. Will be set to 0 if missing
SN – optional. If set, indicates a column that holds the
serial numbers the employee has for the specific catalog
item. The value of the field should be comma delimited

The web method will return this object


<ImportEmployeeCatalogResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ReturnValue>OK</ReturnValue>
</ImportEmployeeCatalogResult>

Parameter Description
Result The result of the import process. The code can be one of the following:
OK – employee catalog imported successfully.
InvalidUserNameOrPasswordOrIPAddress – The supplied username and
password are not valid
UnknownErrorOccurred – An unknown error occurred
InvalidRequest – The request XML could not be parsed
InvalidDataFile – the data file could not be opened
29

InvalidColumnMapping – the mapping XML is not valid


SomeRowsSkipped – some of the imported rows were skipped because of missing
required data
30

Calling a web service using WSE


Below are the steps necessary to call a web service using WSE. To use this code you must install WSE 3.0
SDK from the Microsoft site (this sample code is based on samples from the WSE 3.0 SDK).

1. Add a reference to the WSE 3 assembly DLL (if you installed WSE to the default location then the
DLL is located at C:\Program Files\Microsoft WSE\v3.0\Microsoft.Web.Services3.dll)
2. Add a web reference to the web service
3. Change the web service auto generated class inherits line to inherit from the WSE classes.
Inherits Microsoft.Web.Services3.WebServicesClientProtocol
4. Add the following imports to your code
Imports Microsoft.Web.Services3.Security
Imports Microsoft.Web.Services3.Security.Tokens
Imports Microsoft.Web.Services3.Design
Add this code to call the web method
' Create an instance of the Web service proxy
Dim serviceProxy As New WS.MobileLocations

' This is the security token which will be used by the service proxy
Dim assertion As UsernameOverTransportAssertion = New
UsernameOverTransportAssertion()
assertion.UsernameTokenProvider = New UsernameTokenProvider("User",
"Password")
serviceProxy.SetPolicy(New Policy(assertion))

Dim result As WS.MobileDeviceLocationResponse =


serviceProxy.GetMobileDeviceCurrentLocation("<GetMobileDeviceCurrentLocationReque
st xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-
instance""><MSISDN>+972521234567</MSISDN><AutoSampleThreshold>0</AutoSampleThresh
old></GetMobileDeviceCurrentLocationRequest>")
31

Customer Notification System


The server can send notifications to a customer's server about employee entries that have been added to the
server (timesheet, task related etc.) or about other events that occurred on the server. The server will deliver
the notifications via HTTP (or HTTPS) to a URL given by the customer.

The server supports two methods of sending the notification to the customer: GET and POST. The differences
between the methods are:

GET POST
The customer can specify the The server always sends the same
names of the parameters sent and XML to the client. The XML cannot
which parameters to send be customized.
The notification will not contain The notification will contain files
files and/or catalog items and/or catalog items as part of
the XML

Server Response
Regardless of the method of sending (GET or POST), The customers web page that receives the notification,
must respond with a text that contains the string "_OK_" (without the quotes). If the response of the server
does not contain this string the server will consider the delivery a failure and will queue it up for retry.

Errors while sending a notification


If the server encounters an error while accessing the URL or the server did not respond according to the
specification, then the delivery report will be held for up to 3 days and will be retried at the following intervals:
Every 5 minutes on the first hour; after that every hour

GET Tokens
The available tokens are:
Token Description Default Entry Task
Made By Record
Employee Change
{EVT} The reason this notification was sent. See  
event types table for possible values
{ET} The employee time sheet entry type. See 
entry types table for possible values
{DESC} The description of the entry  
{ADDR} The address the employee was at when 
creating the entry. The address is available
only if the employee created the entry using
his mobile device
{LOC_X} The X coordinate the employee was at when  
creating the entry.
{LOC_Y} The Y coordinate the employee was at when  
creating the entry.
{LOC_ACC} The Accuracy of the location. Can be one of  
the following:
NotSet
GPS
CellDerived
SameCell
CellAntenna
{LOC_PN} The phone number of the mobile device with  
which the location information was obtained.
(can be used to identify the mobile that
reported on other employees)
{EN} The employee number the notification is about  
32

or that was assigned to the task


{E_FIRST} The first name of the employee the notification  
is about or that was assigned to the task
{E_LAST} The last name of the employee the notification  
is about or that was assigned to the task
{REN} The number of the employee creating the 
entry
{TN} The task number (if applicable on ETS entries)  
{T_DESC} The task description (if applicable on ETS  
entries)
{T_NOTES} The task description (if applicable on ETS  
entries)
{T_UD1}…{T_UD20} The task User Data 1..20 (if applicable on ETS  
entries)
{T_UHD1} The task User Hidden Data 1 (if applicable on  
ETS entries)
{T_ECD_DDMMYYYY} The task External Creation Date (if applicable  
on ETS entries) in the format DDMMYYYY in
the servers Time Zone
{T_ECD_HHMM} The task External Creation Date (if applicable  
on ETS entries) in the format HHMM in the
servers Time Zone
{T_LOCDIST} The distance in Km between the Task location  
and the Entry location
{ED_DDMMYYYY} The entry date in the format DDMMYYYY in 
the servers Time Zone
{ED_HHMM} The entry time in the format HHMM in the 
servers Time Zone
{EPN} The mobile number of the Mobile device 
associated with the employee the notification
is about.
{EDS} The age of the entry in the employee time 
sheet. Measured in seconds
{CN} Customer Number in case of a task related  
entry
{TCC} Task Category Code 2 
{DUR} Duration of a task in hours 
{DD_DDMMYYYY} The due date of a task in the format 01/01/1970 
DDMMYYYY (in UTC Time Zone)
{DD_HHMM} The due date in the format HHMM (in UTC 00:00 
Time Zone)
{SD_DDMMYYYY} The start date of a task in the format 01/01/1970 
DDMMYYYY (in UTC Time Zone)
{SD_HHMM} The start date in the format HHMM (in UTC 00:00 
Time Zone)
{TEMPL_C} The code of the template that was used in the 
entry
{TEMPL_T} The text of the template that was used in the  
entry
{LTS_DDMMYYYY} The last Task Start Entry in the format 
DDMMYYYY in the servers Time Zone. Only
sent if the ETS entry is End Task or Close
Task
{LTS_HHMM} The last Task Start Entry in the format HHMM 
in the servers Time Zone. Only sent if the ETS
entry is End Task or Close Task
{LTS_DESC} The last task start entry description. Only sent 

2 Only relevant on Task related entries


33

if the ETS entry is End Task or Close Task


{EGN} The group name the employee the notification 
is about belongs to.

A typical URL will look like this:


http://server/page.asp?Phone={EPN}&Age={EDS}&Event={EVT}&Type={ET}&Address={ADDR}&Employee={
EN}

POST XML Structure


The basic structure of the XML posted is:

<Entry>
<EventType></EventType>
<EntryType></EntryType>
<EntryDateFromEpoch></EntryDateFromEpoch>
<EntryDate></EntryDate>
<Data Type=""></Data>
<EntryTemplate>
<EntryLocation>
<Employee>
<ReportedByEmployee>
<Task>
<Files>
<File>
<File>
</Files>
<CatalogItems>
<Item>
<Item>
</CatalogItems>
<PreviousRelatedEntries>
<Entry>
<Entry>
</PreviousRelatedEntries>
</Entry>

XML Tag Description Optional3 Entry Task


Made By Record
Employee Change
EventType The reason this notification was sent. See event   
types table for possible values
EntryType The employee time sheet entry type. See entry  
types table for possible values
EntryDateFromEpoch The entry date expressed as the number of  
seconds elapsed since 1 January 1970 00:00:00
UTC (UTC+0)
EntryDate The entry date in the format ddmmyyyyhhmmss  
Data The entry data.  
EntryTemplate Information about the template selected by the  
employee for the entry
EntryLocation Information about the location at which the entry  
was made
Employee Contains Information about the employee that  
made the ETS entry or that was assigned to the
task
ReportedByEmployee Information about the employee who reported   
the entry (if the employee differs from the
employee the entry is about)
Task Information about the task  4 

3 Optional XML tags will only be included if they have data. Non-Optional XML tags will only be included
where the tag is relevant (e.g. EntryType will not be included in a tasks notification)
4 On ETS entries the task tag will only be sent if the ETS entry is about a task
34

Files Files attached to the entry   


CatalogItems Catalog items attached to the entry   
PreviousRelatedEntries Previous entries related to this entry (e.g. if this   
entry is about a task, this XML node will hold
other entries made about the same task)

The Data tag


the data tag has a Type attribute denoting the type of the data. the type can be either "String" or "Xml". If the
type is "String" the data will contain a simple string. If the type is "Xml" the data will be a container of xml
Items.

<Data Type = "String">Additional Information Data</Data>

Or

<Data Type = "Xml">


<Item>
<Id>Question 1</Id>
<Data>Answer 1</Data>
</Item>
<Item>
<Id>Question 2</Id>
<Data>Answer 2</Data>
</Item>
</Data>

The EntryTemplate tag


the entry template tag contains Information about the template selected by the employee for the entry
<EntryTemplate>
<Text></Text>
<Code></Code>
</EntryTemplate>

XML Tag Description


Text The text of the template
Code The code of the template

The EntryLocation tag


the entry location tag contains Information about the location the employee was at when making the entry
<EntryLocation>
<Address></Address>
<X></X>
<Y></Y>
<MSISDN></MSISDN>
</EntryLocation>

XML Tag Description


Address The address the employee was at
X The X coordinate the employee was at when creating the entry.
Y The Y coordinate the employee was at when creating the entry.
MSISDN The phone number of the mobile device with which the location information was
obtained. (can be used to identify the mobile that reported on other employees)
35

The Employee tag and the ReportedByEmployee tag


 the employee tag contains Information about the employee that made the ETS entry or that was
assigned to the task
 the reported by employee tag contains information about the employee who reported the entry (if the
employee differs from the employee tag information).

Both tags contain the same data.


<Employee>
<FirstName></FirstName>
<LastName></LastName>
<Email></Email>
<EmployeeNumber></EmployeeNumber>
<UniqueID></UniqueID>
<TelephoneHome></TelephoneHome>
<TelephoneMobile></TelephoneMobile>
<TelephoneWork></TelephoneWork>
<TelephoneWork></TelephoneWork>
<Group>
<Name></Name>
</Group>
</Employee>

XML Tag Description


FirstName The employee's first name
LastName The employee's last name
Email The employee's email address
EmployeeNumber The employee's number
UniqueID The employee's unique ID (e.g. SSN)
TelephoneHome The employee's home phone number
TelephoneMobile The employee's mobile phone number
TelephoneWork The employee's work phone number
Group The employee's group information

The Files tag


The files tag contains information about files attached to the entry (e.g. pictures). Each file is denoted by a
"File" tag
<Files>
<File>
<Guid></Guid>
<Filename></Filename>
<Data></Data>
</File>
</Files>

XML Tag Description


Guid The unique id of the file
Filename The filename
Data The binary contents of the file encoded as Base64
36

The CatalogItems tag


The catalog items tag contains information about catalog items attached to the entry. Each item is denoted by
an "Item" tag
<CatalogItems>
<Item>
<Guid></Guid>
<CatalogNumber></CatalogNumber>
<Quantity></Quantity>
<Discount></Discount>
<Billable></Billable>
<SN></SN>
<Data Type = ""></Data>
</Item>
</CatalogItems>

XML Tag Description


Guid The unique id of the Item entry
CatalogNumber The item catalog number
Quantity The quantity of items
Discount The discount percentage
Billable "1" if the item should be billed, otherwise "0"
SN The item serial number
Data Additional info about this item. The additional info can be a simple string or a XML.
See "The Data tag" for more information

The PreviousRelatedEntries tag


The Previous related entries tag contains information about previous entries that are related to the this entry.
Each entry is denoted by an "Entry" tag
<PreviousRelatedEntries>
<Entry>
<EntryType></EntryType>
<EntryDateFromEpoch></EntryDateFromEpoch>
<EntryDate></EntryDate>
<Data></Data>
</Entry>
</PreviousRelatedEntries>

XML Tag Description


EntryType The employee time sheet entry type. See entry types table for possible values
EntryDateFromEpoch The entry date expressed as the number of seconds elapsed since 1 January 1970
00:00:00 UTC (UTC+0)
EntryDate The entry date in the format ddmmyyyyhhmmss
Data The entry data.
37

The Task tag


The task tag contains information about the task
<Task>
<TaskNumber></TaskNumber>
<Description></Description>
<Status></Status>
<Notes></Notes>
<ContactName></ContactName>
<CoordinationPhone></CoordinationPhone>
<CoordinationPhone2></CoordinationPhone2>
<CustomerName></CustomerName>
<Data1></Data1>

<Data20></Data20>
<HiddenData1></HiddenData1>
<StartDateFromEpoch></StartDateFromEpoch>
<DueDateFromEpoch></DueDateFromEpoch>
<ExternalCreationDateFromEpoch></ExternalCreationDateFromEpoch>
<ExternalCreationDate></ExternalCreationDate>
<TaskCategory>
<Code></Code>
<Name></Name>
</TaskCategory>
</Task>

XML Tag Description


TaskNumber The task number
Description The task description
Status The task status (See task statuses table for possible values)
Notes The task notes
ContactName The task contact name
CoordinationPhone The task coordination phones
CoordinationPhone2
CustomerName The customer name
Data1…Data20 Custom task data
HiddenData1 Custom task data which the employee cannot see
StartDateFromEpoch The task start date expressed as the number of seconds elapsed since 1
January 1970 00:00:00 UTC
StartDate The task start date in the format ddmmyyyyhhmmss
DueDateFromEpoch The task due date expressed as the number of seconds elapsed since 1
January 1970 00:00:00 UTC
DueDate The task due date in the format ddmmyyyyhhmmss
ExternalCreationDateFromEpoch The task external creation date expressed as the number of seconds
elapsed since 1 January 1970 00:00:00 UTC
ExternalCreationDate The task external creation date in the format ddmmyyyyhhmmss
TaskCategory Information about the category of the task
38

Event Types
Value Description
1 The notification is sent because a new entry was created
2 The notification is sent because an entry was updated
4 The notification is sent because a new task was created on the server
8 The notification is sent because a task was updated on the server

Entry Types
Value Entry Type For The Remote Updates Web Description
Service
3 MS_LocationResponse Location entry
4 Manager Query
8 Application on the mobile device is off
21 MS_PunchIn Sign In
22 MS_PunchOut Sign Out
23 MS_StartTask Start Task
24 MS_EndTask End Task
25 MS_ConfirmTask Confirm Task
26 MS_CloseTask Close Task
29 MS_TaskNotDone Task Not Done
93 MS_TurnMobileAppOn Turn mobile device application on
94 MS_TurnMobileAppOff Turn mobile device application off
97 Turn mobile device application privacy off
98 Turn mobile device application privacy on
99 MS_EmergencyResponse Emergency
100 MS_Vacation Vacation
101 MS_MilitaryReserveDuty Military Reserve Duty
102 MS_Sickness Sickness
103 MS_Free Free
104 MS_Busy Busy
105 MS_OnCall On Call
106 MS_AmountSold Amount Sold
107 MS_Training Training

Task Statuses
Value Description
1 New Task
2 Notification Sent
4 Acknowledged
8 In Progress
32 Closed
64 Canceled
128 Not Done
39

Appendix A – Input types and their related message types


The following is a list of supported input types and their related message types.

Input Type Type Message Types


Ignition Digital MS_TurnIgnitionOn
MS_TurnIgnitionOff
Lifting Digital MS_LiftingAlertOn
MS_LiftingAlertOff
Speed Analog MS_SpeedGaugeValue
HatchOpen Digital MS_HatchOpenAlertOn
MS_HatchOpenAlertOff
CraneActivity Digital MS_CraneOn
MS_CraneOff
FuelLevel Analog MS_FuelGaugeValue
EngineTemperature Analog MS_EngineTemperature
TrunkTemperature Analog MS_TrunkTemperature
Odometer Analog MS_OdometerValue
Emergency Digital MS_EmergencyResponse
Fueling Digital MS_FuelingAlertOn
MS_FuelingAlertOff
FuelStealing Digital MS_FuelStealingAlertOn
MS_FuelStealingAlertOff
FreeBusy Digital MS_Free
MS_Busy
UnitStandingTime Analog MS_UnitStandingTime
GpsReception Digital MS_GpsReceptionOn
MS_GpsReceptionOff
CarBatteryConnection Digital MS_CarBatteryConnected
MS_CarBatteryDisconnected
AlarmCounter Analog MS_AlarmCounterValue
UnitStandingTimeWithIgnitionOn Analog MS_UnitStandingTimeWithIgnitionOn
ServicePerformed Digital MS_ServicePerformed
SirenActivated Digital MS_SirenActivated
MS_SirenDeactivated
AlarmArmed Digital MS_AlarmArmed
MS_AlarmDisarmed
IgnitionAttemptWithoutCode Digital MS_IgnitionAttemptWithoutCode
BatteryVoltage Analog MS_BatteryVoltage
ConnectionToExternalUnit Digital MS_ConnectionToExternalUnitUp
MS_ConnectionToExternalUnitDown
Accident Digital MS_Accident
40

Appendix B – Task additional information


The following XML will display to the employee two options for additional info "Additional Info 1" and
"Additional Info 2". Each of these info options will display two items. The XML can be expanded to include
additional information items and text value pairs as needed

<?xml version="1.0" encoding="utf-16"?>


<ArrayOfObjectAdditionalInfo xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd =
"http://www.w3.org/2001/XMLSchema">
<ObjectAdditionalInfo>
<Name>Additional Info 1</Name>
<Items>
<TextValuePair>
<Text>1.1</Text>
<Value>1.1 Data</Value>
</TextValuePair>
<TextValuePair>
<Text>1.2</Text>
<Value>1.2 Data</Value>
</TextValuePair>
</Items>
</ObjectAdditionalInfo>
<ObjectAdditionalInfo>
<Name>Additional Info 2</Name>
<Items>
<TextValuePair>
<Text>2.1</Text>
<Value>2.1 Data</Value>
</TextValuePair>
<TextValuePair>
<Text>2.2</Text>
<Value>2.2 Data</Value>
</TextValuePair>
</Items>
</ObjectAdditionalInfo>
</ArrayOfObjectAdditionalInfo>

Note: The XML should be Url Encoded

You might also like