Start a conversation

Timesheet Import - XML (email)

From version 1.00.17.xxx (or later) it is possible to import Timesheet information from an email containing details of the hours worked in a XML format. 
Essentially you can submit an email to a specific mailbox and the system can scan the mailbox looking for these emails. When it finds an email with the correct subject and formatting the system will use the email to import and input Timesheet data for workers who have been booked.

Provided the email meets the correct specification it will be processed and can then be deleted after processing.

Technical Details:

Parameter, TEMPS, Flag(2)
OL Timesheets enabled
This turns-on the feature

Contents  (Click an Item to Jump to that section)

Email Structure

Example

How it works

Example Scan

Example of Use

Additional Info/Merge Field for Website

Example Merge Field



Email Structure

In order to be imported and processed correctly, the email containing the XML data must conform to the following specifications.

Outlook Object model Class must be Class == 43 OR Class == 45 (Simple Email)

Subject
Must have specific characters otherwise it will be ignored. Not Case sensitive.
(The subject is controlled by a Parameter within Influence, and can be specified using Parameter  Set “TEMPS", Text{3}, e.g. Timesheet Submission )
Attachments
No attachments are necessary and will be ignored.
Client Tag
 Not needed as deduced from the Booking Header Uniq. ID
Body 
The email must contain a valid XML document defining the weeks work


 Example:-

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

<timesheet>
                <weekcommencing>2017-08-07</weekcommencing>

                <worker>
                                <ref>00051374</ref>
                                <name>Harry Bird</name>
                                <bookingid>1000003308</bookingid>
                </worker>
                <tsdetails>
                                <day1>      <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>
                                                <poa></poa>
                                </day1>
                                <day2>
                                                <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>
                                                <poa></poa>
                                </day2>
                                <day3>
                                                <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>
                                                <poa></poa>
                                </day3>
                                <day4>
                                                <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>        
                                                <poa></poa>
                                </day4>
                                <day5>
                                                <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>
                                                <poa></poa>
                                </day5>
                                <day6>
                                                <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>
                                                <poa></poa>
                                </day6>
                                <day7>
                                                <starttime></starttime>
                                                <endtime></endtime>
                                                <break></break>
                                                <poa></poa>
                                </day7>
                </tsdetails>
</timesheet>


Important: 
The <ref> tag relates to the candidate reference number from Influence and needs to match the number in the Influence database.
The <bookingid> tag  relates to a bookingid allocated when the booking is made in the influence database and must match what exists in Influence.


Tip: 
Often the best way to generate such emails is from a web-site or on-line form.  The idea is that workers can go to the online portal or form, complete their hours and then press a [Submit] button which will generate the email and send it to a predetermined email address.


Back to top


How it Works

Once the emails containing the XML data (as above) about the hours worked have been generated they need to be sent to to an Outlook mailbox. They can then be imported into Influence from this mailbox in the following way.

1. Go into [Timesheet Entry] and use the [select] button to choose the relevant email folder.  

Note: the user running the import must have access to the folder where the emails were submitted.


Example of email folder selection (below)

2. Having selected the folder, clicking the [Import] button to open the Timesheet Import window. Pressing [Scan] at the bottom left will start scanning the folder for emails to import.

(Example of the Scan/import screen shown below)

The [Start] button starts the scan and processes emails.
The [Every] drop-down can be used to make it an automatic process and scan periodically. (i.e. Process  /Sleep / Process / Sleep / etc, etc. )
The ‘Delete synced’ check box if checked will delete the emails (Move to Deleted Folder) where the contents of the xml matches what is in the database i.e. Synchronised.
- If running in Repeat mode click [Cancel] to stop.


An example of importing a scan is shown below:

Example Scan  

Compass      
Allows navigation to various parts of the database
Planner        
Opens the planner for this Candidate in the correct week
WC
Week Commencing from the Timesheet
Worker
Candidates Name
Email            
Emails the Candidate
Phone          
Calls the Candidate
SMS               
Send text to Candidate e.g. “Please resubmit your timesheet”
Ref
Candidates Reference Number
Pay Ref
Candidates Payment Reference Number

 
            

Company
Company Booking is for
Branch
Branch / Site of this booking
Contact
Contact from the Booking if specified
Email             
Emails the Contact
Phone            
Calls the Contact
SMS                
Send text to Contact e.g. “Please can you check this workers hours”
Result Text
What was found or what was incorrect
Inc
Include Columns – 3 States Possible

       

When the system scan the email box looking for emails, it will display what it has found, and will mark each item with a Status, which can be seen at the right-hand end of the record.
A list of the statuses and associated icons are listed below:

State 
Icon                             
Meaning
Problem
Exclamation Mark
Some thing is wrong with the XML Timesheet
OK Processed
Tick    
Everything matches Time sheeted OK.
Fully Synchronised  
Sync Symbol
Fully Processed to move to deleted folder.

 Back to top

                       

Example of Use

- A User logs into the system and goes to [Temp Centre ] > [Timesheets]
- They use the [Select] button to specify an email folder, then use the [Start] button to start a scan.
- The system finds and displays some emails containing XML timesheet data, and imports this data.

- Several minutes later, the user hits [Start] again, and re-scans the mailbox for any new emails. The system finds several new emails (which it imports) and also displays the list of 'already' imported emails, which are marked with the Sync symbol. 

(These emails which have already been imported are moved to the Deleted  folder in Outlook)


Back to top




Additional Information / Merge field for Web Site

If you choose to build or use a WEB SITE in order to create and generate the XML emails, then it may be useful to use Influence to send an email to the workers with details of a LINK to the web site where they can submit their timesheets.

To assist with this we have added a special merge field which can be included in your email templates and can construct a URL to 


Example Merge Field:-

http://[[ENV_TIMESHEET_SERVER]]/?worker=[[ENID_FORENAME$]]&ref=[[ENID_REF$]]&bookingid=[[BKHD_BOOKING_ID]]&wc=[[BKG_WEEK_DATE21]]

This can be added into the Booking Confirmation email to the Worker

This makes use of Influence’s merge fields to build HTTP Link where time sheet details can be entered for a relevant Week Commencing.

Parameter
Name
Where in Field Help
Merge Field
?wc=
Week Commencing
Calculated Booking Field
[[BKG_WEEK_DATE21]]
?worker=
Workers Forename
Candidate Table
[[ENID_FORENAME$]]
?bookingid=
Booking ID
Candidate Booking Headers
[[BKHD_BOOKING_ID]]
ENV_TIMESHEET_SERVER
Environment Variable or Hard coded on the Template
Environment Variables
[[ENV_TIMESHEET_SERVER]]


Internal Notes for Influence use only.

Week Commencing is ISO format Date CCYY-MM-DD hence the date type 21
Environment variable can be set in the Service section of KwebAdmin

e.g. Week commencing 15th March 2021 would come out as 2021-03-21


Back to top

Choose files or drag and drop files
Helpful?
Yes
No
  1. Graeme Orchard

  2. Posted
  3. Updated

Comments