HCL Commerce Enterprise

PolicyAdd URL

This URL adds a business policy to a store.

URL structure

http:// host_name/path/
The fully qualified name of your and the configuration path.

Parameter values

type
Required: The type of the policy you want to create, as found in the database table.
name
Required: The name of the business policy you want to create.
plcyStoreId
Required: The store ID of the store in which to create this business policy.
cmd_n
The business command class name.
props_n
The parameters for the business command.
commonProps
The parameters for the business policy.
startDate
The start date for the business policy.
endDate
The end date for the business policy.
URL
Required: The URL to be called when the command completes successfully.

Example

The following example creates a price business policy called MyPricePolicy, in store 204. The policy has properties nvp1=value1 and nvp2=value2 and a start date of January 1, 2003. The policy has 2 business commands:

  1. com.mystore.price.commands.RetrievePricesCmdImpl that has properties nvp1=value1&nvp2=value2
  2. com.mystore.price.commands.ResolvePriceListsCmd that has properties nvp1=value1&nvp2=value2

https://myhostname/webapp/wcs/stores/servlet/PolicyAdd?type=Price&name=MyPricePolicy
&plcyStoreId=204&cmd_1=com.mystore.price.commands.RetrievePricesCmdImpl
&props_1=nvp1%3Dvalue1%26nvp2%3Dvalue2
&cmd_2=com.mystore.price.commands.ResolvePriceListsCmd
&props_2=nvp1%3Dvalue1%26nvp2%3Dvalue2
&commonProps=nvp1%3Dvalue1%26nvp2%3Dvalue2&startDate=2003-1-1%2000:00:00&URL=/

Behavior

  • Creates a business policy in a store.

Exception conditions

  • _ERR_DUPLICATED_POLICY_NAME if a business policy with the same name and type for the same store already exists.
  • _ERR_DUPLICATED_BUSINESS_CMD_NAME if a business policy command with the same name already exists for this business policy.
  • _ERR_MISSING_CMD_PARAMETER if one of the required parameters is missing.
  • _ERR_WRONG_GMT_TIMESTAMP_FORMAT if the startDate or endDate parameter is not in the format yyyy-mm-dd hh:mm:ss.fffffffff.
  • _ERR_UNSUPPORTED_BIZ_POLICY_TYPE if the given business policy type is an unsupported business policy type.