Prerequisites to Regenerate Cache

Before you begin the regenerate cache job, prepare and initialize the CPQ API cache.

Follow these steps to use the incremental cache regeneration feature:

  1. From Setup, in the Quick Find box, enter Custom Settings.

  2. Click Custom Settings.

  3. Go to Trigger Setup.

  4. Next to Trigger Setup, click Manage. The Trigger Setup page appears.

  5. Click Edit beside CacheAPI.CacheManagement, and turn on the trigger.

    If you do not see a trigger for CacheAPI.CacheManagement:

    1. Click New.

    2. Enter CacheAPI.CacheManagement in the Name field.

    3. Click Trigger On.

    4. Click Save.

    This ensures you can see catalog changes reflected in the cache after running the Regenerate Cached API Records job.

    In the Winter '20 version of the software, there is a known issue with this trigger turnedĀ onĀ that prevents you from importing large datapacks. To work around this issue, import datapacks with a batch size of one. Otherwise, the datapack import (deployment) fails due to excessive SOQL errors violating Salesforce governor limits. We recommend that you do not enable the Digital Commerce cache management trigger unless you are using Vlocity CME patch release Spring '20 107.1.1.

    If you do not use the incremental cache regeneration feature with Digital Commerce APIs, or if you want to import datapacks with a batch size larger than one, disable the cache management trigger.

  6. Ensure the following picklist values are added to their appropriate object fields specified here:

    • CachedAPIChange: vlocity_cmtChangeTypec

    • CachedAPIChange: vlocity_cmtCodeTypec

  7. Run the following Maintenance Jobs from Vlocity CMT Administration each time changes are made to the product catalog.:

    To register only the changes for a new version of the calculation matrix:

    1. Turn off the CacheAPI.CacheManagement trigger.

    2. Update the calculation matrix-related data, which requires creating a new version of the calculation matrix.

    3. Turn on the CacheAPI.CacheManagement trigger.

    4. Go to All Tabs -> Vlocity Calculation Matrix. Select the currently active matrix from Related list -> Vlocity Calculation Matrix Versions.

    5. Under Vlocity Calculation Matrix Version , search for Related Lis -> Vlocity Calculation Matrix Row, which should display all available matrix rows.

    6. Search for the row on which the CRUD operation was performed to ensure only the changes get registered.

    7. Click Edit and save the record.

    8. Run the Clear Managed PlatformCache and Product Hierarchy Maintenance jobs from CMT Administration.

    9. Run the Regenerate Batch job.