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.
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.
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
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.