Detaching emails from constituent records process
Introduction
One of the powerful tools built into the Deduper has the function of detaching emails from constituent records so the records are concise and cleaner. Sometimes, constituents have multiple emails or a different primary email, and it may be difficult to decipher which email is better to utilize in the constituent record. Going through the following logical process will help you determine the best email to choose.
Process of Detaching Emails
The Deduper Detaching Process from Data Imports is very useful as it help automate the overall process of detaching emails. Using the Download option after finding duplicates, check the box that says “Automatically mark as Detach.” Upload the data but make sure to review the file in Excel first to see if you are satisfy with the emails that about to be detached.
Step 1: Grab System Record ID and Primary Email Address.
- We start by reading the first row from the spreadsheet to get the System Record ID of the constituent.
- Create a query in Altru with the System Record ID to get all the email addresses found on the record:
- If there are no email addresses found no need to remove anything. The process ends.
- If at least one email address is found the process continue.
- We get the primary email address attached to the record and compare it to the one in the spreadsheet
- Convert both emails to lowercase and compare.
- If the emails are not the same the process ends and no email is detach.
- If they are the same the process continues
Step 2: Detaching emails with attached Sales Orders
- If found no sales orders:
- We check if we have multiple email addresses
- If found more than one email address:
- We look for a non primary email address and set it as the primary email address then the process continue.
- If found only one email address, the process continue.
- If found more than one email address:
- The email is detach from constituents record and the process ends.
- We check if we have multiple email addresses
- If there are sales orders:
- We get all the delivery email addresses
- Compare each delivery email address with the primary email address
- If the email address is the same as the primary email address its saved
- We also store the Lookup of the sales order to restore data if needed
- If the email address is not the same as the primary email address its ignored
- We get all the sales orders who match the primary email address
- If there’s no sales orders found
- We check if constituent has multiple email address
- If more than one email address
- We set a non primary email as the primary email
- We remove the attached email address and process ends
- If there’s one email address found
- We remove the attached email address and process ends.
- If more than one email address
- We check if constituent has multiple email address
- If there are sales orders:
- We remove the delivery email address from each sales order
- We store the lookup ID for each order as a backup
- Again, we check if constituent has more than one email address
- If more than one email address
- We set a non primary email as the primary email
- We remove the attached email address and the process will ends.
- If found just one email address:
- We remove the attached email address and process ends
- If more than one email address
- We remove the delivery email address from each sales order
- If there’s no sales orders found
- We get all the delivery email addresses
Summary
By seeing the logic behind what the Deduper does in detaching email addresses, you can see how the process helps clean constituent records and help run your Altru database more organized and efficient. If you have any more questions about the Deduper and how it works, please contact us!