How Role is Used in Direct Credit, Rollup, and Team Rules
When the crediting or rollup process finds the winning rule and assigns credits, it populates the credit records with the role ID of the role chosen in the rules. You can then use this role ID in expressions for further processing.
In this example, the participant John Gorman is assigned to two different roles. The two roles are assigned to two different compensation plans for the same duration and the same component.
Compensation Plan |
Role Name |
Start Date |
End Date |
---|---|---|---|
Compensation Plan A |
Role A |
January 1 |
December 31 |
Compensation Plan B |
Role B |
January 1 |
December 31 |
Participant John Gorman is assigned to two roles.
Role Name |
Role Start Date |
Role End Date |
---|---|---|
Role A |
January 1 |
March 31 |
Role B |
January 1 |
blank |
These plans are assigned to John Gorman by role.
Compensation Plan |
Role Name |
Effective Start Date |
Effective End Date |
---|---|---|---|
Compensation Plan A |
Role A |
January 1 |
March 31 |
Compensation Plan B |
Role B |
January 1 |
December 31 |
The direct credit rule 15 has these credit receivers:
Type |
Participant Name |
Role |
Split Percent |
Revenue Type |
Effective Start Date |
Effective End Date |
---|---|---|---|---|---|---|
Individual |
John Gorman |
Role A |
100 |
Revenue |
January 1 |
March 31 |
Individual |
John Gorman |
Role B |
75 |
Nonrevenue |
January 1 |
December 31 |
If the same plan component or measure exists in both plans, John Gorman can receive credit twice for the same transaction: once for role A and once for role B. To prevent this, the expression needs to filter on Role ID. In this example you create a user-defined query to get the role ID. Then create an expression that credits only the role that matches the role of the credit and disregards other roles. In this example, you create the user-defined query named GET_ROLEID and the expression:
SUM ( DECODE ( NVL ( GET_ROLEID (Participant.Participant Plan ID ) , 0 ) , Credit.RoleID , Credit.Credit Amount , 0 ) )
-
Create the value set:
-
In the Setup and Maintenance work area, go to the Manage Incentive Value Sets task:
-
Offering: Sales
-
Functional Area: Incentives
-
-
Click Create.
-
In the Create Value Set page, enter or select these fields:
Field
Value
Value Set Code
GET_ROLEID
Description
Get the ROLE_ID based on compensation plan assignment SRP_COMP_PLAN_ID
Module
Incentive Compensation
Validation Type
Table
Value Data Type
Number
FROM Clause
CN_SRP_COMP_PLANS_ALL srp, CN_PARTICIPANT_ROLES pr
Value Column Name
pr.ROLE_ID
WHERE Clause
srp.srp_comp_plan_id = :1 /* NUMBER */ and srp.srp_rule_id = pr.participant_role_id
-
-
Add your new value set to the table value sets list you can select while you build an expression.
-
Go to the Manage Incentive Lookups task.
-
Search for the lookup type ORA_CN_USR_DEFN_EXPRSN_VLE_SET.
-
In the Lookup Codes region click New.
-
Enter the value set as a lookup code
GET_ROLEID
.
-
-
Enable ROLE_ID to be used in your expression.
-
Go to the Configure Tables and Columns task.
-
Use the query by example under View to search for the table CN_SRP_PER_FORM_METRICS_ALL.
-
Use Query by Example to search for the column SRP_COMP_PLAN_ID.
-
Enter the user name Participant Plan ID.
-
Select Enable for Calculation.
-
Click Save.
-
Search for the table CN_TP_CREDITS_ALL.
-
Search for the column ROLE_ID.
-
Enter the user name RoleID
-
Select Enable for Calculation.
-
-
Create the expression.
-
Navigate to
. -
Click Create.
-
Name the expression Demo Sum Role Credit.
-
Create the expression:
SUM ( DECODE ( NVL ( GET_ROLEID (Participant.Participant Plan ID ) , 0 ) , Credit.RoleID , Credit.Credit Amount , 0 ) )
-
-
Set the performance measure's measure formula to Demo Sum Role Credit.
The user-defined query GET_ROLEID will return the ROLE_ID associated to the compensation plan. If the ROLE_ID matches the ROLE_ID on the credited transaction, then return the Credit Amount otherwise the output is zero.