This is the extended post of my previous posts
how to create and
use email template on F9, Send Email OOTB functionality. Supplementary to this, I have also posted
creating Recipient Group.
In this post, I will tell the rest of the things:-
- Creating the New Recipient Source.
- Creating the Non-Joined Recipient Group.
- Creation of Email template.
- Substituting the Fields in the Email text.
- Adding HTML templates.
- Testing the Outbound Communication Request.
- Calling the BS to send the emails.
Let's take a scenario where the Bus Comp is not there listed in the Object for the field Substitutions.
Step1: Query with LOV Type as
'COMM_RECIP_SRC' and Parent LIC as null.
Copy the record and put the Display value and LIC as your Bus Object name.
Step2: Query with the LOV type as 'COMM_RECIP_SRC' and Parent LIC as not null.
Copy the record and put the Display value and LIC as your Child Buscomp which is the Recipient Group BusComp(like Contacts or Employee). Here you may get the unique record error. You may need to update from back end. You can also create
Joined Recipient Source.
Step3 and Step4: Creation of Email template
Step5: To add the HTML templates go to Template Items View. There, you need to add the HTML file. In the HTML code, add the fields name inside square brackets for example [Full Name]. Check the Substitute values if you have used substitute fields and message body if you want to add the HTML into message body of the email.
Step6: To Test the Recipient Source, Recipient Group and Email Template, you can create a Outbound Communication Request from Administration-Communication Screen.
- Go to Outbound Request Overview View,
- Create a new record,
- Put the Recipient Group.
The below applets will be based on the Recipient Source and Recipient Group. Like if you Recipient Source is Account, the New button on Recipient Source will be a Associate Applet of Account BC and the Recipient Source will get auto-populated based on the relation of Recipient Source and Recipient Group.
Make sure that Communication Outbound Manager component is up and running and you have selected the Communication Profile at Email template level.
Step7: Now you have created the Recipient Source, Recipient Group and Email templates.
To triggering the email you need to call the 'Outbound Communications Manager' BS and its method CreateRequest. The arguments you need to pass to this method are follows:
- PackageNameList: Name of the Email Template
- ProcessMode: Remote for Dedicated Client, Local for Web Client
- RecipientGroup: Recipient Group Name like Contact
- SourceIdList: Row Id of the Recipient Source BC like Account
You can call this Business from any triggering point where you want to send the Email.
The best thing about using the Email templates and
CreateRequest of Outbound Communications Manager is the flexibility of changing the Email Body while this is not possible if you are using
SendMessage of Outbound Communication Manager.
Sharing is the power.