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.
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.
- 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
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
- The command calls the GetCurrentIIListsCmd task command when the listId parameter is specified as ".", or omitted, to determine to which interest item list should the catalog entries be added.
- The AuthIIListAccessCmd task command is called to check for write permission for each of the specified interest item lists.
- Calls the ResolveSkuCmd task command to determine the item for the catalog entry.
- Ensures that the catalog entry to be added to the user's interest list is not a member of a product set that has been excluded from the user's contract.
- Adds the catalog entry to the IITEM table.
- On successful completion, calls the specified URL.
- Normalizes and rounds the quantity according to the unit of measure.
Exception conditions
- If the error command assigned to the AuthIIListAccessCmd task command fails, the command sets the AuthIIListAccesErr exception task to handle the error.
- If the error command assigned to the ResolveSkuCmd task command determines that a required product attribute is missing, the command sets the ProductAttributeErrorView exception task to handle the error. If the command determines that a product with the specified attributes does not exist in the database, the task sets the same ProductAttributeErrorView exception task to handle the error.