Skip to Content
Technical Articles
Author's profile photo Karthik Viswanathan

Checking For Duplicate Email – Business and Personal – SuccessFactor Employee Central

Business Requirement:

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.

Solution Overview:

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.

Configuration:

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

 

 

Final Output:

During hiring, entering business email as karthik@karthik.com, 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.

For Blocking:

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.

https://blogs.sap.com/2020/08/23/validate-email-address-with-regular-expression-successfactor-employee-central/

 

Thanks for reading, Keep Exploring 👍

 

Karthik.

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Marvel Maniega
      Marvel Maniega

      Hi Karthik,

      Im trying to do this email duplication step by step as you mentioned, but unfortunately is not working as expected as your work.

      any advice for this error?

      Thanks have a nice day

      Author's profile photo Marcel Kolbus
      Marcel Kolbus

      Hello Marvel,

      I faced the same issue with the rule configuration and noted that a modification in (else if-Statement) is needed for personal email types.

      I added a second IF-Statement at the beginning to check if the email type is business or personal. If personal the rule is then doing nothing. The reason for this is that if no business email type is entered in the system it is taking the business email type as “null” value and always triggering the message.

      Please see business rule below:

      Modification%20Business%20Rule%20to%20check%20email%20address

      Modification Business Rule to check email address

      Kind regards and have a nice day

      Marcel

      Author's profile photo Karthik Viswanathan
      Karthik Viswanathan
      Blog Post Author

      Thanks for this Marcel Kolbus , Blog updated now 🙂

      Author's profile photo Christopher Trum
      Christopher Trum

      What scenario do we miss if we only use one condition

      If Employee Information.Email Information = Email Type is equal to Business

      We are only interested to check the business email no? why overcomplicating it ?

      Author's profile photo Neslihan Sertkol
      Neslihan Sertkol

      Hi Karthik,

      thank you very much for sharing! I have configured your rule, which is great for new hires.

      But what if an employee is terminated and will be rehired again with the same e-mail?

      Can we somehow delete the data record in the custom object "email storage" automatically via business rule or condition in integration center?

      It would be great, if you have an idea to solve this.

      Thank you very much & kind regards,

      Nesli