Resetting Speaker Year-to-Date Caps
- Browser (Classic, Lightning)
A speaker cap is a limit on the total monetary value that can be transferred to an HCP over the course of a year. Year-to-date (YTD) Speaker Caps can be reset via a scheduled Apex class automatically on a date to accommodate customer needs. This also helps provide flexibility for multi-country implementations.
Two fields on the EM_Speaker_vod object, Year_to_Date_Reset_Month_vod and Year_to_Date_Reset_Day_vod, determine when the recalculation takes place. Recalculation updates the Year_to_Date_Spend_vod and Year_To_Date_Utilization_vod fields.
If no values are present in the reset fields, the default date is used to determine when the spend and utilization fields are updated.
- Grant admin users access to the Speaker_YTD_Caps_Reset Apex Class.
- Schedule the Speaker_YTD_Caps_Reset Apex class to run daily.
Grant admin users FLS permission to the following fields on the EM_Speaker_vod object:
Recalculation logic is as follows:
- Start_Time_vod field on the Event record related to the Expense_Header_vod object is greater or equal to the Year_to_Date_Reset_Month_vod and Year_to_Date_Reset_Day_vod and less than the next projected values for those fields
- Either the Speaker or the related Account is the person whom incurred the Expense
- The Expense Type is included in the Speaker Cap
Year_To_Date_Utilization_vod is recalculated by the count of EM_Event_Speaker_vod records where:
- Status_vod field value on the EM_Event_vod object is not Canceled_vod
- Start_Time_vod field on the EM_Event_vod object is greater or equal to the Year_to_Date_Reset_Month_vod and Year_to_Date_Reset_Day_vod and less than the next projected values for those fields
- Status_vod field on the EM_Event_Speaker_vod object matches a value defined in the SPEAKER_ROLLUP_STATUS_FILTER Veeva setting. If the setting is not populated, records with a value of Attended_vod or Signed_vod are counted