Basic command syntax

All WebSphere Commerce shopping flow commands have the following basic syntax:

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

Here is an illustration: 

Example of the of a railroad syntax diagram.

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: 

&listId=1&listId=2&listId=3

The next syntax diagram illustrates alternate 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.

The next syntax diagrams shows memberId, a parameter that is sometimes mandatory.  This is illustrated with a broken line.  In the description of OrgEntityAdd, you will find an explanation of when the parameter is mandatory and when it is optional. 

Example of a syntax diagram with parameters that are sometimes mandatory.

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, Business to consumer Operations Manager, Business to businessLogistics Manager, Business to consumer Merchant, or Business to business 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.

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/

Note that a URL command typically appears on a single line.