Create Transformation Rules
Create a complex transformation rule that uses a bucket set in a decision table.
Learn how to use a simplified rule builder. For details, see Use Visual Information Builder.
Assume you use priority shipping for each sales order that includes a Green Server. You need a rule.
-
If the item is a Green Server, then use priority shipping.
You will create a bucket set that contains the values you will select when you create your transformation rule, then create the rule.
We strongly recommend that you get details about decision tables, bucket sets, and how to use them. For details, see Overview of Using Business Rules With Order Management.
Summary of the Set Up
-
Create the bucket set list.
-
Create the decision table and add a condition.
-
Add a rule to the decision table.
-
Add the action to take if the condition is true.
This topic uses example values. You might need different values, depending on your business requirements.
Create the Bucket Set List
You will create this bucket set list.
Do it.
-
In the Setup and Maintenance work area, go to the task.
-
Offering: Order Management
-
Functional Area: Orders
-
Task: Manage Product Transformation Rules
-
-
On the Manage Product Transformation Rules page, click Bucket sets > Add Bucket set > List of Values.
-
In the Bucket Sets list, click Bucket Set 1 > Edit Bucket set.
-
In the Bucket Set Editor dialog, set the values.
Attribute
Value
Name
Server IDs
Description
List of IDs and aliases for server items to select in a product transformation rule.
Data Type
String
-
Click Add Bucket, then, in the Bucket Values list, in the Bucket 1 row, set the values.
Attribute
Value
Value
300000047394016L
This number identifies the item ID that the database contains. The letter L indicates a long value.
Alias
"AS85005"
You must include the double quotation marks.
Description
Green Server 3500R
-
Click Add Bucket, then, in the Bucket Values list, in the Bucket 2 row, set the values.
Attribute
Value
Value
300000047393961L
Alias
"AS85004"
Description
Green Server 3000
-
Click OK > Save.
Create the Decision Table and Add a Condition
You will create the decision table, condition, and action.
Do it.
-
On the Manage Product Transformation Rules page, click TransformationCustomRS.
-
In the View list, click IF/THEN Rules > Add > Add Decision Table.
-
Replace Decision Table 1 with
AddExpeditedShippingforProductAS85005
, then click Save. -
Immediately above the decision table, click Add > Add Condition.
-
In the Condition Browser dialog, expand OrderTransformationRules > FulfillLineVO > InventoryItemId, click toString, then click OK.
The Condition Browser dialog displays objects from the OrderTransformationRules dictionary. You can use the FulfillLineVO object in this dictionary to specify transformation according to the value of a fulfillment line attribute, such as InventoryItemId.
In this example, you use toString to get the value of InventoryItemId as a string so you can compare it in the rule.
Add a Rule to the Decision Table
You will add this rule.
-
If InventoryItemId is AS85005
Do it.
-
In the decision table, click the cell that displays condition OrderTransformationRules.FulfillLineVO.InventoryItemId.toString().
For example:
-
Click Local List of Values > Server IDs, which is the bucket set you created earlier.
-
In row OrderTransformationRules.FulfillLineVO.InventoryItemId.toString(), double-click the cell in column R1, single-click the cell in column R1, then add a check mark to AS85005.
Add the Action to Take If the Condition Is True
You will add this action.
-
Set the ShipClassOfService attribute to "Expedited"
At run time, order fulfillment will recognize that ShipClassOfService is Expedited, then expedite the shipment.
Do it.
-
Immediately above the decision table, click Add > Add Action > Modify.
-
In the Action Editor dialog, in the Target list, click OrderTransformationRules.FulfillLineVO.
-
In the Arguments list, locate the ShipClassOfService argument, set the value, then click OK. You might need to scroll or page down through the Arguments list.
Property
Value
Parameterized
Contains a check mark.
The Parameterized property makes the object available to the business rule as a parameter.
-
In the decision table, in the ShipClassOfService row, double-click the cell in column R1, then enter
"Expedited"
. You must include the double quotation marks. -
Click Save.