Set up data augmentation rules

Knowledge Center > Zuora RevPro > Set up data augmentation rules

Set up data augmentation rules

Data augmentation is the modification or manipulation of source data. Data augmentation might occur based on a given rule to add, modify, or delete some source data before the RC collection process starts in RevPro. You can set up the following types of data augmentation rules in RevPro:

Rule Type Purpose
Advanced Rule Apply advanced filtering and conditions to manipulate source data.
Clear Value Remove the value of the attribute.
Constant Set the attribute to a constant value.
Formulae Set the attribute to a value that is calculated based on a formula.
Lookup Set the attribute value to a specified value based on the lookup criteria.

Before you begin

For data augmentation rules to work in RevPro, complete the following tasks before you create the rule:

  • Add RPRO_RC_TRNSLTR_RULE_PKG.trnsltr_rule_wrapper as a processor:

    1. Navigate to Setups > Application.

    2. Click side-menu-open.png to open the side menu and click Pre/Post Processor.

    3. To add the processor, click the New Processor icon icon-add.png.

    4. In the New Processor window, provide a unique name in the Procedure Name field, select RC_COLLECT for Object Type field, and then click icon-save.png. The processor is created.

    5. Click the Processor Mapping tab and then click icon-add-green.png to add a row.

    6. Select Procedure for the Processor Type column, enter RPRO_RC_TRNSLTR_RULE_PKG.trnsltr_rule_wrapper in the Processor Object column, and select Before Validate for the Stage Name column.

    7. Click icon-save-green.png. The processor is added.

  • Enable the CUSTOM_CODE_ALLOWED profile:

    1. Navigate to Setups > Application.

    2. Click side-menu-open.png to open the side menu and click Profiles.

    3. Locate the CUSTOM_CODE_ALLOWED profile, hover the mouse over that line, and then click icon-edit.png.

    4. In the Edit Profile window, toggle the System Level Value switch to Yes and save the change.

Procedure

When you create one data augmentation rule, you can specify multiple specific rule types to perform different operations on the source data. For example, you can create one data augmentation rule to have one Formulae rule to update one attribute to a formula-based value, and two Clear Value rules to clear the values of certain attributes. 

Complete the following steps to create a data augmentation rule in RevPro:

  1. Navigate to Setups > Data Augmentation.

  2. To create a data augmentation rule, click the New Rule icon icon-add.png. The New Data Augmentation Rule is displayed.

  3. Enter the values for the following fields as necessary.

    Field name Description
    Book Name Select the name of the primary revenue book. The augmented data for the primary book will be copied to other non-primary revenue books.
    Sequence Specify the sequence to apply this data augmentation rule.
    Rule Name Enter a unique name for the data augmentation rule.
    Start Date

    Enter the effective start date for the data augmentation rule.

    The data augmentation rule becomes effective at the beginning of the next accounting period that follows the start date. For example, a start date of January 15, 2016 means that the rule will be effective starting from February 1, 2016.

    To make the data augmentation rule effective immediately, choose a start date in the prior accounting period.

    Description Enter a description for the data augmentation rule. This field is optional.
    End Date Enter the effective end date. This field is optional.
    Processor Type Select RC_COLLECT.
    Enabled Toggle to Yes to enable the data augmentation rule.
    Stage Name

    Select one of the following stages for the data augmentation rule to be applied:

    • Before Validate
    • After Validate
    • After Bundle Explode
  4. Click icon-save.png. The data augmentation rule is created with no conditions or filters associated.

  5. To add conditions for the rule, in the Conditions section, click icon-add-green.png to add a row, and then complete the following steps depending on the rule type that you are adding:

    Rule Type Substeps
    Advanced Rule
    1. Select Advanced Rule for the Rule Type column.
    2. Select the field to be updated in the Field to be Updated column.
    3. Specify the effective start date of this rule type in the Start Date column.
    4. (Optional): Specify the effective end date in the End Date column.
    5. Ensure this rule is enabled in the Enabled column.
    6. Click icon-in-operator.png in the Actions column. The Advanced Rule window is displayed.
    7. In the upper half of the window, click icon-add-green.png to add a row.
    8. Enter a unique name in the Set Name column, specify the value to be set for the target field that you select in Step b in the Target Value column, and click icon-save-green.png. You can specify SQL statement for this field, for example, SELECT SYSDATE FROM DUAL.
    9. (Optional): In the Advance Rule Filters section, click icon-add-green.png to specify the filter criteria to identify the eligible lines. For example, you can set the following filter to identify the lines for some specific customers:
      • Field Name: Customer Name

      • Operator: IN

      • Join Operator: OR

      • Operand: Company A, Company B, Company C. (To specify multiple operands for the IN operator, click the icon in the Actions column)

    10. Click icon-save-green.png.
    Clear Value
    1. Select Clear Value for the Rule Type column.
    2. Select the field whose value is to be removed in the Field to be Updated column.
    3. Specify the effective start date of this rule type in the Start Date column.
    4. (Optional): Specify the effective end date in the End Date column.
    5. Ensure this rule is enabled in the Enabled column.
    6. Click icon-save-green.png.
    7. To specify the filter criteria to apply this rule, see Step 10.
    Constant
    1. Select Constant for the Rule Type column.
    2. Select the field to be updated in the Field to be Updated column.
    3. Specify the constant value to be set for the selected field in the Target Value field. You can specify SQL statement for this field, for example, SELECT SYSDATE FROM DUAL.
    4. Specify the effective start date of this rule type in the Start Date column.
    5. (Optional): Specify the effective end date in the End Date column.
    6. Ensure this rule is enabled in the Enabled column.
    7. Click icon-save-green.png.
    8. To specify the filter criteria to apply this rule, see Step 10.
    Formulae
    1. Select Formulae for the Rule Type column.
    2. Select the field to be updated in the Field to be Updated column.
    3. Specify the effective start date of this rule type in the Start Date column.
    4. (Optional): Specify the effective end date in the End Date column.
    5. Ensure this rule is enabled in the Enabled column.
    6. Click icon-in-operator.png in the Actions column to specify the formula to calculate the target value.
    7. In the Formulae window, select the appropriate columns name, operators, and functions to set the formula, and then close the window. The specified formula is added to the Expression column.
    8. Click icon-save-green.png.
    9. To specify the filter criteria to apply this rule, see Step 10.
    Lookup
    1. Select Lookup for the Rule Type column.
    2. Select the lookup type in the Lookup Type column. To create a new lookup definition, select New_Look.
    3. Specify the effective start date of this rule type in the Start Date column.
    4. (Optional): Specify the effective end date in the End Date column.
    5. Ensure this rule is enabled in the Enabled column.
    6. Click icon-in-operator.png in the Actions column to specify the lookup. The Lookup window is displayed.
    7. In the Lookup Fields section, click icon-add-green.png to add a row.
    8. Provide a unique name in the Name column and specify the lookup field names in the Reference Field columns. You can specify up to 5 reference fields.
    9. Specify the fields to be updated in the Target Field columns. You can specify up to 5 target fields.
    10. In the Lookup Values section, specify the values for the lookup fields in the Reference Value columns, and specify the values to be set for the target fields in the Target Value columns.
      For example, if the Reference Field1 of a line is found to be Reference Value1 and the Reference Field2 is Reference Value2, the Target Field1 of this line is updated to Target Value1 and the Target Field2 is updated to Target Value2. You can specify SQL statement for the value columns, for example, SELECT SYSDATE FROM DUAL.
    11. Click icon-save-green.png.
  6. Create as many rule types as you need.

  7. If you add more than one row in the Conditions section, use the Seq column to specify the sequence to apply these rules.

  8. Click icon-save-green.png to save your settings.

  9. (Optional): If SQL statements are used in the rules, validate the statements by clicking Validate SQL Statements and fix the errors if any.

  10. (Optional): To apply a filter to identify the lines that eligible for all the added rules,

    1. Click the Filters tab and click icon-add-green.png to add a row.

    2. Select the field name in the Name column and specify the filter criteria by using the Operator, Operand, and Actions columns.

      The Actions column is applicable only for the IN operator. Click icon-in-operator.png in this column to specify multiple filter values for the IN operator.

    3. Add as many rows as you need and use the Seq column to specify their sequence to be applied.

    4. Click icon-save-green.png to save your settings.

Result

A data augmentation rule is set up. Different types of defined rules in it are applied to identify the eligible lines and then perform different operations on the source data.

Last modified

Tags

Classifications

(not set)