Prerequisite: Before beginning this task, ensure that you know the storeid. The storeid is the value located in the STORE_ID column of the STORE database table. To determine the storeid:
- Connect to the WebSphere Commerce database.
- Run the following command
select * from storeent
To register a new e-mail activity template:
- Log on as the database user.
- At a command prompt, navigate to the WCinstall_dir/CommerceServer56/bin/.
- Within that directory, at a command prompt, type the following:
Windows
createEmailTemplate.db2 db_namedb_userJSP_pathproperty_filetemplate_name " template_description" storeId
AIX|Linux|Solaris
createEmailTemplate.db2.sh db_name db_user JSP_path property_file template_name " template_description" storeId
Windows
(Oracle) createEmailTemplate.oracle db_name db_user JSP_path property_file Template_name " template_description" storeId
AIX|Solaris|(Oracle) createEmailTemplate.oracle.sh db_name db_user JSP_path property_file template_name " template_description" storeId
Where:
- db_name
- the name of the WebSphere Commerce database
- db_user
- The database user name for the specified db_name
- JSP_path
- The fully qualified URL of the JSP associated with the template on the commerce server. For example, http://www.myhostname.com/webapp/wcs/stores/servlet/STOREDIR/JSPDIR/EmailTemplateFile.jsp
- property_file
- The property file associated with the template. If there is no property file, specify noTemplate
- template_name
- The name of the template
- template_description
- A short description for the template
- storeId
- The store ID of the target store
(DB2) When prompted, enter the user's database password.
I5/OS|
- Use the Operations Navigator, or some other comparable method, run the following SQL on your instance
insert into schemaname.emlmsg (emlmsg_id, jsppath, propertyfile, name, description, storeent_id) select coalesce(max(emlmsg_id), 0) + 1, ' JSP_path', ' property_file', ' template_name', ' template_description', storeId from emlmsg ;Where:
- schemaname
- is the name of your instance
- JSP_path
- is the fully qualified URL of the JSP associated with the template on the commerce server
- property_file
- is the property file associated with the template. If there is no property file, specify noTemplate
- template_name
- is the name of the template
- template_description
- is a short description for the template
- storeId
- is the store ID of the target store
- Enter the following SQL command
insert into emlmsg (emlmsg_id, jsppath, propertyfile, name, description, storeent_id) values ( emlmsg_id, 'http:// hostname:80/webapp/wcs/stores/servlet/ store-name/ template/template_name.jsp', '', ' template_name', ' template_description', store_id);Where:
- emlmsg_id
- is the ID of the e-mail.
- store_name
- is the name of the store.
- template_name
- is the name of the template
- template_description
- is a short description for the template
- storeId
- is the store ID of the target store
E-mail activities
Configure the e-mail activity accounts
Change or deleting an e-mail activity