Loading
Salesforce now sends email only from verified domains. Read More
Get Started with Communications, Media, and Energy & Utilities (CME)...
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
          Set Up Cache for Calculation Matrices for Performance

          Set Up Cache for Calculation Matrices for Performance

          To optimize performance for large calculation matrices or pricing plans that have many attribute-based pricing steps, you can cache your calculation matrices in the platform cache.

          Caching is not needed for all calculation matrices. Small to medium-sized matrices will likely be quite fast. Salesforce recommends implementing your attribute-based pricing solution without a cache at first and creating the cache if additional speed is required.

          The PricingPlanHelper Apex class caches calculation matrix data using the key AttrMatrixMap + {Matrix Id}, for example, AttrMatrixMapa1K46000002FATaE, in a custom org cache partition.

          Note
          Note

          Calculation matrix data is not cached in the CPQPartition that is part of the CME managed package.

          After you have implemented the caching feature, you must clear the cache every time you make a change to your calculation matrices to ensure your changes are reflected at runtime.

          To cache your calculation matrices, create a custom partition in the platform cache, and then create a custom setting that stores the name of the custom partition as follows. The PricingPlanHelper.cls then detects your custom setting and stores your calculation matrices in the cache.

          1. Create a custom partition:
            1. Go to Setup, and then type platform cache in the Quick Find search dialog box.
            2. Click New Platform Cache Partition.
            3. In the Detail section, enter the following information.

              Field

              Value

              Description

              Label

              AttributePricingPartition

              The label to be displayed for this partition.

              Name

              AttributePricingPartition

              The name of this partition. This value must be entered in the CPQ Configuration custom setting.

              Default Partition

              Do not select.

               

              Description

              Stores calculation matrices for attribute based pricing.

               
            4. In the Capacity section, under Org Cache Allocation specify the amount of cache for the PricingPlanHelper Apex class to use. Do not enter an allocation amount for the session cache since it is not used by the PricingPlanHelper.cls
          2. Create the AttrMatrixInfoCachePartition custom setting.
            1. Go to the Vlocity CMT Administration tab.
            2. In the Custom Settings area, click CPQ Configuration Setup.
            3. Scroll to the bottom of the page, and click Add.
            4. In the first box, enter AttrMatrixInfoCachePartition.
            5. In the second box, enter AttributePricingPartition (or the name of the partition you created above).
            6. Click Save.
           
          Loading
          Salesforce Help | Article