Skip to content

Initiate Transfer To Payroll

Operation
wsdlInitiateTransferToPayroll
SOAP Action
uri:FlexForce/initiateTransferToPayroll
Service
FlexForce
Port
FlexForcePort
Style
rpc

Initiate a transfer to payroll, including locking the searched period and producing final (non-preliminary) payroll data.

With this service you can perform the same function as transfer to payroll from the Quinyx GUI. Inclusive of locking selected (searched) period and drawing hard/final payroll data (using isPreliminary false).

If edits where required to be done after this action, transactions needs to be reversed either in GUI or by wsdlReverseTransactions

Notes

  • extTransferId is mandatory and must be unique
  • If api key is for the main unit (rootstore), it's allowed to specify multiple units in the request
  • if api key is for other unit than main unit, parameters for unitId and extUnitIds can only be the unit of the api key or the not specified at all.
  • if unitIds is specified extUnitIds shall be ignored
  • fromDate and toDate are mandatory and toDate must be equal or greater than fromDate. If userId(s) is specified, badgeNo(s) will be ignored
  • if costCentres are specified, extCostCentres will be ignored
  • if sectionId(s) are specified, extSectionId(s) will be ignored
  • If not isPreliminary transfer, validate that there are no existing definite payroll process for selected users in specified time frame.

Selection on unit id(s) is set depending on includeSalariesOptions option:

  • 0 set empUnitIds
  • 1 set shiftUnitIds
  • 2 set unitIds
  • (which unit id's to set is from unitIds, extUnitIds, unitGroups or unit related to api key)

Request

Message: wsdlInitiateTransferToPayrollRequest

apiKeystringrequired

API key of the unit.

searchOptionssearchOptionrequired

Filter set — see the searchOption type.

extTransferIdstringrequired

Choosable text string to identify the “payroll run”. Used later on in wsdlGetResultTransferToPayroll

fromDatedaterequired
FormatYYYY-MM-DD
Example2013-04-01
toDatedaterequired
FormatYYYY-MM-DD
Example2013-04-30
userIdsArray<xsd:int>

its an array of user id

itemint
badgeNosArray<xsd:string>

if userIds is specified this will be ignored

itemstring
unitIdsArray<xsd:int>

unit Ids of the employee. You only have access to the unit id of the api key unless the api key is for the root unit id of the customer, in this case u have access to all the units

itemint
extUnitIdsArray<xsd:string>

if unitIds is specified this will be ignored

itemstring
includeSalariesOptionsint
Values
0Employees belong to units
1Worked on unit
2Both
Default0
unitGroupsArray<xsd:string>
itemstring
costCentresArray<xsd:int>

CostCentre Ids

itemint
extCostCentresArray<xsd:string>

External CostCentres Ids

itemstring
sectionIdsArray<xsd:int>

Section ids

itemint
extSectionIdsArray<xsd:string>

Ext Section Ids

itemstring
staffCategoriesArray<xsd:int>

Staff Categories Ids

itemint
skillsArray<xsd:int>

Skill ids

itemint
includeNotFullyApprovedboolean

Whether an employee whose period is not fully approved (contains unattested punches or unapproved leave) is still included in the transfer. Unapproved entries themselves are never transferred, regardless of this setting.

Values
trueThe employee is included, with only their approved entries
falseThe employee is excluded entirely if their period contains even one unapproved entry
Defaultfalse
payrollSystemstring

Name of the payroll system (salary file) to generate, exactly as labelled in Quinyx. A name that doesn't match any configured payroll system fails validation. When employees are selected automatically (no userIds/badgeNos), only employees connected to this payroll system are included. When omitted, the default definition is used, which produces a generic semicolon-delimited CSV file.

isPreliminaryboolean

Select if the payroll file should be preliminary or final (final locking all transactions)

lockSalaryPeriodboolean

Whether to lock the salary period. The period is never unlocked through this field.

Values
trueLock the period
falseLeave the current lock status unchanged, same as omitting the field
uploadFileToServerboolean

Whether the generated payroll file is delivered to the customer's configured SFTP server instead of being made available for download.

Values
trueUploads the payroll file to the customer's SFTP server. Make sure the SFTP settings are configured.
falseThe payroll file is made available for download via wsdlGetResultTransferToPayroll
Defaultfalse
curl -X POST 'https://api.quinyx.com/FlexForceWebServices.php' \
  -H 'Content-Type: text/xml; charset=utf-8' \
  -H 'SOAPAction: "uri:FlexForce/initiateTransferToPayroll"' \
  --data @- <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://api.quinyx.com/soap/FlexForce">
  <soap:Body>
    <tns:wsdlInitiateTransferToPayroll>
    <apiKey xsi:type="xsd:string">string</apiKey>
    <searchOptions xsi:type="tns:searchOption">
      <extTransferId xsi:type="xsd:string">string</extTransferId>
      <fromDate xsi:type="xsd:date">2013-04-01</fromDate>
      <toDate xsi:type="xsd:date">2013-04-30</toDate>
      <userIds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[1]">
        <item xsi:type="xsd:int">0</item>
      </userIds>
      <badgeNos xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
        <item xsi:type="xsd:string">string</item>
      </badgeNos>
      <unitIds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[1]">
        <item xsi:type="xsd:int">0</item>
      </unitIds>
      <extUnitIds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
        <item xsi:type="xsd:string">string</item>
      </extUnitIds>
      <includeSalariesOptions xsi:type="xsd:int">0</includeSalariesOptions>
      <unitGroups xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
        <item xsi:type="xsd:string">string</item>
      </unitGroups>
      <costCentres xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[1]">
        <item xsi:type="xsd:int">0</item>
      </costCentres>
      <extCostCentres xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
        <item xsi:type="xsd:string">string</item>
      </extCostCentres>
      <sectionIds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[1]">
        <item xsi:type="xsd:int">0</item>
      </sectionIds>
      <extSectionIds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
        <item xsi:type="xsd:string">string</item>
      </extSectionIds>
      <staffCategories xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[1]">
        <item xsi:type="xsd:int">0</item>
      </staffCategories>
      <skills xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:int[1]">
        <item xsi:type="xsd:int">0</item>
      </skills>
      <includeNotFullyApproved xsi:type="xsd:boolean">true</includeNotFullyApproved>
      <payrollSystem xsi:type="xsd:string">string</payrollSystem>
      <isPreliminary xsi:type="xsd:boolean">true</isPreliminary>
      <lockSalaryPeriod xsi:type="xsd:boolean">true</lockSalaryPeriod>
      <uploadFileToServer xsi:type="xsd:boolean">true</uploadFileToServer>
    </searchOptions>
    </tns:wsdlInitiateTransferToPayroll>
  </soap:Body>
</soap:Envelope>
EOF

Response

Message: wsdlInitiateTransferToPayrollResponse

returnTransferStatus

A TransferStatus record with extTransferId, the current status, and any validationErrors.

extTransferIdstringrequired

External transfer id supplied with the request.

statusstringrequired

Current status of the transfer.

Values
In Progress
Failed
Ready To Download
validationErrorsArray<xsd:string>required

Array of validation errors, if any.

itemstring
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://api.quinyx.com/soap/FlexForce">
  <soap:Body>
    <tns:wsdlInitiateTransferToPayrollResponse>
    <return xsi:type="tns:TransferStatus">
      <extTransferId xsi:type="xsd:string">string</extTransferId>
      <status xsi:type="xsd:string">string</status>
      <validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
        <item xsi:type="xsd:string">string</item>
      </validationErrors>
    </return>
    </tns:wsdlInitiateTransferToPayrollResponse>
  </soap:Body>
</soap:Envelope>

Change log

Date Description
2018-12-18 Method created.
2020-01-16 Added lockSalaryPeriod parameter