Business requirement
Our client intended to display/default multiple pay components for a given country via a business rule, additionally there were two major requests:
- Amount of certain pay components should be restricted via a range of values. For example, well-being allowance could be a minimum of Rs 1000 and can reach upto Rs 25000 max.
- Percentage based pay components should hold only a certain percentage. For example, Pensionable Salary- Memo for South Africa can either be 65% | 75% | 85% of total package.
Configuration steps
- Download corporate data model and enable following fields for <hris-element id="payComponent">
![](/legacyfs/online/storage/blog_attachments/2023/06/IMG1-2.png)
Corporate data model config
- Upload updated corporate data model and verify the config on pay component screen.
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture1-52.png)
Pay Component with custom fields.
- Go to Manage Data and create two Message Definitions as defined below:
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture2-41.png)
Message Definition 1
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture3-47.png)
Message Definition 2
- Create a business rule with following conditions:
Scenario: Trigger Rules to validate HRIS ElementsBase object: Compensation Model
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture4-34.png)
Business rule screen 1
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture5-25.png)
Business rule screen 2
- Attach this rule onchange of Amount and on save of payComponentRecurring
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture6-29.png)
Attaching the rule part 1
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture7-28.png)
Attaching the rule part 2
- Setup a pay component to hold these custom values and test the rule out.
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture8-21.png)
Test data 1
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture9-19.png)
Test result 1
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture10-17.png)
Test result 2
Points to note:
- If both range and valid value are maintained, first range would be checked, then valid value. Therefore, valid values should always be defined within range.
- Valid values will have to be separated with a | symbol with space from both the numbers.
- For Valid value, whole numbers must be maintained along with a decimal and 0 at pay component level, as shown in the example.
![](/legacyfs/online/storage/blog_attachments/2023/06/Picture11-15.png)
Test Data