---
schema_version: "1"
id: 7d5da931bb2e4b4e8476eda01f2abe5ea4dac73b8c62dd48171927f9b999924a
title: Fix Product Attribute JSON
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_fix_product_attribute_json.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_fix_product_attribute_json.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 86dbe0827881974890b652de1f8db40b837a6d7b3e54493a5345e9a626f7f862
description: This job Regenerates the JSONAttribute fields for products managed through the Salesforce Classic interface, instead of Vlocity Product Console.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Fix Product Attribute JSON

This job Regenerates the JSONAttribute fields for products managed through the Salesforce Classic interface, instead of Vlocity Product Console.

For products that are managed in the legacy Salesforce Aloha page through the Attributes Setup component, you can run this batch job in case the JSONAttribute gets out-of-sync with the attributes that are assigned to the product. By default, this job only creates the JSONAttribute for the products where JSONAttribute is null.

To update all products:

1. Go to Vlocity CMT Administration &amp;gt; CPQ Configuration Setup.
2. Add a new setting:
    
    - Name: **ProductAttribJSONBatchJob Update All**
    - Value: **True**
3. Call the batch job in execute anonymous:
    
    `Id batchJobId = Database.executeBatch(new FixProductAttribJSONBatchJob());`

<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="d386960e86">
            <p style="margin-bottom:0;">Applies to</p>
          </th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d386960e92">
            <p style="margin-bottom:0;">Releases prior to Summer '17</p>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Applies to" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e86 ">
            <p style="margin-bottom:0;">Apex Name</p>
          </td>

          <td data-label="Releases prior to Summer '17" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e92 ">
            <p style="margin-bottom:0;">
              <span class="apiname">FixProductAttribJSONBatchJob</span>
            </p>
          </td>

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

          <td data-label="Releases prior to Summer '17" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e92 ">
            <p style="margin-bottom:0;">Developer Console</p>
          </td>

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

          <td data-label="Releases prior to Summer '17" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e92 ">
            <p style="margin-bottom:0;">None</p>
          </td>

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

          <td data-label="Releases prior to Summer '17" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e92 ">
            <p>Do not run this job In a live production
              environment when orders are being taken.</p>
            <p style="margin-bottom:0;">Do
              not run this job In orgs with products created using Vlocity Product
              Console.</p>
          </td>

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

          <td data-label="Releases prior to Summer '17" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e92 ">
            <ul>
              <li>
                <p>After spinning a new org.</p>
              </li>

              <li>
                <p>After importing data containing product attributes.</p>
              </li>

            </ul>
          </td>

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

          <td data-label="Releases prior to Summer '17" class="slds-cell-wrap" style="vertical-align:top;" headers="d386960e92 ">
            <p style="margin-bottom:0;">This job processes product attributes created using
              the Salesforce Classic interface and corrects the product attribute record
              IDs. It does not affect the org cache.</p>
          </td>

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