# RIM Object & Field Mapping

Many RIM features match on and populate standard fields when creating object records based on the RIM data model's object and field mapping logic. RIM Vault Admins can use the guidelines on this page to understand the various RIM features (wizards) which use object and field mapping, and how to access and understand a given RIM Vault's object and field mapping data when troubleshooting.



<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 article covers how Vault processes mappings for standard objects and fields only. Custom objects are not supported. Instead, Vault matches custom fields between objects based on the field’s name, rather than the object and field mapping components described here.</p>
    </div>
  </div>
</div>



## Relevant RIM Features

Vault uses object and field mapping for standard objects and fields for many RIM features, including:

* [Submission Wizard](/en/lr/73649/)
* [Global Content Planning](/en/lr/77852/)
* [Create Related Records](/en/lr/31322/)
* [Pulling Regulatory Objective Data](/en/lr/67241/)
* [Bundling Activities & Regulatory Objectives](/en/lr/49520/)
* Splitting [Activities](/en/lr/4946040/) or [Regulatory Objectives](/en/lr/50022/)
* Creating [Product](/en/lr/43102/), [Investigational](/en/lr/45395/), [Active Substance](/en/lr/65511/), or [Manufacturing Site](/en/lr/65523/) Registrations



<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 excludes certain field mappings for the Create Related Records wizard and Global Content Plan dispatch features. See <a href="/en/lr/15340/#exclude-from-matching">additional details</a> below.</p>
    </div>
  </div>
</div>



## Locating & Understanding Object Mapping

To access your Vault's object and field mapping, generate a [configuration report](/en/lr/42889/) and minimally select **Rimobjectmapping** for the **Included Component Types**. The resulting report includes both the Rimobjectmapping and Rimfieldmapping components within their own tabs.

Each mapping is prefixed with the object relationship, followed by the related record Vault is attempting to find using this mapping. For example, the `application_sub_active_substance__v` object mapping locates shared *Active Substances* within *Application* and *Submission* relationships, based on the fields defined within the report's **source_object** and **target_object** columns. In this example, these values allow Vault to match the *Application*'s `active_substance__v` field to the *Submission*'s `active_substance__rim` field.

<a href="https://platform.veevavault.help/assets/images/rim-object-mapping-location.png" data-lightbox="RIM Object and Field Mapping Examples" data-title="" data-alt="object mapping location in the config report">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/rim-object-mapping-location.png" alt="object mapping location in the config report" style="max-width: 100%;"  />
</a>

### About the exclude_from_matching Attribute {#exclude-from-matching}

The **Rimfieldmapping** component tab includes the **exclude_from_matching** column. Generally, a checkmark in this column means that the mapping is not used to match fields between objects when Vault is already performing a similar check within another process. In most cases, Vault ignores such mappings as applicable within the Create Related Records wizard and Global Content Plan dispatch features.

For example, the `evt_app_active_substance__v` field mapping for the `health_authority__v` field is not used when the Create Related Records wizard is in use.

<a href="https://platform.veevavault.help/assets/images/rim-object-mapping-exclude-from-matching.png" data-lightbox="RIM Object and Field Mapping Examples" data-title="" data-alt="exclude from mapping attribute example">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/rim-object-mapping-exclude-from-matching.png" alt="exclude from mapping attribute example" style="max-width: 100%;"  />
</a>


## Examples

### Create Related Records

The Create Related Records wizard applies mapping based on whether the Submission Wizard is enabled (the *Enable Application Relationships* setting is enabled).

When enabled, Vault matches between existing *Event* and *Application* relationships, as governed by the mappings which begin with `evt_app`, for example `evt_app_active_substance__v`.

Once the matching *Application* relationship is located, Vault references the *Application*-*Regulatory Objective* (`application_ro`) and *Application-Submission* (`application_sub`) mappings to locate an existing *Regulatory Objective* and/or *Submission*. Then, Vault proceeds accordingly:

* When a match is not found, Vault creates (proposes) the new *Application* relationship along with the *Regulatory Objective* and *Submission* relationships.
* When a matching *Application* relationship is found, but there is no *Regulatory Objective* or *Submission* relationship, Vault creates the *Regulatory Objective* and *Submission* relationships and sets the *Application Source* field accordingly.



<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>: Even when a field mapping’s <code class="language-plaintext highlighter-rouge">exclude_from_matching</code> is blank (null), Vault still references the mapping when initially creating records to default the value of that field on the created record.</p>
    </div>
  </div>
</div>




### Submission Wizard

When a Submission Wizard user adds *Clinical Studies* in the wizard, Vault creates corresponding target *Submission Clinical Study* and *Regulatory Objective Clinical Study* relationship records based on the selected source *Application Clinical Study* records. Vault sets field values on these new target records using the mapping below. 

For example, when the source *Application Clinical Study*'s `clinical_study_type__v` is "Biopharmaceutical", Vault sets the target *Submission Clinical Study*'s `clinical_study_type_rim__v` field to match.

<a href="https://platform.veevavault.help/assets/images/rim-object-mapping-sub-wiz.png" data-lightbox="RIM Object and Field Mapping Examples" data-title="" data-alt="submission wizard mapping example">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/rim-object-mapping-sub-wiz.png" alt="submission wizard mapping example" style="max-width: 100%;"  />
</a>

### Global Content Plan Dispatch

When dispatching a Global Content Plan, Vault compares source *Event* relationship records against existing *Submission* relationship records for each target submission to determine which Content Plan sections to copy. When the source record's fields match those within the target record, Vault uses the relevant mapping to determine the appropriate relationship records to create.

For example, when there is a source *Event Active Substance* and an existing target *Submission Active Substance* with matching fields, Vault references the records' `active_substance__rim` field values to determine the applicable *Active Substance*. When these values match, Vault copies Content Plan sections accordingly. If in this scenario the user selects the Copy Relationships option, Vault does not copy the *Submission Active Substance* relationship record because it already exists.

<a href="https://platform.veevavault.help/assets/images/rim-object-mapping-dispatch-gcp.png" data-lightbox="RIM Object and Field Mapping Examples" data-title="" data-alt="dispatch GCP mapping example">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/rim-object-mapping-dispatch-gcp.png" alt="dispatch GCP mapping example" style="max-width: 100%;"  />
</a>

[1]: #exclude-from-matching