You must execute Constraint Rule maintenance batch job whenever changes you change constraint rules and when you upgrade to a new version of CPQ. When you run the Constraint Rule Maintenance job, CPQ inserts new rule records without affecting existing records and the quotes with existing records.

This includes:

  • Adding or removing a constraint rule.
  • Adding or removing a constraint rule condition and actions.
  • Modifying anything in a constraint rule condition and actions.

To run Constraint Rule Maintenance you must have read/write access to ProductConstraintView__c object. You must also have ProductConstraintView Visualforce page access and Apex class access enabled.

If the Constraint Rule Maintenance tab is not already available, you can add it as follows:

  1. Go to Setup > App Setup > Create > Apps and click Edit next to Apttus Batch Updates.
  2. Select Constraint Rule Maintenance from Available Tabs, click Add to add it to Selected Tabs.
  3. Click Save. The tab should now be available.

If the tab is still not available, as a workaround you can manually append apex/Apttus_Config2__ProductConstraint View to your URL in the address bar.

To run a constraint rule maintenance job

  1. Go to the Constraint Rule Maintenance tab.
  2. Click Update All.

The batch job is executed. The administration task is complete and an updated history for all the batch jobs is displayed. The key item to observe is Status. When Completed is displayed it means the job is executed successfully, even if the percentage indicator remains at 0%. 

You can see the status or notes about the Constraint Rule Maintenance job on the Maintenance Console page. Go to All Tabs > CPQ Console Maintenance Console.

When you have a large number of constraint rules to be processed in the maintenance, CPQ may hit governor limits. You can define a threshold to execute the Constraint Rule Maintenance Job in batches and avoid hitting governor limits. The default percentage value of the threshold, when left blank, is 100%. You can reduce the percentage based on the amount of processing your org performs. The amount of processing is based on the following factor. You can reduce the threshold when you have a number of records or a combination of them:

  • Total number of SOQL queries issued
  • Total number of records retrieved by SOQL queries
  • Total heap size
  • Maximum CPU time on the Salesforce servers

To set a threshold for Constraint Rule Maintenance Job

Follow the steps below:

  1. Go to Setup > Develop > Custom Settings > Config System Properties > Manage.
  2. Find System Properties and click Edit.
  3. Enter a number in the CR Maintenance Governor Limits Threshold field. The number denotes the percentage of the governor limit.
  4. Click Save.