Temporary changes to contextual information for URLs
It is possible to override some of the command context information and execute URL commands within the context of another store, or on behalf of another user.
URL commands have the following URL input parameters that allow for this temporary switch in command context:
- forStoreId
- The forStoreId URL input parameter allows you to specify the store ID to be used for this particular URL request. This, in effect, temporarily changes the storeId value in the command context to that of the specified store, but this change is only valid for the duration of the URL command and the resulting view.
- cmdStoreId
- The cmdStoreId URL input parameter allows you to specify the store ID to be used for this particular URL command only. This, in effect, temporarily changes the storeId value in the command context to that of the specified store, but this change is only valid for the duration of the URL command. Unlike the forStoreId parameter, cmdStoreId will not change the storeId for the resulting view.
- forUser
- forUserId
- Both the forUser and forUserId URL input parameters
allow you to specify that the command be executed for the specified
user, even though the user that is currently logged in may be different.
This is particularly useful when a customer service representative
needs to assist a customer. For example, the customer service representative
can update a customer's address on behalf of that customer, by specifying
the customer's user name or user ID by using the URL input parameters.
This change in user information is only valid for the duration of
the URL request for which it was specified. The forUser parameter
is the value of the logon ID of the user. The forUserId parameter
is the value of the user ID of the user.Note: If LDAP is configured as the user repository to be used with WebSphere Commerce, the full DN must be used as the value for this forUser parameter.