Tuesday, April 6, 2010

Using Email Templates for Automatic triggering of Emails

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:-
  1. Creating the New Recipient Source.
  2. Creating the Non-Joined Recipient Group.
  3. Creation of Email template.
  4. Substituting the Fields in the Email text.
  5. Adding HTML templates.
  6. Testing the Outbound Communication Request.
  7. 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.

6 comments:

  1. Hi Ankit,

    I read through your post and followed the steps as mentioned here. At step-6 when I choose the Recipient Group the child applet for Recipient Source is not enabled.(New Button is disabled). The Request template is enabled though and I'm able to choose the template though. What could be the reason? Can I still use it? Is it properly configured? Please help.

    ReplyDelete
  2. Thanks for sharing the info, keep up the good work going.... I really enjoyed exploring your site. good resource...
    free email templates

    ReplyDelete
  3. Herbs are very popular ever since the ancient times. At present, they are still highly regarded for their various culinary, decorative, and medicinal purposes. It is no wonder then that many people are now planting their own herbs outdoors as well as indoors.
    coupons for nutrisystem

    ReplyDelete
  4. I recently received an email where the writer asked me how much room she would need to store her nutrisystem meals.
    his comment is here

    ReplyDelete
  5. Surely Feverex Toto Is the recommended brand for relief of fever both children and adults.when my son was ill,doctor also told me about using it.I think you should make adds of your products on websites like https://megamoolahslots.info.It'll help a lot of people.Keep doing such a humble work. laser level measure

    ReplyDelete