Update AgreementsDeprecated
Update agreements in Quinyx WFM. Deprecated — use wsdlUpdateAgreementsV2 instead.
Notes
- To update a specific agreement you have to either specify Quinyx internal id or you can use a external id. If an internal id is specified then the external id will be ignored. The first time an external id is used, a new agreement will be created and the mapping to Quinyx internal id is created.
- If agreement id is not included in the request and the employee has existing agreements, current agreement will be update. The system will select which agreement to update based on the following priority order:
- Agreement with the same template id and it’s from date is the same as the supplied
fromDate. - Agreement with the same template id and it’s valid period includes the supplied
fromDate. - Agreement with the same from date is the supplied
fromDate. - Agreement where it’s valid period includes the supplied
fromDate. - Agreement with the latest from date where the from date is before the supplied from date.
- The main agreement
- Agreement with the same template id and it’s from date is the same as the supplied
- If an agreement is updated based on above selection and the supplied
fromDateis different from current agreements from date, a new agreement will be created with the new from date and the current agreement will be closed with a to date of the previous day. - If new overtime methods is activated for the customer and the array of overtime methods is omitted, the system will use the single field
overtimeMethod(o-4) to determine the overtime methods that shall be set for the agreement. In this way current customers shall be able to use their web service call even if they switch on the feature new overtime method. - An agreement can only be set as main agreement if the agreement is valid at point where the call is made. So it’s not possible to set future or past agreement as main agreement.
Request
API key of the unit.
An array of tns:UpdateAgreement
A single agreement to create or update through wsdlUpdateAgreements (deprecated).
Identifies the agreement. Optional parameter that can be omitted or set to 0 if not used.
External identification of the agreement; will automatically map to an internal id.
If name is not supplied a default based on the agreement template or the employee's name will be used.
Identifies the employee and is required if id is not specified.
Identifies the unit of the employee.
Preferred hours in a week.
Minimum hours in a week.
Maximum hours in a week.
For hourly agreements this sets the hourly salary; for monthly agreements it sets the monthly salary and hourly salary is recalculated based on working hours.
Monthly salary. Overrides anything set by salary.
Hourly salary. Overrides anything set by salary.
Not used anymore.
Not used anymore.
Not used anymore.
From this date the agreement is valid.
To this date the agreement is valid.
Salary period type.
The date that the agreement became valid.
Salary period length. If periodType is 0 and periodLength is 1 the total salary period is 1 month.
Calculated hours a week.
Employment level. 1 = 100%, 0 = 0%, 0.42 = 42%.
If an agreement template is used, this id represents the primary key from wsdlGetAgreementTemplates.
Indicates whether availability from the agreement template is used, or specified on the individual agreement.
Indicates whether time rules from the agreement template are used, or specified on the individual agreement.
Indicates whether salary information from the agreement template is used, or specified on the individual agreement.
Indicates whether working time from the agreement template is used, or specified on the individual agreement.
Indicates whether monthly hours from the agreement template are used, or specified on the individual agreement.
Not used anymore.
Indicates whether time options from the agreement template are used, or specified on the individual agreement.
Overtime Method:
Additional information 1 used for customer information.
Additional information 2 used for customer information.
Additional information 3 used for customer information.
Additional information 4 used for customer information.
Additional information 5 used for customer information.
Indicates whether social cost and absence cost from the agreement template are used, or specified on the individual agreement.
Indicates whether breaks should be rounded to origin schedule breaks. Only valid for agreements whose punch type is "punching in/out and breaks".
An array of punchRounding rules.
An array of agreementOvertimeMethod rules.
Indicates whether the agreement should be set as the main agreement for the employee.
False means ignore leave reason in Webpunch 3.
If set, updates the customMonthlyHoursDivisor field. If hourly is also false, hourly salary is recalculated based on the new divisor.
Returned in the response only. Array of error strings if the update failed; empty array on success.
curl -X POST 'https://api.quinyx.com/FlexForceWebServices.php' \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: "uri:FlexForce/wsdlUpdateAgreements"' \
--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:wsdlUpdateAgreements>
<apiKey xsi:type="xsd:string">string</apiKey>
<agreements xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:UpdateAgreement[1]">
<item xsi:type="tns:UpdateAgreement">
<id xsi:type="xsd:int">0</id>
<extAgreementId xsi:type="xsd:string">string</extAgreementId>
<name xsi:type="xsd:string">string</name>
<badgeNo xsi:type="xsd:string">string</badgeNo>
<restId xsi:type="xsd:int">0</restId>
<weekHours xsi:type="xsd:decimal">0</weekHours>
<minHours xsi:type="xsd:decimal">0</minHours>
<maxHours xsi:type="xsd:decimal">0</maxHours>
<salary xsi:type="xsd:decimal">0</salary>
<monthlySalary xsi:type="xsd:decimal">0</monthlySalary>
<hourlySalary xsi:type="xsd:decimal">0</hourlySalary>
<premiumSalary xsi:type="xsd:decimal">0</premiumSalary>
<premiumSalary2 xsi:type="xsd:decimal">0</premiumSalary2>
<premiumSalary3 xsi:type="xsd:decimal">0</premiumSalary3>
<hourly xsi:type="xsd:int">0</hourly>
<fromDate xsi:type="xsd:date">2024-01-01</fromDate>
<toDate xsi:type="xsd:date">2024-01-01</toDate>
<expires xsi:type="xsd:int">0</expires>
<periodType xsi:type="xsd:int">0</periodType>
<periodStart xsi:type="xsd:date">2024-01-01</periodStart>
<periodLength xsi:type="xsd:int">0</periodLength>
<weeklyAvg xsi:type="xsd:decimal">0</weeklyAvg>
<empLevel xsi:type="xsd:decimal">0</empLevel>
<templateId xsi:type="xsd:int">0</templateId>
<useTempAvail xsi:type="xsd:int">0</useTempAvail>
<useTempTimeRules xsi:type="xsd:int">0</useTempTimeRules>
<useTempSalary xsi:type="xsd:int">0</useTempSalary>
<useTempWorkTime xsi:type="xsd:int">0</useTempWorkTime>
<useTempMonthHours xsi:type="xsd:int">0</useTempMonthHours>
<useTempRedDates xsi:type="xsd:int">0</useTempRedDates>
<useTempTandA xsi:type="xsd:int">0</useTempTandA>
<overtimeMethod xsi:type="xsd:int">0</overtimeMethod>
<additionalField1 xsi:type="xsd:string">string</additionalField1>
<additionalField2 xsi:type="xsd:string">string</additionalField2>
<additionalField3 xsi:type="xsd:string">string</additionalField3>
<additionalField4 xsi:type="xsd:string">string</additionalField4>
<additionalField5 xsi:type="xsd:string">string</additionalField5>
<closeParallelAgreements xsi:type="xsd:int">0</closeParallelAgreements>
<useObjectAgreement xsi:type="xsd:int">0</useObjectAgreement>
<useTempCosts xsi:type="xsd:int">0</useTempCosts>
<roundingBreaks xsi:type="xsd:int">0</roundingBreaks>
<punchRoundings xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:punchRounding[1]">
<item xsi:type="tns:punchRounding">
<type xsi:type="xsd:int">0</type>
<punchPart xsi:type="xsd:int">0</punchPart>
<insideShift xsi:type="xsd:int">0</insideShift>
<roundingRule xsi:type="xsd:int">0</roundingRule>
<minutes xsi:type="xsd:decimal">0</minutes>
</item>
</punchRoundings>
<agreementOvertimeMethods xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:agreementOvertimeMethod[1]">
<item xsi:type="tns:agreementOvertimeMethod">
<overtimeMethodId xsi:type="xsd:int">0</overtimeMethodId>
<order xsi:type="xsd:int">0</order>
</item>
</agreementOvertimeMethods>
<isMainAgreement xsi:type="xsd:boolean">true</isMainAgreement>
<showUnspecifiedLeaveInWP xsi:type="xsd:boolean">true</showUnspecifiedLeaveInWP>
<customMonthlyHoursDivisor xsi:type="xsd:decimal">0</customMonthlyHoursDivisor>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</item>
</agreements>
</tns:wsdlUpdateAgreements>
</soap:Body>
</soap:Envelope>
EOFResponse
Array of UpdateAgreement records;
A single agreement to create or update through wsdlUpdateAgreements (deprecated).
Identifies the agreement. Optional parameter that can be omitted or set to 0 if not used.
External identification of the agreement; will automatically map to an internal id.
If name is not supplied a default based on the agreement template or the employee's name will be used.
Identifies the employee and is required if id is not specified.
Identifies the unit of the employee.
Preferred hours in a week.
Minimum hours in a week.
Maximum hours in a week.
For hourly agreements this sets the hourly salary; for monthly agreements it sets the monthly salary and hourly salary is recalculated based on working hours.
Monthly salary. Overrides anything set by salary.
Hourly salary. Overrides anything set by salary.
Not used anymore.
Not used anymore.
Not used anymore.
From this date the agreement is valid.
To this date the agreement is valid.
Salary period type.
The date that the agreement became valid.
Salary period length. If periodType is 0 and periodLength is 1 the total salary period is 1 month.
Calculated hours a week.
Employment level. 1 = 100%, 0 = 0%, 0.42 = 42%.
If an agreement template is used, this id represents the primary key from wsdlGetAgreementTemplates.
Indicates whether availability from the agreement template is used, or specified on the individual agreement.
Indicates whether time rules from the agreement template are used, or specified on the individual agreement.
Indicates whether salary information from the agreement template is used, or specified on the individual agreement.
Indicates whether working time from the agreement template is used, or specified on the individual agreement.
Indicates whether monthly hours from the agreement template are used, or specified on the individual agreement.
Not used anymore.
Indicates whether time options from the agreement template are used, or specified on the individual agreement.
Overtime Method:
Additional information 1 used for customer information.
Additional information 2 used for customer information.
Additional information 3 used for customer information.
Additional information 4 used for customer information.
Additional information 5 used for customer information.
Indicates whether social cost and absence cost from the agreement template are used, or specified on the individual agreement.
Indicates whether breaks should be rounded to origin schedule breaks. Only valid for agreements whose punch type is "punching in/out and breaks".
An array of punchRounding rules.
An array of agreementOvertimeMethod rules.
Indicates whether the agreement should be set as the main agreement for the employee.
False means ignore leave reason in Webpunch 3.
If set, updates the customMonthlyHoursDivisor field. If hourly is also false, hourly salary is recalculated based on the new divisor.
Returned in the response only. Array of error strings if the update failed; empty array on success.
<?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:wsdlUpdateAgreementsResponse>
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:UpdateAgreement[1]">
<item xsi:type="tns:UpdateAgreement">
<id xsi:type="xsd:int">0</id>
<extAgreementId xsi:type="xsd:string">string</extAgreementId>
<name xsi:type="xsd:string">string</name>
<badgeNo xsi:type="xsd:string">string</badgeNo>
<restId xsi:type="xsd:int">0</restId>
<weekHours xsi:type="xsd:decimal">0</weekHours>
<minHours xsi:type="xsd:decimal">0</minHours>
<maxHours xsi:type="xsd:decimal">0</maxHours>
<salary xsi:type="xsd:decimal">0</salary>
<monthlySalary xsi:type="xsd:decimal">0</monthlySalary>
<hourlySalary xsi:type="xsd:decimal">0</hourlySalary>
<premiumSalary xsi:type="xsd:decimal">0</premiumSalary>
<premiumSalary2 xsi:type="xsd:decimal">0</premiumSalary2>
<premiumSalary3 xsi:type="xsd:decimal">0</premiumSalary3>
<hourly xsi:type="xsd:int">0</hourly>
<fromDate xsi:type="xsd:date">2024-01-01</fromDate>
<toDate xsi:type="xsd:date">2024-01-01</toDate>
<expires xsi:type="xsd:int">0</expires>
<periodType xsi:type="xsd:int">0</periodType>
<periodStart xsi:type="xsd:date">2024-01-01</periodStart>
<periodLength xsi:type="xsd:int">0</periodLength>
<weeklyAvg xsi:type="xsd:decimal">0</weeklyAvg>
<empLevel xsi:type="xsd:decimal">0</empLevel>
<templateId xsi:type="xsd:int">0</templateId>
<useTempAvail xsi:type="xsd:int">0</useTempAvail>
<useTempTimeRules xsi:type="xsd:int">0</useTempTimeRules>
<useTempSalary xsi:type="xsd:int">0</useTempSalary>
<useTempWorkTime xsi:type="xsd:int">0</useTempWorkTime>
<useTempMonthHours xsi:type="xsd:int">0</useTempMonthHours>
<useTempRedDates xsi:type="xsd:int">0</useTempRedDates>
<useTempTandA xsi:type="xsd:int">0</useTempTandA>
<overtimeMethod xsi:type="xsd:int">0</overtimeMethod>
<additionalField1 xsi:type="xsd:string">string</additionalField1>
<additionalField2 xsi:type="xsd:string">string</additionalField2>
<additionalField3 xsi:type="xsd:string">string</additionalField3>
<additionalField4 xsi:type="xsd:string">string</additionalField4>
<additionalField5 xsi:type="xsd:string">string</additionalField5>
<closeParallelAgreements xsi:type="xsd:int">0</closeParallelAgreements>
<useObjectAgreement xsi:type="xsd:int">0</useObjectAgreement>
<useTempCosts xsi:type="xsd:int">0</useTempCosts>
<roundingBreaks xsi:type="xsd:int">0</roundingBreaks>
<punchRoundings xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:punchRounding[1]">
<item xsi:type="tns:punchRounding">
<type xsi:type="xsd:int">0</type>
<punchPart xsi:type="xsd:int">0</punchPart>
<insideShift xsi:type="xsd:int">0</insideShift>
<roundingRule xsi:type="xsd:int">0</roundingRule>
<minutes xsi:type="xsd:decimal">0</minutes>
</item>
</punchRoundings>
<agreementOvertimeMethods xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:agreementOvertimeMethod[1]">
<item xsi:type="tns:agreementOvertimeMethod">
<overtimeMethodId xsi:type="xsd:int">0</overtimeMethodId>
<order xsi:type="xsd:int">0</order>
</item>
</agreementOvertimeMethods>
<isMainAgreement xsi:type="xsd:boolean">true</isMainAgreement>
<showUnspecifiedLeaveInWP xsi:type="xsd:boolean">true</showUnspecifiedLeaveInWP>
<customMonthlyHoursDivisor xsi:type="xsd:decimal">0</customMonthlyHoursDivisor>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</item>
</return>
</tns:wsdlUpdateAgreementsResponse>
</soap:Body>
</soap:Envelope>