This command 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 command can be issued.
Command structure
- http://host_name/path/
- The fully qualified name of your WebSphere Commerce Server and the configuration path. You may use either http or https with this command.
Parameter values
- contractId
- (Required) The contract ID for the contract you want to shop under for this session. You can set multiple contract IDs, but at least one is required for this command. This parameter can be repeated.
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
Behavior
This command sets contract IDs to use in the current session. Contracts specified in this command will be used in the shopping flow after this command successfully completes. The ContractSetInSession command calls ContractListView when the ContractSetInSession command completes successfully.
Exception conditions
The following exceptions may be thrown by this command:
- _ERR_DIDNT_LOGON will be thrown if there is no user logged on to the store before this command 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.