Account Contact Information synchronization
Medical Information Cloud Inquiry Management provides a utility to synchronize Account data with Contact Information records. For example, the Account Phone field might be used by non-agents as the work number for an HCP. To make that information available to the agents in the Medical Information Cloud Inquiry Management module, the Account Contact Info Sync can be configured to create/update a related Contact Information record. The synchronization is a one-way sync. The Contact Info Records are configured to be locked.
Configuring Account fields to sync to Contact Information records
For the Account Contact Information synchronization to work, the Enable Contact Info Mappings (MED_Enable_Contact_Info_Mappings__c
) field must be enabled in the Global Setting (MED_Global_Setting__mdt
) custom metadata type.
The fields that trigger the creation or update of an associated Contact Info record can be configured by creating an Account Field Contact Info Mapping record. Provide the following information:
Account Field API name of the field that should trigger the update.
Record Type Developer name of the Contact Info record that should be created/updated.
The field on the Contact Info Record to map the value to. This should be the same type as the source field.
Optionally provide the Type that should be set on the contact info record.
Once configured, any updates to the account trigger the synchronization of the account field to the proper contact info record.
Locking synced records
The records which are created using the functionality have a source of ‘Parent Account’, so by default, they will be locked by the Locked Record Handler unless it has been reconfigured.
Note
Changing this formula to allow the records to be edited may result in data being out of sync and/or being overwritten when the account information changes.
Initializing Data
If the Medical Information Cloud product is being installed in a Salesforce instance that already has account data, then the synchronization must be initialized through a batch job. To kick off the batch job, perform these steps:
Open an Execute Anonymous Window. See Salesforce's documentation.
Enter the following code:
MED_AccountContactInfoSync batchJob = new MED_AccountContactInfoSync();
Database.executeBatch(batchJob);
Click Execute.
A status of "Success" should be displayed in the log panel.
You should also see jobs being executed under Setup > Jobs> Apex Jobs. You can abort the job from this screen if necessary.