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

  1. Create the bucket set list.

  2. Create the decision table and add a condition.

  3. Add a rule to the decision table.

  4. 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.

bucket set list

Do it.

  1. In the Setup and Maintenance work area, go to the task.

    • Offering: Order Management

    • Functional Area: Orders

    • Task: Manage Product Transformation Rules

  2. On the Manage Product Transformation Rules page, click Bucket sets > Add Bucket set > List of Values.

  3. In the Bucket Sets list, click Bucket Set 1 > Edit Bucket set.

  4. 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

  5. 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

  6. 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

  7. Click OK > Save.

Create the Decision Table and Add a Condition

You will create the decision table, condition, and action.

decision table, condition, and action

Do it.

  1. On the Manage Product Transformation Rules page, click TransformationCustomRS.

  2. In the View list, click IF/THEN Rules > Add > Add Decision Table.

  3. Replace Decision Table 1 with AddExpeditedShippingforProductAS85005, then click Save.

  4. Immediately above the decision table, click Add > Add Condition.

  5. 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.

  1. In the decision table, click the cell that displays condition OrderTransformationRules.FulfillLineVO.InventoryItemId.toString().

    For example:

    rule in the decision table
  2. Click Local List of Values > Server IDs, which is the bucket set you created earlier.

  3. 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.

  1. Immediately above the decision table, click Add > Add Action > Modify.

  2. In the Action Editor dialog, in the Target list, click OrderTransformationRules.FulfillLineVO.

  3. 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.

  4. 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.

  5. Click Save.