Professional Documents
Culture Documents
Current State
Technical Components
Design Decisions
Eligible ACV
Implementation Approach:
Aggregate ACV
Implementation Approach:
Error Handling
New Components
Modified Components
Diagrams
Current Process
To Be Eligible ACV Flow
To Be Aggregate ACV Flow
Solution Architecture
Test Strategy
References
Q&A
Overview
In the current state, GIC Ops has to follow a manual process to calculate and exclude ECS
reps from orders that are above their individual cut-off thresholds, per incentive comp policy.
Scope
The scope for threshold based crediting is limited to the following:
Current State
In the current state GIC Ops manually exclude ECS reps (CPOs) from orders that are above
their individual cut-off thresholds, per incentive comp policy.
Below are the involved objects and the relationship between them:
Order
Deal Relationship Keeps track of all opptys, converted quotes and new contracts.
Quote (CPQ) Holds dates and line items, many quotes/proposals may be related
to a single opportunity, a quote/proposal may have many detail
lines
Design Decisions
There are 2 separate processes that we are trying to automate as part of TBC:
Threshold Based Crediting - Technical Design Page 4 of 14
1. Exclude/Include CPO and Order Team records of member and CPO records of
Manager based on Eligible ACV
a. In this we are relying on the Product Eligibility Matrix (PEM) data to get the
Eligibility% for the ECS selling group AEs and calculating Eligible ACV.
b. PEM data in Org62 is stored in 2 objects →
Commission Incentive Plan (CIP)
Commission Incentive Unit (CIU)
c. From CPO using Selling Role, Vertical, Market Segment and Role, get the
PEK from the CIP.
d. Use this PEK and Sub-Cloud from the CEO to get Eligibility% from the CIU.
e. Finally calculate Eligible ACV = Participant ACV * Eligibility% → Commissionable
ACV
f. If Eligible ACV = 0 then mark Exclude__c on CPO and sfbase__Exclude__c
on related Order Team
g. Else unmark Exclude__c on CPO and sfbase__Exclude__c on related Order
Team
2. Exclude/Include CPO and Order Team records of member and CPO records of
Manager based on Aggregate ACV
a. To calculate the Aggregate ACV use following priorities after fetching the CPO
records satisfying the criteria →
CEO_Name__r.RecordType.Name IN ('Auto',’Manual’) AND
CEO_Name__r.Commission_Period__c <= THIS_MONTH AND
CEO_Name__r.CEO_Status__c != 'Deleted' AND SellingRole__r.Name LIKE
'%ECS%' AND ECST_Approved__c = FALSE AND
CEO_Name__r.Order_Record_Type__c != 'Attrition'
i. If Deal Number (DealRelationship__r.Name) is present on related
CEO then
Aggregated ACV = Sum of Commissionable ACV of all CEOs falling
under this Deal Number.
ii. Else if Related Quote (CPQ) (SfdcRelatedQuote__c) is present on the
Order then
Aggregated ACV = Sum of Commissionable ACV of all CEOs falling
under this Quote.
iii. Else
Aggregated ACV = Sum of Commissionable ACV of all CEOs related
to the same Order.
iv. Refer to this sheet for scenarios.
b. Get the threshold values from Commission ACV Threshold Configuration
(Commission_ACV_Threshold_Configuration__mdt) custom metadata type:
i. Region from CPO Role__c field = Region__c
ii. CPO MarketSegment__c NOT IN ExcludeMarketSegment__c
iii. CPO Sub_Region__c NOT IN ExcludeSubRegion__c
iv. CPO Vertical__c NOT IN ExcludeVertical__c
v. If IncludeMarketSegment__c != NULL then CPO MarketSegment__c IN
IncludeMarketSegment__c
vi. If IncludeSubRegion__c != NULL then CPO Sub_Region__c IN
IncludeSubRegion__c
vii. If IncludeVertical__c != NULL then CPO Vertical__c IN IncludeVertical__c
viii. If SellingRoleName__c on the CPO IN TeamRole__c
ix. Active__c = TRUE
Eligible ACV
Implementation Approach:
The Eligible ACV will be calculated with Aggregate ACV calculation
Aggregate ACV
This doc has details on different approaches considered for implementation.
Implementation Approach:
Schedule-trigger Flow for calling the CalculateAggregateEligibleACVFunctions apex class
which calls ThresholdBasedCreditingBatch apex batch class.
Schedule-triggered Flow:
Schedule: @7:00am PST
Frequency: Daily
To Handle exceptions related to platform (eg: LOCKED_ROW) are handled by PML. EOPs
will keep on monitoring the object and report any unexpected issues that they see.
New Components
Custom Fields on CPO (CPO__c) object:
Flows:
Apex Classes:
# Name Methods
global void
execute(Database.BatchableContext
batchCon, List<sObject> lSObject)
Modified Components
FLS on Profiles:
Current Process
Test Strategy
1. Create new Test Cases for Eligible ACV and Aggregate ACV scenario
a. Upload the test suit into Taleggio
b. Run the Test Cases as required and update results in Taleggio
2. Create Unit Test Classes.
3. Identify the Regression/Patch test cases from the identified scenarios in step 1.
Run as needed on demand.
Q&A
● Is there a need to update the Eligible ACV periodically? Asking this because the data
on CIU/CIP objects can change which can affect the calculation.
○ Eligible ACV - calculate start of every month until Org62 to Huiforce
automation
○ Daily Nightly job to evaluate CPO records daily
● Which profiles will need access to the newly created fields as part of TBC?
○ Mirror access to CEOs/CPOs - Sales Ops Commissions
● To get PEK from CIP we use the following info from CPO:
1. Selling Role
2. Vertical
3. Market Segment
4. Role
Vertical and Market Seg are multi-select picklists. So do we have to look up the CIP
records which have all the Vertical and Market Seg in it?
○ Managers usually have a multi select picklist. We should map the AEs and
managers should get based on their directs
● What if there is no value for Eligibility% is returned from PEM? Should we consider it
as 0% or 100%?
○ 0%
● We saw that if CEOs are created on an order where deal is involved then on CEO
the Deal Number field is populated but not Deal Relationship. So for aggregation we
should look at Deal Number field or Deal Relationship field?
● How the subRegion on CPO is playing a role in finding GEO on CIP?
● When we say for deal aggregation the CEOs to consider should be of the same
commission period, do we mean the CEOs with commission period falling in the
same month should only be considered along with deal/quote/order aggregation?
● Observation: In production currently there are ~300 000 CEO records of Auto/Manual
RT with previous commission period ( > 1 Apr 2004).
A total of 494 CPO records of prior Commision Period ( < 1 Oct 2021). include Fiscal
Year criteria
●
●
● Team Role info from Production