Reference > Shop flow URLs > Trading subsystem URLs > Account and contract URLs
ContractSetInSession URL
This URL sets the contracts that a customer is shopping under. A user can shop under more than one contract at the same time. A user must be logged in to a store before this URL can be issued.
URL structure
- http:// host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path. You may use either http or https with this URL.
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
Parameter values
- contractId
- Required: The contract ID for the contract to shop under for this session. You can set multiple contract IDs, but at least one is required for this URL. This parameter can be repeated.
- URL
- Required: The URL to be called when the command completes successfully.
Example
This example allows the customer currently logged in to shop under contract IDs 260369 and 212394:
https://myhostname/webapp/wcs/stores/servlet/ContractSetInSession?contractId=260369&contractId=212394&URL=ContractDisplay
Behavior
This URL sets contract IDs to use in the current session. Contracts specified in this URL will be used in the shopping flow after this URL successfully completes. The ContractSetInSession command calls ContractListView when the ContractSetInSession command completes successfully.
Exception conditions
The following exceptions may be thrown by this URL:
- _ERR_DIDNT_LOGON will be thrown if there is no user logged on to the store before this URL is issued.
- _ERR_NOT_ENTITLE_TO_THIS_CONTRACT will be thrown if the user in this session is not entitled to use one of the contracts specified in the command.