Veeva CRM customers can enable the CRM Connection, which allows Vault to pull Medical Inquiry records from CRM and close the inquiry in CRM when the case is closed in MedInquiry. Vault pulls Medical Inquiry records in the Submitted or Saved states that are assigned to the Medical Inquiry Integration User using a scheduled job to create corresponding Case and Case Request records. Then, Vault pushes the status of records in the Closed state back to CRM using a second scheduled job. By default, Vault sends a status update to CRM indicating that the inquiry is closed.

This feature is separate from the CRM Data Sharing feature and does not require you to sync CRM Accounts to MedInquiry prior to pulling inquiries.

Vault notifies the user initiating the job or the job owner upon failure or completion of the job. You can schedule jobs to run the connection. You can also manually run the pull and push jobs by performing the actions on the integration points.

This feature must be enabled by Support. Once this feature is enabled, navigate to Admin > Settings > Application Settings and, under Medical Inquiry, select the Sync CRM Inquiries with MedComms checkbox.

This feature can only be enabled when the Medical Inquiry CRM Data Sharing feature is disabled.

To create the Connection, create a CRM Org object with the Medical Inquiry integration selected. Vault provides the initial setup from the CRM Org record. You must enter the CRM Org Type and CRM Org ID fields on applicable CRM Org records. You must also enter a CRM Username.

You must configure the following components to use the CRM Connection:

  • Add the Veeva ID and OpenData Healthcare Provider ID fields to the Case Contact object type on the Person object.
  • Add the Mobile, CRM Org, External ID, and Source fields to the Associated Contact object type.
  • Update the Email field on the Associated Contact object type to be optional.
  • On the Person object, clear the Must Be Unique checkbox on the External ID field.
  • Add the Last CRM Data Share and Source CRM Org fields to the Case object page layout
  • Configure the user action and add your CRM Connection credentials.

Authorizing the Connection

First, you must configure the action to authorize credentials:

  1. Navigate to Admin > Configuration > Objects > Connection Authorization.
  2. Click the Actions tab.
  3. Click Create.
  4. Select Enter Salesforce Connected App Details and click Continue.
  5. Optional: Enter a Description.
  6. Click Save.
  7. Navigate to the Object Type tab.
  8. Click the Actions menu.
  9. Select Edit Object Type Actions.
  10. Add the Enter Salesforce Connected App Details action to the Basic Auth Object Type.
  11. Click Save.

Next, add your credentials:

  1. Navigate to Admin > Connections > Connection Authorizations.
  2. Click the desired authorization or create a new Connection Authorization.
  3. Click Edit.
  4. Enter your Veeva CRM User Name, then click Save.
  5. Click the Actions menu and select Set Password.
  6. Enter your CRM password, then click Save.
  7. Click the Actions menu and select Enter Salesforce Connected App Details.
  8. Enter your Client ID / Connected App Consumer Key and Secret / Connected App Consumer Secret.
  9. Click Save.

Configuring Integration Rules

After authorizing the CRM Connection, you must add and configure integration rules to suit your business logic. You can create a single set of inbound integration rules for the integration point. The outbound push job does not support integration rules, and only pushes a status update back to Veeva CRM to close the Medical Inquiry when the Case is closed in Vault.

To configure integration rules:

  1. Navigate to Admin > Connections > Integration Rules.
  2. Click Create.
  3. Enter a Label and a Name.
  4. Select a Connection.
  5. Select an Integration Point.
  6. Click Save.

Field Rules

Next, you must add field rules for each field you want Vault to populate. Field rules should account for the fields you want to sync from the Medical Inquiry in CRM into Vault. You can specify default values for fields that are excluded from the transfer between applications using a record with only the target object and field populated alongside the type and default value. Vault also applies defaults if the CRM record has no value selected.

Vault limits the Medical Inquiry transfer to the sources used and only pulls the fields for the given query object, the Medical Inquiry record in CRM.

Field Rule Property Descriptiom
Target Object The object you are using in Vault.
Target Object Field The object field in Vault for which you are creating the rule.
Label The label identifying the field rule.
Name The key identifying the field rule.
Field Default The value to assign to the field if the field is blank. If you are using a referenced object such as Product Family, use the ID.
Reference Lookup Type Supports mapping values in CRM to Vault and Vault to CRM. For example, CRM may return Cholecap in the Product Family field, which is stored as cholecap__v in Vault.
Reference Lookup A link to a reference lookup for the matching type. Reference lookups contain a set of values and can be shared. For example, you can use a reference lookup for the Product Family object in multiple field rules.
Query Object The object in CRM to which this field rule relates.
Query Field The field on the object in CRM to which this field relates.
Query Field Type The field type to which this relates. This property is optional.

Create a Scheduled Pull Job

Next, you must configure the action to authorize credentials:

  1. Navigate to Operations > Job Definitions and click Create Job.
  2. Enter a Title and a Name.
  3. Under Type, select SDK Job.
  4. Under Job, select com.veeva.vault.app.medical.medicalinquiry.crmorg.jobs.CRMOrgMedicalInquiryPullSchedulingJob (Medical Inquiry (CRM Connection Inquiry Pull)).
  5. Define a schedule.
  6. Select a Job Owner.
  7. Select Active in the Status drop-down.
  8. Click Save.

Create a Scheduled Push Job

Then, you must configure a second action to authorize credentials:

  1. Navigate to Operations > Job Definitions and click Create Job.
  2. Enter a Title and a Name.
  3. Under Type, select SDK Job.
  4. Under Job, select com.veeva.vault.app.medical.medicalinquiry.crmorg.jobs.push.CRMOrgMedicalInquiryPushJob (Medical Inquiry (Inquiry Push Job) - NA Commercial Org).
  5. Define a schedule.
  6. Select a Job Owner.
  7. Select Active in the Status drop-down.
  8. Click Save.

Create a Local Connection

The scheduled job requires a connection to allow Vault to read data from the CRM Org and Connection objects.

To create a new connection:

  1. Enter a Name.
  2. Enter medcomms_local as the API Name.
  3. Under Connection Type, select Local.
  4. Enter a Description.
  5. Select an Authorized Connection User. This is the user with permission to to run the scheduled job.

Next, add an action to run the job:

  1. Navigate to Configuration > Objects > Integration > Actions.
  2. Select Create.
  3. Add the Execute Medical Inquiry Pull job.