Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/Multichannel/ApprovedEmail/ConfiguringAE/AECRMVaultIntegration.htm

## Integrating Vault CRM and PromoMats / MedComms for Approved Email

Approved Email requires an integration with either PromoMats or MedComms, depending on which the organization has licensed, in order to deliver approved content to end users. Email templates and fragments are created and stored in PromoMats / MedComms and pulled into Vault CRM via the integration process.

Admins can manage this integration from the Approved Email Administration tab, including managing the integration user, managing and validating credentials, and mapping PromoMats / MedComms fields. Users can access the Approved Email Administration tab by selecting Content Setup tab > Approved Email.

API requests sent from Vault CRM are monitored and limited to avoid interrupting integrations. Multichannel functionalities relying on the integration between Vault CRM and PromoMats / MedComms, including Approved Email, CLM, and Engage, send API requests and should not hit API limits.

**Who can use this feature?**

* Approved Email Admin Users — Browser
* [Defining and Managing Credentials](#DefiningManaging)
* [Mapping Fields and Pulling Content into Vault CRM](#Mapping)
* [Viewing Approved Email Statistics and Statuses](#Viewing)
* [Scheduling the Integration Process](#Scheduling)
* Users require an Approved Email license

### Defining and Managing Credentials as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Approved Email Admin Users](#)

#### Managing the Integration User

1. Select **Edit** under the Veeva Approved Email Credential Management section of the Approved Email Administration tab.
2. Enter the credentials for the integration user account.
3. Indicate whether the account is a sandbox.

   ![](../../../../Resources/Images/Multichannel/ApprovedEmail/Config/3-ManagingtheIntegrationUser.png)
4. Select **Save**.

Vault CRM does not support integration users having the File Staging API > Access Root Folder permission.

#### Vault Login Credential Management

The Vault Login Credential Management section manages the PromoMats / MedComms credentials for integration with Vault CRM. Users can connect to multiple instances, with each line representing a single instance from which the integration pulls PromoMats / MedComms Document metadata into the approved\_document\_\_v object in Vault CRM.

Admin users must supply a username and password for each PromoMats / MedComms instance, and the PromoMats / MedComms user needs to have a Security Profile of System Admin. Select **Validate** next to the credentials to confirm their authentication and create a connection to PromoMats / MedComms.

The PromoMats / MedComms integration user must be assigned to a Vault Security Policy (Users > Settings > Security Policy) that has a Password Expiration value of No Expiration. If the password ever expires, the integration will fail. Ensure that the Vault Integration User has access to Events API in Vault.

The Vault URL endpoints and optional Vault WHERE clause display in this section.

The authentication credentials are used for several Approved Email integration processes. All actions are fully audited in the activity logs.

* Query Vault during the Incremental Refresh of metadata into the approved\_document\_\_v object
* Query Vault during the Full Refresh of metadata into the approved\_document\_\_v object
* Query Vault to validate outbound Email Templates, Email Fragments and all referenced PromoMats / MedComms documents are in an approved or steady state prior to sending an email
* Query Vault to pull PromoMats / MedComms document events (views and downloads by email recipients) into the email\_activity\_\_v object
* Write events related to the Incremental Refresh and Full Refresh processes back to the activity log. This provides an audit trail within PromoMats / MedComms that lists all orgs that reference each Email Template or Email Fragment

![](../../../../Resources/Images/Multichannel/ApprovedEmail/Config/2-VaultLoginCredentialManagement.png)

### Mapping Fields and Pulling Content into Vault CRM as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Approved Email Admin Users](#)

#### Mapping PromoMats / MedComms Fields to Vault CRM

Users can map custom fields and Vault Object Framework (VOF) records to Vault CRM fields using the Approved Email - PromoMats / MedComms Integration. For example, mapping a custom field on an Email Template in PromoMats / MedComms to a custom text field on Approved Document records in Vault CRM.

To map PromoMats / MedComms fields to Vault CRM:

1. Navigate to the Product Catalog in PromoMats/MedComms: Business Admin > Products.
2. For each product in the Vault Product Catalog, populate an External Id corresponding to what you populated in the Vault CRM app for that specific product. This will be used to specify the Product references on the Approved Documents refreshed from PromoMats / MedComms.

![](../../../../Resources/Images/Multichannel/ApprovedEmail/Config/CRMVaultInteg.png)

This custom mapping is available by default if the integration is configured. When integration administrators open the Field Mapping page, which is available for each PromoMats / MedComms instance connected to the CRM Vault, as a link - 'View Mapping' in the Approved Email Administration page, a new Edit Mapping action displays. Selecting the action opens the Field Mapping in edit mode. In edit mode, mappings can be updated by making a selection from the Vault Field Name drop down, and selecting Save Mapping. You need to review and save eligible mappings to ensure they are correct.

Select the desired PromoMats / MedComms Field Name you want to map to the Vault CRM field. By default, the integration maps fields between Vault CRM and PromoMats / MedComms that have matching case insensitive Field names (i.e. franchise\_\_c and Franchise\_\_c). Select “do not map” if the Field names match between the PromoMats / MedComms and Vault CRM fields but you do not want values from the PromoMats / MedComms field to be pulled into Vault CRM. “Do not map” should be used when a mapping is no longer relevant to the integration but the fields are still accessible in PromoMats / MedComms and Vault CRM. Select the blank entry if you do not want to make any other selection.

#### Defining PromoMats / MedComms Endpoints and Where Clauses

To more efficiently define PromoMats / MedComms Endpoints and Where Clauses, integration users can manage the information on the Approved Email Admin page. Previously, this information was defined using Veeva Messages referenced in Approved Email Custom Settings.

Admins do not need to make any changes to enable the migration from Veeva Messages to PromoMats / MedComms Endpoints and Where Clauses. Once a Vault has been upgraded to the latest version of Vault CRM and either an initial process schedule has run or an Admin runs an incremental/full force refresh, the migration takes place automatically if the Vault CRM integration user's credentials are valid. After the migration, the Veeva Messages are no longer used for Approved Email Custom Settings.

To define Endpoints and Where Clauses:

1. Access the **Approved Email Admin** page.
2. Navigate to the **Vault Login Credential Management** section.
3. Select **New** to add an Endpoint.

   ![](../../../../Resources/Images/Multichannel/ApprovedEmail/Config/4-DefiningVaultEndpointsandWhereClauses.png)
4. Define the **Vault DNS**, the **user name**, the **password**, and the **Where clause**, if any.

   Users cannot use the status\_\_v PromoMats / MedComms field in the Where clause because status is already filtered by default. Users are already prevented from sending emails that are not in an Approved State, so it is not necessary to create a Where clause for this purpose.
5. Select **Save**. The user name and endpoint display on the user page.
6. Select **Validate** to confirm the credentials have been established.

To remove an Endpoint, select the **Delete** link next to the vault you want to remove.

#### Pulling Approved Email Content into Vault CRM

The Refresh Administration section is used to pull content from PromoMats / MedComms into Vault CRM. The content on this object is synced from PromoMats / MedComms using the following refresh processes:

* **Incremental Refresh** - Pulls documents modified since the last refresh from PromoMats / MedComms into Vault CRM. This is the same process executed by the scheduled task in the Process Scheduler. It should be used when documents in PromoMats / MedComms are in a steady state (for example, Approved).
* **Force Full Refresh** - Pulls all documents in an Approved state from PromoMats / MedComms into Vault CRM. Documents that were previously Approved and are now Expired in PromoMats are Expired in Vault CRM. This is typically used in the early stages of implementation or for troubleshooting.

![](../../../../Resources/Images/Multichannel/ApprovedEmail/Config/5-PullingApprovedEmailContentintoCRM.png)

This section displays the success and failure of the last 10 refresh processes.

##### Error Handling During Sync

If an error occurs during the sync process (Incremental or Force Full Refresh), for example, a mapping issue for a particular document, the error is logged and the sync process continues to update the remaining documents. This ensures that an error with a single document does not prevent the successful synchronization of other documents. Error messages are available in the log for review.

To download the log, select the Failed Rows or EM Failed Rows link in the Refresh Administration section of the Approved Email Administration page.

### Viewing Approved Email Statistics and Status as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Approved Email Admin Users](#)

#### Vault Statistics Management

The Vault Statistics Management section allows users to pull email activity records from PromoMats / MedComms into Vault CRM. PromoMats / MedComms is the system of record for email activities such as opens, views, click throughs, and downloads for all PromoMats / MedComms documents referenced within Email Templates and Email Fragments.

![](../../../../Resources/Images/Multichannel/ApprovedEmail/Config/1-IntegratingCRMandVaultforApprovedEmail.png)

For example, when an email recipient selects the Download action on the viewer or an external link, PromoMats / MedComms captures the activity. After syncing from PromoMats / MedComms, these activity statistics are inserted into the email\_activity\_\_v object in Vault CRM.

To run the process, select **Pull Vault Statistics**.

Only click events and the target URL of the click-through are captured for links that point to documents hosted outside of PromoMats / MedComms

#### Viewing Email Engine Status

Selecting **View Email Engine Status** opens an external page that displays the current status of the Mailgun engine and any incidents reported.

See [Setting up a Sending Domain](CreateSendingDomain.htm) for more information on managing the Email Engine.

#### Viewing Email Domain Status

Customers must create Domain Name Status (DNS) records, for the email domain they use to send Approved Emails. The Email Domain Status section enables Admins to easily check if DNS entries are set up.

For example, Amy Brown notices an email is in Sent status for an unusual amount of time. She consults the Email Domain Status section of the Approved Email Administration tab and notes the DNS record for the email domain has not been created.

### Scheduling the Integration Process as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Approved Email Admin Users](#)

#### Scheduling the Integration Process

Admin users should schedule the incremental refresh process and other Approved Email processes to execute at least once a day. To schedule these processes, navigate to the Veeva Process Scheduler and select **Run** next to Approved Email Processes. This initiates the following processes:

* Pull Vault Statistics – Displays the email actions (such as views and downloads) of PromoMats / MedComms documents referenced in Approved Emails. This process inserts the activity records into the email\_activity\_\_v object
* Retry Email Send – Retries sending email that is not sent. This is typically because of a failed connection to the email engine. Unsent emails in the sent\_email\_\_v object are placed into Saved status.

  If any associated Related ISI, PI, Piece or other document in a sent email's Email Template or Email Fragments are not in a steady state in PromoMats / MedComms, the email is not sent and the status\_details\_\_v field stamps with the information needed to address the issue. Every time the job runs for the next four days, the job attempts to resend these emails. After four days of unsuccessful trying, the status sets to Failed and no further attempts are made.
* Retry Inserting Email Engine Activities – Retries inserting any email activity into the email\_activity\_\_v object
* Fetch Approved Document Changes – Uses the incremental refresh process to send any PromoMats / MedComms Document metadata changes that have not synced to Vault CRM

To improve performance, the email\_content\_file\_\_v attachment field on the sent\_email\_\_v record updates within hours after the completion of the process that sends scheduled emails. This has no impact on the delivery of email messages, tracking of activity, or the HCP experience.

See [Process Scheduler](../../../Integration/Process_Scheduler.htm) for more information.

#### Frequently Processing Scheduled Emails

Some customers require emails to be processed more frequently. A setting allows Scheduled emails to be processed every 10 minutes.

This option is only available to the production environment, not sandbox environments.

1. Navigate to the Approved Email Administration page.
2. Select the Enable Scheduled Email Processor checkbox.

If the checkbox is selected and the Veeva [Process Scheduler](../../../Integration/Process_Scheduler.htm) is configured for Approved Email, the Scheduler processes all sent email records in the Scheduled status every 10 minutes. The frequency of this job is not configurable.

A row does not display in the Approved Email Administration page after this job completes.

### Related Topics

[Approved Email Overview](../Overview.htm)

[Creating Approved Email Templates](../CreatingContent/CreatingAETemplates.htm)

[Creating Approved Email Fragments](../CreatingContent/CreatingAEFragments.htm)
