Reference > Shop flow URLs > Messaging system URLs
BroadcastMessage URL
This URL broadcasts an e-mail to customers.
URL structure
- http:// host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
name-value pair with the & character. For a detailed description of the parameters and their values, see 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. Create a new row with the name in WebSphere Commerce Struts framework and assign the devicefmt_id, and JSP page (with the full path).
- 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:
- 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.
- 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.
- Sends the message to all customers who have indicated that they would like to receive promotional e-mail.
- messageType
- (Optional but deprecated) 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. Verify the message type is assigned to a transport.
- messageTypeName
- Optional: Message type name included in the MSGTYPES.NAME column.
- 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.
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
- Calls the GetRecipientsCmd task command to create a list of broadcast e-mail message recipients.
- Calls the SendMsgCmd task command to send e-mail messages by providing the return e-mail address, (optional) subject of message, the message, and the comma-separated list of recipients parameters.
- If the messageContent is not provided, uses the template corresponding to the specified message type for the body of the message. Otherwise, the messageContent will be used.
- Attempts to send to all registered customers who satisfy the mode condition and who have primary e-mail addresses provided. Messages sent are temporarily stored into MSGSTORE table. They are all sent when the SendTransactedMsg command is called.
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.
Related concepts
Related tasks
Assign a message type to a transport method for a site or store
Related reference