===== XML Processor =====
The TSM XML Processor is used to process data from a third party source for the purpose of creating or updating TSM job records.
This document will describe how to create an XML document for direct import to TSM.
As this is a direct import, the TSM application has no control over the quality or suitability of the data being imported – it is up to the XML developer to ensure that the data provided is free from errors and that the data is mapped correctly. Importing incorrect data can result in inconsistencies and errors in the TSM application which may need to be repaired by the TSM Support department at a cost.
If the data needs additional parsing or processing before being imported to TSM, please provide support@theservicemanager.com with a specification of what is required and you will be provided with an estimate to write the parser.
The TSM Support team should be contacted if you require clarification or assistance with testing.
Basic XML example:
6329
Attended job. Pumped down system and removed old evaporator.
EQ2
1
S3
3
21/04/2006
RICHARD
15:00
18:10
The above example would be used to update an existing Job card.
It shows:
*The job number
*A description of the work performed
*Two parts used records
*One timesheet record
Additional fields can be used as described below.
Not all of these fields need to be used and in some cases they may in fact cancel each other out.
In most cases, if a field is already populated in the TSM job and that field is referenced in the XML being processed, the original value will be completely overwritten with the new data.
If the XML requires a field in TSM which is not present in this example, please contact TSM Support for clarification
Please refer to the comments after each tag for more information
Expanded XML, showing all commonly used fields:
; The TSM_JOB tag indicates that this is a new job record. A new XML Document should be used per TSM Job
; Determines that this section is for customer related data.
Coles866
; This is the Customer ID for the job. Should only be used for new jobs.
If this matches a customer record which already exists in TSM, the related fields (Company, Custcont, Phone) will be populated by TSM.
If this Customer ID does not already exist in TSM, it will be created and the new record will be populated with the information from the XML
; Determines that this section is for billing customer related data.
ColesHQ
; This is the Customer ID for the Billing customer on the job. Should only be used for new jobs.
If this matches a customer record which already exists in TSM, the related fields (Company, Custcont, Phone) will be populated by TSM.
If this Customer ID does not already exist in TSM, it will be created and the new record will be populated with the information from the XML
; Determines that this section is for site customer related data.
ColesHQ
; This is the Customer ID for the Site customer on the job. Should only be used for new jobs.
If this matches a customer record which already exists in TSM, the related fields (Company, Custcont, Phone) will be populated by TSM.
If this Customer ID does not already exist in TSM, it will be created and the new record will be populated with the information from the XML
; Determines that the following fields refer to the whole TSM job
6329
; This is the job number we are updating.
Must match the existing TSM Job number – you cannot make these up.
If left blank, TSM will create a new job using the next available job number.
Coles866
; This is the Customer ID for the job. Do not use if Job_Customer / CustomerID is used. This should only be used for new jobs. CustomerIDs must match the existing code in TSM exactly.
Coles Pavillion, 866
; This is the full company name. Do not use if Job_Customer / CustomerID is used. This should only be used for new jobs.
Brett Banfield
; This is the contact person for the client (customerid). Do not use if Job_Customer / CustomerID is used. This should only be used for new jobs.
02 9269 0910
; Phone number for the Company requesting the work. Do not use if Job_Customer / CustomerID is used. This should only be used for new jobs.
Pedro Orokosaki
; This is the person who logged the job.
ColesHQ
; This is the Billing ID on the job, behaves the same as Customer ID but with billing information. Do not use if Job_Billcust / CustomerID is used. This should only be used for new jobs. CustomerIDs must match the existing code in TSM exactly.
Coles866
; This is the Site ID on the Job, behaves the same as Customer ID but with site information.
Pedro Orokosaki
; This is the contact person for the Site.
0400 000 000
; Mobile phone number for the site contact person
02 9000 0000
; Phone number for the site. If the SITEID is present, this will be inherited from the contact record for the site customer.
email@host.com
; Email address for the site. If the SITEID is present, this will be inherited from the contact record for the site customer.
02 9000 0001
; Fax number for the site. If the SITEID is present, this will be inherited from the contact record for the site customer.
67 Penny Lane
; Street address for the site. Should not be used if the SITEID field is also used, or the job already has a SITEID.
Liverpool
; Suburb of the site. Should not be used if the SITEID field is also used, or the job already has a SITEID.
2099
; Postcode of the site. Should not be used if the SITEID field is also used, or the job already has a SITEID.
NSW
; State for the site. Should not be used if the SITEID field is also used, or the job already has a SITEID.
24/04/2009 12:25
; Date field for reporting purposes. Must be formatted as DD/MM/YYYY HH:mm.
Incorrectly formatted dates may cause problems in TSM.
1138
; Order number supplied by the customer.
TK421
; Reference number related to the job
TK421
; Reference number related to the job
TK421
; Reference number related to the job
Other text
; Field used for reporting / sorting. This may be either plain text or a value from a list of pre-defined options. Check with the client.
Other text 2
; Field used for reporting / sorting. This may be either plain text or a value from a list of pre-defined options. Check with the client.
Evaporator fail light is on in plant room #2
; This is the Job Name field on the job card.
24/04/2009 12:25
; Date field for reporting purposes. Must be formatted as DD/MM/YYYY HH:mm.
Incorrectly formatted dates may cause problems in TSM.
CODE TEXT
; Code field used for reporting / sorting. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Code field used for reporting/sorting/escalation. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Code field used for reporting / sorting. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Code field used for reporting / sorting. Used in TSM for tracking Territory. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Code field used for reporting / sorting. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Code field used for reporting / sorting. Also determines the Default Product location against the job. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Code field used for reporting / sorting. Also determines the Default Labour type for timesheets added in TSM for this job. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Field for the Primary Employee on the job. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
Attend site and investigate fail light in plant room # 2
; This is the Service Requested Information.
Attend site and investigate fail light in plant room # 2
; This is the same as the SERVREQUES field, but will append the text to the end of the record rather than overwriting. Use one or the other, not both.
Avoid Jenny, she doesnt like us
; This is a note on the job which the customer usually won’t see..
Avoid Jenny, she doesnt like us
; This is the same as the JOBNOTE field, but will append the text to the end of the record rather than overwriting. Use one or the other, not both.
Attended site and carried out work as requested. Fan belt on number 3 fan will need replacing next visit.
; This is a summary of the work performed on the site
Attended site and carried out work as requested. Fan belt on number 3 fan will need replacing next visit.
; This is the same as the WORKPERF field, but will append the text to the end of the record rather than overwriting. Use one or the other, not both.
24/04/2009 12:25
; Date field for reporting purposes. Must be formatted as DD/MM/YYYY HH:mm.
Incorrectly formatted dates may cause problems in TSM.
CODE TEXT
; This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes. This is the repair code in TSM.
24/04/2009 12:25
; Date field for reporting purposes. Providing this date will complete the job. Must be formatted as DD/MM/YYYY HH:mm. Incorrectly formatted dates may cause problems in TSM.
; Closes off the Job Detail section
; Announces that we’re adding a part to this job. Must use these tags for each new part line item (see simple example above)
EQ2
; This is this is the Product code for the part we’re adding. Mandatory for each part being added. If the Product ID exists in TSM, the related fields will be automatically populated with the correct information.
Freetext Description of Product
; Description of the product being added. Will overwrite the inherited value from the Products table, if present.
INSTALLATIONS
; Cost Centre. Code field used for reporting / sorting. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
CODE TEXT
; Employee code of the person adding the part. Not mandatory. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
999.9999
;Cost of the item being added. Numeric, 4 decimals. Ex Tax. Will overwrite the inherited value from the Products table, if present.;
999.99
;Quantity of the item being added. Numeric, 2 decimals. Mandatory.
999.9999
;Sell Price of the item being added. Numeric, 4 decimals. Ex Tax. Will overwrite the inherited value from the Products table, if present.;
; Indicates that this part entry is complete. Use these tags again for the next product.
; Announces that we’re adding a timesheet record to the job. These tags need to be reused every time we have a new timesheet line item.
21/04/2006
; Date on the timesheet. Dd/mm/yyyy
RICHARD
; Employee code for the person on the timesheet. This field must be in upper case. This field is a preset list – refer to the client and/or TSM Support for a list of available codes.
15:00>
; Start time on the timesheet. HH:mm. 24 hours time.
18:10
; Finish time on the timesheet. HH:mm. 24 hours time.
Started work and did routine 24.
; Comments related to the timesheet record. Will appear on the invoice
Took so long because I lost my keys.
; Comments related to the timesheet record. Will not appear on the invoice.
; Indicates that this timesheet entry is complete. Use these tags again for the next timesheet.
; Indicates that this job XML is complete. Use a new XML file for the next job.