Reference > Shop flow URLs > Catalog subsystem URLs > Interest lists
InterestItemAdd URL
This site level URL adds one or more products, or items, or both, to one or more interest item lists.
Use this URL with SSL (Secure Sockets Layer) to ensure that the customer's logon password and personal information are encrypted.
To do so type the URL with the HTTPS secure protocol.
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
- 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 URL 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 URL completes successfully.
- storeId
- Required: The store reference number which is associated with the catalog entry and under which this URL 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 URL 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 URL is invoked to obtain the customer's current interest item list, and the URL behaves as if the current interest item list had been specified. If the GetCurrentIIListsCmd task URL 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 URL behaves as if all the customer's interest item lists were specified.
This parameter can be repeated.
- listIdName
- Upon completion of this URL, if redirection is used to cause a second URL to run, then listIdName specifies the parameter name of the second URL that will use the value of the listId parameter in this first URL. Most often, the second URL 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 URL 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 URL. 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 URL calls the GetCurrentIIListsCmd task URL 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 URL is called to check for write permission for each of the specified interest item lists.
- Calls the ResolveSkuCmd task URL 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 URL assigned to the AuthIIListAccessCmd task URL fails, the URL sets the AuthIIListAccesErr exception task to handle the error.
- If the error URL assigned to the ResolveSkuCmd task URL determines that a required product attribute is missing, the URL sets the ProductAttributeErrorView exception task to handle the error. If the URL 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.
Related concepts
Related reference