# Configuring the Packaging Composition Viewer (Compliance Management)

[Compliance Management](/en/lr/71434/) provides the [Packaging Composition Viewer](/en/lr/713528/) on _Packaging_ records where users can review a package's composition in relation to its formulation data. This allows you to determine the weight and percentage of recycled content in the packaging to help identify potential risks.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: This viewer is not available for Vaults provisioned after 25R2. Instead, we recommend using the <a href="/en/lr/74427/">Formulation Composition Viewer</a> to view the hierarchical structure of <em>Packaging Component</em> types of <a href="/en/lr/74427/#define"><em>Formulations</em></a>. As of 25R2, you cannot create new <em>Packaging</em>, <em>Packaging Composition</em>, or <em>Product Packaging</em> records in your Vault. We recommend moving your packaging details to <em>Formulations</em> and associating those with the applicable <em>Products</em> so that users can view them in the Formulation Composition Viewer. Contact your Veeva Representative for more details.</p>
    </div>
  </div>
</div>



The viewer displays all relevant descendent _Packaging_ records based on the child _Packaging Compositions_ of the parent _Packaging_. From within the viewer on the parent record, users can view and open active _Packaging_ and any related _Formulation_ records. They can also view, create, and edit _Packaging Qualitative Assessments_ for _Packaging_ and _Qualitative Assessments_ for _Formulations_.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: In Vaults created prior to 22R3, the <em>Qualitative Assessment</em> object may be labeled <em>Compliance Assessment</em>.</p>
    </div>
  </div>
</div>



## Configuration Overview {#overview}

Configuring your Vault to use the Packaging Composition Viewer involves the following steps:

1. [Map _Regulated Categories_][8]
2. [Configure assessment statuses][9]
3. [Configure the _Packaging Qualitative Assessment_ object layout][11]
4. [Configure the _Packaging_ object layout][10]
5. [Configure the _Packaging Composition_ object][1]
6. [Define referenced items][3]
7. [Configure user permissions][4]

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Depending on your Vault’s creation date and which features are currently enabled and configured, some of the steps described in this article may be unavailable or already complete in your Vault.</p>
    </div>
  </div>
</div>



## Mapping Regulated Categories {#map}

The viewer displays data from _Packaging Qualitative Assessments_ and _Qualitative Assessments_ with _Regulated Category (Internal Name)_ values. These values represent internal names your organization uses for regulated categories, such as "TSCA" for the "Toxic Substance Control Act" Regulated Category. The viewer uses these internal names as column headers on the right side of the grid.

You must create internal names and map them to _Regulated Categories_ so that the viewer displays relevant _Packaging Qualitative Assessments_ and _Qualitative Assessments_. When users select a _Regulated Category_ on a _Packaging Qualitative Assessment_ or _Packaging Qualitative Assessment_ record, Vault populates the _Regulated Category (Internal Name)_ field based on your mappings. Vault does not allow users to create assessments for unmapped _Regulated Categories_.

To map _Regulated Categories_ to internal names:

1. Add appropriate values to the _Regulated Category (Internal Name)_ [picklist](/en/lr/1269/) for all _Regulated Categories_.
2. _Add the Regulated Category (Internal Name)_ field to the _Regulated Category_ [object layout](/en/lr/26387/).
3. Populate the _Regulated Category (Internal Name)_ field on all _Regulated Categories_ in your Vault.

You cannot edit any picklist values that are currently referenced in any _Packaging Qualitative Assessment_ or _Qualitative Assessment_ records.

## Configuring Assessment Statuses {#status}

The viewer displays the status value of active _Packaging Qualitative Assessments_ and _Qualitative Assessments_ related to the _Packaging_ and _Formulations_. When users create assessments, they must select a status value from the _Compliance Assessment Status_ picklist.

### Adding Values to Picklists {#picklists}

You must [add values](/en/lr/1269/) to the following picklists:

* **Compliance Assessment Status**: This picklist contains the status values users can assign to _Packaging Qualitative Assessments_ and _Qualitative Assessments_. We recommend adding the values "Y", "N", "E", "R", and "N/A".
* **Assessment Status Color**: This picklist contains the colors that users can select to specify how _Compliance Assessment Status_ picklist values appear in the Formulation Composition Viewer. See [Configuring the Assessment Status Color Picklist][7] for more details.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: These picklists also display statuses in the <a href="/en/lr/74427/#picklists">Formulation Composition Viewer</a>.</p>
    </div>
  </div>
</div>



#### Configuring the Assessment Status Color Picklist {#color-picklist}

You can configure the _Assessment Status Color_ picklist to allow users to select specific colors to display _Compliance Assessment Status_ values in the viewer. This allows users to draw special attention to a specific record's compliance status for a certain category and alert all users of that status. We recommend configuring only a small number of colors to maximize the visual impact of colors displayed in the viewer and help direct user attention to specific statuses.

1. Navigate to **Business Admin > Picklists > Assessment Status Color**.
2. Click **Edit**.
3. In the _Picklist values_ section, type a new color value such as "Red" and press **Enter** on your keyboard to add the new _Picklist Value Label_. The new value also populates the _Picklist Value Name_ field for the new color.
4. In the **Picklist Value Name** field for the new color value, replace the populated color value with a six (6) digit hex color code such as "ff0000" for the color red. If you enter an invalid hex color code and a user selects that picklist value on a _Qualitative Assessment_ record, Vault displays that _Compliance Assessment Status_ value in Vault's default hyperlink color.
5. Optional: Add additional colors to the picklist.
6. Click **Save**.

Vault displays the _Compliance Assessment Status_ in the selected color in the viewer for all users. If the _Assessment Status Color_ field is blank, Vault displays that status in Vault's default hyperlink color for all users.

## Configuring the Packaging Qualitative Assessment Object Layout {#pqa-object}

You must configure the _Packaging Qualitative Assessment_ [object layout](/en/lr/26387/) in the following ways:

* Add the _Compliance Assessment Status_ and _Assessment Status Color_ fields to the layout so that users can select a status and color that determines how Vault displays the _Compliance Assessment Status_ value in the viewer.
* Add the _Regulated Category (Internal Name)_ field to the layout. Vault populates this field based on [regulated category mapping][8].

## Configuring the Packaging Object Layout {#packaging-object}

You must update the _Packaging_ [object layout](/en/lr/26387/) so that users can see the viewer and add the appropriate child and parent records.

### Configuring the Packaging Composition Viewer Section {#pcv-section}

You must update the _Packaging_ object layout so users can see the viewer. To insert the viewer section:

1. Navigate to **Admin > Configuration > Objects > Packaging > Layouts > [Layout]**.
2. Insert the **Packaging Composition Viewer** control section with the slider (<img class="inline" src="https://platform.veevavault.help/assets/images/CPC-Icon-Slider.png" alt="Slider Icon" style="" />) icon.
3. Optional: Change the **Section Label**.
4. Optional: Change the **Section Name**.
5. Optional: Enter **Section Help** to display to users in this section.
6. Optional: Select the **Expand the section by default** checkbox so that the section is always open when users open _Packaging_ object records.
7. Optional: Select the **Expand formulation records by default** checkbox so that all _Formulation_ levels are always open when users open the viewer.
8. Optional: Select the **Shade hierarchical levels** checkbox to help users distinguish hierarchical levels in the viewer.
9. Optional: Select the **Highlight row on hover** checkbox to help users distinguish the relevant column values when they hover over a specific row.
10. For **Grid Columns (Packaging Compositions)**, select [supported][6] standard (`__v`) **Packaging Composition** fields to display on the left side of the grid. You must add the **Packaging ID** field as the first column. The order you add the fields is the same order they display to users.
11. For **Freeze Grid Columns (Packaging Compositions)**, select how many **Packaging Composition** columns to freeze on the left side of the grid while users scroll horizontally.
12. Optional: For **Grid Columns (Regulated Categories)**, select up to 15 _Regulated Categories_ to display as headers on the right side of the grid. The viewer will display [_Compliance Assessment Status_ picklist values][7] for the applicable active _Packaging Qualitative Assessment_ records in these columns. Drag and drop the fields to determine the order the columns display to users. If you don't add any fields, the right side of the grid will not display and users cannot view _Compliance Assessment Statuses_ in the viewer.
13. Optional: Enter [**VQL Criteria**](/en/lr/1037069/) to constrain the **Packaging** records shown in the viewer based on fields on the **Packaging Composition** object. For example, you can use **VQL Criteria** to exclude tertiary types of packaging components. This field does not support `IN` or `LIKE` operators or relationships (`__vr`) or `__cr`).
14. Click **Done**.
15. Click **Save** when you finish updating the layout.

Vault supports a single _Packaging Composition Viewer_ section on any _Packaging_ record details page.

#### Supported Fields {#supported-fields}

Vault supports the following object field types in the _Grid Columns (Packaging Compositions)_ field:

* Name
* Number
* Object
* Object Type
* Picklist
* Text
* Yes/No
* Lookup (so long as the type is a supported type listed above)
* Formula (so long as the return type is a supported type listed above)

### Inserting Related Object Sections {#packaging-sections}

You must insert two (2) related object sections for the _Packaging Composition_ object to the _Packaging_ [object layout](/en/lr/26387/). We recommend labeling the sections "Parent Compositions" and "Child Compositions" so that users can easily add and create relevant related records. When users add child _Packaging Compositions_ to a parent _Packaging_ record, Vault includes the appropriate child _Packaging_ records in the viewer on the parent _Packaging_.

## Configuring the Packaging Composition Object {#pc-object}

You must configure the _Packaging Composition_ object to support the viewer.

### Configuring Packaging Composition Fields {#pc-fields}

Depending on the business needs of your organization, you can configure the _Child_ field on the _Packaging Composition_ object as a [required field](/en/lr/15057/#required). To allow users to create _Formulation_ types of _Packaging Composition_ records that will display in the viewer, you must configure the _Child_ field to be optional.

### Configuring the Packaging Composition Object Layout {#pc-layout}

You must add all fields you included in the _Grid Columns (Packaging Compositions)_ field in the [_Packaging Composition Viewer_ section][2] to the _Packaging Composition_ [object layout](/en/lr/26387/). The viewer displays these object fields as columns on the left side of the grid.

We recommend adding the _Packaging Name_ field to the layout. When users add child _Packaging Compositions_ to a parent _Packaging_, Vault populates this field with the _Title_ of the _Packaging_ users select for the _Child_ field.

We also recommend adding the following fields to the layout:

* _Child_
* _Composition Type_
* _Formulation Child_
* _Function Target_
* _Unit_

## Defining Referenced Items {#referenced-items}

For users to utilize the Packaging Composition Viewer, you must define the appropriate _Formulation_, _Formulation Composition_, _Packaging_, and [_Packaging Composition_][5] records by creating new records or importing them into your Vault from an [external connection](/en/lr/53358/) to a third-party application, such as a PLM system.

### Packaging Compositions {#pcs}

You must create the relevant _Packaging Compositions_ to specify the composition type and link each parent _Packaging_ to the appropriate child _Packaging_ or _Formulation_. To create a _Packaging Composition_:

1. Navigate to **Business Admin > Objects > Packaging Composition**.
2. Click **Create**.
3. Optional: Enter the **External ID**.
4. Select the **Parent Packaging** record.
5. Select the **Child Packaging** record. Leave this field blank if you select **Formulation** as the **Composition Type**.
6. Optional: Select the **Composition Type**.
7. If you selected **Formulation** as the **Composition Type**, select a **Formulation** Child. If you selected any other value, leave this field blank.
8. Optional: Select the **Function**.
9. Optional: Enter the **Target**.
10. Optional: Select the **Unit**.
11. Click **Save**.

You can use [Vault Loader](/en/lr/31536/) to create and update fields on multiple _Packaging Composition_ records.

## Configuring User Permissions {#user-permissions}

You must ensure users have the appropriate read and create [permissions](/en/lr/22824/) to access the appropriate objects and object fields in addition to the following permissions:

* For the _Packaging Composition_ object: _Read_ permission, including _Read_ permission on the _Parent_ and _Child_ fields.
  * If you configure [Atomic Security](/en/lr/47850/) on the _Child_ or _Formulation Child_ fields, users must have _Read_ permission on those fields to see child records in the viewer.
* For the _Packaging_ object: _Read_ permission, including _Read_ permission on the _Packaging ID_ field.
* If you add _VQL Criteria_ to the [_Packaging Composition Viewer_ control section][2], users must have _Read_ permission on all referenced _Packaging Composition_ fields.
* To view _Formulation_ types of _Packaging Compositions_ in the viewer, users must have _Read_ permission on the following objects:
  * _Formulation_, including _Read_ permission on the _Name_ field.
  * _Formulation Composition_, including _Read_ permission on the _Name_ field.
* To view the right side of the viewer, users must have _Read_ permission on the following objects:
  * _Packaging Qualitative Assessment_, including _Read_ permission on the _Assessment Status_, _Packaging_, and _Regulated Category_ fields.
  * _Regulated Category_, including _Read_ permission on the _Regulated Category (Internal Name)_ field.
  * _Qualitative Assessment_, including _Read_ permission on the _Compliance Assessment Status_, _Formulation_, and _Regulated Category_ fields.
* If your Vault utilizes [Atomic Security on fields](/en/lr/47850/#Atomic_Security_Fields), users must also have _Edit_ permission on the appropriate lifecycle states for the applicable fields.
* If your Vault utilizes [DAC](/en/lr/33946/) for the _Packaging Qualitative Assessment_ or _Qualitative Assessment_ objects, users can only view and populate fields for which they have permission to _Read_ and _Edit_.
* Users can only see data for grid columns for which they have _Read_ permission.

[1]: #pc-object
[2]: #pcv-section
[3]: #referenced-items
[4]: #user-permissions
[5]: #pcs
[6]: #supported-fields
[7]: #color-picklist
[8]: #map
[9]: #status
[10]: #packaging-object
[11]: #pqa-object