Basic URL syntax

All HCL Commerce shopping flow URLs follow the same basic syntax.

http://host_name/path/Command?parameter1=value&parameter2=value&parameter3=value

Here is an illustration:

Example of the railroad syntax diagram.

To read these railroad-style syntax diagrams, start in the upper left corner, and follow the line (think of it as a railroad track). Keep in mind the following conventions:

  • The host_name and the path are determined based on how HCL Commerce is installed. The host_name is the fully qualified name of your HCL Commerce Server. The path is the configuration path. For example,
    http://myhostname/webapp/wcs/stores/servlet/DynaCacheInvalidation?clear=true
    
    Where myhostname is the host_name for the URL, and webapp/wcs/stores/servlet/ is the path.
  • The delimiter after the command name is ?. The delimiter between successive parameters is &. You do not have to use the & before the first parameter. The value of the parameter is typically given in the syntax diagrams as either S for string, or I for integer. If a parameter can have a value of only true or false, the default value is specified in the diagram. If a parameter requires predefined codes or if it places non-obvious restrictions on data type, this requirement or restriction is explained in the description. When you read the line from left to right, any parameter that is on the main line, such as URL cannot be avoided. This location of a parameter identifies that the parameter is mandatory.
  • If a parameter is off the main line, such as langId, and can be avoided, the parameter is optional.
  • If a parameter has a line that returns to the left site, such as listId, it indicates that the parameter can be used repeatedly, For example:
    &listId=1&listId=2&listId=3
    
The next syntax diagram illustrates alternative sets of mandatory parameters: you either use:
&logonId=s&challengeAnswer=s 
Or else you use
&logonPassword=s&logonPasswordOld=s&logonPasswordVerify=s

Example of a syntax diagram with alternate mandatory parameters.

Parameter values

Some common parameters are available to most of the commands:

storeId
Associates the command with a specific store. This store association is especially useful with commands that operate at the mall level because it forces the command to operate within the scope of only the store.
langId
Specifies the language that is used during the command. The values for the parameter are stored in the LANGUAGE table. The language that is specified overrides the user default language if supported. Otherwise, if the specified language is not supported, then the store or site default language is used.
forUser
Specifies logon ID of a user for whom actions are being taken by another user. The parameter can be used only by a person with the authority to process orders, such as a Customer Service Representative, Customer Service Supervisor, B2C Operations Manager, B2BLogistics Manager, B2C Merchant, or B2B Seller. The parameter is useful in a call center setting if a customer requests assistance with completing a purchase. The call center operator then logs in and completes the order by using the identify of the calling customer.
forUserId
Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
URL
The web address that is called when the command succeeds. The value for this parameter is determined as follows: Start with the input parameters to the command, except URL. Add, replacing when a name conflict occurs, any additional name-value pairs that are produced by this command. Finally, add, replacing when a name conflict occurs, the name-value pairs found in URL.
errorTaskView
The name of the view to which the browser is redirected if any problems occur. If not specified, then the default error view that is associated with a particular exception is used.

Example

In the example of a URL, the URL often spans multiple lines. For readability, they are arranged like the following URL:

http://myhostname/webapp/wcs/stores/servlet/AddressUpdate?addressId=128
     &firstName=Jeffery&URL=/webapp/wcs/stores/servlet/

A URL command typically appears on a single line.