**Source URL:** https://regulatoryone.veevavault.help/en/lr/31006/index.md

# Configuring the Quality-Safety Connection

With the [Quality-Safety Connection](/en/lr/31231/), Vault supports the automatic transfer of Product Quality Complaints (PQCs) from your Safety Vault to your Quality Vault for the _Complaint Intake_ process. After an _Inbox Item_ in your Safety Vault has been identified as a potential PQC and promoted to a _Case_, Safety Vault users can select the _Transfer PQCs to Quality_ action from the _Case's_ **All Action** menu to transfer the identified PQC, along with all relevant patient and product information, via a Vault to Vault connection and initiate the _Complaint Intake_ process in their Quality Vault. Vault also supports creating _Complaints_ in your Quality Vault and sending the data to your Safety Vault to generate _Inbox Items_ for investigation. If your Quality organization receives a PQC containing a potential adverse event, Quality users can send information about the _Complaint_ using the _Transfer to Safety_ action. Vault then creates an _Inbox Item_ in your Safety Vault for each _Complaint_.

<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>: The Quality to Safety Connection is only available for organizations with both a Safety Vault and a Quality Vault. Product Quality Complaint (PQC) functionality is only available for organizations with the Vault QMS application.</p>
    </div>
  </div>
</div>



## Quality-Safety Connection Components

The components below support the Quality-Safety Connection.

### Connections

The following _Connection_ is available from **Admin > Connections**:

* _Quality-Safety Connection_ is available in your Quality Vault
* _Quality-Safety Connection_ is available in your Safety Vault

In your Safety Vault, you can update the _Connections_ [object layout](/en/lr/26387/) to include the following fields in the [_Connection Stats_ section](/en/lr/53358/#stats):

* _Quality: Inbox Items Received_
* _Quality: PQCs Sent_
* _Quality: PQC Outcomes Received_

You must [establish the Vault to Vault connection](/en/lr/53358/#Establish_Vault_to_Vault) before you can use it.

### Integration & Integration Points

The _Integration_ and _Integration Point_ objects enable Vault to manage message queues and define what data the connection maps from one Vault to another. These records are read-only and used by Vault to manage the connection and track any connection errors.

#### Quality Integrations & Integration Points

The _Quality-Safety Connection_ includes the following default _Integration_ with _Integration Points_ in your Quality Vault:

|Integration Name|Integration Point Name|Sent From|Sent To|
|--- |--- |--- |--- |
|_Quality-Safety: PQC Integration_|_Quality-Safety: PQC Outbound Integration Point_ |Quality|Safety|
|_Quality-Safety: PQC Integration_|_Quality-Safety: PQC Inbound Integration Point_ |Safety|Quality|
|_Quality-Safety: Inbox Item Integration_|_Quality-Safety: Inbox Item Outbound Integration Point_ |Quality|Safety|
|_Quality-Safety: Inbox Item Integration_|_Quality-Safety: Inbox Item Inbound Integration Point_ |Safety|Quality|

#### Safety Integrations & Integration Points

The _Quality-Safety Connection_ includes the following default _Integration_ with _Integration Points_ in your Safety Vault:

|Integration Name|Integration Point Name|Sent From|Sent To|
|--- |--- |--- |--- |
|_Quality-Safety: PQC Integration_|_Quality-Safety: PQC Outbound Integration Point_|Safety|Quality|
|_Quality-Safety: PQC Integration_|_Quality-Safety: PQC Inbound Integration Point_ |Quality|Safety|
|_Quality-Safety: Inbox Item Integration_|_Quality-Safety: Inbox Outbound Integration Point_ |Safety|Quality|
|_Quality-Safety: Inbox Item Integration_|_Quality-Safety: Inbox Inbound Integration Point_ |Quality|Safety|

### Integration Rules

To support the Quality-Safety Connection, it may be necessary to transform data from the source Vault's data model to fit within the target Vault's data model. Veeva provides standard  _Integration Rules_ for various connections. Navigate to **Admin > Connections > Integration Rules** for a current inventory in your Quality and Safety Vaults.

#### Quality Integration Rules

The standard _Integration Rules_ for the _Quality-Safety: PQC Integration_ in your Quality Vault include:

|Integration Rule|Integration Point|Primary Query Object|
|--- |--- |--- |
|_Complaint Intake Case Assessment Integration Rule_ |_Quality-Safety: PQC Inbound Integration Point_ | _Case Assessment_ |
|_Complaint Intake Case Contact Integration Rule_ |_Quality-Safety: PQC Inbound Integration Point_ | _Case Contact_ |
| _Reported Product Integration Rule_ |_Quality-Safety: PQC Inbound Integration Point_ |_Case Product_ |
| _Safety Case Assessment Integration Rule_ |_Quality-Safety: PQC Inbound Integration Point_ |_Case Assessment_ |
| _Safety Case Complaint Integration Rule_ | _Quality-Safety: PQC Inbound Integration Point_  | _Inbox Item_  | 
| _Safety QE Complaint Integration Rule_ | _Quality-Safety: PQC Inbound Integration Point_ | _Inbox Item_  |

The standard _Integration Rules_ for the _Quality-Safety: Inbox Item Integration_ in your Quality Vault include:

|Integration Rule|Integration Point|Primary Query Object|
|--- |--- |--- |
|_Inbox Item Integration Rule_ |_Quality-Safety: Inbox Item Inbound Integration Point_ |_Inbox Item_ |
|_Inbox Item Integration Rule_ |_Quality-Safety: Inbox Item Outbound Integration Point_ |_Inbox Item_ |

#### Safety Integration Rules

The standard _Integration Rules_ for the _Quality-Safety: PQC Integration_ in your Safety Vault include:

|Integration Rule|Integration Point|Primary Query Object|
|--- |--- |--- |
|_Case Assessment Integration Rule_ |_Quality-Safety: PQC Inbound Integration Point_ | _Complaint Intake_ |

The standard _Integration Rules_ for the _Quality-Safety: Inbox Item Integration_ in your Safety Vault include:

|Integration Rule|Integration Point|Primary Query Object|
|--- |--- |--- |
|_Net New Inbox Item – Complaint Integration Rule_|_Quality-Safety: Inbox Inbound Integration Point_ |_Complaint_|
|_Net New Inbox Item – Complaint Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Complaint_ |
|_Net New Inbox Item – Quality Event Complaint Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ | _Quality Event_|
|_Net New Inbox Item – Quality Event Complaint Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Quality Event_ |
|_Follow-Up Inbox Item – Complaint Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Complaint_|
|_Follow-Up Inbox Item – Complaint Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Complaint_ |
|_Follow-Up Inbox Item – Quality Event Complaint Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Quality Event_ |
|_Follow-Up Inbox Item – Quality Event Complaint Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Quality Event_ |
|_Complaint AE Code Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Complaint-Adverse Event Code_ |
|_Complaint AE Code Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Complaint-Adverse Event Code_|
|_Complaint Batch Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Complaint Batch_ |
|_Complaint Batch Integration Rule_|_Quality-Safety: Inbox Outbound Integration Point_ |_Complaint Batch_ |
|_Quality Event AE Code Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Adverse Event Problem Code_ |
|_Quality Event AE Code Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Adverse Event Problem Code_ |
|_Quality Event Batch Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Quality Event Batches_ |
|_Quality Event Batch Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Quality Event Batches_ |
|_Product Return Integration Rule_ |_Quality-Safety: Inbox Inbound Integration Point_ |_Product Return_ |
|_Product Return Integration Rule_ |_Quality-Safety: Inbox Outbound Integration Point_ |_Product Return_ |

### Integration Field Rules

Connections use [Integration Field Rules](/en/lr/62154/#about-field-rules) to ensure specific object fields are populated and maintained. When we deliver a standard Integration, we also include standard _Integration Field Rules_; however, you may need to create additional custom field rules. Navigate to **Admin > Connections > Integration Rules > _Integration Rule_ > Field Rules** for a current rule inventory for each connection in your Quality and Safety Vaults.

#### Quality Integration Field Rules

The _Quality-Safety: PQC Integration_ in your Quality Vault includes the following standard _Field Rules_:

* _Complaint Intake Case Assessment Integration Rule_ 
* _Complaint Intake Case Contact Integration Rule_ 
* _Combination Product Product Family_ 
* _Product Family_ 
* _Product Variant_ 
* _Reported Product Integration Rule_ 
* _Safety Case Assessment Integration Rule_ 

The _Quality-Safety: Inbox Item Integration_ in your Quality Vault includes the following standard _Field Rules_:

* _Inbox Item – Quality Event Complaint_ 
* _Inbox Item – Complaint_ 

##### Complaint Intake Case Assessment Integration Rule

This _Field Rule_ populates target _Complaint Intake_ fields from source _Case Assessment_ fields. The table below shows how Vault copies values in the source query object to fields in the target object.

|	Target Object	 |	Target Object Field	 |	Target Object Field Default	 |	Query Object	 |	Query Field	 |
| ---	|--- | --- | --- | --- |
| `complaint_intake__v` | `awareness_date__v`	| N/A | `case_assessment__v` | `case_version__vr.receiptdate_date__v` | 
| `complaint_intake__v` | `complaint_intake_source__v` | `safety__v` | N/A | 	N/A |
| `complaint_intake__v` | `date_of_event__v`	| N/A | `case_assessment__v` | `case_adverse_event__vr.onset_normalized__v` |
| `complaint_intake__v` | `description__v`	| N/A | `case_assessment__v` | `case_adverse_event_meddra__vr.name__v` |
| `complaint_intake__v` | `initial_report_date__v`	| N/A | `case_assessment__v` | `case_version__vr.receiptdate_date__v` |
| `complaint_intake__v` | `link__sys`	| N/A | `case_assessment__v` | `global_id__sys	` |
| `complaint_intake__v` | `object_type__v` | `complaint_intake__v` | N/A | 	N/A |
| `complaint_intake__v` | `safety_case_assessment_id__v`	| N/A | `case_assessment__v` | `id`	|
| `complaint_intake__v` | `safety_case_id__v` | N/A | `case_assessment__v` | `case_version__v` |
| `complaint_intake__v` | `safety_title__c` | N/A | `case_version__vr	` | `text_safety_title__c	` |
| `complaint_intake__v` | `title__v` | N/A | `case_assessment__v` | `case_adverse_event_meddra__vr.name__v` |

<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>: Vault automatically populates the <em>Safety Case Number</em> field on the <em>Complaint Intake</em> without a Field Rule.</p>
    </div>
  </div>
</div>



##### Complaint Intake Case Contact Integration Rule

This _Field Rule_ populates target _Complaint Intake_ fields from the applicable source _Safety Case > Contact_. The table below shows how Vault copies values in the source query object to fields in the target object.

|Target Object|Target Object Field|Target Object Field Default|Query Object|Query Field|
|--- |--- |--- |--- |--- |
|`complaint_intake__v` | `initial_reporter_details__v` | N/A | `case_contact__v` | `title_value__v` |
|`complaint_intake__v` | `reporter_type__v` | N/A | `case_contact__v` | `qualification__vr.api_name__v` |

<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>: The connection does not support custom <em>Field Rules</em> due to <em>Case Contact</em> logic.</p>
    </div>
  </div>
</div>



##### Reported Product Integration Rule

This _Field Rule_ maps the _Product_ field on a _Safety Case Assessment_ to the _Product_ field on a QMS _Reported Product_. The table below shows how Vault copies values in the source query object to fields in the target object:

|Target Object|Target Object Field|Target Object Field Default|Query Object|Query Field|
|--- |--- |--- |--- |--- |
|`reported_product__v` | `link__sys` | N/A | `case_product__v` | `global_id__sys` |
|`reported_product__v` | `product__v` | N/A | `case_product__v` | `product__vr.link__sys` |
|`reported_product__v` | `product_reported__v` | N/A | `case_product__v` | `product__vr.name__v` |
|`reported_product__v` | `product_component_details__v` | N/A | `case_assessments_case_product__vr` | `product_component_details__v` |
|`reported_product__v` | `combination_product__v` | N/A | `case_product__v` | `combination_product__v` |
|`reported_product__v` | `combination_product_reported__v` |N/A|`case_product__v` | `combination_product_reported__v` |

Vault populates the following QMS fields without a _Field Rule_: 

* Vault populates the _Reported Batch Number(s)_ field from the _Product_ field on the _Case Assessment_.
* Vault populates the _Safety Case Number_ field on the _Complaint Intake_ from the _Case_ related to the associated _Case Assessment_.

##### Safety Case Assessment Integration Rule

This _Field Rule_ collects and stores Safety _Case Assessment_ data for _Complaint Intakes_ generated from multiple _Case Assessments_. The table below shows how Vault copies values in the source query object to fields in the target object:

|Target Object|Target Object Field|Target Object Field Default|Query Object|Query Field|
|--- |--- |--- |--- |--- |
|`safety_case_assessment__v` | `case_assessment_id__v` | N/A | `case_assessment__v` | `case_assessment_id__v` |
|`safety_case_assessment__v` | `case_assessment_name__v` | N/A | `case_assessment__v` | `case_assessment_name_id__v` |
|`safety_case_assessment__v` | `case_id__v` | N/A | `case_assessment__v` | `case_id__v` |
|`safety_case_assessment__v` | `case_name__v` |N/A| `case_assessment__v` | `case_name__v` |
|`safety_case_assessment__v` | `cessation_date__v` | N/A | `case_assessment__v` | `cessation_date__v` |
|`safety_case_assessment__v` | `duration__v` | N/A | `case_assessment__v` | `duration__v` |
|`safety_case_assessment__v` | `expected__v` | N/A | `case_assessment__v` | `expected__v` |
|`safety_case_assessment__v` | `link__sys` | N/A | `case_assessment__v` | `link__v` |
|`safety_case_assessment__v` | `onset_date__v` |N/A| `case_assessment__v` | `onset_date__v` |
|`safety_case_assessment__v` | `severity__v` | N/A | `case_assessment__v` | `severity__v` |

#### Safety Integration Field Rules

The _Quality-Safety: PQC Integration_ in your Safety Vault includes the following standard _Field Rule_:

* _Case Assessment Integration Rule_ 

The _Quality-Safety: Inbox Item Integration_ in your Safety Vault includes the following standard _Field Rules_:

* _Net New Inbox Item – Quality Event Complaint_
* _Net New Inbox Item – Complaint_
* _Follow-Up Inbox Item – Quality Event Complaint_
* _Follow-Up Inbox Item – Complaint_

##### Case Assessment Integration Rule

This _Field Rule_ maps the source _Case Assessment_ in your Safety Vault to the related _Complaint Intake_ in your Quality Vault. The table below shows how values in the source query object are copied to fields in the target object.

|Target Object|Target Object Field|Target Object Field Default|Query Object|Query Field|
|--- |--- |--- |--- |--- |
|`case_assessment__v` | `global_id__sys` | N/A |`complaint_intake__v` | `link__sys` |
|`case_assessment__v` | `complaint_intake_id__v` | N/A |`complaint_intake__v` | `global_id__sys` |

### Queues

The _Quality-Safety: PQC Integration_ includes the following standard queues: one inbound in your Safety Vault, and one inbound and one outbound in your Quality Vault. You can access and manage these queues from **Admin > Connections > Spark Queues**.

* _Quality to Safety PQC Inbound Queue_ in your Safety Vault
* _Quality to Safety PQC Outbound Queue_ in your Quality Vault
* _Quality to Safety PQC Outbound Queue_ in your Quality Vault

The _Quality-Safety: Inbox Item Integration_ includes the following standard queues: one inbound in your Safety Vault, and one inbound and one outbound in your Quality Vault. You can access and manage these queues from **Admin > Connections > Spark Queues**.

* _Quality to Safety Inbox Item Inbound Queue_ in your Safety Vault
* _Quality to Safety Inbox Item Inbound Queue_ in your Quality Vault
* _Quality to Safety Inbox Item Outbound Queue_ in your Quality Vault

### Jobs

The Quality-Safety Connection deploys standard jobs into the Quality and Safety Vaults. You can see when a job executed and download the associated log file from **Admin > Operations > Job Status > History**. Log files can be helpful when debugging a connection error. Connections also generate exception messages when an error is encountered. Connection exception messages are available from **Admin > Connections > User Exception Messages**.

### User Exception Objects

Vault includes the _User Exception Message_ object and its child object, _User Exception Item_, to help you track and resolve any errors that occur with your Quality-Safety Connection. If either end of your integration can't process an incoming message, Vault creates a _User Exception Message_ to capture the failure. Vault also creates individual _User Exception Items_ for each item that failed on the related _Integration Point_ in the outbound Vault. _User Exception Items_ in Quality Vaults include the originating Safety _Case ID_ for traceability.

You can view and manage these messages from **Admin > Connections > User Exception Messages**. If you want specific users or groups to receive notifications when Vault creates _User Exception Messages_, you must create a custom lifecycle for the _User Exception Message_ object and configure a notification entry action. A _User Exception Message_ means that you need to update your configuration. After you update the configuration, Vault attempts to resolve any errors the next time the connection runs. You can also run the **Rerun Integration** action to resolve errors.

### Updating Fields

In order for the connection to run successfully, you should update any required object fields that are not defined in the connection to either have a default value or to make values not required. Alternatively, you can create custom _Field Rules_ for any custom required fields on the _Complaint Intake_ or _Reported Product_ objects that map to appropriate object fields in your Safety Vault.

### Quality Vaults

Update the following fields in your Quality Vault:

1. Activate the following fields on the following QMS objects for the _Quality-Safety: PQC Integration_:
   1. _Safety Case Number_, _Safety Case Assessment ID_, _Complaint Intake Source_, _Contains Combination Product?_, and _Type of Complaint Intake_ on the _Complaint Intake_ object
   2. _Product Reported_, _Product Component Details_, _Combination Product_, and _Combination Product Reported_ on the _Reported Product_ object
   3. _Safety Case Number_, _Contains Combination Product?_, _Product Component Details_, _Combination Product_, and _Combination Product Reported_ on the _Complaint_ object
   4. _Safety Case Number_ on the _Quality Event_ object, and add to the _Complaint_ object type
   5. _Contains Combination Product?_, _Product Component Details_, _Combination Product_, and _Combination Product Reported_ on the _Quality Event_ object
2. Activate the following fields on the following QMS objects for the _Quality-Safety: Inbox Item Integration_:
   1. _Safety Inbox Item ID_, _Reported Adverse Event Name_, _Product Reported_, and _Last Sent to Safety Date_ on the _Complaint_ and _Quality Event_ objects
   2. _Potential Adverse Event?_ and _Reported Adverse Event Name_ on the _Complaint Intake_ object

### Safety Vaults

Update the following fields in your Safety Vault:

1. Activate the following fields on the _Case Assessment_ object:
   1. _Potential PQC_
   2. _Complaint Intake ID_
2. Activate the _Type_ field on the _Case Adverse Event_ object.
3. Activate the _Potential PQC_ field on the _Case_ object and the _Case_ and _Imported Case_ object types on the _Case Product_ object.
4. Activate the _Quality Summary & Conclusion_ and _Complaint ID_ fields on the _Inbox Item_ and _Case_ objects.

## Configuring the Quality-Safety Connection

Complete the steps below to configure your Quality and Safety Vaults for this connection.

### Configuring Your Quality Vault

Complete the following steps to configure your Quality Vault:

1. Ensure that the connection, Integrations, _Integration Points_ are active for your Quality Vault.
2. Ensure that the _Integration Rules_ and their respective _Field Rules_ are active.
3. Add the _Related Complaint Intake_ object as a _Related Object_ section to the _Complaint Intake_ object layout.
4. Ensure that the appropriate users have permissions to access the _Related Complaint Intake_ object.
5. Ensure that no VQL Constraint is on the _Product_ field in the _Reported Product_ object.
6. Configure the _Transfer to Safety_ action as an entry action, user action, or system action, according to your business needs, on the _Complaint_ and _Quality Event_ objects.
7. Optional: Ensure that the _Safety Case Assessment_ object is active, and add this object to the _Complaint Intake_ object layout.
8. To allow users to track the status of _Inbox Items_ generated in the Safety Vault by the connection:
    * Activate the _Safety Case Complaint Integration Rule_ and _Safety QE Complaint Integration Rule_, and their respective _Field Rules_.
    * Add the following fields to the _Complaint_ object layout:
        * _Safety Inbox Item Status_
        * _Safety Case State_
        * _Safety Case ID_
   
<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>: If the <em>Product</em> field includes a VQL constraint and users create <em>Reported Products</em>, removing the constraint means that users select from an unfiltered list of <em>Products</em>. To maintain a filtered list of <em>Products</em> after deploying the connection, consider adding a configuration that conditionally enforces the constraint. Consult your Veeva Services team for guidance, if needed.</p>
    </div>
  </div>
</div>



### Configuring Your Safety Vault

Complete the following steps to configure your Safety Vault:

1. Ensure that the connection, Integrations, and _Integration Points_ are active for your Safety Vault.
2. Ensure that the _Integration Rule_ and its respective _Field Rule_ are active.
3. Configure the _Send to Quality_ action as an entry or user action on the _Case_ object.
4. To track quality complaints transferred to your Quality Vault by the connection, add a related object section for the _Quality Complaint Information_ object to the _Case_ layout.

## Connection Limitations

See [Standard Connection Limitations](/en/lr/53358/#limitations) for the limitations.

## Related Permissions

You need a System Admin security profile as well as the following permissions to set up a connection:

|Type|Permission Label|Controls|
|--- |--- |--- |
|Security Profile|Admin: Application: Manage Connections|Ability to set up the Quality to Safety Connection|
|Security Profile|Object: User Exception Item, User Exception Message: Read|Ability to see _User Exception Items_ and _User Exception Messages_ when connection failures occur|
