Basic URL syntax
All WebSphere Commerce shopping flow URLs follow the same basic syntaxhttp://host_name/path/Command?parameter1=value¶meter2=value¶meter3=valueHere is an illustration:
To read this 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 by the way the product was installed.
- The delimiter after the command name is ?. The delimiter between successive parameters is &. There is no need to use the & before the first parameter.
- The value of the parameter is typically given in the syntax diagrams as s, for string. If a parameter requires predefined codes or if it places non-obvious restrictions on data type, this is explained in the description.
- While following the line from left to right, if there is no avoiding a parameter that is on the main line, such as URL, this indicates 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 returning to the left site, such as listId, it indicates that the parameter can be used repeatedly, like this
&listId=1&listId=2&listId=3The next syntax diagram illustrates alternative sets of mandatory parameters: you either use
&logonId=s&challengeAnswer=sor else you use&logonPassword=s&logonPasswordOld=s&logonPasswordVerify=s
Parameter values
There are some common parameters that are available to most of the commands:
- storeId
- Associates the command with a specific store. This is especially useful with commands that operate at the mall level because it forces the command to operate within the scope of the store only.
- langId
- Specifies the language that will be used for the duration of the command. The values for the parameter are stored in the LANGUAGE table. The language specified overrides the user's default language if supported. Otherwise, if the specified language is not supported, then the store or site's 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,
Operations Manager, Logistics Manager, Merchant, or 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 using the calling customer's identity.
- 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 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 will be redirected if any problems occur. If not specified, then the default error view associated with a particular exception will be used.
Example
When displaying examples, the URL often spans multiple lines. For readability, they will be arranged like this:
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.
Related reference
Shopping flow URLs