RSM InTime provides a SOAP Web Service Interface that allows two-way flow of information to external systems. This enables automated and efficient transfer of data to and from your other systems reducing effort and duplication.
...
Before you can call any other RSM InTime Web Service method you must first call the authenticate() method. Providing valid credentials to this method will return an authentication token that must be provided with all other Web Service calls.
...
When you first start go live with the Web Services you can use this function to get a list of all existing entities by specifying a date that is earlier than the first entity in the system. You can then read in the details of all the entities so you know you have a complete copy of all the data in InTimein RSM InTime. This can be a large amount of data and could take a significant amount of resources so should only be a one-off exercise at the start of the integration.
Once you have a current copy you can then periodically check for any items that have been modified since the last update and just update the details of those modified items. This is much more efficient than attempting to update all entities every the time.
Identifying Entities
Most RSM InTime entities can be referenced by three different fields: the internal database ID (primary key); a GUID referred to as "refCode"; and the "externalId". We recommend using the externalId wherever possible as this is what is displayed as the primary reference in the RSM InTime UI, can contain alpha-numerics and is human readable. Some entities such as InvoiceInfo do not have an externalId field so the refCode should be used to reference these.
...
These methods return a complex data structure that represents the RSM InTime entity. Some of these also contain other data types that constain information about related entities. For example the Timesheet object that is returned from getTimesheetById() can also contain a number of InvoiceInfo objects that hold information about the invoices that the Timesheet is associated with. It also contains a number of Shift objects that detail the worked time that has been entered on the Timesheet.
...
From version 2.0 onwards it is possible to create data in RSM InTime via the Web Services. This includes the following entities: Worker, Client, Manager, Consultant, Provider, Placement and Timesheet. These mostly take the form of createOrUpdate<Entity> as this allows the same method to be used to create the entity if it doesn't exist or update it if it does. Examples are: createOrUpdateWorker(), createorUpdatePlacement() and createOrUpdateProvider()
If you are gong to create and update data in RSM InTime it is best practice to attempt to read the entity from RSM InTime first. This ensures that any updates made within the UI are not lost and any fields not accessible through the API are not overwritten by the Web Service update. This is demonstrated in the examples below.
...
revertTimesheet() can also be used to revert a Submitted or Approved status Timesheet if required. This has exactly the same result as reverting a Timesheet though the RSM InTime UI.
Single Sign On
getSingleSignOnToken() can be used to log in to RSM InTime using an existing RSM InTime User account. This method returns a token that you can then append to any valid RSM InTime URL and it will allow you to retrieve the page as if you were logged into the system directly. This means you can embed RSM InTime pages within another web site or retrieve other data.
...
getURLForContractorsPayslip() retrieves the URL to viewing a workers Payslips. *InPay Linked systems only
Getting started
The RSM InTime Web Service uses the Simple Object Access Protocol (SOAP) interface as opposed to REST. This is a stricter protocol than REST which means you can only call the defined methods available and the return types will be in a fixed format. Normally you would start by building "stub" code against the WSDL file that defines the interface.
...
#Get placements and associated data from frontend system that you require in InTIME#Consultant |
---|
RETRIEVING UPDATES FROM
...
RSM InTime:
def entityList = getModifiedItemsWithRefCode(java.lang.String token, java.util.Calendar since) |
---|
...
def needRatePayElementCode = false //Not usually needed but if required change to true |
---|
RETRIEVING TIMESHEETS:
def entityList = getModifiedItemsWithRefCodeByType(java.lang.String token, java.util.Calendar since, java.lang.String "Timesheet") for(entity:entityList){ def entityRefCode = entity.getRefCode() def timesheet = getInvoiceByRefCode(java.lang.String token, java.lang.String entityRefCode) for(shift:timesheet.getShifts(){ def date = new Date(shift.getDay()) def start = new Date(shift.getStartTime()) def start = new Date(shift.getEndTime()) def start = new Date(shift.getMealBreak()) def hours = new Date(shift.getHours()) def hoursDecimal = shift.getDecimal() def rateName = shift.getRateName() def ratePay = getRate().getPay() def rateCharge = getRate().getCharge() //PUT INFORMATION COLLECTED HERE WHERE YOU WANT TO PUT IT } } |
---|
Java Code
Authenticate
try { //Create an instance of the stub IntimeServiceV3_2Stub stub = new IntimeServiceV3_2Stub("https://demo.in-time.co.uk/services/IntimeServiceV3_2?wsdl"); //Get an authentication token IntimeServiceV3_2Stub.Authenticate auth=new IntimeServiceV3_2Stub.Authenticate(); auth.setAgencyRefCode("<supplied_credentials>"); auth.setUsername("<supplied_credentials>"); auth.setPassword("<supplied_credentials>"); IntimeServiceV3_2Stub.AuthenticateResponse authResp=stub.authenticate(auth); String ticket=authResp.get_return(); System.out.println("Authentication token:" + ticket); //Use this authentication token (ticket) to pass in to any of the other WebService calls } catch (java.lang.Exception e) { System.out.println("Exception occurred: " + e); } |
---|
...
Limited Company type workers have additional information that relate to their limited company. To provide access to this an associated LimitedCompany object and a LtdCompanyContact object were added to the Worker object.
The following RSM InTime data fields appear in both the Worker object and the associated LimitedCompany Object: AccountsReference (AccountsRef), VATCode, DefaultPaymentCurrency (Currency), NominalCode, ExpensesNominalCode, Consolidation and Grouping.
Version 2.9 and earlier: Both the LtdCompanyContact object and the LimitedCompany.InvoiceContact are populated when reading a Worker from RSM InTime. When creating or updating RSM InTime you should set the fields in the ltdCompanyContact object for the contact name, email, phone and address details.
...
Constants
Whilst using the RSM InTime Web Services, some fields have expected values from a range of constants. These are detailed below.
Field | Constant | Comment | Notes |
---|---|---|---|
Client | |||
invoicePeriod | 0 | Weekly | |
1 | Two-Weekly | ||
2 | Four-Weekly | ||
3 | Calendar Monthly | ||
4 | 4-4-5 | ||
howSendInvoices | 0 | Post | Invoice delivery method |
1 | |||
2 | Fax | ||
3 | Not sent | ||
Worker | |||
workerType | paye | For PAYE Workers | |
ltd | For Ltd Company Workers | ||
external-contractor | For Non Ltd Company Workers | ||
cis | For CIS Workers | ||
umb | For Workers operating through an Umbrella | You must also reference the umbrella against the worker, otherwise the worker will appear as LTD. | |
ir35 | For workers inside scope of IR35 (deemed) | ||
cisBusinessType | SoleTrader | ||
Company | |||
Trust | |||
Partnership | |||
cisPercentage | 0 | ||
20 | |||
30 | |||
paymentFrequency | weekly | ||
monthly | |||
<InPay Payroll Name> | If InPay connected, for PAYE workers, use the InPay Payroll Name | ||
timesheetsOnInvoices | 0 | Timesheets On Invoices | |
1 | Timesheets Not On Invoices | ||
paperOnInvoices | -1 | Agency Default | |
0 | No Attachments | ||
1 | Attach Paper Timesheets | ||
2 | Attach Expense Group Paper | ||
4 | Attach Expense Receipts Paper | ||
<sum of the above> | Attach the appropriate paper | For example, 5 to attach timesheets and receipts | |
gender | M | ||
F | |||
LTD invoice period | 0 | Weekly | |
1 | Two-Weekly | ||
2 | Four-Weekly | ||
3 | Calendar Monthly | ||
4 | 4-4-5 | ||
Payment Method | bacs | NOT CASE SENSITIVE | |
cheque | NOT CASE SENSITIVE | ||
cash | NOT CASE SENSITIVE | ||
chaps | NOT CASE SENSITIVE | ||
ach | NOT CASE SENSITIVE | ||
international | NOT CASE SENSITIVE | ||
building society | NOT CASE SENSITIVE | ||
sendLtdCompanyTimesheets | 0 | Do not send a copy of the timesheets to the worker or provider | |
1 | Only send a copy of timesheets to the worker's ltd company email address | ||
2 | Send a copy of timesheets to the worker's provider if they have one, otherwise send it to the worker | ||
3 | Send copies to both the worker and provider | ||
Placement | |||
layout | standard | See Maintaining Placements | |
calendar | |||
timesheetDateCalculator | weekly | See Maintaining Placements. You can see all possible values for this in the ui. | |
monthly | |||
<many more> | See UI for all options. | ||
Rates | |||
period | 60 | For hourly rates entered in hours format (hours only or start, break, finish). | |
1440 | For fixed rates of a specified duration entered in decimal format (decimal or tickbox) | ||
periodDuration | <any integer> | The duration in minutes for the fixed rate (e.g. 60 for hours, 480 for a day). | |
timePattern | default | Will use the selected default time pattern | |
<any string> | The string should match the name of a time pattern in the system | ||
timesheetFields | START_FINISH_BREAK | Enter start, break, finish | Only when period above is 60 |
HOURS | Enter hours only | Only when period above is 60 | |
DECIMAL | Enter time as a decimal | Only when period above is 1440 | |
DAY | Tickbox only (equivalent to entering decimals as 1.00) | Only when period above is 1440 | |
InvoiceAdjustmentSettings (Company / Worker) | |||
AdjustBy | 0 | Fixed Amount | |
1 | Percentage | ||
AdjustPer | 0 | Per Worker | |
1 | Per Timesheet | ||
2 | Per Invoice | ||
AdjustType | 0 | Addition | |
1 | Deduction | ||
ExpenseType | |||
EntryMethod | 0 | Gross value | Populate the GrossValue and optionally the VatAmount field on an ExpenseItem with this entry method |
1 | Net Value | Populate the NetValue field on an ExpenseItem with this entry method | |
2 | Units and Unit net | Populate the Unit and UnitNet fields on an ExpenseItem with this entry method. E.g. Set Unit = 30 and UnitNet = 0.45 to claim 30 miles at 45p per mile. | |
3 | Units and Net | Populate the Unit and Net Value fields on an ExpenseItem with this entry method. | |
Timesheet | |||
Status | getTimesheetStatus() | getStatus() | |
-1 | DELETED | ||
1 | INCOMPLETE | ||
2 | SUBMITTED | ||
3 | APPROVED | ||
5 | COMPLETED | ||
-2 | MISSING | ||
-3 | REVERTED | ||
InvoiceInfo | |||
Invoice Type | getInvoiceDescription() | ||
Advice Note | |||
Client Invoice | |||
Client Credit Note | |||
Self Bill Invoice | |||
Self Bill Credit Note | |||
Supplier Invoice | |||
Supplier Credit Note |