BroadcastMessage URL

This URL broadcasts an e-mail to customers.

URL structure

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

Diagram of the URL structure: the URL starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the URL name, BroadcastMessage  and the ? character. End the URL 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
(Optional) 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
(Optional) 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
(Optional) 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
(Optional) 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
(Optional) 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
(Optional) 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. If the messageType is provided and there is no JSP associated with the message type, than the messageContent paramenter is required. Ensure that the message type is assigned to a transport.
recipient
(Optional) The extra recipients of the e-mail, in a comma-separated list.
partNumber
(Optional) The part number of the item associated with the e-mail in mode 2.
contractId
(Optional) Target members that have purchased under this contract in mode 2.
offerId
(Optional) Target members that have purchased under this offer in mode 2.
catEntryId
(Optional) 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.

Feedback