Technical Articles
Custom email templates using SuccessFactors Document Generation
Introduction
Every implementation partners/consultants faces a situation atleast once from customers asking for custom email notifications for different scenarios instead of using standard notifications.
Using SuccessFactors standard email notification templates, one cannot change multiple formats on the same object; to overcome this situation we can use a functionality available in Document Generation.
This article focuses on Custom email Notifications using Document Generation for MDF Based Objects (standard/customer specific).
Custom Notification Templates using Document Generation
Apart from generating Employee letters and documents, we can make use of Document Generation functionality to trigger custom email templates – workflow approvals, cc roles, etc.,
First step in the process is to create “Document Generation Group”:
- use transaction “Document Generation – Manage Document Template”
- in Create New – Select “Document Generation Group”
- fill in all required fields
Next – create “e-mail / workflow template”:
- use transaction “Document Generation – Manage Document Template”
- in Create New – Select “Document Generation Template”
- provide Category as “Workflow” and Group as “MDF_CUST_EMAIL” (created in earlier step)
- maintain the template content
Next – maintain mappings for the tokens used in the template
- use transaction “Document Generation – Manage Document Template Mapping”
- map the tokens used in the template with right references
Now, the template and groups are ready.
Second step in the process is to create a workflow utilizing the document template and document group.
- use transaction “Manage Organization, Pay and Job Structures”
- in Create New – select “Workflow”
- provide ID, name and other mandatory information
- this scenario we’ll use only Cc Role
- under Cc Role – select the document group “MDF_CUST_EMAIL” created in the previous step
Third step in the process is creating a business rule to trigger the workflow configuration
- use transaction “Configure Business Rules”
- select “+” or “Create New Rule”
- now, expand Metadata Framework and select “Rules for MDF Based Objects”
- provide mandatory information and make sure to select the Base Object and Purpose as “Workflow”
- make the rule to “always true” and in Then clause set the workflow configuration created in the earlier step.
Fourth Step in the process is assigning the Business rule to MDF object (standard / customer specific).
- use transaction “Configure Object Definitions”
- select “Object Definition” and Relevant MDF Object
- click “Take Action” – “Make Correction”
- go to “Save Rules”
- select the Business Rule created in the previous step.
Let’s Test the Scenario
- go to employee profile
- navigate to the MDF object / Portlet on Employee Files
- click on the “Pencil Icon” and create and save the record
- once the save is hit, the workflow configuration will trigger the email which was attached to the “Save Rules” in MDF object.
Make sure every employee has a valid email address maintained on their profile to receive the alerts/emails.
Conclusion
This feature allows customers to go with custom notification templates for different scenarios on the same MDF object, which was not feasible with standard notification templates provided by SuccessFactors.
Hi Ajay,
Nice Article....it resolves custom notification issue.
thank you 🙂
Nice One. Thanks.
thank you 🙂
Very Good Ajay!!!
Thanks for sharing.
thank you 🙂
Excelente dica para este cenário !!
Tks!!
Gracias 🙂
Very good block
thank you 🙂
Nice article Ajay!
Do you know if it is possible to map fields from mdf object into notification not only reference placeholders?
Thank you
Regards
Do you have any solution?
Hi,
I am addiding Business rule to employee time object in same way to trigger custom notification , but not sure why email notification is not triggering .
Any clue ??
Am facing the same challenge here too
sorry for the delayed reply, hope you have solved your issue if not, please check if the mappings for the template are completed otherwise email will not be triggered.
Great Article!! Thanks for sharing this. Just one doubt in step 2 when we create the rule, does it have to be always true? Because this use case can also be used for sending alerts like Birthdays and work anniversaries, which has some if conditions. Does it work there as well?
sincere apologies for the delay.. not sure if you have already came to a solution.
I have no logical conditions to validate, so to trigger the template I need to set it as "Always True"
Hi Ajay Kumar Nudurupati
thank you for the informative guide. We are actually using a business rule to trigger a workflow, which sends out some information to cc roles. As we know we can only insert the Email Template Group to the cc roles, right?
What happens if there are more email templates in this group, than only one. Which one will be taken by the system?
Does this mean, that if we want to have individual mails to the cc roles we also need to create for each template one group?
I did not test it, maybe you know the answer rigth away 😉
Thank you
Regards Benedikt
Hi Benedikt
If you need to use multiple templates, one suggestion is create multiple workflow objects and control which workflow to be triggered based on your requirement using business rules, the workflow will have the right CC roles and the template you want to use. I used this approach to control multiple templates for CC roles.
Thanks
Ajay
Nice blog!
Is there an example of custom email notifications for cc roles incase of alerts?
Hi Ajay,
Thanks for the helpful blog post.
I am trying to include data from my custom MDF record into the e-mail template. I added a variable in the template, and I can map this variable to a field from my custom MDF object (which is employee based) in "Manage document template mapping".
However, when the e-mails arrive, the variable is not filled in, while the MDF record contains data.
Do you have any idea whether this functionality is supported?
Thanks!
Thomas
Hi Thomas
Yes, it supports reading values from custom MDF objects as well.
To access the data from custom MDF into the template, add the custom object to WF business rule under parameters to read values from it.
Regards
Ajay
Hi Ajay,
I am creating a custom email notification on hire/rehire. While setting up the doucment generation template , I am getting below error. I tried find the KBA's but couldnt find the right answer.Pls help.
"Please note the workflow does not support Read access logging for advanced email notification"
The email is not getting triggered.
Thanks,
Radhika
Hi Radhika
You might have checked "Log Read Access" under template mapping, try to set this as "No".
Regards
Ajay
Hi Ajay Kumar Nudurupati ,
Can we map Employee ID, employee's resignation date from custom MDF portlet in the email template?
Regards,
Chaitra
Hi Ajay,
when i tried it, it shows me a mail look like this:
HTML><BODY><p>Hello HR & Support Team,</p>
<p>A Create Employee Time for Ebtehal Salem Eid Almehmadi has been Approved.</p>
<p>So please If required, check the leave dates and support with the following services:</p>
that's like HTML code so is there any solution to this.
Regards,
Mostafa
Hi,
Will this work for workflows with multiple approvers? I gave it a try and it doesnt seem to work and hence would like to confirm.
Thank you.
Hi Ajay,
I have configured the template in mange document template as shown below email is triggering but start and end date is coming blank can you please suggest ..
Hi All,
I would like to ask everyone for clarification on the impact of including the employee in self in the "Contributors" section of the Workflow
We would like to know if, by entering the employee in self, employees will only receive the e-mail?
The request would be to receive the notification and not the possibility to leave comments.
I should like to thanks in advance anyone who replies.
Best Regards