BroadcastMessage command

This command broadcasts an e-mail to customers. 

Command structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

 Diagram of the command structure: the command starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the command name, BroadcastMessage  and the ? character. End the command with a list of parameters in the form of name value pairs. Separate each name value pair with the & character. For a detailed description of the parameters and their values, refer to the list entitled Parameter values.

Parameter values

langId
Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
storeId
The reference number of the store from which the message is being sent.
URL
(Required) The URL to be called when the command completes successfully.
messageContent
The content of the message being sent.  If specified, this content overrides the content of the message template. The message content will override the content generated by the message template, which is the JSP used under  the MSGTYPES.viewname and  VIEWREG.viewname columns.
subject
The content of the Subject line in the e-mail. If the subject is not specified, the default subject specified in the message type configuration will be used.
sender
(Required) The content of the From line in the e-mail. If the sender is not specified, the default sender specified in the message type configuration is used.
mode
(Required) Possible values:
  1. Sends the message to all customers for a given store who have purchased any product and have indicated that they would like to receive promotional e-mail.
  2. Sends the message to all customers for a given store who have purchased the indicated SKU and have indicated that they would like to receive promotional e-mail.
  3. Sends the message to all customers who have indicated that they would like to receive promotional e-mail.
messageType
Reference to a predefined message template defined in the MSGTYPE_ID column of the MSGTYPES table. If messageType is not specified, the site-level message type for broadcast messaging will be used. By default, the site-level message type has no associated message template, so it is recommended that stores have their own broadcast message type set up. For information on message logging, see the WebSphere Commerce Administration Guide.
recipient
The extra recipients of the e-mail, in a comma-separated list.
partNumber
The part number of the item associated with the e-mail in mode 2.
contractId
Target members that have purchased under this contract in mode 2.
offerId
Target members that have purchased under this offer in mode 2.
catEntryId
Target members that have purchased this catalog entry in mode 2.

Note: The optional parameters are set using the SendMsgCmd.setConfigData() API.  Parameter names must equal the configuration data administration name, such as host, protocol, and CC.

Example

https://localhost/webapp/wcs/stores/servlet/BroadcastMessage?mode=3&messageContent=message_content

Behavior

Exception Conditions

If the list of recipients could not be determined or there is an error delivering the message, the BroadcastMessageErrorView error task is called.