Use Different Attributes in the Condition and Do Simple Math

Create a pretransformation rule on a variety of attributes in the condition or action, and include a simple mathematical equation.

Assume you have an agreement with a drop ship supplier where the supplier needs 3 days lead-time to before they begin processing sales orders that include the AS54888 item for your Computer Service and Rentals customer. To reflect this requirement, you create a pretransformation rule that moves the Ordered Date out by 3 days.

create a pretransformation rule that moves the Ordered Date out by 3 days.

Here's pseudocode for the rule.

If the Customer attribute on the order header contains Computer Service and Rentals, and if the Order Type attribute on the order header contains Dropship Orders, and if the Item attribute on the order line contains AS54888, then set the Ordered Date on the order header to the value that the Current Date attribute contains plus 3 days.

Summary of the Setup

  1. Create the If statement.

  2. Create the action.

  3. Test your setup.

Create the If Statement

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

    • Offering: Order Management

    • Functional Area: Orders

    • Task: Manage Pretransformation Rules for Sales Orders

  2. Create a new rule.

    Attribute

    Value

    Name

    Set the Requested Ship Date for Drop Ship Orders

  3. Create the If statement.

    • In the If area, click New Condition.

    • In the Create Condition dialog, enter customer, wait a moment, then click Item (Order Fulfill Line).

      Customer (Order Header) indicates that you're referencing the Customer attribute on the header of the sales order.

    • Click Search.

    • In the Search dialog, search for Computer Service and Rentals, click Computer Service and Rentals in the search results, then click OK.

    • In the Create Condition dialog, click OK.

  4. Add the order type to the If statement.

    • In the If area, click And.

    • In the Create Condition dialog, enter order type, wait a moment, then click Order Type (Order Header).

    • Set the equation to Is Equal To.

    • Set the order type to Dropship Orders, then click OK.

  5. Add the item to If statement.

    • In the If area, click And that's immediately below the condition you just added.

    • In the Create Condition dialog, enter item, wait a moment, then click Item (Order Fulfill Line).

    • Click Search.

    • In the Search dialog, search for AS54888, click AS54888 in the search results, then click OK.

    • In the Create Condition dialog, click OK.

Create the Action

  1. In the DO area, click New Action > Set a Value.

  2. In the Create Action Dialog, enter Ordered Date, then click Ordered Date (Order Header).

  3. In the window below Is Set To, click Attribute, then enter Current Date.

  4. Click Add Arithmetics. Its the f(x) icon.

    The rules editor adds a row that you can use to do math according to the context of the attribute. For example, you're modify a date attribute that's measured in days, so the editor lets you add or subtract days.

  5. In the next line that displays, set the sign to + (plus) and enter the value 3 in the window.

  6. Click OK.

  7. Publish and release your rule.

Test Your Setup

  1. Go to the Order Management work area and create a sales order.

    Attribute

    Value

    Customer

    Computer Service and Rentals

    Order Type

    Dropship Orders

  2. Notice that the Ordered Date on the order head defaults to the current date. Assume the current date is 9/01/20 10:02 PM.

  3. Add the AS54888 item to an order line, then click Submit.

  4. Notice that the Ordered Date on the order header is now the current date plus 3 days. In this example, verify that Ordered Date contains 9/04/20 10:02 PM.