# Configuring the Quality-RIM Connection

Organizations using both a RIM Registrations Vault and a Quality QMS Vault can utilize the standard [Quality-RIM Connection](/en/lr/57086/) for Enhanced Change Control, Document Exchange, and Product Transfer.

## About the Quality-RIM Connection

Within Vault, an organization may use the QMS application in a Quality Vault to ensure that a change to a product or system is introduced in a controlled and coordinated manner. The same organization may use the Registrations application in a RIM Vault to determine the impacted markets for that change and manage the filing updates and approvals for relevant health authorities. In such a case, separate systems can result in duplicate data entry and a lack of synchronization, which prolongs the process and results in changes occurring without a proper understanding of regulatory impact.

The Quality-RIM Connection enables organizations using both a QMS Vault and a Registrations Vault to:

* Share and update data about change controls that have regulatory impact.
* Maintain RIM product data in Quality.
* Exchange _Steady State_ document and field updates via CrossLinks.

## Connection Components

The components below support the standard Quality-RIM Connection.

### Connections

The following records are available from **Admin > Connections**:

  * _QMS RIM Connection_ (`qms_rim_connection__v`) becomes available in your RIM Vault
  * _QMS to RIM_ (`qms_to_rim__v`) becomes available in your Quality Vault

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

<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>: RIM Vaults also include the <em>RIM Local Connection</em>, which Vault uses to run source document publishing actions as the <em>Application Owner</em>. It must always remain active and does not require any Admin interaction.</p>
    </div>
  </div>
</div>



### Integration & Integration Points {#integrations-and-points}

The _Integration_ and _Integration Point_ objects enable Vault to manage [message processing queues](/en/lr/53147/) and define what data the connection maps from one Vault to another. These records are read-only and are used by Vault to manage the connection and track any connection errors.

* The Variation Management (also known as Change Management) integration is only available for configuration in Quality Vaults for QMS and RIM Vaults for Registrations. Admins can see these components in all RIM Vaults, but the integration only works in Registrations. As of 23R1, this integration can create _Impacted Countries_ as long as all required fields are provided in the integration rule. As of the 25R1 release, the Quality-RIM Connection's Variation Management (Change Management) feature is superseded by the Enhanced Change Control feature. Veeva customers should consider using this connection's Enhanced Change Control feature instead.
* The Product Transfer integration can create _Product_-related records in Quality. This connection also checks for records with matching _External IDs_ between RIM and Quality _Product_ records and links the records when Vault finds a match, rather than creating a new _Product_ record.
* The Document Exchange integration allows _Steady_ state CrossLinked documents and fields to be created and maintained across Quality and RIM.
* The Enhanced Change Control integration is only available for configuration in Quality Vaults that have QMS enabled and RIM Vaults that have Registration enabled. This connection automates the transfer of _Regulatory Change Items_ and _Regulatory Activity Items_.

In most cases, these integrations can run independently or together. The Product Transfer integration must be enabled in order to use Enhanced Change Control.

#### Quality Integrations & Integration Points

The _QMS to RIM_ (`qms_to_rim__v`) connection record includes the following default _Integration_ records with standard _Integration Point_ records in your Quality Vault:

| Integration Name | Integration Point Name | Sent From | Sent To |
|---|---|---|---|
| QMS-RIM: Change Management | New Change Event | Quality | RIM |
| QMS-RIM: Change Management | Regulatory Impact Assessment Complete | RIM | Quality |
| QMS-RIM: Change Management | Change Control Ready for Implementation | Quality | RIM |
| QMS-RIM: Change Management | Country Filing Information Updated | RIM | Quality |
| QMS-RIM: Change Management | Change Control Closed | Quality | RIM |
| QMS-RIM: Change Management | Change Control Cancelled | Quality | RIM |
| RIM-Quality: Product Integration | Complex Product Component | RIM | Quality |
| RIM-Quality: Product Integration | Material Active Substance | RIM | Quality |
| RIM-Quality: Product Integration | Material Active Substance Alias | RIM | Quality |
| RIM-Quality: Product Integration | Material Container | RIM | Quality |
| RIM-Quality: Product Integration | Material Inactive Ingredient | RIM | Quality |
| RIM-Quality: Product Integration | Material Inactive Ingredient Alias | RIM | Quality |
| RIM-Quality: Product Integration | Material Packaging | RIM | Quality |
| RIM-Quality: Product Integration | Material Product (PKG PRD) | RIM | Quality |
| RIM-Quality: Product Integration | Material Product (PKG PV) | RIM | Quality |
| RIM-Quality: Product Integration | Product | RIM | Quality |
| RIM-Quality: Product Integration | Product Family | RIM | Quality |
| RIM-Quality: Product Integration | Product Family Product | RIM | Quality |
| RIM-Quality: Product Integration | Product Variant | RIM | Quality |
| RIM-Quality: Product Integration | Related Material Packaged Container | RIM | Quality |
| Quality/RIM Document Integration | RIM Documents Outbound | Quality | RIM |
| Quality/RIM Document Integration | RIM Documents Inbound | RIM | Quality |
| Quality-RIM: Enhanced Change Control | Quality-RIM: Regulatory Change Item to Change Item (Outbound) | Quality | RIM |
| Quality-RIM: Enhanced Change Control | Quality-RIM: Change Item to Regulatory Change Item (Inbound) | RIM | Quality |
| Quality-RIM: Enhanced Change Control | Quality-RIM: Activity Change Item to Regulatory Activity Item (Inbound) | RIM | Quality |

#### RIM Integrations & Integration Points {#rim-integrations-and-points}

The _QMS RIM_ (`qms_rim_connection__v`) connection record includes the following default _Integration_ records with standard _Integration Point_ records in your RIM Vault:

|Integration Name|Integration Point Name|Sent From|Sent To|
|--- |--- |--- |--- |
|QMS RIM Integration|New Change Event|Quality|RIM|
|QMS RIM Integration|Regulatory Impact Assessment Complete|RIM|Quality|
|QMS RIM Integration|Regulatory Event Created|RIM|Quality|
|QMS RIM Integration|Change Control Ready for Implementation|Quality|RIM|
|QMS RIM Integration|Country Filing Information Updated|RIM|Quality|
|QMS RIM Integration|Change Control Closed|Quality|RIM|
|QMS RIM Integration|Change Control Cancelled|Quality|RIM|
|RIM-Quality: Product Integration|Product Family|RIM|Quality|
|RIM-Quality: Product Integration|Product|RIM|Quality|
|RIM-Quality: Product Integration|Product Family Product|RIM|Quality|
|RIM-Quality: Product Integration|Product Variant|RIM|Quality|
|RIM-Quality: Product Integration|Complex Product Component|RIM|Quality|
|RIM/Quality Document Integration|Quality Documents Outbound|RIM|Quality|
|RIM/Quality Document Integration|Quality Documents Inbound|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Activity Change Item to Regulatory Activity Item (Outbound)|RIM|Quality|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Change Item to Regulatory Change Item (Outbound)|RIM|Quality|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Change Item to Event and Event Change Item (Inbound)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Change Item to Event and Event Change Item by Product Family (Inbound)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Product) (Inbound)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Product Legacy) (Inbound)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Packaging)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Packaging Legacy)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Container)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Container Legacy)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Active Substance)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Active Substance Legacy)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Inactive Ingredient)|Quality|RIM|
|Quality-RIM: Enhanced Change Control|Quality-RIM: Regulatory Change Item to Change Item (Inactive Ingredient Legacy)|Quality|RIM|

### Integration Rules {#integration-rules}

To support the Quality-RIM Connection, it may be necessary to transform data from the source Vault's data model to fit within the target Vault's data model. You can use Integration Rules to incorporate configurable rules for mapping object fields between two Vaults. Learn more about [creating and managing Integration Rules](/en/lr/62154/).

We also deliver standard Integration Rules for various connections. Navigate to **Admin > Connections > Integration Rules** for a current inventory in your Quality and RIM Vaults.

### Integration Field Rules {#integration-field-rules}

Connections use [Integration Field Rules](/en/lr/62154/#about-field-rules) to ensure that specific object and document 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 RIM Vaults.

#### Integration Field Rules for Document Exchange
The Integration Rules provisioned for the document exchange integration include standard Integration Field Rules. As part of integration configuration, you will create additional rules to handle any additional Quality or RIM document fields the integration should populate and maintain.

To do this, add field rules to the `quality_rim_inbound_documents__v` (Quality) and `quality_rim_inbound_documents_ir__v` (RIM) Integration Rules with the below high-level requirements. Object reference fields require you to first create a [Reference Lookup][11].

* **Target Object**: Document
* **Target Doc Field**: The document field to be populated and maintained in this Vault.
* **Label** and **Name**: The auto-populated target document field UI label and API name. We recommend maintaining the auto-populated values.
* Text fields:
    * **Query Object**: Document
    * **Query Field**: The outbound document field name to which the **Target Doc Field** (inbound document field) is mapped, for example `approved_date__c`.
* Picklist fields:
    * Create a [Reference Lookup][11] for the picklist field.
    * **Reference Lookup Type**: Generic
    * **Reference Lookup**: The reference lookup you created for this picklist.
    * **Query Object**: Document
    * **Query Field**: The source picklist field.
* Object fields (except _Product Family_, _Product_, and _Product Variant_):
    * Create a [Reference Lookup][11] for the object
    * **Reference Lookup Type**: Object
    * **Reference Lookup**: The reference lookup you created for this object field.
    * **Query Object**: Document
    * **Query Field**: The source object field.

#### Product-Related Field Rules for Document Exchange

* _Product Variant_ mapping:
    * **Query Object**: `document_product_detail__vr`
    * **Query Field**: *Global ID* (`global_id__sys`)
* For _Product Family_ mapping:
    * **Query Object**: `document_product__vr`
    * **Query Field**: _Global ID_ (`global_id__sys`)

#### Integration Field Rules for Enhanced Change Control

The Integration Rules provisioned for the Enhance Change Control integration include standard Integration Field Rules. As part of integration configuration, you will create additional rules to handle any additional Quality or RIM fields the integration should populate and maintain.

#### Product & Material-Related Field Rules for Enhanced Change Control

- _Product_ mapping: 
  - **Query Object**: Regulatory Change Item (`regulatory_change_item__v`)
  - **Query Field**: `product__vr.link__sys`
- _Product Variant_ mapping:
  - **Query Object**: Regulatory Change Item (`regulatory_change_item__v`)
  - **Query Field**: `product_variant__vr.link__sys`
- For _Product Family_ mapping:
  - **Query Object**: Regulatory Change Item (`regulatory_change_item__v`)
  - **Query Field**: `product_family__vr.link__sys`
- For _Material_ mapping:
    * __Query Object__: Regulatory Change Item (`regulatory_change_item__v`)
    * __Query Field__: `material__vr.link__sys`

### Standard Document Type Groups

Vault uses Document Type Groups to determine which [document types](/en/lr/618/) to send from one Vault to another.

Quality and RIM Vaults each include a _Quality to RIM Connection_ Document Type Group in **Admin > Business Admin > Objects > Document Type Groups**. When enabling the document exchange integration, you will associate this group to all Quality and RIM document types, subtypes, and classifications included in the exchange.

### Queues

This connection includes standard [message processing queues](/en/lr/53147/). You can access and manage these queues from **Admin > Connections > Spark Queues**.

### 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 connection. If either end of your integration can't process an incoming message, Vault creates a _User Exception Message_ record to capture the failure and individual _User Exception Item_ records for each item that failed.

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 Message_ records, 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 work with Veeva Services to update your configuration. After you update the connection configuration, you can resubmit the message that originally failed. Navigate to the _User Exception Item_ record, open the **Actions** menu, and select **Resubmit Message**.

## Configuring Quality for the Connection

Before configuring the Quality-RIM Connection, you need to [establish the Vault to Vault connection](/en/lr/53358/#Establish_Vault_to_Vault). To configure the standard connection, you must work with Veeva Services. The following steps need to be performed in your Quality Vault to configure the standard connection:

1. Verify that the appropriate _Integration_ records and associated _Integration Points_ are _Active_ in your Quality Vault. See [details above][3] on the _Integrations_ and _Integration Points_ available for this connection.
2. Perform any additional steps to configure your Quality Vault for the below standard integrations:
  * [_RIM-Quality: Product Integration_][6]
  * [_Quality-RIM: Enhanced Change Control_][5]
  * [_Quality/RIM Document Integration_][14]
3. Add reference lookups for controlled fields within the integration scope. See [details about this step][10] below.
4. Add the _QMS RIM Notification User_ field to the object page layout of the _Integration_ object.

### Configuring Quality for Product Transfer {#qual-product-transfer}

Complete the following additional steps in your Quality Vault to configure the _RIM-Quality: Product Integration_:

  1. Add values to the _Therapeutic Area_ (`therapeutic_area__v`) picklist that exist for the same picklist in your RIM Vault.
  2. Add reference lookups for the _Therapeutic Area_ (`therapeutic_area__v`) picklist. See [details about this step][10] below.
  3. Optional: Add related object sections or fields to the object page layouts for the _Product_ and _Product Variant_ objects.
  4. Assign the _Retry Transfer_ action to the _User Exception Message_ object. See [details on how to assign an action to an object](/en/lr/43127/).
  5. Optional: Add the standard _External ID_ field to the _Product Family_ (`product_family__v`), _Product_ (`product__v`), and _Product Variant_ (`product_variant__v`) objects' page layouts, if data is sourced from an external system.

### Configuring Quality for Enhanced Change Control {#qual-enhanced-change-control}

Complete the following steps to configure the Quality-RIM: Enhanced Change Control integration in your Quality Vault:

1. Enable the _Enhanced Change Control_ integration under the Quality-RIM Connection.
2. Update the _Change Control_ object layout to allow for the creation of _Regulatory Change Items_.
3. Update the _Change Control_ object layout to display _Regulatory Activity Items_.
4. To allow Regulatory users to notify the Quality Team that corrections are needed during regulatory assessments, update the _Regulatory Change Item_ object and lifecycle as follows:
   1. Add the _Regulatory Correction Required_ and _Correction Details_ fields to the _Product Change_ object type and the _Regulatory Change Item_ detail page layout.
   2. Add the _Requires Correction_ and _Corrected_ lifecycle states to the _Regulatory Change Item_ lifecycle.
5. To allow for the transfer of material change data between Quality and RIM Vaults:
    1. Configure the _Regulatory Change Item_ object:
        1. Activate the _Material Change_ object type and configure an appropriate layout.
        2. Activate the _Material_ field.
    2. Configure the _Regulatory Activity Item_ object:
        1. Activate the _Activity Material Change_ object type and configure an appropriate layout.
        2. Create a custom _Material_ lookup field if one does not already exist.
    3. Activate the _RIM Source Object_ picklist field on the _Material_ object and add it to the relevant _Material_ object types and layouts.

## Configuring RIM for the Connection

Before configuring the Quality-RIM Connection, you need to [establish the Vault to Vault connection](/en/lr/53358/#Establish_Vault_to_Vault). To configure the standard connection, you must work with Veeva Services. The following steps need to be performed in your RIM Vault to configure the standard connection:

1. Verify that the appropriate _Integration_ records and associated _Integration Points_ are _Active_ in your Quality Vault. See [details above][3] on the _Integrations_ and _Integration Points_ available for this connection.
2. Perform any additional steps to configure your RIM Vault for the below standard integrations:
  * [_RIM-Quality: Product Integration_][8]
  * [_Quality-RIM: Enhanced Change Control_][7]
  * [_RIM/Quality Document Integration_][14]
3. Add reference lookups for controlled fields within the integration scope. See [details about this step][10] below.
4. Recommended: Create a custom lifecycle for the _User Exception Message_ object and configure an entry action to alert a specific user or group whenever Vault creates a _User Exception Message_ record.
5. Add the _QMS RIM Notification User_ field to the object page layout of the _Integration_ object.

### Configuring RIM for Product Transfer {#rim-product-transfer}

To configure the RIM-Quality: Product Integration, the following additional steps need to be performed in your RIM Vault:

  1. Deprecate the _Abbreviation_ (`abbreviation__c`), _Generic Name_ (`generic_name__c`), and _Therapeutic Area_ (`therapeutic_area__c`) custom fields on the _Product Family_ object and the _Dosage Form_ (`dosage_form__c`) picklist. These need to be replaced with standard equivalents.
  2. Populate the new standard fields of existing _Product Family_ records with the current values of the deprecated custom fields.
  3. Optional: Add the standard _External ID_ field to the _Product Family_ (`product__v`), _Product_ (`drug_product__v`), and _Product Variant_ (`product_detail__v`) objects' page layouts, if data is sourced from an external system.

### Configuring RIM for Enhanced Change Control {#rim-enhanced-change-control}

To configure the Quality-RIM: Enhanced Change Control integration generally, enable the _Quality-RIM: Enhanced Change Control_ integration (`qr_enhanced_change_control__v`) under the _Quality-RIM Connection_ (`qms_rim_connection__v`).

This integration includes optional functionality for creating _Events_ in your RIM Vault based on _Change Controls_ in your Quality Vault. You can enable one of the two related [inbound integration points][2]:
   * To create _Event_ records with related _Change Items_ for each Quality _Change Control_, activate the _Quality-RIM: Change Item to Event and Event Change Item_ inbound integration point.
   * To create separate _Events_ with related _Change Items_ for each combination of Quality _Change Control_ and _Product Family_ records, activate the _Quality-RIM: Change Item to Event and Event Change Item by Product Family_ inbound integration point.

To allow Regulatory users to notify the Quality Team that corrections are needed during regulatory assessments, update the _Change Item_ object and lifecycle as follows:

1. Add the _Correction Required_ and _QMS Correction Details_ fields to the _Product Change_ object type and the _Change Item_ detail page layout.
2. Add the _Requires Correction_ and _Corrected_ object lifecycle states to the _Change Item_ object lifecycle.

To allow for the transfer of material data between your Quality and RIM Vaults, complete the following steps:

1. If the connected Quality Vault uses a <a class="external-link " href="https://quality.veevavault.help/en/lr/722050" target="_blank" rel="noopener">_Quality Event_ object<i class="fa fa-external-link" aria-hidden="true"></i></a>, activate the following integration points:
    * Quality-RIM: Regulatory Change Item to Change Item (Packaging Legacy)
    * Quality-RIM: Regulatory Change Item to Change Item (Container Legacy)
    * Quality-RIM: Regulatory Change Item to Change Item (Active Substance Legacy)
    * Quality-RIM: Regulatory Change Item to Change Item (Inactive Ingredient Legacy)
1. If the connected Quality Vault instead uses a standalone data model for quality processes, activate the following integration points:
    * Quality-RIM: Regulatory Change Item to Change Item (Packaging)
    * Quality-RIM: Regulatory Change Item to Change Item (Container)
    * Quality-RIM: Regulatory Change Item to Change Item (Active Substance)
    * Quality-RIM: Regulatory Change Item to Change Item (Inactive Ingredient)
2. Configure the _Change Item_ object:
    * Activate the following object types and configure layouts for them:
        * _Active Substance Change_
        * _Container Change_
        * _Inactive Ingredient Change_
        * _Packaging Change_
    * Activate the following fields:
        * _Active Substance_
        * _Container_
        * _Inactive Ingredient_
3. Configure the _Activity Change Item_ object:
    * Activate the following object types and configure layouts for them:
        * _Activity Active Substance Change_
        * _Activity Container Change_
        * _Activity Inactive Ingredient Change_
        * _Activity Packaging Change_
    * Activate the following fields:
        * _Active Substance_
        * _Container_
        * _Inactive Ingredient_

## Configuring Quality & RIM for Document Exchange {#document-exchange}

To configure this integration, all aspects of these instructions must be considered for both your Quality and RIM Vaults.

The provided instructions assume you've already [established the Vault to Vault connection](/en/lr/53358/#Establish_Vault_to_Vault). All remaining configuration is highly dependent upon the documents and fields your organization plans to include in the exchange, as well as document lifecycle configurations. To gather requirements:
* See [About the Quality-RIM Connection](/en/lr/57086/) for the integration's overall behavior and use cases.
* See [Document Exchange Limitations][12] for additional considerations.
* We recommend using each Vault's [configuration report](/en/lr/42889/) as a reference point.

### Configuration Overview

This configuration outline references the below variable components in your Quality and RIM Vaults:

| Component | Quality Vault Record | RIM Vault Record |
|---|---|---|
| Connection | QMS to RIM (`qms_to_rim__v`) | QMS RIM Connection (`qms_rim_connection__v`) |
| Integration | Quality/RIM Document Integration (`quality_rim_documents__v`) | RIM/Quality Document Integration (`rim_quality_documents_i__v`) |
| Outbound Integration Point | RIM Documents Outbound (`rim_documents_outbound_ip__v`) | Quality Documents Outbound (`qual_documents_outbound_oip__v`) |
| Inbound Integration Point | RIM Documents Inbound (`rim_documents_inbound_ip__v`) | Quality Documents Inbound (`qual_documents_inbound_iip__v`) |
| Integration Rules | RIM Inbound Documents (`quality_rim_inbound_documents__v`) | Quality Inbound Documents (`quality_rim_inbound_documents_ir__v`) |

To enable your RIM and Quality Vaults for document exchange:

1. [Enable CrossLinks](/en/lr/23139/#enable-crosslinks) in **Admin > Settings > General Settings**.
2. In the document lifecycle for each document type to be exchanged:
  * Define or confirm the lifecycle's Steady, Superseded, and Obsolete state types are mapped to the intended lifecycle states.
  * Review the mapped Steady state to ensure it is configured with an entry action to set a new major version. See [Document Exchange Limitations][12].
3. For each of your Quality Vault's in-scope documents, create or confirm there are _Product Family_ and _Product Variant_ object reference fields to ensure this information can be received from RIM.
4. Activate the Vault's Integration record in **Admin > Connections > [Connection] > [Integration]**. This additionally activates the integration's outbound and inbound Integration Points. You can individually deactivate and reactivate Integration Points as required. For example, you may opt to deactivate RIM's outbound Integration Points if the Vault will only be receiving documents.
5. Confirm the related standard Integration Field Rules are active in **Admin > Connections > Integration Rules > [Integration Rule]**. Review all rules in the **Field Rules** panel to ensure their **Status** is _Active_.
6. Add Reference Lookups to the connection record in **Admin > Connections**. You'll add one lookup for each document type, subtype, and classification the Vault will receive in the exchange according to your organization's requirements. See [details about this step][11].
7. Add custom Integration Field Rules to the applicable Integration Rule in **Admin > Connections**. Integration Field Rules are required in each Vault that will be receiving documents according to your organization's requirements. See [details about this step][13].
8. Confirm the _Quality to RIM Connection_ Document Type Group is active in **Admin > Business Admin > Objects > Document Type Groups**. Then, assign it to each relevant document in **Admin > Configuration > Document Types**. Select the document type, subtype, or classification's **Actions** menu, then populate the **Document Type Group** field.

###  Configuring Integration Field Rules {#configuring-integration-field-rules}

The Integration Rules provisioned for the document exchange integration include standard Integration Field Rules. As part of integration configuration, you will create additional rules to handle any additional Quality or RIM document fields.

To do this, add field rules to the `quality_rim_inbound_documents__v` (Quality) and `quality_rim_inbound_documents_ir__v` (RIM) Integration Rules with the below high-level requirements. Picklist and object reference fields require you to first create a [Reference Lookup][11].

* **Target Object**: Document
* **Target Doc Field**: The inbound document field to be populated and maintained in this Vault.
* **Label** and **Name**: The auto-populated target document field UI label and API name. We recommend maintaining the auto-populated values.
* Text fields:
    * **Query Object**: Document
    * **Query Field**: The outbound document field name to which the **Target Doc Field** (inbound document field) is mapped, for example `approved_date__c`.
* Picklist fields:
    * Create a [Reference Lookup][15].
    * **Reference Lookup Type**: Generic
    * **Reference Lookup**: The reference lookup you created for this picklist.
    * **Query Object**: Document
    * **Query Field**: The source picklist field.
* Object reference field except *Product*, *Product Family*, and *Product Variant* (see details below):
    * Create a [Reference Lookup][16].
    * **Reference Lookup Type**: Object
    * **Reference Lookup**: The reference lookup you created for this object field.
    * **Query Object**: Document
    * **Query Field**: The source object field.
* For the *Product* object reference field, the connection references the standard `document_product__v` Integration Field Rule.
* For *Product Family* and *Product Variant*:
    * *Product Family*
        * **Query Object**: `document_product__vr`
        * **Query Field**: *Global ID* (`global_id__sys`)
    * *Product Variant*
        * **Query Object**: `document_product_detail__vr`
        * **Query Field**: *Global ID* (`global_id__sys`)

## Configuring Reference Lookups {#configuring-reference-lookups}

Reference Lookups are a configuration component referenced by [integration rules][9] that allow you to map the value of a field in the target Vault indirectly from a value in the source Vault. When you configure the connection, you need to add reference lookups for controlled fields within the integration scope.

For example, you need to add Reference Lookups in your Quality Vault to enable the mapping of _Country_ records and regulatory _Activity_ lifecycle states. See [Creating & Managing SDK Reference Lookups](/en/lr/58198/) for detailed instructions.

### Reference Lookups for Document Exchange {#reference-lookups-for-document-exchange}

For each inbound document (any document received in a Vault), you must configure one Reference Lookup in that Vault for that document type. This means, for example, a _Regulatory > Correspondence > Approval Letter_ RIM document which will be sent to Quality and classified as _Operations > Agreement_ requires one reference lookup in the Quality Vault.

Using your Vaults' document and mapping inventory, add Reference Lookups to the connection record [individually](/en/lr/58198/) or [in bulk](/en/lr/58198/#Template) with the following high-level requirements:

* **Reference Lookup Type**: Document Type
* **Target Object**: Document Type (`document_type__sys`)
* **Source Key**: The type, subtype, or classification of the document being received in this Vault.
  * In RIM Vaults, this is expressed in the case-sensitive `Type.Subtype.Classification` format, referencing field labels. For example, RIM's _Approval Letter_ document classification is expressed as `Regulatory.Correspondence.Approval Letter`.
  * In Quality Vaults, this is expressed as `type__c.subtype__c.classification__c`. For example, Quality's _Agreement_ document classification is expressed as `operations__c.agreement__c`.
* **Target Key**: The type, subtype, or classification of the document that will be created in the target Vault, expressed in the same format in both Vaults as `type__c.subtype__c.classification__c`. For example, Quality's _Agreement_ document subtype is expressed as `operations__c.agreement__c`.
* **Status**: Active

Additionally, in order to create related [Integration Field Rules][13] for object reference and picklist fields, you'll need to first create Reference Lookups with the following high-level requirements:

* <a id="ref-lookups-object"></a>For object reference fields:
    * **Reference Lookup Type**: Object
    * **Target Object**: The object to which the inbound object data is mapped.
    * **Source Key**: The source object record's *ID* (`id`).
    * **Target Key**: The target object record's *ID* (`id`). Alternatively, you can use this record's *External ID*.
    * **Status**: Active
* <a id="ref-lookups-picklist"></a>For picklist fields:
    * **Reference Lookup Type**: Generic
    * **Reference Lookup Name**: The picklist's API name, for example `imported_document__c`
    * **Source Key**: The inbound document's expected picklist value, for example `no__c`
    * **Target Key**: The mapped picklist value in the target Vault, for example `No`



<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>: An object record’s <em>ID</em> (<code class="language-plaintext highlighter-rouge">id</code>) in a Production Vault is different from the same record’s ID in a Sandbox Vault. As part of your go-live strategy, ensure any Reference Lookups mapped with an <em>ID</em> (<code class="language-plaintext highlighter-rouge">id</code>) are created or updated in the Production Vault accordingly.</p>
    </div>
  </div>
</div>



## Connection Limitations

For a list of limitations or errors that affect your connection, see [Standard Vault to Vault Connection Limitations](/en/lr/53358/#limitations) for a list of limitations or errors that impact your connection.

### Document Exchange Limitations {#document-exchange-limitations}

* CrossLinks are not supported across [domains](/en/lr/14691/). The Quality and RIM Vaults configured for this integration must share the same domain.
* After this integration is enabled, the connection only initiates document and metadata transfer once the source document reaches its next Steady state. For example, if Quality document v2.0 is updated to Steady state v3.0, only v3.0 is transferred to RIM. The RIM CrossLink version history begins at v3.0, and any subsequent Steady state versions (4.0 and later) are properly reflected.
    * Similarly, the integration does not create target Vault CrossLinks for source documents created in the Steady state. A source document must exit a given state (for example, _Draft_), then enter the Steady state in order for Vault to create a target CrossLink.
* If a document's lifecycle is configured such that a document can reach the Steady state with a non-zero minor version, Vault does not maintain it after creating the CrossLink in the target Vault. For example, if a RIM document is in its Steady state at v1.1, Vault creates a Quality CrossLink v1.1 and takes no further action if the RIM document is subsequently updated. To avoid this, you must at minimum configure the source document's lifecycle with a _Set new major version_ [entry action](/en/lr/12399/) in the Steady state.

## Troubleshooting the Connection

There may be instances where you need to switch the target Vault for your Quality-RIM Connection. In order for the connection to function properly, you should inactivate _Transaction_ and _Transaction Log_ records in your Quality Vault before resuming use of the connection.

## Related Permissions

You need a _System Admin_ security profile as well as the following permissions to set up the standard Quality-RIM Connection:

|Type|Permission Label|Controls|
|--- |--- |--- |
|Security Profile|Admin: Application: Manage Connections|Ability to set up the standard Quality-RIM Connection|
|Security Profile|Object: User Exception Item, User Exception Message: Read|Ability to see User Exception Item and User Exception Message records if a connection failure occurs|

 [2]: #rim-integrations-and-points
 [3]: #integrations-and-points
 [4]: #standard-object-state-types
 [5]: #qual-enhanced-change-control
 [6]: #qual-product-transfer
 [7]: #rim-enhanced-change-control
 [8]: #rim-product-transfer
 [9]: #integration-rules
 [10]: #configuring-reference-lookups
 [11]: #reference-lookups-for-document-exchange
 [12]: #document-exchange-limitations
 [13]: #configuring-integration-field-rules
 [14]: #document-exchange
 [15]: #ref-lookups-picklist
 [16]: #ref-lookups-object
