Running Maintenance Jobs
As an administrator, you can run the following maintenance jobs.
Job |
Definition |
---|---|
Custom Setting Maintenance |
This job generates static resources for custom settings. |
Category Maintenance |
This job creates a de-normalized view for Categories with related products. |
Criteria Maintenance
|
These jobs optimize the query time by creating indexes for the fields that are referred to in the criteria or expressions. |
Bundle Maintenance |
This job synchronizes all the bundles and options. |
You must execute an appropriate maintenance job after applying structural changes to the definition of categories, products, or criteria to ensure that the Sales rep does not see stale definition in CPQ application. A stale definition may cause errors in the console or application.
Prerequisites
- Go to Access to Send Email section, ensure that the Access Level is set to All Email. . In the
- Define Update View Product Batch Size and Update View Category Batch Size in Config System Properties.
To run a Custom Settings Maintenance job
CPQ uses custom settings to process computation on various CPQ pages. The Custom Settings Maintenance job generates static resources of the custom settings to reduce the time to fetch the values. Because the values are static, you must run the Custom Settings Maintenance Job every time you make any modification in the custom settings. Otherwise, the changes may not reflect in CPQ and the computations may get processed with stale values, resulting in incorrect configuration and pricing.
-
Go to All Tabs (
) > Custom Settings Maintenance.
- Select the flow you want to run the maintenance for or select All to run maintenance for all the flows.
- Click Update.
To run a Category Maintenance job
This executes an asynchronous batch job that maintains the hierarchy.
After you click Update View, the administration task is complete and an updated history for all the batch jobs is displayed.
To use manual incremental update for category views
After making changes to the existing category definition you can run the Category Maintenance batch job only for changes rather than running for the entire definition. For example, if your category has 10 products and you added 5 more, you can run the Category Maintenance batch job only for the 5 additional products. To execute the Category Maintenance batch job for the changes, you must define an Admin Property that is used by CPQ to isolate the changes in the category.
Perform the following steps to add an admin entry:
-
Click the All tabs icon (
) and click Admin.
- Click New to create a new Admin entry.
- In the Name field, enter APTS_UpdateViewProductClasses. Leave the fields Value and Code blank.
- Click Save.
Now, if you change the category definition, the Code field in the Admin property is populated with the Product Classification records of the newly added products. These records are created after you associate products to the category. When you execute the Category Maintenance batch job, the maintenance batch job is only executed for the changes and not the entire definition. In case, you want to execute a maintenance batch job for the entire definition, clear the Code field in the Admin Entry and then execute the Category Maintenance batch Job.
You must run the Category Maintenance batch job after every CPQ version upgrade.
To specify the batch size for the Category Maintenance batch job
You can use the APTS_UpdateViewApiBatchSize admin entry to specify the batch size for the Category Maintenance batch job when the job is executed using the exposed global Apex method CPQWebService.updateHierarchyViews(). The default batch size for the Category Maintenance batch job set in this global method is 2000, which is used when you have not defined the APTS_UpdateViewApiBatchSize admin entry. The behavior of the Category Maintenance batch job is same when the job is executed from the UI.
You must specify a batch size value only when you notice limit exceptions in batch jobs because of complex categories with a lot of hierarchy levels. In such cases, you must decrease the batch size to execute the batch jobs successfully.
The maximum batch size for the Category Maintenance batch job set in the CPQWebService.updateHierarchyViews() global method is 2000. You can specify any number between 1 to 2000 in the APTS_UpdateViewApiBatchSize admin entry depending on the number of categories in the org. If you specify a value greater than 2000, CPQ will use 2000 as default. The actual batch size value to be used depends on the complexity of the categories and hence is specific to your requirements. You must arrive at the exact number through the trial and error method.
Perform the following steps to add an admin entry:
-
Click the All tabs icon (
) and click Admin.
- Click New to create an admin entry.
- In the Name field, enter APTS_UpdateViewApiBatchSize.
- In the Value field, enter a value between 1 and 2000.
- Leave the Code field blank.
- Click Save.
To run a Criteria Maintenance job
To run a Bundle Maintenance Job
The asynchronous task that maintains the product bundle structure is executed.
To run maintenance of view record for individual bundles
- Navigate to the CPQ Console tab and click Manage Products.
- Select an existing bundle to which you want to add or remove a bundle or an option.
- Click Product Console.
- From the Catalog section, click Manage Bundles/Options.
- After making changes to the product association, click Update View.
The view record of the selected bundle is updated.
To run Attribute Maintenance Job
In the Classic UI, you must run the Attribute Maintenance job after you update attributes. You must execute this job after you associate attribute groups to a category or define a Product Attribute Rule (PAR) or Attribute Value Matrix (AVM). It is not required to execute the job if you use CPQ Admin UI; CPQ executes the batch job automatically.
Follow the steps below in Classic UI: