Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/Multichannel/ApprovedEmailDocModel/ConfiguringAE/AECRMVaultIntegration.htm

## Integrating Vault CRM and PromoMats / MedComms for Approved Email

* Document Model

Customers have the option to use PromoMats or MedComms to build Email Templates, Email Fragments, and Template Fragments that are reviewed and approved in PromoMats and MedComms, without Content Creators maintaining a separate copy of that content in Vault CRM.

When Approved Email content is developed this way, PromoMats and MedComms remain the single source of truth for approved email content, and the Approved Email Integration syncs that content, its related documents, and their relationships into Vault CRM as documents.

The integration is an inbound standard Vault to Vault integration under the PromoMats - CRM and Medical - CRM Connections, and supports connecting many PromoMats and Medical Vaults to many Vault CRMs. It syncs Email Templates, Email Fragments, Template Fragments, and their related documents as Crosslinks, so the source file and viewable renditions continue to be maintained in the source Vault, and Vault CRM controls the publishing of Approved Email content to the Vault CRM CDN.

Because the integration runs closer to real time than the legacy Approved Email integration, Content Creators publish approved content once and End Users compose emails from the current approved version. The Country Integration limits each regional Vault CRM to the content assigned countries that Vault actually uses, and the standard configuration of Integration Rules, Query Object Rules, Field Rules, and Reference Lookups can be added to, modified, or disabled.

**Who can use this feature?**

* Content Creators – Browser
* [Using Approved Email Integration](#UsingApprovedEmailIntegrationas)
* Integration Users – Browser
* [Syncing Approved Email Content](#SyncingApprovedEmailContentas)
* Users require an Approved Email license

### Configuring Approved Email Integration for

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)
Content Creators and Integration Users](#)

To configure this feature:

1. Ensure [Configuring Approved Email as Document Model](AEConfig.htm) is complete.
2. Navigate to **Admin > Users & Groups > Permission Sets**.
3. Select the appropriate Permission Set.
4. Select Objects.
5. Grant the following permissions:

   | Object | Object Permission | Object Types | Fields | Field Permission |
   | --- | --- | --- | --- | --- |
   | user\_exception\_message\_\_v | R | All | All | Read |
   | user\_exception\_item\_\_v | R | All | All | Read |
   | connection\_settings\_\_v | RE | Approved Email Integration Settings | country\_filter\_\_v | Edit |
6. Navigate to the Application tab of the permission set.
7. Select the **Manage Connections** checkbox.
8. Navigate to **Admin > Settings > General Settings**.
9. Select the Enable CrossLink Documents checkbox.
10. Navigate to **Admin > Configuration > Document Types**.
11. Select the Email Template type.
12. Select Edit Details from the All Actions menu.
13. Select Source document’s source file and rendition for the CrossLink Source Type field.
14. Repeat this process for the Email Fragment and Template Fragment types.
15. Activate the Approved Email Integration and its Integration Points in the Connection. The following records are automatically provisioned as Inactive by default:

    | Record | Name | API Name |
    | --- | --- | --- |
    | Integration | PromoMats-CRM: Approved Email Integration | promomats\_crm\_ae\_i\_\_v |
    | Integration | Medical-CRM: Approved Email Integration | medical\_crm\_ae\_i\_\_v |
    | Inbound Integration Point | <Connection Name>: Approved Email | <connection\_name>\_approved\_email\_iip\_\_v |
    | Outbound Integration Point | <Connection Name>: Approved Email Country | Available values are:  * promomats\_crm\_ae\_country\_oip\_\_v * medical\_crm\_ae\_country\_oip\_\_v |
    | Integration Rule | <Connection Name> Approved Email Integration Rule | Available values are:  * promomats\_crm\_approved\_email\_ir\_\_v * medical\_crm\_approved\_email\_ir\_\_v |

    Duplicate integration record names, and the names of all records under the integration, are appended with a number, for example PromoMats-CRM: Approved Email Integration 001.

#### Mapping Document Types

The following standard Document Type Reference Lookups in the Connection are defined by default and cannot be edited:

| PromoMats/MedComms Document Type | Vault CRM Document Type |
| --- | --- |
| Email Template (email\_template\_\_v) | Email Template (email\_template\_\_v) |
| Email Fragment (email\_fragment\_\_v) | Email Fragment (email\_fragment\_\_v) |
| Template Fragment (template\_fragment\_\_v) | Template Fragment (template\_fragment\_\_v) |
| Reference > Labeling (reference\_\_v.labeling\_\_v) | Reference > Labeling (reference\_\_v.labeling\_\_v) |
| Reference > Important Safety Information (reference\_\_v.important\_safety\_information\_\_v) | Reference > Important Safety Information (reference\_\_v.important\_safety\_information\_\_v) |

To map custom Document types between Vault CRM and PromoMats/MedComms:

1. Navigate to the appropriate Connection record.
2. Create a Document Type Reference Lookup record in the Connection, then create a Reference Lookup record for each custom document type configured as Related Piece, Related Medical Content, or Other Related Documents.

   Only document types with Reference Lookups defined sync through the integration.
3. Populate the source key with the document type API name in PromoMats/Medical Vault, defined down to the classification level where applicable:

   * doctype\_\_v
   * doctype\_\_v.subtype\_\_v
   * doctype\_\_v.subtype\_\_v.classification\_\_v

Each source key must be unique, and the Reference Lookup must be Active to apply. Document Type Reference Lookups on the PromoMats - CRM and Medical - CRM Connections apply when Active without being added to a Field Rule.

#### Mapping Document Lifecycles

For document types that do not use the Vault CRM Content Lifecycle, customers must define a Document Lifecycle State Reference Lookup record in the Connection for each lifecycle state that maps to Vault CRM.

Populate the source key with the Document lifecycle and lifecycle state API name in PromoMats/Medical Vault, for example general\_\_c.draft\_\_c. Each source key must be unique, and the Reference Lookup must be Active to apply.

There is no default lifecycle, and Documents that are not assigned to the CRM Content Lifecycle and do not have Document Lifecycle State Reference Lookups defined fail to sync. Email Templates, Email Fragments, and Template Fragments are hard-coded to the Vault CRM Content Lifecycle and use the following mappings:

| PromoMats/Medical Vault State Type | Vault CRM Lifecycle State |
| --- | --- |
| Steady State | Approved |
| Obsolete State | Expired |
| Superseded State | Superseded |
| All Other States | Staged |

Default Reference Lookups are also provisioned to the General Lifecycle (general\_lifecycle\_\_c) in Vault CRM for the Reference > Labeling and Reference > Important Safety Information document types, which are assigned that lifecycle by default:

| Source Key | Vault CRM Lifecycle State |
| --- | --- |
| medical\_library\_\_c.approved\_for\_use\_\_c reference\_documents\_\_c.approved\_for\_use\_\_c | approved\_\_c |
| medical\_library\_\_c.expired\_\_c reference\_documents\_\_c.expired\_\_c | obsolete\_\_c |
| medical\_library\_\_c.draft\_\_c reference\_documents\_\_c.draft\_\_c | draft\_\_c |

Customers must also add the Rendition Transfer Status (rendition\_transfer\_status\_\_v) field to any additional Document type configured to sync through the integration. This field is automatically provisioned on the dynamic\_word\_template\_\_v, reference\_\_v.important\_safety\_information\_\_v, reference\_\_v.labeling\_\_v, and slide\_\_v Document types and is hidden by default. It is used only by Vault CRM processes to determine when all renditions for a document are available, and should never be viewed or set manually.

#### Mapping Reference Fields

Reference fields on Documents in PromoMats/MedComms can also be mapped to Vault CRM, enabling these fields to resolve correctly during the sync and integration via Field Rules on the Approved Email Integration Rule.

The following standard fields map from PromoMats/Medical Vault to Vault CRM:

| Vault CRM Document Field | PromoMats/MedComms Query Object | Query Field |
| --- | --- | --- |
| brand\_\_v | document\_product\_\_vr – For PromoMats document\_local\_product\_\_vr – For MedComms | name\_\_v |
| product\_family\_\_v | document\_product\_family\_\_vr – For PromoMats document\_product\_\_vr – For MedComms | name\_\_v |
| indication\_\_v | document\_indication\_disease\_\_vr | name\_\_v |
| language\_\_v | documents | language\_\_v |
| restrict\_fragments\_by\_product\_\_v | documents | restrict\_fragments\_by\_product\_\_v |
| audience\_\_v | documents | event\_audience\_\_v |
| bcc\_\_v | documents | bcc\_\_v |
| check\_consent\_\_v | documents | check\_consent\_\_v |
| target\_platform\_\_v | documents | crm\_target\_platform\_\_v |
| content\_type\_\_v | document\_content\_type\_\_vr | external\_id\_\_v |
| title\_\_v | documents | title\_\_v |
| document\_host\_url\_\_v | documents | document\_host\_url\_\_v |
| email\_builder\_\_v | document\_content\_module\_\_vr | name\_\_v |
| email\_domain\_\_v | documents | email\_domain\_\_v |
| events\_management\_subtype\_\_v | documents | crm\_template\_subtype\_\_v |
| email\_from\_address\_\_v | documents | from\_address\_\_v |
| email\_from\_name\_\_v | documents | from\_name\_\_v |
| hidden\_\_v | documents | crm\_hidden\_\_v |
| key\_message\_\_v | document\_key\_message\_\_vr | external\_id\_\_v |
| email\_replyto\_address\_\_v | documents | reply\_to\_address\_\_v |
| email\_replyto\_name\_\_v | documents | reply\_to\_name\_\_v |
| email\_subject\_\_v | documents | subject\_\_v |
| survey\_\_v | document\_crm\_survey1\_\_vr | external\_id\_\_v |
| territory\_\_v | documents | territory\_\_v |
| email\_template\_type\_\_v | documents | email\_template\_type\_\_v |

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

To configure this feature:

1. Ensure [Configuring Approved Email as Document Model](AEConfig.htm) is complete.
2. Navigate to **Admin > Users & Groups > Permission Sets**.
3. Select the appropriate Permission Set.
4. Select **Objects**.
5. Grant the following permissions:

   | Object | Object Permission | Object Types | Fields | Field Permission |
   | --- | --- | --- | --- | --- |
   | Document | R | All appropriate object types | All mapped fields | Read |

### Using Approved Email Integration as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)
Content Creators](#)

Content Creators create, review, and approve Email Templates, Email Fragments, and Template Fragments in PromoMats and MedComms, and the integration transfers them to Vault CRM. Documents are created with bound reference to the corresponding Document version in PromoMats and MedComms, meaning that new draft versions can be created in PromoMats or MedComms without affecting availability in Vault CRM. When a new Approved version of a Document is synced via the integration, a new version of the Document is created in Vault CRM.

In addition, the integration syncs the fields mapped through Field Rules and the Assets rendition. Content Creators can confirm in PromoMats/Medical Vault that documents were successfully crosslinked to Vault CRM.

The following fields are populated automatically on Approved Email documents in Vault CRM and are not mapped through Field Rules:

| Vault CRM Document Field | Populated With |
| --- | --- |
| name\_\_v | The source Document's name\_\_v |
| detail\_product\_\_v | The crm\_product\_\_v value in PromoMats/Medical Vault, matched on external\_id\_\_v to vexternal\_id\_\_v in Vault CRM.  If crm\_product\_\_v is null, the product\_\_v value is used. If neither field is populated, Detail Product remains null and the document syncs successfully. |
| product\_group\_\_v | The crm\_product\_group\_\_v value in PromoMats/Medical Vault, matched on the combination of the referenced Product and Detail Group. |
| detail\_group\_\_v | The crm\_detail\_group\_\_v value in PromoMats/Medical Vault, matched on external\_id\_\_v to vexternal\_id\_\_v in Vault CRM.  If crm\_detail\_group\_\_v is null, the detail\_group\_\_v picklist value label is matched to name\_\_v in Vault CRM. If neither field is populated, Detail Group remains null and the document syncs successfully. |
| vexternal\_id\_\_v | <vault DNS>\_\_<source vault doc ID>\_\_<source vault doc version> |
| source\_vault\_dns\_\_v | The source Vault's DNS. |
| source\_vault\_document\_id\_\_v | The source Vault document's ID. |
| publish\_method\_\_v | vault\_user\_published\_\_v |
| cdn\_processing\_status\_\_v | waiting\_for\_assets\_\_v, if the document has an Assets rendition. |
| email\_allows\_documents\_\_v | True, if the Email Template contains the {{insertEmailFragments}} or {{insertEmailFragments[Minimum,Maximum]}} token. |
| ai\_enabled\_template\_\_v | True, if the Email Template contains the {{aiRewriteStart}} or {{aiRewriteEnd}} token. See [Agentic Email Overview](../../../VeevaAI/EmailAgent/EmailAgentOverview.htm) for more information. |

### Syncing Approved Email Content as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)
Integration Users](#)

To sync Approved Email content to Vault CRM:

1. Create or update an Email Template, Email Fragment, or Template Fragment in PromoMats/Medical Vault.
2. Move the document to a lifecycle state that syncs through the integration. By default, only Steady State documents sync.
3. Confirm the document is assigned a country included in the Country Filter of the target Vault CRM, if the Approved Email Country Integration Point is active. Documents with no countries assigned always sync.

PromoMats/Medical Vault records all changes to Approved Email documents and notifies Vault CRM, which schedules a job to run five minutes later. Vault CRM then queries only the documents that changed since the last successful run. Changes that sync include document versions and renditions that are created, updated, or deleted, changes to document metadata, and changes to Approved Email document relationships. On the first full sync after the integration point is activated, only the latest minor version and the latest steady state version sync. Superseded and Obsolete versions are maintained in Vault CRM after incremental and subsequent full syncs.

To sync Documents related to Approved Email content, relate the document to an Email Template, Email Fragment, or Template Fragment in PromoMats/Medical Vault using one of the following relationships:

| PromoMats/Medical Vault Relationship | Vault CRM Relationship |
| --- | --- |
| Related PI | Related PI |
| Related Email Fragments | Related Email Fragments |
| Related Template Fragments | Related Template Fragments |
| Related Piece (PromoMats) Related Medical Content (Medical) | Related Piece |
| Related ISI | Related ISI |
| Other Related Documents | Other Related Documents |

Related documents sync as version-specific Documents, in the same way that Approved Email content syncs.

To remove Approved Email content from Vault CRM, delete the Document in PromoMats/Medical Vault, or move it to an Obsolete state. The corresponding document in Vault CRM moves to the Expired state instead of being deleted, which maintains the references other records in Vault CRM have to it. A related document that is expired or obsolete in PromoMats/Medical Vault is expired in Vault CRM, and its Approved Email document relationships are preserved. A related document that is removed from all Approved Email document relationships in PromoMats/Medical Vault is expired in Vault CRM.

Documents that sync through the integration are read-only in Vault CRM. Modifying document metadata or document relationships in Vault CRM, including adding or removing related documents, is not supported.

When a document fails to sync, Vault CRM creates a User Exception Message with User Exception Items that contain the IDs of the documents that failed. Documents fail to sync and move to the Sync Error lifecycle state, if they were previously synced, in the following scenarios:

* The document has a mapped field that references a Vault Object record that does not exist in Vault CRM
* The document has a required field in Vault CRM that is not populated in, or mapped from, PromoMats/Medical Vault
* The document has a mapped field that references a picklist value that does not exist in Vault CRM
* The Email Template or Email Fragment has a relationship to a document that fails to sync

When a related document fails to sync, it also causes a sync failure for any Email Templates or Email Fragments related to it. When a text field in PromoMats/Medical Vault is longer than the mapped field in Vault CRM, the value truncates when it syncs and a warning displays in the logs, but the sync does not fail and no User Exception Message is created.

User Exception Messages are set to Inactive when the user runs the Reprocess Request action on the User Exception Message, or the next time the related integration runs successfully.

When the Document Transfer Integration is active in the same Connection and is configured to sync the same documents, the two integrations do not run at the same time. When one integration receives a notification while the other is running, it waits for the running integration to complete before starting. Documents are not duplicated, because each integration checks whether the document was already created or updated by the other. Where the Approved Email Integration is configured to sync non-steady state related documents and the Document Transfer Integration is not, the Approved Email Integration syncs the latest non-steady state version and the Document Transfer Integration syncs only changes to Steady State versions. If one integration encounters an error syncing a document, the other still attempts to sync it, and each integration checks whether the other has already resolved the error before retrying.

### Related Topics

[Creating Approved Email Templates](../CreatingContent/CreatingAETemplates.htm)

[Creating Approved Email Fragments](../CreatingContent/CreatingAEFragments.htm)
