# Configuring the PromoMats-CRM Connection

Organizations using both a PromoMats Vault and Vault CRM on the same domain can use a standard Vault to Vault connection.

The PromoMats-CRM Connection enables the transfer of the following data from Vault CRM to your PromoMats Vault:

  * _CRM Product_ records
  * _CRM Product Group_ records
  * _CRM Detail Group_ records
  * _Content Groups_ records
  * _Surveys_ records
  * _Directories_ records 
  * _Content Types_ records
  * _Event Topic_ records
  * _Event Configuration_ records
  * _Country_ records

The PromoMats-CRM Connection also enables the transfer of the following data from your PromoMats Vault to Vault CRM:

  * _Product Family_ and _Brand/Product_ records
  * _Indication_ records

See [About the PromoMats-CRM Connection](/en/lr/921792/) for detailed information about how the connection works.

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



## PromoMats-CRM Connection Components

The following components support the standard Vault to Vault PromoMats-CRM Connection.

### Connections

The _PromoMats-CRM Connection_ (`promomats_crm__v`) record is available from **Admin > Connections** in your PromoMats Vault. You must [establish the Vault to Vault connection](/en/lr/53358/#Establish_Vault_to_Vault) before using it.

### Integration & Integration Points

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

The _PromoMats-CRM Connection_ record includes the following default _Integration_ records with standard _Integration Point_ and _Integration Rule_ records in your PromoMats Vault:

* _Indication Integration_
  * _Indication Outbound Integration Point_
* _Product Integration_
  * _Product Family Outbound Integration Point_
  * _Brand/Product_ _Outbound Integration Point_
* _Country Integration_
  * _Country Inbound Integration Point_
* _CLM Integration_
  * _CLM Outbound Integration Point_
* _CRM Metadata Sync Product Content Integration_
  * _CRM Content Group Inbound Integration Point_
  * _CRM Detail Group Inbound Integration Point_
  * _CRM Product Inbound Integration Point_
  * _CRM Product Group Inbound Integration Point_
* _CRM Metadata Sync Survey Integration_
  * _CRM Survey Configuration Inbound Integration Point_
* _CRM Metadata Sync Content Type Integration_
  * _CRM Content Type Inbound Integration Point_
* _CRM Metadata Sync Directory Integration_
  * _CRM Directory Inbound Integration Point_
* _CRM Metadata Sync Event Management Integration_
  * _CRM Event Configuration Inbound Integration Point_
  * _CRM Event Topic Inbound Integration Point_

### Integration Rules

To support the PromoMats-CRM 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 the [_Integration Rules_](/en/lr/62154/) to incorporate configurable rules for mapping object and document fields between the two Vaults.

### Queues 

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

In your PromoMats Vault, you have:

  * _PromoMats-CRM_ outbound queue (`promomats_crm_outbound_queue__v`)
  * _PromoMats-CRM_ inbound queue (`promomats_crm_inbound_queue__v`)

In your CRM Vault, you have:

  * _CRM to PromoMats_ outbound queue (`crm_to_promomats_outbound_queue__v`)
  * _PromoMats to CRM_ inbound queue (`promomats_to_crm_inbound__v`)

### Query Object Rules

The connection supports [query object rules](/en/lr/62154/#about-query-object-rules). Query object rules provide an additional layer of specificity to your field rules. Learn more about [creating query object rules](/en/lr/62154/#create-query-rule).

### 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 PromoMats-CRM Connection. If either end of your integration can't process an incoming message, Vault creates a _User Exception Message_ record to capture the failure.

Vault also creates individual _User Exception Item_ records for each item that failed on the related _Integration Point_ record in one of your Vaults. Vault typically creates _User Exception Messages_ in the source Vault when there are issues with the configuration or connection itself. _User Exception Messages_ in the target Vault often contain _User Exception Items_, as the target Vault can encounter document-specific errors as well as configuration errors.

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](/en/lr/59885/#entry-actions).

A _User Exception Message_ means 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 select the **Retry Transfer** action on the _User Exception Message_ record to run the connection and resolve errors.

### Last Successful Run Time Field

On each _Integration_ record, the _Last Successful Run Time_ field captures the date and time that the integration last ran with no errors. Vault uses this date to query changes since the integration's last successful run.

When an integration becomes active, Vault automatically sets its _Last Successful Run Time_ to the current datetime. If you reset the connection and reactivate the _Metadata_ _Integration_ records, Vault also sets the _Last Successful Run Time_ to the current datetime.

You can also manually set the _Last Successful Run Time_ field to a prior datetime. Setting the field to a prior datetime automatically triggers the integration to schedule a job.

## Configuring Your Vaults for the Connection

### Enabling the Integrations in PromoMats

The integrations are inactive by default. To activate these integrations:

  1. In your PromoMats Vault, navigate to **Admin > Connections > PromoMats-CRM Connection**.
  2. Expand the **Integrations** section.
  3. Click the integration name.
  4. Select **Active** in the _Status_ field.
  5. Click **Save**.
  6. Repeat steps 3 through 5 to activate other applicable integrations.

### Enabling the Integrations in Vault CRM

The _PromoMats-CRM: Product Integration_ is inactive by default. To activate this integration:

  1. In Vault CRM, navigate to **Admin > Connections > PromoMats-CRM Connection**.
  2. Expand the **Integrations** section.
  3. Click **PromoMats-CRM: Product Integration**.
  4. Click **Edit**. Expand the _System Information_ section and select **Active** in the _Status_ field.
  5. Click **Save**.
  6. Repeat steps 3 through 5 to activate other applicable integrations.

### Configuring Reference Lookups

[Reference lookups](/en/lr/58198/) are a configuration component referenced by integration rules that allow you to map the value of a field on a target object or document indirectly from a value in the source Vault. When you configure the PromoMats-CRM Connection, you need to add reference lookups for controlled fields within the integration scope. We recommend creating CSV mapping files and loading these to your Vault to create reference lookups.

### Reviewing Field Rules

We recommend reviewing the field rules for each integration rule for the PromoMats-CRM Connection. To do so, navigate to **Admin > Connections > Integration Rules**, select an integration rule, and click **Field Rules**.

## Duplicating the PromoMats-CRM Connection {#duplicating}

After configuring the PromoMats-CRM Connection, you can duplicate the _PromoMats-CRM Connection_ (`promomats_crm__v`) record to connect the same PromoMats Vault to multiple Vault CRMs.

## Related Permissions

You need a _System Admin_ security profile as well as the following permissions to set up the standard PromoMats-CRM connection:

| Type | Permission Label | Controls |
| --- | --- | --- |
| Security Profile | Admin: Application: Manage Connections | Ability to set up the standard PromoMats-CRM 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 |