Other outbound messaging services

The following methods outline the other services offered by the outbound messaging system.

public void addMember(Long aMember)
This method represents the second way of entering recipient data into the messaging system (the first being setConfigData). The parameter represents a valid member. The user can call this method repeatedly, each call adding an additional member to the list of recipients. Internally, the messaging system extracts the appropriate address from the Member. The messaging system will also attempt to identify the language preference of members/registered users/customers when it calls the compose(String aView, com.ibm.commerce.command.CommandContext, a CommandContext, and com.ibm.commerce.datatype.TypedProperty aParms . In this case, the language preference indicated in the CommandContext will be ignored. The command should add the member ID, especially for e-mail messages, before the content is composed. If the recipient address is set through using setConfigData(), the messaging system will not be able to determine the language preference of the recipient. The message content can be personalized, for example the language preference can be set by composition.

Notes:

  1. It is important that you ensure validation is performed on member addresses.
  2. The recipient can be set using either addMember(Long aMemberId) or setConfigData(String aKey, String aValue) but not both. If both are entered, the setConfigData(String aKey, String aValue) entries will be overridden by the addMember(Long aMemberId) entries. Also note that the messaging system requires the user to add the member ID before the content is set. If it is not necessary to personalize the message, for example to set a language preference, you can set the recipient address using setConfigData().
public void remTransport(Integer aRemoveTransportID)
This method gives you flexibility over which transports are used to deliver the method. The parameter should be a transport id that is valid for this message type. When this method is called, the messaging system removes the transport from the messages list of transports that may be used. In other words, the transport passed in as a parameter will be disabled for this particular message call.
public void setPartialSend(Boolean partialSend)
This method is applicable only when the addMember method is used to set the recipients. The Boolean parameter represents whether partial sends are permitted. In the messaging system, a partial send refers to sending the message as long as one of the members added has a preferred e-mail address associated with their profile. The following is an explanation of the partialSend parameter:
  • true: Permit partial sends. Those members who have not set up an address in the appropriate place will be skipped.
  • false: All or nothing. Returns an exception if even one of the members does not have an appropriately configured e-mail.
Notes:
  • No verification is performed by the messaging system to ensure an address is of the correct format. Partial send operates on the principle of the existence of a value in the appropriate place.
  • To send order notification e-mail messages to guest customers, the store JSP pages should be modified wherever the OrderProcess URL is called. See the OrderProcess URL reference material for more information about sending notification messages.