Develop > Controller layer > Application developer > Business relationship assets
Create business policy XML files
While WebSphere Commerce provides a number of business policies that the terms and conditions in the store's default contract can reference, some business policies must still be defined by you. You must define any return charge, return approval, and pricing business policies that the store default contract terms reference. Commands for these business policies are provided and can be used without modification.
To create business policies for the store, create the business policy and associate one or more commands with the business policy. To create a business policy, add information to the POLICY table. To associate a command with a business policy, add information to the POLICYCMD table.
To create a business policy and associate commands with the policy:
Procedure
- Create a business policy in the business policies XML file by adding information to the POLICY table. Use the following example as a guide:
<policy policy_id="@policy_id_10" policyname="MasterCatalogPriceList" policytype_id="Price" storeent_id="@storeent_id_1" properties="name=&STORE_IDENTIFIER;&orgentity_dn=ORGANIZATION_DN />Where:
- policy_id
- is the unique, numeric identifier for the business policy.
- policyname
- is a unique name for this business policy.
- policytype_id
- is the type of policy being defined. Valid policytype_ids are:
- InvoiceFormat
- Payment
- Price
- ProductSet
- ReturnApproval
- ReturnCharge
- ReturnPayment
- ShipCharge
- ShipPayment
- ReferralInterface
- storeent_id
- is the store or store group.
- properties
- is a list of name-value pairs that is sent to the business policy command.
- Associate a command with the business policy in the business policies XML file by adding information to the POLICYCMD table. Use the following example as a guide:
<policycmd policy_id="@policy_id_10" businesscmdclass= "com.ibm.com.commerce.price.commands.RetrievePricesCmdImpl" />
Where:
- policy_id
- The numeric identifier of the business policy with which the command is being associated.
- businesscmdclass
- The name of Java class implementing the business policy.