---
schema_version: "1"
id: f76f5525976faeab72d64cd312d42f7a016e6d4e42948035dba5b12d261c78be
title: Required Indexes for Industries CPQ Implementations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_required_indexes_for_vlocity_cpq_implementations.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_required_indexes_for_vlocity_cpq_implementations.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1e9a363026d33612f2568c7ea738c2591531c995df3a0f26f45f373bd0edf238
description: If you are implementing Industries CPQ, add the following required indexes to support the related CPQ objects.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Required Indexes for Industries CPQ Implementations

If you are implementing Industries CPQ, add the following required indexes to support the related CPQ objects.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note

Salesforce does not allow installation of custom indexes in an org during install. To have a custom index added to an org, open a case with Salesforce technical support and provide the exact SOQL queries with bind variables needed to create and test the index.

If you are implementing Industries CPQ, you must add the following required indexes to support the related CPQ objects.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Required Indexes for Industries CPQ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d220733e52">
              <p style="margin-bottom:0;">CPQ Objects</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d220733e58">
              <p style="margin-bottom:0;">Required Indexes</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="CPQ Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e52 ">
              <p style="margin-bottom:0;">Opportunity-Based CPQ</p>
            </td>

            <td data-label="Required Indexes" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e58 ">
              <ul>
                <li>
                  <p>OpportunityLineItem.vlocity_cmt__ParentItemId__c</p>
                </li>

                <li>
                  <p>OpportunityLineItem.vlocity_cmt__RootItemId__c</p>
                </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="CPQ Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e52 ">
              <p style="margin-bottom:0;">Order-Based CPQ</p>
            </td>

            <td data-label="Required Indexes" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e58 ">
              <ul>
                <li>
                  <p>OrderItem.vlocity_cmt__ParentItemId__c</p>
                </li>

                <li>
                  <p>OrderItem.vlocity_cmt__RootItemId__c</p>
                </li>

                <li>
                  <p>OrderItem.vlocity_cmt__AssetReferenceId__c</p>
                </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="CPQ Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e52 ">
              <p style="margin-bottom:0;">Quote-Based CPQ</p>
            </td>

            <td data-label="Required Indexes" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e58 ">
              <ul>
                <li>
                  <p>QuoteLineItem.vlocity_cmt__ParentItemId__c</p>
                </li>

                <li>
                  <p>QuoteLineItem.vlocity_cmt__RootItemId__c</p>
                </li>

                <li>
                  <p>QuoteLineItem.vlocity_cmt__AssetReferenceId__c</p>
                </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="CPQ Objects" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e52 ">
              <p style="margin-bottom:0;">Contract and Asset-Based Operations</p>
            </td>

            <td data-label="Required Indexes" class="slds-cell-wrap" style="vertical-align:top;" headers="d220733e58 ">
              <ul>
                <li>
                  <p>Asset.vlocity_cmt__ParentItemId__c</p>
                </li>

                <li>
                  <p>Asset.vlocity_cmt__RootItemId__c</p>
                </li>

                <li>
                  <p>Asset.vlocity_cmt__AssetReferenceId__c</p>
                </li>

                <li>
                  <p>Asset.vlocity_cmt__PricebookEntryId__c</p>
                </li>

                <li>
                  <p>vlocity_cmt__ContractLineItem__c.vlocity_cmt__AssetReferenceId__c</p>
                </li>

                <li>
                  <p>vlocity_cmt__ContractLineItem__c.vlocity_cmt__PricebookEntryId__c</p>
                </li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Sample SOQL Queries Requiring Custom Indexes

The following sample SOQL queries require custom indexes. You may need to update the ID values in the WHERE clauses so that they refer to an actual record in your Salesforce org.

## Optional Indexes for CPQ Implementation

For better performance, we recommend indexing the vlocity\_cmt\_\_SubClassId\_\_c field for the object vlocity\_cmt\_\_ObjectFieldAttribute\_\_c.

## Asset SOQL Queries

Asset.vlocity\_cmt\_\_ParentItemId\_\_c

```
SELECT Id,ParentId,vlocity_cmt__AssetReferenceId__c,vlocity_cmt__ParentItemId__c,vlocity_cmt__PricebookEntryId__c,vlocity_cmt__RootItemId__c FROM Asset WHERE vlocity_cmt__ParentItemId__c = '02i3i00000099TNAAY'
```

Asset.vlocity\_cmt\_\_RootItemId\_\_c

```
SELECT Id,ParentId,vlocity_cmt__AssetReferenceId__c,vlocity_cmt__RootItemId__c FROM Asset WHERE vlocity_cmt__RootItemId__c = '02i3i00000099TaAAI'
```

Asset.vlocity\_cmt\_\_AssetReferenceId\_\_c

```
SELECT Id,ParentId,vlocity_cmt__AssetReferenceId__c FROM Asset WHERE vlocity_cmt__AssetReferenceId__c = 'f49e9fa7-2f95-814f-084a-bc017de032ff'
```

Asset.vlocity\_cmt\_\_PricebookEntryId\_\_c

```
SELECT Id,ParentId,vlocity_cmt__AssetReferenceId__c,vlocity_cmt__PricebookEntryId__c,vlocity_cmt__RootItemId__c FROM Asset WHERE vlocity_cmt__PricebookEntryId__c = '01u3i000000PavqAAC'
```

## Order Item SOQL Queries

OrderItem.vlocity\_cmt\_\_ParentItemId\_\_c

```
SELECT Id,OrderId,vlocity_cmt__ParentItemId__c FROM OrderItem WHERE vlocity_cmt__ParentItemId__c = '8023i0000000EBkAAM'
```

OrderItem.vlocity\_cmt\_\_RootItemId\_\_c

```
SELECT Id,OrderId,vlocity_cmt__ParentItemId__c,vlocity_cmt__RootItemId__c FROM OrderItem WHERE vlocity_cmt__RootItemId__c = '8023i0000000EBkAAM'
```

OrderItem.vlocity\_cmt\_\_AssetReferenceId\_\_c

```
SELECT Id,OrderId,vlocity_cmt__AssetReferenceId__c,vlocity_cmt__ParentItemId__c,vlocity_cmt__RootItemId__c FROM OrderItem WHERE vlocity_cmt__AssetReferenceId__c = 'f8c87dd8-42bd-acce-c064-0ff505aa0883'
```