You are here:
Schedule an Apex Job To Calculate Referral Scores
Keep your referral scores for each practitioner up-to-date by scheduling an Apex job to calculate the number of converted referrals.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions with Health Cloud |
| User Permissions Needed | |
|---|---|
| To schedule an Apex job: | Author Apex |
Referral Scores tell you the conversion percentage for each referring practitioner. The scores are based on the number of converted referrals vs. the total referrals for each practitioner.
Total referrals are the count of referrals submitted in the last six months by this referring practitioner. Converted referrals are a count of those referrals that have a status of “Closed-Converted”. To keep these values up-to-date, schedule an Apex job that calculates these numbers and displays them in the Total Referrals and Converted Referrals fields on the contact record:
- From Setup, in the Quick Find box, enter Apex Classes, then select Apex Classes.
- Click Schedule Apex.
- Enter a Job Name such as Calculate Referral Scores.
- For Apex Class, search for and select HcReferrerScoreScheduledJob.
-
Specify how often you want the job to run.
- For Weekly—enter one or more days of the week that the job runs (such as Monday and Wednesday).
- For Monthly—enter either the date that the job runs or the day (such as the second Saturday of every month).
- Specify the start and end dates. If you enter a single day, the job runs only one time.
Note We recommended scheduling the job to run daily by choosing Weekly and selecting each day. -
Save your changes.
View or change the details of your scheduled job by going to Settings > Scheduled Jobs, and clicking Manage next to the job name.

