Account Merges in CRM

Account merges are reflected in CRM through regular imports. Record conflicts can occur during an import when values from external ID fields from a losing Account are copied into winning Accounts. The conflict arises from the same external ID being used across two Account records for which Align is not supported.

To avoid record conflicts in Align after a CRM import, Align alters the External Ids of losing Accounts in Align during CRM Account merges. Align completes the following steps when processing Account merges during a CRM import:

  1. Align queries CRM for losing Accounts: (WHERE Account.IsDeleted=True AND Account.MasterRecordId != null)
  2. Align imports the losing Accounts and processes them in the following way:

    • The status__v field on the account__aln object is set to inactive__v
    • All unique fields on the Account__aln object have "::MergedWith::<CRM.Account.Id of the Winning Account>" appended to the original value.

      For example, the losing Account’s external_id__aln field on the account__aln object is set to 12345. The winning Account has a value of CRM.Account.Id of 001q000000bvSJ4AAM. After the merge, the losing Account in Align has a value of 12345::MergedWith::001q000000bvSJ4AAM.

      Align only supports unique fields of type Text and not of type Number.

    • All open Territory assignments are end dated for the losing Account
  3. CRM Import continues to import the remaining Accounts.

This logic does not apply to modeling records.

Account Merges in MCCP Targeting

If accounts are merged in CRM that are associated with MCCP targets, the following update also occurs in Align as part of the account merge process:

Merged

CRM Accounts

Merge Import Behavior into the Current Production Cycle in Align

Merge Import Behavior into the Upcoming Modeling Cycle in Align

The winning account is a target

The mc_cycle_plan_target__aln record is not updated, since the losing account is not a target.

The losing account is a target

The target__aln field of the mc_cycle_plan_target__aln records for both the production and modeling cycles update to instead reference the winning account. The records remain active.

An entry noting the successful merge is added to the SUCCESSFILES_IMPORTFROMCRM folder of the import process.

Both the winning and losing accounts are targets

  • The mc_cycle_plan_target__aln record associated with the winning account is not changed.

    The following fields are updated on the mc_cycle_plan_target__aln record associated with the losing account:

    The status__v field updates to inactive__v
  • The target__aln field updates to instead reference the winning account
  • The external_id__aln and targeting_id__aln fields are appended with the following:

    ::MergedWith::<CRM.Target.Id of the Winning Account>

An entry noting the successful merge is added to the SUCCESSFILES_IMPORTFROMCRM folder of the import process.

The mc_cycle_plan_target__aln record associated with the winning account is not changed.

The mc_cycle_plan_target__aln record associated with the losing account is deleted. Any mc_cycle_plan_channel__aln and mc_cycle_plan_product__aln records associated with the target are also deleted.

An entry noting the successful merge is added to the SUCCESSFILES_IMPORTFROMCRM folder of the import process.