---
schema_version: "1"
id: ca3e11a28c6e40bc62dcc6017c181d2f57a1407d262004830720485fc861ff77
title: Upgrade EPC Schema
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_upgrade_epc_schema.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_upgrade_epc_schema.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2004c851cde74df15f2bd5bb67b3e1cca2f45c312ceb7a522dd70408a740dd3a
description: Run these jobs to upgrade the existing product data to populate new fields that support the Product Versioning feature. The Product Versioning feature tracks versions of products, picklists, and object types. These fields must be populated and maintained regardless of whether Versioning is enabled.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Upgrade EPC Schema

Run these jobs to upgrade the existing product data to populate new fields that support the Product Versioning feature. The Product Versioning feature tracks versions of products, picklists, and object types. These fields must be populated and maintained regardless of whether Versioning is enabled.

![Important](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_important.png)

Important

Ensure the **Populate New Fields** job is completed successfully before running the **Populate Product Hierarchy Group Key Path** job.

## Populate New Fields

Populates new fields on all existing record types for the listed 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

Before running this job, deactivate flows for custom record types to avoid interference with the update. See Deactivate a Flow in [Flow Management](https://help.salesforce.com/s/articleView?id=ind.comms_flow_management_in_industries_cpq.htm&language=en_US) and Vlocity Triggers. Active them again after the job completes.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d195209e65">
              <p style="margin-bottom:0;">Applies to</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d195209e71">
              <p style="margin-bottom:0;">Upgrades from ​Salesforce
                Industries Communications, Media, and Energy
                Spring '20
              </p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e65 ">
              <p style="margin-bottom:0;">Apex Name</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e71 ">
              <p style="margin-bottom:0;">
                <span class="apiname">VersioningUpgradeBatchJob</span>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e65 ">
              <p style="margin-bottom:0;">Where to Run this Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e71 ">
              <p style="margin-bottom:0;"><strong class="uicontrol">Upgrade</strong> Jobs in the Admin
                Console section on the CMT Administration tab.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e65 ">
              <p style="margin-bottom:0;">Risks of Running This Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e71 ">
              <p>Low Risk. These fields are populated only when
                they are null, so if you run this job again, it does not modify existing
                field values.</p>
              <p style="margin-bottom:0;">By default, this job processes all products,
                including those that are not in the Vlocity catalog. While there is no
                risk to the non-Vlocity products, processing these products adds to the
                time to deploy.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e65 ">
              <p style="margin-bottom:0;">When Not to Run This Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e71 ">
              <p style="margin-bottom:0;">Do not run this job for product&nbsp;configuration
                that is not managed directly in Enterprise Product Catalog
                (EPC).</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e65 ">
              <p style="margin-bottom:0;">When to Run This Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e71 ">
              <ul>
                <li>
                  <p>Run this job once during the upgrade process for existing
                    product data.</p>
                </li>

                <li>
                  <p>Run this job for products imported from external sources.</p>
                </li>

                <li>
                  <p>Re-run this job for products imported from external sources
                    after the initial run.</p>
                </li>

                <li>
                  <p>If you create entries in&nbsp;Vlocity Product
                    Console, run this job again before updating to&nbsp;Vlocity Product Designer.</p>
                </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e65 ">
              <p style="margin-bottom:0;">More Information</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e71 ">
              <p>This batch job is used for the following versioned objects:</p>
              <ul>
                <li>
                  <p>Product2</p>
                  <ul>
                    <li>
                      <p>Populates GlobalGroupKey__c with auto-generated GUID.</p>
                    </li>

                    <li>
                      <p>Sets the Version Label field if you provide it. The default
                        value is V1.0.</p>
                    </li>

                  </ul>

                </li>

                <li>
                  <p>Object Type</p>
                  <ul>
                    <li>
                      <p>Populates GlobalGroupKey__c with an auto-generated
                        GUID.</p>
                    </li>

                    <li>
                      <p>Sets the Version Label if you provide it. The default value
                        is V1.0.</p>
                    </li>

                  </ul>

                </li>

                <li>
                  <p>Picklist</p>
                  <ul>
                    <li>
                      <p>Populates GlobalGroupKey__c with an auto-generated
                        GUID.</p>
                    </li>

                    <li>
                      <p>Sets the Version Label field if you provide it. The default
                        value is V1.0.</p>
                    </li>

                  </ul>

                </li>

              </ul>
              <p>If you do not want to update custom record types, use
                the following steps to run the job from the Developer Console.</p>
              <ol>
                <li>
                  <p>From Setup, choose&nbsp;<strong class="uicontrol">Developer
                      Console</strong>.</p>
                </li>

                <li>
                  <p>From the Debug menu, choose&nbsp;<strong class="uicontrol">Open Execute Anonymous
                      Window</strong>.</p>
                </li>

                <li>
                  <p>Paste the following statement into the Enter Apex Code dialog
                    box, replacing namespace with the namespace for your org:</p>
                  <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>// initiate the batch process
String parameters = '{"methodName":"startVersioningUpgradeBatchJob","objectString":"Product2","versionLabel":"V1","lifecycleStatus":null,"versionUpgradeJobBatchSize":200,"objectFiltersListString":"RecordTypeId NOT IN (\'abcde\',\'fghij\',\'klmno\')"}';
vlocity_cmt.TelcoAdminConsoleController consoleController = new vlocity_cmt.TelcoAdminConsoleController();
consoleController.setParameters(parameters);
consoleController.invokeMethod();

// update the Installation Assistant step
AsyncApexJob batchJob = [SELECT Id, CreatedDate FROM AsyncApexJob WHERE ApexClass.Name = 'VersioningUpgradeBatchJob' ORDER BY CreatedDate DESC LIMIT 1];
List&lt;UpgradeStep__c&gt; steps = [SELECT Id, Name FROM UpgradeStep__c WHERE Name = 'Populate New Fields for Product2' LIMIT 1];
if(steps.isEmpty()) return;
steps[0].LastCheckStatus__c = 'Complete';
steps[0].LastExecutionDateTime__c = batchJob.CreatedDate;
steps[0].LastExecutionStatus__c = 'Complete';
update steps;</code></pre>
                </li>

                <li>
                  <p>Select the statement.</p>
                </li>

                <li>
                  <p>Click&nbsp;<strong class="uicontrol">Execute Highlighted</strong>.</p>
                </li>

                <li>
                  <p>Close Developer Console.</p>
                </li>

              </ol>
            </td>

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

## Populate Product Hierarchy Group Key Path

Populates product group keys and product hierarchy group key path fields for existing records.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d195209e347">
              <p style="margin-bottom:0;">Applies to</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d195209e353">
              <p style="margin-bottom:0;">Upgrades from ​Salesforce Industries
                Communications, Media, and Energy
                Spring '20
              </p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e347 ">
              <p style="margin-bottom:0;">Apex Name</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e353 ">
              <p style="margin-bottom:0;"><span class="apiname">PopulateVlocityAttachmentProdGrpKeyJob</span> and
                <span class="apiname">PopulateProdHierarchyGrpKeyPathJob</span>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e347 ">
              <p style="margin-bottom:0;">Where to Run this Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e353 ">
              <p style="margin-bottom:0;"><strong class="uicontrol">Upgrade</strong> Jobs in the Admin Console section on
                the CMT Administration tab.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e347 ">
              <p style="margin-bottom:0;">Risks of Running This Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e353 ">
              <p style="margin-bottom:0;">Low Risk</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e347 ">
              <p style="margin-bottom:0;">When Not to Run This Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e353 ">
              <p style="margin-bottom:0;">Do not run this job for product&nbsp;configuration managed directly in
                EPC.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e347 ">
              <p style="margin-bottom:0;">When to Run This Job</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e353 ">
              <ul>
                <li>
                  <p>Run this job once during the upgrade process for existing
                    product data.</p>
                </li>

                <li>
                  <p>Run this job for products imported from external sources.</p>
                </li>

                <li>
                  <p>Re-run this job for products imported from external sources
                    after the initial run.</p>
                </li>

                <li>
                  <p>If you create entries in&nbsp;Vlocity Product
                    Console, run this job again before updating to&nbsp;Vlocity Product Designer.</p>
                </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e347 ">
              <p style="margin-bottom:0;">More Information</p>
            </td>

            <td data-label="Upgrades from ​Salesforce Industries Communications, Media, and Energy Spring '20" class="slds-cell-wrap" style="vertical-align:top;" headers="d195209e353 ">
              <p>This job populates product global group key references on related
                objects, mainly ProductHierarchyGroupKeyPath__c, in the following
                objects:</p>
              <ul>
                <li>
                  <p>Opportunity Line Item</p>
                </li>

                <li>
                  <p>Quote Line Item</p>
                </li>

                <li>
                  <p>Order Item</p>
                </li>

                <li>
                  <p>Asset</p>
                </li>

                <li>
                  <p>Promotions Item</p>
                </li>

                <li>
                  <p>Override Definition</p>
                </li>

                <li>
                  <p>Vlocity Attachment</p>
                </li>

              </ul>
              <p style="margin-bottom:0;">ProductHierarchyPath__c stores the hierarchy path
                using Product2.Id, whereas ProductHierarchyGroupKeyPath__c stores the
                hierarchy path using Product2.GlobalGroupKey__c.</p>
            </td>

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