Skip to main content

Return to TX Community

Liaison

Prospect Scoring Upgrade

Step 1 - Record Your Current Package Version

​Prior to upgrading, you will need to find and record your currently installed version:

  1. Navigate to Setup > Installed Packages
  2. Search for TargetX_Prospect Scoring
  3. Record your current version number

Note: ​if your current version is 2511.0, you are on the most recent package and should proceed to the Telemarketing Upgrade.

Step 2 - Manually add the code changes via a Change Set 

Prospect Scoring is an unmanaged package, so you must manually add the code changes for the Prospect Scoring package via a Change Set. You must complete the steps in a sandbox environment before pushing to production via an Outbound Change Set

Your starting package version number determines what, if any, additional configuration steps may be required. Please click the link for your initial version number (identified in Step 1 above) from the list below. You will be directed to the first step required for your upgrade and should complete all steps that follow. If you do not see your version number listed, please get in touch with the TargetX Support team. 

Step 3 - Log into your Sandbox

Ensure that your sandbox has been refreshed before continuing.

Starting Version

This is the version you currently have installed, as Identified in Step 1.

Ending Version

This is the upgrade you are installing, as selected in Step 2.  

Configuration Steps by Release

These are the steps you need to complete, from the starting version to the ending version. For example, if your starting version is 2205.0 (May '22) and you're upgrading to 2208.6 (August '22), you'll need to complete the configuration steps for 2206.3 (June '22), 2207.0 (July '22), and 2208.6 (August '22). 

2305.0 2505.0 (May '25)

Item 1: Update API Version on Apex Classes

  1. Navigate to Setup and search for Apex Classes.
  2. For each of the classes listed below, go to Edit, select the Version Settings tab, and set the Salesforce.com API version to 62.0:
    • calculateProspectScore
    • dataGenerator
    • testCalculateProspectScore
    • testDataGenerator
    • TriggerContextUtility

Item 2: Update API Version on Apex Triggers

  1. Navigate to Setup and search for Apex Triggers.
  2. For each of the triggers listed below, go to Edit, select the Version Settings tab, and set the Salesforce.com API version to 62.0:
    • postApplicationDelete
    • postApplicationUpsert
    • postContactScheduleItemDelete
    • postContactScheduleItemUpsert
    • postEmailBroadcastMemberInsert
    • postRelationshipDelete
    • postRelationshipUpsert
    • postTaskDelete
    • postTaskUpsert
       

Item 3: Update API Version on Visualforce Pages

  1. Navigate to Setup and search for Visualforce Pages
  2. For the Visualforce page below, click Edit, then the Version Settings tab. Change Salesforce.com API version to 62.0:
    • Prospect_Scorecard
2505.0 2511.0 (November '25)

Item 1: Update the calculateProspectScore Apex Class

  1. Navigate to Setup and search for Apex Classes.
  2. Click Edit for the calculateProspectScore Apex Class.
  3. Add the following at the end of the class BEFORE the last }
    TargetX_ProspectScore_Nov25_PutCodeHere.jpg
        public static void setContactActivityDate(Map<Id,Contact> conOldMap, List<Contact> conNew) {
        TriggerContextUtility.startProspectScoring();
        for (contact newCon : conNew) {
            if(conOldMap != null) {
                Contact oldCon = conOldMap.get(newCon.Id);
                if (newCon.Prospect_Contact_Score__c  != oldCon.Prospect_Contact_Score__c) {
                    newCon.Prospect_Score_Last_Updated__c = Date.Today();
                }
            }
            else {
                if(newCon.Prospect_Contact_Score__c > 0) {
                    newCon.Prospect_Score_Last_Updated__c = Date.Today();
                }
            }
        }
        TriggerContextUtility.stopProspectScoring();
    }

For example:

TargetX_ProspectScr_Nov_updt2.jpg

Item 2: Create the ContactTrigger

  1. Navigate to Setup and search for Apex  Triggers.
  2. Click the Developer Console.
  3. Select File > New > Apex Trigger.
  4. Select:
    • Name: contactTrigger
    • sObject: Contact
  5. Click Submit.
  6. Replace the existing code with the following and Save:

trigger contactTrigger on Contact (before insert, before update) {
    if(!TriggerContextUtility.checkProspectScoring()){
        calculateProspectScore.setContactActivityDate(Trigger.oldMap, Trigger.new);
    }
}
Item 4: Test the Changes in Your Sandbox 
  1. Login to your Community using an existing test user.
  2. Verify they can create an Application, submit payment, etc.
  3. Register a new test user.
  4. Verify they can create an Application, submit payment, etc.
  5. Test any additional processes that are important to your institution.
Item 5: Create an Outbound Change Set
  1. Navigate to Setup and search for Outbound Change Sets.
  2. Select New.
  3. Name the Change Set, for example, Community Upgrade February '24.
  4. Add a Description and Save your changes.
  5. In the Change Set Components section, select Add.
  6. Select a Component Type of Visualforce Page or Apex Class, depending on your changes.
  7. Click the checkboxes for the Apex Classes, Visualforce Components, or Visualforce Pages you updated in previous steps, depending on your starting version. For example:
     
    Upgrading from 2305.0

    Apex Class:

    • calculateProspectScore
    • dataGenerator
    • testCalculateProspectScore
    • testDataGenerator
    • TriggerContextUtility

    Apex Triggers: 

    • postApplicationDelete
    • postApplicationUpsert
    • postContactScheduleItemDelete
    • postContactScheduleItemUpsert
    • postEmailBroadcastMemberInsert
    • postRelationshipDelete
    • postRelationshipUpsert
    • postTaskDelete
    • postTaskUpsert
    Upgrading from 2505.0

    Apex Class:

    • calculateProspectScore

    Apex Triggers:

    • ContactTrigger
Item 6: Upload your Change Set
  1. From the Change Set, you created above, select the Org to which you want to send the Change Set.
  2. Click Upload.

Note: Uploading the Change Set will send it to the Target Org; it will NOT make changes in your production Org until you Deploy the Change Set.

Item 7: Validate the Change Set in your Production Org 
  1. Login to your production Org.
  2. Navigate to Setup and search for Inbound Change Sets.
  3. The Change Set you uploaded should be available under Change Sets Awaiting Deployment.
  4. Click the Change Set you want to deploy.
  5. Click Validate.

Note: when validating the change set, select Run Specified Tests and enter the following list:
testCalculateProspectScore, testDataGenerator

Item 8: Deploy the Change Set in your Production Org 
  1. Login to your production Org.
  2. Navigate to Setup and search for Inbound Change Sets.
  3. The Change Set you uploaded should be available under Change Sets Awaiting Deployment.
  4. Click the Change Set you want to deploy.
  5. Click Deploy. For additional information on deploying Change Sets, please see Salesforce Help & Training article "Deploying a Change Set"
Item 9: Your upgrade is complete 

No further configuration is required. You may proceed to the Telemarketing Upgrade.

 

  • Was this article helpful?