Individual Compensation
This topic lists the implementation considerations for Individual Compensation processes.
Administer Compensation, Individual Compensation, and Personal Compensation
You can typically use field value defaulting and validation in these cases.
- Default when date such that awards can be created after 1st of next quarter by employees only.
- Validate that awards can be created after 1st of next quarter by employees only.
- Validate that certain plans are excluded for line managers.
- Validate when date such that it's in the current fiscal year (1 Apr - 31 Mar).
- Validate spot bonus is effective either on 01 Apr 2024 or 01 Oct 2024.
- Validate new hire bonus doesn't exceed $3000.
- Validate car allowance increase is below or equal to 10%.
- Validates new awards starts on or before 17th of a month.
- Validate that only one award proposal is submitted at a time.
- Validate bus and taxi reimbursement aren't claimed together.
- Validate that bonus can be allocated once in 6 months only.
This table lists the supported attributes, exceptions, and the implementation recommendations for Administer Compensation, Individual Compensation, and Personal Compensation.
It applies to the Administer Compensation page accessed from My Client Groups tab, Individual Compensation pages accessed from My Team and My Client Groups tabs and Personal Contribution page accessed from Me tab.
In the Conditions to Default Values | To Default Field Values | In the Condition to Validate Values | To Validate Field Values | Implementation Guidelines |
---|---|---|---|---|
*Can impact performance |
|
For When Section
For Compensation Section
|
Not Applicable |
|
Examples
Default When date such that awards can be created after 1st of next quarter by employees only.
Advanced Expression
let effectiveDate = new Date();
let currentQuarter = Math.floor((effectiveDate.getMonth() + 3) / 3);
// Get first date of current quarter
effectiveDate.setDate(1);
effectiveDate.setMonth((currentQuarter - 1) * 3);
// Use this technique for year rollover
effectiveDate.setMonth(effectiveDate.getMonth() + 3);
return effectiveDate.toISOString().slice(0, 10);
Validate When date such that it's in the current fiscal year (1 Apr - 31 Mar)
Advanced Expression
let effectiveDate = $fields.individualCompensationDetails.EffectiveDate.$value();
if (effectiveDate) {
// Fetch current financial year start date
let currentDate = new Date();
let fyStartDate = null, fyEndDate = null;
if (currentDate.getMonth() + 1 <= 3) {
fyStartDate = new Date(currentDate.getFullYear() - 1, 3, 1);
fyEndDate = new Date(currentDate.getFullYear(), 2, 31);
} else {
fyStartDate = new Date(currentDate.getFullYear(), 3, 1);;
fyEndDate = new Date(currentDate.getFullYear() + 1, 2, 31);
}
return (new Date(effectiveDate) < fyStartDate || new Date(effectiveDate) > fyEndDate);
}
return false;
Validate new hire bonus doesn't exceed $3000
Advanced Expression
if ($fields.individualCompensationDetails.PlanId.$value() === '100000018708168'
&& Number($fields.individualCompensationDetails.ValueString.$value()) > 3000) {
return true;
}
return false;
Validate car allowance increase is below or equal to 10%
Advanced Expression
if ($fields.individualCompensationDetails.ComponentId.$numberValue() === 300100010424490
&& $fields.individualCompensationDetails.Mode.$initialValue() === 'EDIT') {
let proposedValue = Number($fields.individualCompensationDetails.ValueString.$value());
let currentValue = Number($fields.individualCompensationDetails.ValueString.$initialValue());
if (proposedValue > (1.1 * currentValue))
return true;
}
return false;
In this example, initialValue of Mode is used to handle date-effective update scenario.
For date effective update case, the new record will have Mode as 'CREATE' since it's a newly generated split.
Validate new awards start on or before 17th of a month
Advanced Expression
if ($fields.individualCompensationDetails.Mode.$value() == 'CREATE'
&& $fields.individualCompensationDetails.EffectiveStartDate.$value()) {
let planSD = new Date($fields.individualCompensationDetails.EffectiveStartDate.$value());
return (planSD.getDate() > 17)
}
return false;
Validate that only one award proposal is submitted at a time
Advanced Expression
let currentAllocations = $fields.individualCompensationDetails.CurrentAllocations.$value();
if (currentAllocations && currentAllocations.length) {
let newAllocationCount = 0;
for (let allocation of currentAllocations) {
if (allocation.Mode == 'CREATE')
newAllocationCount++;
}
if(newAllocationCount > 1)
return true;
}
return false;
Validate bus and taxi reimbursement aren't claimed together
Advanced Expression
let currentAllocations = $fields.individualCompensationDetails.CurrentAllocations.$value();
if (currentAllocations && currentAllocations.length) {
let busBonusPresent = false;
let taxiBonusPresent = false;
for (let allocation of currentAllocations) {
if (allocation.PlanId == '300100113565911')
busBonusPresent = true;
else if (allocation.PlanId == '300100113565893')
taxiBonusPresent = true;
}
return (busBonusPresent && taxiBonusPresent);
}
return false;
Validate bonus is allocated only once in six months
if ($fields.individualCompensationDetails.PlanId.$numberValue() === 300100090079227
&& $fields.individualCompensationDetails.Mode.$value() === 'CREATE') {
let startDate = new Date($fields.individualCompensationDetails.EffectiveStartDate.$value());
let minusSixMonth = new Date(startDate.getFullYear(), startDate.getMonth() - 6, startDate.getDay());
minusSixMonth = minusSixMonth.toISOString().slice(0, 10);
let priorAllocations = $fields.individualCompensationDetails.PriorAllocations.$value();
if (priorAllocations?.length) {
let priorSpotBonus = priorAllocations.find(record => record.PlanId == '300100004468561');
if (priorSpotBonus?.EffectiveStartDate > minusSixMonth) {
return true;
}
}
}
return false;
Field Details
Field | Field Accessor | Type | Comments |
---|---|---|---|
Action Date | $fields.individualCompensationDetails.EffectiveDate.$value() |
||
Record Level Attributes | |||
Plan | $fields.individualCompensationDetails.PlanId.$value() |
Number | PlanId selected using Plan LOV which shows Plan Name |
Plan Option | $fields.individualCompensationDetails.ComponentId.$value() |
Number | OptionId selected using Option LOV which shows values in the format <Plan Name> - <Option Name> |
Start Date | $fields.individualCompensationDetails.EffectiveStartDate.$value() |
String |
Allocation start date as string (Format: yyyy-MM-dd) Requires Advanced Expression mode for date comparison. |
End Date | $fields.individualCompensationDetails.EffectiveEndDate.$value() |
String |
Allocation end date as string (Format: yyyy-MM-dd) Requires Advanced Expression mode for date comparison. |
Value | $fields.individualCompensationDetails.ValueString.$value() |
String |
Primary input value as string. Requires Advanced Expression mode for non-string primary input value. For numerical field, the value should be type-casted to Number for arithmetic operations. Similarly, for date field, the value should be type-casted to Date for date comparisons. |
Currency | $fields.individualCompensationDetails.DisplayCurrency.$value() |
String | Currency for monetary primary input value |
Legal Entity | $fields.individualCompensationDetails.LegalEntityId.$value() |
Number | LegalEntityId selected using Legal Entity LOV which shows LE Name |
Create or Edit | $fields.individualCompensationDetails.Mode.$value() |
String | Mode attribute is to determine whether the record is newly created or an existing record. |
Section Level Attributes | |||
Current Allocations | $fields.individualCompensationDetails.CurrentAllocations.$value() |
Array | Object Structure
|
Prior Allocations | $fields.individualCompensationDetails.PriorAllocations.$value() |
Array | Object Structure
|
Troubleshooting
To print all the attributes of an Individual Compensation object:
- Create a validation rule without any condition
- Add a messages to display the proposed value, by using the below
expression:
[[ JSON.stringify($fields.individualCompensationDetails.$value(), null, 2) ]]
- Add another messages to display the initialValue (the database value of the
record, for EDIT case), by using the below expression:
[[ JSON.stringify($fields.individualCompensationDetails.$initialValue(), null, 2) ]]
- For new allocation, initialValue will be null since it doesn't exist in the database
-
Same applies for Section Level Validation as well. It will trigger on Continue/Submit.
-
To review the value of CurrentAllocations array, set the message severity to error, otherwise it will allow submit or navigate to next section.
Validation Rule Definition

Result
