# About the Medical-CRM Connection

Organizations using both a Medical Vault and Vault CRM can use a standard Vault to Vault connection. 

<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 Medical-CRM Connection is only available for organizations with both a Medical Vault and Vault CRM.</p>
    </div>
  </div>
</div>



The Medical-CRM Connection enables the transfer of the following information:

  * Medical Inquiries are shared from Vault CRM to your Medical Vault for fulfillment with the corresponding _Account_ information.
  * _Case_ and _Case Request_ updates and closures in your Medical Vault are shared back to Vault CRM.
  * _Case Contact_ information in Vault CRM is matched to existing _Case Contacts_ in your Medical Vault, where data usage agreements allow.
  * _Country_ routing information in Vault CRM to your Medical Vault.

For example, when a sales representative creates an inquiry in Vault CRM, Veeva MedInquiry pulls the inquiry from Vault CRM to create a _Case_ in MedInquiry, which a call center agent responds to using MedInquiry to generate a response package. When the agent closes the case in MedInquiry, Vault pushes an update, which can include response notes and a link to the response package, back to Vault CRM.

<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 Medical-CRM Connection works cross-domain between production and sandbox Vaults. However, Vault does not populate production Vaults with data or documents from sandboxes.</p>
    </div>
  </div>
</div>



## Prerequisites

To use this feature, your Admin must complete the following procedures:

  * <a href="/en/gr/53358/#Establish_Vault_to_Vault">Establish a Vault to Vault Connection</a>
  * <a href="/en/gr/879897/">Configure the Medical-CRM Connection</a>

## How the Medical-CRM Connection Works

When you create and process an _Inquiry_ in Vault CRM and submit the _Inquiry_ with the _Transfer to Medical_ action:

  * Vault pulls the HCP information from the _Account_ or _Inquiry_ into MedInquiry, depending on your data usage agreement. 
  * Vault Medical either creates a new _Case Contact_ record or updates an existing record based on whether or not an existing _Case Contact_ includes a matching _Veeva ID_ or _External ID_.
  * Vault Medical creates the _Case_ and _Case Request_ records. 

Vault CRM pulls _Case Request_ records modified since the _Last Successful Run Time_ for _Case Requests_ that originated from Vault CRM. 

After the _Case_ and _Case Request_ are successfully created in MedInquiry, Vault CRM updates the _Transfer Status_ field to _Success_ and the _Inquiry_ can no longer be updated. When the _Case Request_ enters the _In Progress_ and _Closed_ states, Vault CRM updates the _Medical Inquiry Case Status_ field and any other fields mapped using <a href="/en/gr/879897/#field-rules">field rules</a>.

Vault Medical uses the _Case Contact Source Data_ object to store the Vault CRM _Account_ information in order to create or update a corresponding _Case Contact_ record.

The Medical-CRM Connection supports synchronizing records from <a href="/en/gr/879897/#duplicating">multiple Vault CRMs</a>. While synchronizing records:

  * If a pre-existing record from the source Vault with a matching _CRM Org_, _CRM ID_, _External ID_, or _Link_ value exists in the target Vault, Vault updates the existing record.
  * If a pre-existing record from the source Vault with an identical _Name_ but different _CRM Org, CRM ID, External ID_, or _Link_ value, Vault creates a new record.
  * Vault uses the _Link_ field to look up matching records in Vault CRM. If the _Link_ field on an existing record in MedInquiry is blank, the Medical-CRM Connection uses the _External ID_ field.

### How the Country Integration Works

Vault CRM includes a _Connection_ _Settings_ object type, such as _CLM Integration Settings_, for each feature that supports document routing based on country. Within this object, users can select multiple _Country_ (`country_cda__v`) values from the _Country Filter_ picklist to route content for their Medical Vault.

In the Medical Vault, a _Connection Country_ record is created to match the _Countries_ selected from the filter in Vault CRM. The connection confirms that it creates a _Connection_ _Country_ record for each _Country_ (`country__v`) record which has the _Country_ (`country_cda__v`) field populated with values that match the values in the _Country Filter_ picklist in Vault CRM.

For example:

* **Vault CRM A**: The _Country Filter_ picklist is populated with **United States**.
* **Vault CRM B**: The _Country Filter_ picklist is populated with **United States**, **Canada.**
* **Vault CRM C**: The _Country Filter_ picklist is populated with **Mexico**, **Canada**.

Subsequently, the Medical Vault will have _Country_ records for the **United States**, **Canada**, and **Mexico**, and the _Country_ records will have their _Country_ fields populated with `country_cda__v` picklist values for their matching countries. Additionally, the _Global Country_ record also has its _Country_ field populated with `country_cda__v` picklist values of **United States**, **Canada**, and **Mexico**, along with other countries listed.

After Vault synchronizes Vault CRM with the Medical Vault, the _Connection Country_ object creates records as follows:

* **Vault CRM A**: United States, Global
* **Vault CRM B**: United States, Canada, Global
* **Vault CRM C**: Mexico, Canada, Global

If Document A in the Medical Vault has a _Country_ field of **United States** and is updated with a new description, Vault CRM A and Vault CRM B are updated with the new description in near real-time, based on the records in the _Connection Country_ object.

If Document B is created in the Medical Vault and has a _Country_ field of **Global,** Vault CRM A, Vault CRM B, and Vault CRM C are sent Document B in near real-time, based on the records in the _Connection Country_ object.

### How the CLM Integration Works

With the CLM Integration, Vault can distribute approved multichannel presentations and slides from Medical Vaults to Vault CRM. This connection ensures that content approved via a standard MLR (Medical, Legal, Regulatory) workflow is available for use in CLM within Vault CRM. The CLM integration uses the standard Vault to Vault connection to establish a bridge between your source Medical Vault and the target Vault CRM to share content approved for distribution.

Vault can transfer CLM content in the format of a binder containing slides. Users can manually create a binder and slides for transfer or use the _Create Presentation_ user action to generate a binder and slides, but CLM auto-publishing is not supported for use with this integration. 

Medical Vaults automatically publish content to Vault CRM when a document's _Publish for CRM (CLM)_ (`clm_content__v`) field is set to _Yes_. Content is withdrawn when this field is set to _No_ or moves into an _Obsolete_ state. For every document published, Vault CRM creates a CrossLink of the original source document. This CrossLink connects the production Medical Vault to the sandbox Vault CRM across domains.

To ensure that the correct content reaches the right audience, Vault routes documents to specific Vault CRM environments based on their _Country_ assignments, using the _CRM Connection Country_ object and routing logic applied via the `country__v` field.