Email activities and custom activity template JSP files
Email activities allow business users to deliver news and promotions to customers through email. These activities enable business users to reach customers who might not have visited your site in some time. These activites can also be used to keep regular customers up to date regarding up coming events or products.
Email activities can be either pending or delivered. They are considered pending while they are being created, and while they are awaiting delivery. Thereafter, they are considered delivered.
Email activities are based on templates, which are coded as JavaServer Pages, which define the subject and content of the email. The templates contain data beans, which can access the WebSphere Commerce database to generate dynamic content, such as the individual recipients first and last names.
The email activity templates, once created, must be stored in a location accessible by the server. They must also be registered in the database by a database administrator before they are available in the business user tools.
As a site developer, when you are creating email activity templates, you must be aware of your site policy for customers that opt in and out of receiving email. In order to receive email activities, the customer must have a corresponding entry in the EMLUSRRECV table. If the user does not have an entry in this table, or if the RECEIVEEML column in that table is set to '0' for the store, the user does not receive email. The user receives email only if there is a corresponding '1' in the RECEIVEEML column for the customer in question. WebSphere Commerce does not scope a customer segment to a particular store. Therefore, an entry of '0' in the STORE_ID column represents a customer that is being opted-out of all email activities in all stores.
It is recommended that you, as the email template author, use the EmailActivityUrlHelperDataBean class to allow the recipient a one click opt-out method from receiving future email activities.