Skip to content

Update AgreementsDeprecated

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

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
  • If an agreement is updated based on above selection and the supplied fromDate is 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

Message: wsdlUpdateAgreementsRequest

apiKeystring

API key of the unit.

FormatXXXX-XXXX-XXXX-XXXX
agreementsArray<UpdateAgreement>

An array of tns:UpdateAgreement

itemUpdateAgreement

A single agreement to create or update through wsdlUpdateAgreements (deprecated).

idint

Identifies the agreement. Optional parameter that can be omitted or set to 0 if not used.

extAgreementIdstring

External identification of the agreement; will automatically map to an internal id.

namestringrequired

If name is not supplied a default based on the agreement template or the employee's name will be used.

badgeNostringrequired

Identifies the employee and is required if id is not specified.

restIdintrequired

Identifies the unit of the employee.

weekHoursdecimalrequired

Preferred hours in a week.

minHoursdecimalrequired

Minimum hours in a week.

maxHoursdecimalrequired

Maximum hours in a week.

salarydecimalrequired

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.

monthlySalarydecimalrequired

Monthly salary. Overrides anything set by salary.

hourlySalarydecimalrequired

Hourly salary. Overrides anything set by salary.

premiumSalarydecimalrequired

Not used anymore.

premiumSalary2decimalrequired

Not used anymore.

premiumSalary3decimalrequired

Not used anymore.

hourlyintrequired
Values
1Hourly employed
fromDatedaterequired

From this date the agreement is valid.

FormatYYYY-MM-DD
toDatedaterequired

To this date the agreement is valid.

FormatYYYY-MM-DD
expiresintrequired
Values
1This agreement is expired.
periodTypeintrequired

Salary period type.

Values
0Months
1Weeks
2Days
periodStartdaterequired

The date that the agreement became valid.

FormatYYYY-MM-DD
periodLengthintrequired

Salary period length. If periodType is 0 and periodLength is 1 the total salary period is 1 month.

weeklyAvgdecimalrequired

Calculated hours a week.

empLeveldecimalrequired

Employment level. 1 = 100%, 0 = 0%, 0.42 = 42%.

templateIdintrequired

If an agreement template is used, this id represents the primary key from wsdlGetAgreementTemplates.

useTempAvailintrequired

Indicates whether availability from the agreement template is used, or specified on the individual agreement.

Values
0false
1true
useTempTimeRulesintrequired

Indicates whether time rules from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
useTempSalaryintrequired

Indicates whether salary information from the agreement template is used, or specified on the individual agreement.

Values
0false
1true
useTempWorkTimeintrequired

Indicates whether working time from the agreement template is used, or specified on the individual agreement.

Values
0false
1true
useTempMonthHoursintrequired

Indicates whether monthly hours from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
useTempRedDatesintrequired

Not used anymore.

Values
0false
1true
useTempTandAintrequired

Indicates whether time options from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
overtimeMethodintrequired

Overtime Method:

Values
0No overtime
1Time exceeding schedule per day
2Time exceeding nominal hours during salary period
3Time exceeding nominal hours during x days
4Time exceeding fixed schedule per day
additionalField1stringrequired

Additional information 1 used for customer information.

additionalField2stringrequired

Additional information 2 used for customer information.

additionalField3stringrequired

Additional information 3 used for customer information.

additionalField4stringrequired

Additional information 4 used for customer information.

additionalField5stringrequired

Additional information 5 used for customer information.

closeParallelAgreementsintrequired
useObjectAgreementintrequired
useTempCostsintrequired

Indicates whether social cost and absence cost from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
roundingBreaksint

Indicates whether breaks should be rounded to origin schedule breaks. Only valid for agreements whose punch type is "punching in/out and breaks".

Values
0false
1true
punchRoundingsArray<punchRounding>

An array of punchRounding rules.

agreementOvertimeMethodsArray<agreementOvertimeMethod>

An array of agreementOvertimeMethod rules.

isMainAgreementboolean

Indicates whether the agreement should be set as the main agreement for the employee.

showUnspecifiedLeaveInWPboolean

False means ignore leave reason in Webpunch 3.

customMonthlyHoursDivisordecimal

If set, updates the customMonthlyHoursDivisor field. If hourly is also false, hourly salary is recalculated based on the new divisor.

validationErrorsArray<xsd:string>

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

Response

Message: wsdlUpdateAgreementsResponse

returnArray<UpdateAgreement>

Array of UpdateAgreement records;

itemUpdateAgreement

A single agreement to create or update through wsdlUpdateAgreements (deprecated).

idint

Identifies the agreement. Optional parameter that can be omitted or set to 0 if not used.

extAgreementIdstring

External identification of the agreement; will automatically map to an internal id.

namestringrequired

If name is not supplied a default based on the agreement template or the employee's name will be used.

badgeNostringrequired

Identifies the employee and is required if id is not specified.

restIdintrequired

Identifies the unit of the employee.

weekHoursdecimalrequired

Preferred hours in a week.

minHoursdecimalrequired

Minimum hours in a week.

maxHoursdecimalrequired

Maximum hours in a week.

salarydecimalrequired

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.

monthlySalarydecimalrequired

Monthly salary. Overrides anything set by salary.

hourlySalarydecimalrequired

Hourly salary. Overrides anything set by salary.

premiumSalarydecimalrequired

Not used anymore.

premiumSalary2decimalrequired

Not used anymore.

premiumSalary3decimalrequired

Not used anymore.

hourlyintrequired
Values
1Hourly employed
fromDatedaterequired

From this date the agreement is valid.

FormatYYYY-MM-DD
toDatedaterequired

To this date the agreement is valid.

FormatYYYY-MM-DD
expiresintrequired
Values
1This agreement is expired.
periodTypeintrequired

Salary period type.

Values
0Months
1Weeks
2Days
periodStartdaterequired

The date that the agreement became valid.

FormatYYYY-MM-DD
periodLengthintrequired

Salary period length. If periodType is 0 and periodLength is 1 the total salary period is 1 month.

weeklyAvgdecimalrequired

Calculated hours a week.

empLeveldecimalrequired

Employment level. 1 = 100%, 0 = 0%, 0.42 = 42%.

templateIdintrequired

If an agreement template is used, this id represents the primary key from wsdlGetAgreementTemplates.

useTempAvailintrequired

Indicates whether availability from the agreement template is used, or specified on the individual agreement.

Values
0false
1true
useTempTimeRulesintrequired

Indicates whether time rules from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
useTempSalaryintrequired

Indicates whether salary information from the agreement template is used, or specified on the individual agreement.

Values
0false
1true
useTempWorkTimeintrequired

Indicates whether working time from the agreement template is used, or specified on the individual agreement.

Values
0false
1true
useTempMonthHoursintrequired

Indicates whether monthly hours from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
useTempRedDatesintrequired

Not used anymore.

Values
0false
1true
useTempTandAintrequired

Indicates whether time options from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
overtimeMethodintrequired

Overtime Method:

Values
0No overtime
1Time exceeding schedule per day
2Time exceeding nominal hours during salary period
3Time exceeding nominal hours during x days
4Time exceeding fixed schedule per day
additionalField1stringrequired

Additional information 1 used for customer information.

additionalField2stringrequired

Additional information 2 used for customer information.

additionalField3stringrequired

Additional information 3 used for customer information.

additionalField4stringrequired

Additional information 4 used for customer information.

additionalField5stringrequired

Additional information 5 used for customer information.

closeParallelAgreementsintrequired
useObjectAgreementintrequired
useTempCostsintrequired

Indicates whether social cost and absence cost from the agreement template are used, or specified on the individual agreement.

Values
0false
1true
roundingBreaksint

Indicates whether breaks should be rounded to origin schedule breaks. Only valid for agreements whose punch type is "punching in/out and breaks".

Values
0false
1true
punchRoundingsArray<punchRounding>

An array of punchRounding rules.

agreementOvertimeMethodsArray<agreementOvertimeMethod>

An array of agreementOvertimeMethod rules.

isMainAgreementboolean

Indicates whether the agreement should be set as the main agreement for the employee.

showUnspecifiedLeaveInWPboolean

False means ignore leave reason in Webpunch 3.

customMonthlyHoursDivisordecimal

If set, updates the customMonthlyHoursDivisor field. If hourly is also false, hourly salary is recalculated based on the new divisor.

validationErrorsArray<xsd:string>

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>