Skip to main content

Set up data augmentation rule

Zuora

Set up data augmentation rule

The purpose of data augmentation is to modify the transaction source data before the data collection process starts in Zuora Revenue. Set up data augmentation rules according to your business needs. The following types of data augmentation rules can be defined in Zuora Revenue.

Rule type Description
Advanced Rule           This type of data augmentation rules updates the same target field to different values for different lines. You use a rule set to define the criteria to filter the lines and the corresponding target value.
Clear Value   This type of data augmentation rules clears an attribute value for the filtered lines.
Constant  This type of data augmentation rules updates an attribute value to a specified constant value for the filtered lines.
Formulae This type of data augmentation rules updates an attribute value based on a formula for the filtered lines.
Lookup  This type of data augmentation rules updates an attribute value based on a lookup. For example, if a reference field is found to be the specified reference value, the system will update the target field to the specified target value.

Prerequisites

Before you set up the data augmentation rule, complete the following steps:

  1. Add RPRO_RC_TRNSLTR_RULE_PKG.trnsltr_rule_wrapper as a processor to use the defined data augmentation rule.
    1. Navigate to Setups > Application.
    2. Click side-menu-open.png to open the side menu and then click Pre/Post Processor.
    3. To add a processor, click the New Processor icon icon-add.png.
    4. In the New Processor window, specify a unique procedure name, select RC_COLLECT for the Object Type field.

      new-processor.png

    5. Ensure the Enable switch is toggled to Yes and then click the save icon icon-save.png .
    6. Click the Processor Mapping tab to add a procedure.
    7. Click icon-add-green.png to add a row. 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. 

      processor-mapping.png

    8. Click the save icon icon-save-green.pngand close the window. 
  2. Enable the CUSTOM_CODE_ALLOWED profile.
    1. Navigate to Setups > Application.
    2. Click side-menu-open.png to open the side menu and then click Profiles.
    3. Find the CUSTOM_CODE_ALLOWED profile and make sure the system-level value of this profile is Yes.

Procedure

Complete the following steps to set up data augmentation rules:

  1. Navigate to Setups > Data Augmentation.
  2. To add a data augmentation rule, click the New Rule icon icon-add.png.
  3. In the New Data Augmentation window, specify the following information:
    Field name Description
    Book Name     Select the name of the primary revenue book. The augmented data for the primary book will be copied to any other additional (non-primary) revenue books.
    Sequence     Sequence to apply data augmentation rules.
    Rule Name Enter a unique name of the data augmentation rule.
    Start Date Enter a start date for the data augmentation rule. It is important to note that the data augmentation rule becomes effective at the beginning of the next accounting period following the start date. For example, if the start date is January 15, 2020, the rule will be effective starting February 1, 2020. 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.
    End Date Optionally enter the end date.
    Enabled Toggle to Yes to enable the data augmentation rule.
    Processor Type Select RC_COLLECT.
    Stage Name Select the appropriate stage to apply the data augmentation rule.
  4. Click the save icon icon-save.png. The data augmentation rule is created.
  5. In the Conditions tab, to add a rule, click icon-add-green.png  and then complete the following steps depending on your selection in the Rule Type column:
    Rule Type Substeps
    Advanced Rule
    1. In the Rule Type column, select Advanced Rule.
    2. In the Field to be Updated column, select the name of the field whose value is to be changed.
    3. In the Start Date column, specify the effective start date of this rule type.
    4. (Optional): In the End Date column, specify the effective end date.
    5. In the Enabled column, ensure this rule is enabled.
    6. Click icon-in-operator.png in the Actions column. The Advanced Rule window is displayed.
    7. In the Advance Rule Set section, click icon-add-green.png to add a row.
    8. In the Rule Set column, specify a meaningful name and then enter the new value to be set in the Target Value column.
    9. To save this rule set, click icon-save-green.png
    10. In the Advanced Rule Filters section, define the condition to filter the lines for which the new value is to be set. Click icon-add-green.png to add a row. You can create more than one line and use the Seq column to determine the sequence of these filter conditions.
    11. To save the filter conditions, click icon-save-green.png. A rule set is defined. The value specified in the Target Value column will be set for the lines that satisfy the filter conditions in the Advanced Rule Filters section.
    12. If you want to update the same field to another value for other lines. Repeat Step d - h to define another rule set.
    13. After you are done, click save and close the window.
    Clear Value
    1. In the Rule Type column, select Clear Value.
    2. In the Field to be Updated column, select the name of the field whose value is to be cleared.
    3. In the Start Date column, specify the effective start date of this rule type.
    4. (Optional): In the End Date column, specify the effective end date.
    5. In the Enabled column, ensure this rule is enabled.
    6. To save this rule, click icon-save-green.png.
    7. Click the Filters tab to define the conditions to filter the lines whose values are to be cleared.
    8. Click icon-add-green.png to add a row. You can create more than one line and use the Seq column to determine the sequence of these filter conditions.
    9. After you are done, click icon-save-green.png and close the window.
    Constant
    1. In the Rule Type column, select Constant.
    2. In the Field to be Updated column, select the name of the field whose value is to be changed.
    3. In the Target Value column, enter the new value to be set
    4. In the Start Date column, specify the effective start date of this rule type.
    5. (Optional): In the End Date column, specify the effective end date.
    6. In the Enabled column, ensure this rule is enabled.
    7. To save this rule, click icon-save-green.png.
    8. Click the Filters tab to define the conditions to filter the lines whose values are to be cleared.
    9. Click icon-add-green.png to add a row. You can create more than one line and use the Seq column to determine the sequence of these filter conditions.
    10. After you are done, click icon-save-green.png and close the window.
    Formulae
    1. In the Rule Type column, select Formulae.
    2. In the Field to be Updated column, select the name of the field whose value is to be changed.
    3. In the Start Date column, specify the effective start date of this rule type.
    4. (Optional): In the End Date column, specify the effective end date.
    5. To specify the formula for calculating the target value, click icon-in-operator.png in the Actions column.
    6. In the Formulae window, specify the formula by using the listed columns, keypad characters, and functions, and then close the window. The formula is displayed in the Expression column.
    7. In the Enabled column, ensure this rule is enabled.
    8. To save this rule, click icon-save-green.png.
    9. Click the Filters tab to define the conditions to filter the lines whose values are to be cleared.
    10. Click icon-add-green.png to add a row. You can create more than one line and use the Seq column to determine the sequence of these filter conditions.
    11. After you are done, click icon-save-green.png and close the window.
    12. Click the Filters tab to define the conditions to filter the lines whose values are to be cleared.
    13. Click icon-add-green.png to add a row. You can create more than one line and use the Seq column to determine the sequence of these filter conditions.
    14. After you are done, click icon-save-green.png and close the window.
    Lookup
    1. In the Rule Type column, select Lookup.
    2. In the Lookup Type column, select the lookup type. To create a new lookup definition, select New_Look.
    3. In the Start Date column, specify the effective start date of this rule type.
    4. (Optional): Specify the effective end date in the End Date column.
    5. Click icon-in-operator.png in the Actions column to specify the lookup. The Lookup window is displayed.
    6. If you are creating a new lookup, specify the lookup name in the Lookup Type Name field.
    7. In the Lookup Fields section of the window, click icon-add-green.png to add a row.
    8. Provide a unique name in the Name column.
    9. Specify at least one lookup field name in the Reference Field column and one filed name in the Target Field column. You can specify up to 5 reference fields and 5 target fields.
    10. Click icon-save-green.png in the Lookup Fields section. 
    11. In the Lookup Values section, specify the values for the lookup fields in the Reference Value and Target Value columns respectively. If the reference field of a line is found to be the specified reference value, update the target field to the target value.
    12. Click icon-save-green.png to save your settings.
    13. Repeat Step c ~ j to create as many lookup rule sets as you need, and then close the window. 
    14. Ensure this rule is enabled in the Enabled column and close the window.
  6. In the Edit Data Augmentation Rule window, if the SQL statement is used for the Target Value column, click Validate SQL Statements for validation.
  7. Click the save icon icon-save.png and close the window.