Skip to main content

Return to TX Community

Liaison

Telemarketing Upgrade

Step 1: Record Your Current Package Version

​Prior to upgrading, you will need to find and record your currently installed version. This will be referenced in Step 3 below. 

  1. Navigate to Setup > Installed Packages
  2. Search for TargetX Telemarketing
  3. Note the version number

Note: if your current version is 2605.0, you are on the most recent package and should proceed to TargetX Integration.

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

Telemarketing is an unmanaged package, so you must manually add the code changes for the Telemarketing 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). 

2102.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:
    • TelemarketingController
    • TelemarketingControllerTest
    • TelemarketingSettingsController
    • TelemarketingSettingsControllerTest

Item 2: 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:
    • Telemarketing
    • TelemarketingSettings
2505.0 2605.0 (May '26)

Item 1: Update the TelemarketingControllerTest class

  1. Navigate to Setup and search for Apex classes.
  2. Locate and click Edit for the TelemarketingControllerTest apex class.
  3. Replace the contents with the following or download the file here:
    /**
     * This class contains unit tests for validating the behavior of Apex classes
     * and triggers.
     *
     * Unit tests are class methods that verify whether a particular piece
     * of code is working properly. Unit test methods take no arguments,
     * commit no data to the database, and are flagged with the testMethod
     * keyword in the method definition.
     *
     * All test methods in an organization are executed whenever Apex code is deployed
     * to a production organization to confirm correctness, ensure code
     * coverage, and prevent regressions. All Apex classes are
     * required to have at least 75% code coverage in order to be deployed
     * to a production organization. In addition, all triggers must have some code coverage.
     * 
     * The @isTest class annotation indicates this class only contains test
     * methods. Classes defined with the @isTest annotation do not count against
     * the organization size limit for all Apex scripts.
     *
     * See the Apex Language Reference for more information about Testing and Code Coverage.
     */
    @isTest
    private class TelemarketingControllerTest {
    
         static testMethod void testNormalFlow(){
            //campaign
            Campaign testCampaign       = new Campaign();
            testCampaign.name           = 'TestCampaign';
            testCampaign.CallerTimeout__c = 'Null';
            testCampaign.Callbacks__c = '2 Callbacks';
            insert testCampaign;
    
            List<Lead> lstLead = new List<Lead>();
            //Lead
            Lead testLead1          = new Lead();
            testLead1.FirstName     = 'LeadFirstName1';
            testLead1.LastName      = 'LeadLastName1';
            testLead1.Company       = 'Test1';
            testLead1.Street        = '123 abc st';
            lstLead.add(testLead1);
            
            //Lead
            Lead testLead2          = new Lead();
            testLead2.FirstName     = 'LeadFirstName2';
            testLead2.LastName      = 'LeadLastName2';
            testLead2.Company       = 'Test2';
            lstLead.add(testLead2);
            insert lstLead;
    
            List<Contact> lstCon = new List<Contact>();
            //Contact
            Contact testContact         = new Contact();
            testContact.FirstName       = 'ContactFirstName';
            testContact.LastName        ='ContactLastName';
            testContact.Email           = 'Adress2@Adress.com';
            testContact.Title           = 'ContactTitile';
            testContact.MailingStreet   ='456 garrik st';
            lstCon.add(testContact);
    
            //Contact2
            Contact testContact2        = new Contact();
            testContact2.FirstName      = 'ContactFirstName2';
            testContact2.Email          = 'Adress@Adress.com';
            testContact2.LastName       ='ContactLastName2';
            testContact2.Title          = 'ContactTitile2';
            lstCon.add(testContact2);
            insert lstCon;
    
            List<CampaignMember> lstCamp = new List<CampaignMember>();
            //make campaign members
            CampaignMember testCM       = new CampaignMember();
            testCM.leadID               = lstLead[0].Id;
            testCM.campaignID           = testCampaign.Id;
            testCM.Status               ='None';
            lstCamp.add(testCM);
            
            //make campaign members
            CampaignMember testCM1      = new CampaignMember();
            testCM1.leadID              = lstLead[1].Id;
            testCM1.campaignID          = testCampaign.Id;
            testCM1.Status              = 'None';
            testCM1.Failed_Calls__c     = 0;
            lstCamp.add(testCM1);
            
            CampaignMember testCM2      = new CampaignMember();
            testCM2.ContactId           = lstCon[0].Id;
            testCM2.CampaignId          = testCampaign.Id;
            testCM2.Status              = 'None';
            testCM2.Failed_Calls__c     = 0;
            lstCamp.add(testCM2);
            
            CampaignMember testCM3      = new CampaignMember();
            testCM3.ContactId           = lstCon[1].Id;
            testCM3.CampaignId          = testCampaign.Id;
            testCM3.Status              = 'None';
            testCM3.Failed_Calls__c     = 0;
            lstCamp.add(testCM3);
            insert lstCamp;
    
            //begin tests
            TelemarketingController tc1 = new TelemarketingController();
            tc1.ownerId = UserInfo.getUserId();
            List<CampaignMember> testCMList = [ SELECT id, ContactId, CampaignId, Status, Failed_Calls__c FROM CampaignMember WHERE id IN: lstCamp ];
            tc1.updateAll();
            List<CampaignMember> testCMList2 = [ SELECT id, ContactId, CampaignId, Status, Failed_Calls__c FROM CampaignMember WHERE id IN: lstCamp ];
            
            // No changes
            System.assertEquals( testCMList, testCMList2 );
            
            List<Selectoption>sO=tc1.getstatusItems();
            
            tc1.camp = testCampaign.Id;
            String s = tc1.getCampaignName();
            
            //Campaign name
            System.assertEquals( s, 'All Leads' );
            
            tc1.campaignRefresh();
            s = tc1.getCampaignName();
            sO=tc1.getstatusItems();
            
            List<Selectoption> options= new List<Selectoption>{ new Selectoption( 'None', 'None'), new Selectoption( 'No Answer', 'No Answer' ), new Selectoption( 'Left Message', 'Left Message'), new Selectoption('Had Conversation', 'Had Conversation')};
           
            // Options
            System.assertEquals( sO[ 0 ].getLabel(), options[ 0 ].getLabel());
            System.assertEquals( sO[ 1 ].getLabel(), options[ 1 ].getLabel());
            System.assertEquals( sO[ 2 ].getLabel(), options[ 2 ].getLabel());
            System.assertEquals( sO[ 3 ].getLabel(), options[ 3 ].getLabel());
            System.assertEquals( sO[ 0 ].getValue(), options[ 0 ].getValue());
            System.assertEquals( sO[ 1 ].getValue(), options[ 1 ].getValue());
            System.assertEquals( sO[ 2 ].getValue(), options[ 2 ].getValue());
            System.assertEquals( sO[ 3 ].getValue(), options[ 3 ].getValue());
            //Campaign name
            System.assertEquals( s, 'TestCampaign' );
            Test.startTest();
            tc1.getLeadPlusTasks()[0].statusUpdate = 'No Answer';
            System.debug('******' + tc1.getLeadPlusTasks().size());
            tc1.updateAll();
            System.debug('******' + tc1.getLeadPlusTasks().size());
            List<CampaignMember> testCMList3 = [ SELECT id, ContactId, CampaignId, Status, Failed_Calls__c FROM CampaignMember WHERE id IN: lstCamp ];
            tc1.getLeadPlusTasks()[0].statusUpdate = 'Never Answered';
            System.debug('******' + tc1.getLeadPlusTasks().size());
            tc1.updateAll();
            System.debug('******' + tc1.getLeadPlusTasks().size());
           Test.stopTest();
            
           
            
            
            // Changes
            System.assert( testCMList != testCMList3, 'The collections not be equals.' );
            
            sO=tc1.getcampaignItems();
            
            List<Selectoption> auxCampList = new List<Selectoption>(); 
            auxCampList.add(new SelectOption( '1','SELECT' ));
            
            for(Campaign c : [Select Name, Id From Campaign Where Type = 'Telemarketing' AND isactive = true order by Name limit 1])
                auxCampList.add( new SelectOption( c.ID, c.Name ));
                
            Integer k = 0;
            for( SelectOption op: auxCampList )
                System.assertEquals( sO[ k++ ].getValue(), op.getValue(), 'Error list of campaigns must be equals');
        
            tc1.getLeadPlusTasks()[ 0 ].getmemStatusValue();
            tc1.getLeadPlusTasks()[ 0 ].sett( tc1.getLeadPlusTasks()[ 0 ].gett());
            tc1.getLeadPlusTasks()[ 0 ].getmemStatus();
        
        
        
            System.assert( tc1.gethasCampaignID());
            
            tc1.status='None';
            tc1.campaignRefresh();
            System.assert( tc1.status == 'None');
            
            tc1.status='None';
            tc1.campaignRefresh();
            System.assert( tc1.status == 'None');
            
            sO=tc1.getcampaignItems();
            sO=tc1.getstatusItems();
            
            s = tc1.getCampaignName();
            boolean b = tc1.getName();
            
            tc1.setowners(new List<SelectOption>());
            System.assert( tc1.getowners().size() == 0);
            
          }
      
    }
    Item 3: Test the Changes in Your Sandbox  
    1. Log in to your sandbox using an existing Telemarketing test user.
    2. Verify they can create a Telemarketing campaign, update a Call Status, etc.
    3. Verify they can access a student from the same test campaign.
    4. Test any additional processes that are important to your institution.
    Item 4: 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, Telemarketing Upgrade May '26.
    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 1912.0

      Apex Class:

      • TelemarketingController
      Upgrading from 2102.0

      Apex Class:

      • TelemarketingController
      • TelemarketingControllerTest
      • TelemarketingSettingsController
      • TelemarketingSettingsControllerTest

      Visualforce pages:

      • Telemarketing
      • TelemarketingSettings
      Upgrading from 2505.0

      Apex Class:

      • TelemarketingControllerTest
    Item 5: 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 6: 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:
    TelemarketingControllerTest, TelemarketingSettingsControllerTest

    Item 7: 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 8: Your upgrade is complete  
    1. See the article: Creating a Telemarketing tab if you wish to create a tab for Telemarketing.
    2. If you wish to create a Lightning App, see the article: Creating the Telemarketing app in Lightning.
    3. No further configuration is required. Proceed to TargetX Integration.

     

    • Was this article helpful?