Start a conversation

Timesheet Import - XML (email)

Timesheet Import from XML (email)


From version (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:

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

The Body of the email must contain a valid XML document defining the weeks work


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


                                <name>Harry Bird</name>
                                <day1>      <starttime></starttime>

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.

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.

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 Icon    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.

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)

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:-


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.

Where in Field Help
Merge Field
Week Commencing
Calculated Booking Field
Workers Forename
Candidate Table
Booking ID
Candidate Booking Headers
Environment Variable or Hard coded on the Template
Environment Variables

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

Choose files or drag and drop files
  1. Graeme Orchard

  2. Posted
  3. Updated