Checking For Duplicate Email – Business and Personal – SuccessFactor Employee Central
When hiring, business wants to place a check to search for duplicates in personal and business email and also wants to block certain emails so that it cannot be used for any users globally.
A very simple requirement, but we do not have a standard/straight forward solution to identify duplicates in email information portlet.
We are going to use below tools to achieve the requirement,
- Custom MDF
- Integration Center
- Business Rules
Custom MDF – To store the business and Personal emails of all users.
Integration Center – To check for new users hired to system and add their email address to Custom MDF
Business Rule – To check for duplicate email during hire.
We will create a Custom MDF to store all the email address(Business and Personal), data migration will happen via Integration Center for existing data and same IC Job will be used for all the future hires as well.
IC job will run every day to check for new hires and it will push the email address to Custom MDF.
A business rule will be created with parameter “Employee Information” and will be added at two places “OnSave” and “OnChange” in email info portlet and email address field respectively.
STEP 1: Creating Custom MDF to store business and Personal email of all users.
1.1: Object Definitions >> Create a new object
I created a very simple object with two string fields to store business and personal email, we can also create other string fields to store other emails if maintained in email info portlet.
Very importantly make sure API Visibility is set to “Editable” so that we can use this object in Integration Center.
After creating above object, please provide necessary permissions to yourself so that you can access the “Email Storage” Object.
Below is the object view on Manage Data
Above image is a sample image on how email storage object will look before IC Job.
STEP 2: Creating Integration Center Job to migrate existing user’s email and also to check for new hires and push their email to above created custom MDF.
2.1: Tools >> Integration Center >> Create >> More Integration Types and follow below steps in screen shot
2.2: Select Tag as Personal Information >> Select Email Information in Other Entities
After clicking select, >> On the Next screen, input Integration Center Job name of your choice and click next
2.3: Select Destination Field as “Email Storage” Object we created in Step 1.
2.4: Mapping Fields from Email information portlet to Custom MDF Email Storage Portlet.
Drag Person ID from Email Information Portlet to externalcode, so that external code will have value of person ID
Similarly to capture business email from email info portlet, follow below steps,
Create condition like below to capture business email,
Note: 8448 in above equalto condition is option id of Business email type, you can get the option id from picklist center >> search for ecEmailType
Click OK >> click on Test View to look for output
2.5: Go to Filter and Sort Tab >> Advanced Filters >> Set Filtering condition to Business Email, with this IC Job am going to show and focus on Business Email, same set of condition can be created for Personal Email as well with Personal Email type option Id
2.6: Go to Scheduling Tab >> Select Suspended/Not Scheduled >> Click NEXT
2.7: Go to Review and Run Tab >> Save >> Click Run Now
After Job ran successfully, all the email data would have got migrated to Custom MDF,
2.8: Now edit IC job again and add scheduling to run every day
Go to Filter and Sort Tab >> TIme Based Filters >>Select Modified Since >> Last Run Time
2.9: Go to Scheduling Tab to make the job to run daily >> Save and Click “Set Schedule”
STEP 3: Creating rules to check for duplicate emails.
3.0: Creating rule with parameter “Employee Information”, below rule is created to check for business email, similar rule can be created to check personal email as well.
3.1: Place above rule in Email Info portlet >> Email Address Field >> OnChange
During hiring, entering business email as firstname.lastname@example.org, which is already available and used by an user.
Above setup can also be used for blocking certain emails so that it cannot be used for any users.
you have to manually maintain the emails which needs to be blocked in Manage Data >> Custom MDF Email Storage, once stored, rules in email info portlet will make sure to stop HR from using those emails to users.
Note: It is a string field, so emails are case sensitive, you can also create a rule to always save the emails in CAPITAL Letters so that case sensitive confusions will never happen.
You can also validate email, please refer below blog.
Thanks for reading, Keep Exploring 👍