Human Capital Management Blogs by Members
Gain valuable knowledge and tips on SAP SuccessFactors HCM suite and human capital management market from member blog posts. Share your insights with a post of your own.
Showing results for 
Search instead for 
Did you mean: 
How to Automatically generate email addresses and phone number for the employees during hiring.



If First name is Test and Last name is Emaildefault were to be hired, his email address would have to be, Email Type to be Business and Is Primary to be Yes.

Also Phone Type to be Office, Country Code to be +44, Phone Number to be 000000 and Is Primary to be Yes.

It should automatically default or fill those fields.

Lets Start!!!!!!



Navigation: EC-> Admin Tools -> Search for Configure Business Rules

Create the rule as per this screen below for Email default.


Points to be noted:

  • Base object has to be Employee Information as you need this rule to kick in while hiring.

  • Format() is a function that comes shipped. There are many other useful functions that you can use out of the box

  • Format() lets you use java style runtime variables %s. The rule here essentially means replace the first %s with the first name and the next %s with the last name of the employee.



Now tie the business rule you created for emailInfo

Navigation: EC->Admin Tools-> Search for “Manage Business Configuration”



Navigation: EC-> Admin Tools -> Search for Configure Business Rules

Create the rule as per this screen below for Phone default.



Points to be noted:

Base object has to be Employee Information as you need this rule to kick in while hiring.



Now tie the business rule you created for phoneInfo

Navigation: EC->Admin Tools-> Search for “Manage Business Configuration”




Let’s take our rule for a spin by trying to hire an employee.

Navigation: EC->Admin Tools-> Search for ‘Add New Employee’



Check the Email and Phone Info data.


Fields are automatically defaulted.

Looks all good!


Hope this was helpful.



Venkata Subbarao Pathangi
Product and Topic Expert
Product and Topic Expert
0 Kudos
Interesting post, but in 8 years implementing EC I have never had the request to set up email addresses this way.   The nuggets in this post are setting the country code and 'business'.  However, for this to be scalable for a global implementation then your rule would become very complex and may find it easier referencing the company table.

Active Participant
0 Kudos
Thanks Venkata for sharing.

One of my clients had similar requirement.
0 Kudos
Gr8...Thanks Venkata, this is really useful.


Is there any possibility to create USERNAME automatically while hiring the employee, in similar logic of email id creation.
0 Kudos
Thank you venkata, Useful
0 Kudos
What will happen, if you got two people having the same name in the company?
There is no check logic, right?
Hi Sebastian,

We can put logic.

The solution is fairly simple. Just create the email address in the rule and check for its availability in the EC database. If already available, suffix the email with an incremental number, else, just use the email. But…

  • There is no way to access employee email data either via a function or via an API call at the business rule level => we got to create our own email store – we do that with an MDF object.

  • The business rule framework also doesn’t provide a way to create an entry in the MDF object. Hence we have to populate the MDF object with via an external contrivance – a custom BOOMI process to be precise.

Step 1: Create MDF Object  – cust_email
Navigation:EC->Admin Tools-> Search for “Configure Object Definitions”.
Just create an object with effective dating set to none, API visibility set to editable and retain the External Code and Name. Everything else is optional and can be configured on a need basis.

Now get object cust_email into the business rule

For the moment  let’s assume that the aforementioned BOOMI process already exists and keeps the MDF object cust_email afresh with all the new email addresses as and when they are generated.

With that assumption let’s understand the business rule here.

For starters, there is an if statement. The if statement checks for the existence of the email address in the MDF object. If it does exist-> then suffix the email address with an incremental number else just use the email address.


the Then Statement has a few new faces

  • Format template now reads –

  • The third argument is basically the suffix. E.g. So how do we get such a suffix generated?

  • We can use the standard function GetNextValue() along with the MDF object Sequence to achieve the incremental behavior of the suffix. In this rule email-auto-increment is one specific Sequence object


So the Sequence object has to be created beforehand.

Navigation:EC->Admin Tools-> Search for “Manage Data” -> Create new sequence.


The sequence starts with the number 1 and it’s auto-incremented in steps of 1.

Now the business rule as such is in place. Provided the cust_email object is updated every now and then we are assured of a unique email address every time a new person is hired.



Venkata Subbarao Pathangi
0 Kudos

Instead of first name i use "Preferred Name". But when i test it doesn't pull the preferred name through. I get the following:




Employee Information.Personal Information.Preferred Name


Employee Information.Personal Information.Last Name

Does this mean "preferred anme is not available for this type rule?

Kind regards

Labels in this area