cancel
Showing results for 
Search instead for 
Did you mean: 

Move Contacts to Correct Accounts Based on Domain

klabisje
Contributor

Like most of us I am working to clean up chaos in our SFDC. We have finally removed all duplicate Leads & Contacts, but now I am left with Contacts that are not currently sitting on the correct Account record. 

I am trying to determine if there is any way to leverage DemandTools to move Contacts, via logic, to their correct Account by looking for the Email Domain fields on our Acocunt & Contact object to match. 

Example:

Account 1
Email Domain: mydomain.com
Contact 1 [Email Domain:yourdomain.com]
Contact 2 [Email Domain: mydomain.com]
Contact 3 [Email Domain: mydomain.com]

Account 2
Email Domain: yourdomain.com
Contact 4 [Email Domain: yourdomain.com]
Contact 5 [Email Domain: yourdomain.com]
Contact 6 [Email Domain: mydomain.com]

 

With the end goal to have only the Contacts on each Account where they belong. I am  open to the idea of needing to run a series of Modules to achive the end goal. Any insights for this community would be greatly appracited, thanks in advanced. 

1 ACCEPTED SOLUTION

AnthonyValidity
Validity Team Member
Validity Team Member

Hi @klabisje ,

Thank you for the detailed request and examples.  I think I have a solution that will work for you.  I'm assuming that you're going to be using the website domain on the account record, but if not you could just modify what I provide to use a main account email if that's the case.  This is a two step process - we're using two steps because if we don't flag the contacts that don't align with the account domain, the system would process all contacts (aligned or not).

  1. Run a Modify scenario where we flag a custom field.
  2. We're using the Formula action on step 2.  It will look like something like this:  
    1. IF(RelaxedDomain(${Email})=RelaxedDomain (${Account.Website}), "True", "False")
    2. The field we're changing is the custom field we created.
    3. True means the domains align.
    4. False means that they do not.
  3. Process the scenario.

Now we're going to use this as a flag to know which records we need to process.

  1. Open Import.
  2. Source is going to be the same Salesforce you're logged into in the top right corner.
  3. The first Salesforce Object is going to be Account (I don't think you'll be able to filter those).
  4. The Operations is going to be Update and Method is going to be Match Conditions
  5. The next Salesforce Object is going to be Contact.
  6. You only have to map two fields:  ID to Account ID (Always Update) and Website to Email (Do not Update)
  7. Next step add a condition where that custom fields = False so that we only look at those contacts that don't align with their account's domain.
  8. For Match steps, you're going to choose Email from the drop down and use the "Domain" comparison type.

Review the matches to make sure that it is matching as you'd like - essentially you're comparing the Contact's email domain against all accounts and seeing if it matches.  If it matches, you're going to have the account ID on the contact be updated with the matched account.

Here's a video showing what I did:

https://www.loom.com/share/ade1f39158e74e0b8cff9813fcd12ba5?sid=95903c4a-426f-40b7-8128-9c7acc8d885a

Hope this helps!

Anthony Lardiere Jr
Senior Customer Success Manager

View solution in original post

2 REPLIES 2

AnthonyValidity
Validity Team Member
Validity Team Member

Hi @klabisje ,

Thank you for the detailed request and examples.  I think I have a solution that will work for you.  I'm assuming that you're going to be using the website domain on the account record, but if not you could just modify what I provide to use a main account email if that's the case.  This is a two step process - we're using two steps because if we don't flag the contacts that don't align with the account domain, the system would process all contacts (aligned or not).

  1. Run a Modify scenario where we flag a custom field.
  2. We're using the Formula action on step 2.  It will look like something like this:  
    1. IF(RelaxedDomain(${Email})=RelaxedDomain (${Account.Website}), "True", "False")
    2. The field we're changing is the custom field we created.
    3. True means the domains align.
    4. False means that they do not.
  3. Process the scenario.

Now we're going to use this as a flag to know which records we need to process.

  1. Open Import.
  2. Source is going to be the same Salesforce you're logged into in the top right corner.
  3. The first Salesforce Object is going to be Account (I don't think you'll be able to filter those).
  4. The Operations is going to be Update and Method is going to be Match Conditions
  5. The next Salesforce Object is going to be Contact.
  6. You only have to map two fields:  ID to Account ID (Always Update) and Website to Email (Do not Update)
  7. Next step add a condition where that custom fields = False so that we only look at those contacts that don't align with their account's domain.
  8. For Match steps, you're going to choose Email from the drop down and use the "Domain" comparison type.

Review the matches to make sure that it is matching as you'd like - essentially you're comparing the Contact's email domain against all accounts and seeing if it matches.  If it matches, you're going to have the account ID on the contact be updated with the matched account.

Here's a video showing what I did:

https://www.loom.com/share/ade1f39158e74e0b8cff9813fcd12ba5?sid=95903c4a-426f-40b7-8128-9c7acc8d885a

Hope this helps!

Anthony Lardiere Jr
Senior Customer Success Manager

klabisje
Contributor

Thanks so much Anthony, workign though a few aspects of this, but intial tests seem to be promising!