Loading
Salesforce now sends email only from verified domains. Read More
Vlocity Contract Lifecycle Management
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Setting a Contract For Auto Renewal

          Setting a Contract For Auto Renewal

          You can save time by setting a contract for auto renewal using a scheduled apex job. The RenewContractBatchJobScheduler job can be initiated towards the end of a contract's current term to automatically extend the term. An email notification is sent to the customer based on the renewal notification setting.

          For the RenewContractBatchJobScheduler apex job to run successfully, you need to ensure that the required contract fields have values set, and that two custom settings are configured.

          1. Set a Contract for Auto Renewal.

            Ensure that the following contract values are filled:

            • Contract Start Date

            • Contract Term

            • Renewal Notification Object

              Based on this dropdown selection, an Opportunity, Quote, or Order is created after the RenewContractBatchJobScheduler scheduled job is completed.

            • Renewal Notification Period

              The number of days or months in advance the customer is notified of their new contract's effective date.

            • Renewal Notification Term

              The renewal notification is set in days or months.

              The default query is 'Select Id,AutoRenewObjectCreation_c,SendRenewalNotificationc from Contract where IsAutoRenewc = false AND RenewalStartDate_c < '
              today' AND RenewalStartDate__c > '+lastRunDate;
              
              Important
              Important

              Don't select the Auto Renew check box.

            • Price Book

              The contract must have an associated Price Book Entry Id with the opportunity/quote/order.

          2. Configure Custom Settings for Auto Renewal.

            Configure RenewContractBatchJobProcess and RenewContractBatchJobQuery custom settings to make the auto renewal generation work.

            1. From Setup, enter Custom Settings in the Quick Find box, then click Custom Settings.
            2. Next to Custom Class Implementation, click Manage, then click New.
            3. Enter the following values:
              • Name: RenewContractBatchJobProcess

              • Class Name: DefaultContractRenewalProcess

            4. Click Save & New.
            5. Enter the following values:
              • Name: RenewContractBatchJobQuery

              • Class Name: DefaultContractRenewalQuery

            6. Click Save.
          3. Set Up a Scheduled Apex Job for Auto Renewal.

            Create a job that references the RenewContractBatchJobScheduler apex class and runs on a schedule that aligns with your renewal dates.

            Note
            Note

            The RenewContractBatchJobScheduler apex job can only be scheduled once every hour.

            1. From Setup, enter Apex Classes in the Quick Find box, then click Schedule Apex.
            2. Enter the following values:
              • Job Name: Adescriptivejobname

              • Apex Class: RenewContractBatchJobScheduler

              • Schedule Apex Execution: Enter a job schedule based on your renewal date requirement.

            3. Click Save. The job gets queued in the Apex Jobs list. When the scheduled Apex job executes, the renewal for the selected contract is created. After the job is completed, the customer receives an email confirming the completion of auto renewal of their contract and a corresponding opportunity, quote, or order is created.
           
          Loading
          Salesforce Help | Article