InterestItemAdd command

This site level command adds one or more products, or items, or both, to one or more interest item lists.

Use this command with SSL (Secure Sockets Layer) to ensure that the customer's logon password and personal information are encrypted. To do so type the command with the HTTPS secure protocol.

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, InterestItemAdd  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.
forUser
The logon ID of the user on whose behalf the command will be run. Only a person with the authority to process orders can specify this parameter.
forUserId
Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
URL
(Required) The URL to be called when the command completes successfully.
storeId
(Required) The store reference number which is associated with the catalog entry and under which this command is run.
catEntryId_i
(Required) The reference number of the catalog entry to add to the interest item list.
attrName_i
Any attribute reference ID that is defined in the ATTRVALUE table for the catalog entry. This parameter can be repeated.
attrValue_i
The STRINGVALUE or INTEGERVALUE columns of the attribute, defined in the ATTRVALUE table, for the catalog entry. This parameter can be repeated.
listId
The reference number of the interest item list; abbreviations may be used:
  • If a specified catalog entry no longer exists, it is not added.
  • If this parameter is missing, the command behaves as if "." were specified.
  • If the parameter attempts to add a catalog entry to the list that is already on the list, the result depends on the setting of the updatable parameter.
  • If "." is specified, the GetCurrentIIListsCmd task command is invoked to obtain the customer's current interest item list, and the command behaves as if the current interest item list had been specified. If the GetCurrentIIListsCmd task command determines that there is no current interest item list, the most recently updated list is used. If there is no list at all, the task creates a new one.
  • If "*" is specified, the command behaves as if all the customer's interest item lists were specified.
This parameter can be repeated.
listIdName
Upon completion of this command, if redirection is used to cause a second command to run, then listIdName specifies the parameter name of the second command that will use the value of the listId parameter in this first command. Most often, the second command also has a listId parameter and thus &listIdName=listId. This parameter can be repeated.
quantity_i
Quantity of the item. The default is 1. This parameter can be repeated.
UOM_i
The unit of measure. The default is associated with the store. This parameter can be repeated.
field1_i, field2_i, field3_i
Value stored in the store-reserved columns FIELD1, FIELD2, and FIELD3 in the IITEM table. This parameter can be repeated.
updateable_i
What to do when a command requests that an catalog entry should be added to a list and it is already on that list:  
  • 1=Update it
  • 0=Throw an exception
  • Not specified=Defaults to 1
This parameter can be repeated.

Example

The following example adds the deluxe version of the catalog entry, having reference number 9, sold by the store with reference number 1, to the customer's current order, and then calls the InterestItemDisplay command. The example assumes that 3 is a valid attribute ID for the item and that it has an attribute value of "deluxe" defined in the ATTRVALUE table.

https://host_name/webapp/wcs/stores/servlet/InterestItemAdd?
storeId=1&catEntryId=9&URL=/webapp/commerce/InterestItemDisplay
&attrName=3&attrValue=deluxe

Behavior

Exception conditions