Create Business Rules

Last Updated: Version R2607

A business rule is logic used to automate processing in RICOH Intelligent Automation. A rule can run at the batch level or document level within a process flow, based on defined criteria. A batch business rule applies to the entire batch whereas document business rules apply to each document in the batch.

For example, you can use a business rule to:

  • Calculate values: Use a rule to perform a calculation of multiple fields. For example, sum the subtotal + tax + shipping fields to form a Total. This example allows you to compare the invoice total to the calculation performed by the system and then use logic to determine if the invoice total is valid or not.

  • Compare dates or durations: Use a rule to calculate the duration between dates. For example, use the rule to determine if an invoice is due to be paid.

  • Convert one format to another: If the date field must be presented in a particular format, use a rule to reformat correctly. For example, if the date is presented as YYYY-MM-DD, but should be DD-MM-YYY, you can use a rule to reformat the data.

  • Validate or extract data with regular expressions: If the rule must specifically match a particular format, create an expression. You can have the rule Check, Match, Replace, Extract, or Split based on if the expression terms are met.

  • Modify strings: Use a rule to remove blank spaces or even characters. For example, if the invoices include a space, but the space must be removed, you can create a rule to change '2265 894' to 2265894'.

  • Set fields or variables: Apply a specific value to a field or variable based on field-specific data.

  • Transform: Apply business rules consecutively. For example, if you are dealing with invoices that must be formatted in a particular way, use this functionality to apply rules in a set order. If you have one rule that removes a blank space, and another rule that converts the field to a particular format, you can use the transform feature to take the output from one applied rule and then apply the second rule on the output.

Business rules can also affect routing in the process flow depending on whether conditions are met. Follow these instructions to create a business rule that transforms a field, and then use the output in another business rule.

A user with Designer access level can complete this task.

Create a Batch Business Rule

This example rule will evaluate a date format, and then transform the date (if necessary) based on the batch business rule.

  1. Create or edit a Batch Type.  Refer to Create a New Batch Type for instructions.

  2. You need to create the business rule first. In the Edit Batch Type screen, locate the Batch Business Rules section, and select + Add Business Rule:

    1. Enter a name for the rule.

    2. From the Rules list, select Convert Value.

    3. From the Source value list, click + and then select Date from the System values.

    4. From the Target type list, select Date time.

    5. Click OK to save the rule and return to the Edit Batch Type screen.

  3. Next, add a date field to the scanned documents. From the Batch Fields section, click + Add Batch Field:

    1. Enter a name for the field.

    2. Under the Data Type section, locate the Data type list, and select Date.

    3. From the Format list, select the format you want the date to appear in.

    4. Under the Data Value section, locate the Data source list and select Auto Entry.

    5. From the Data source value list, select Date from the System Values.

    6. You can now add the Transform requirement to the field, which requires selecting the business rule you created above. Click Configure Transformation (circled in the screen capture above).

    7. Click Add Transformation Rule and then from the drop-down list, select the business rule you created earlier.

    8. Click OK to close the window and return to the Batch Field Settings screen.

  4. Click OK to save the Batch field settings.

  5. Proceed with creating a Process flow and completing all other settings for this Batch Type.

When an Operator scans any document using this Batch Type, the date field will be automatically evaluated and then transformed to the required format if needed.

You could also perform this transformation at the Document level if you want to apply the transformation to particular document types only (rather than to any document type within a batch). Instead of creating a Batch Business Rule while creating the Batch Type, you can click + Add Document, and then choose either Manual Indexing or an AI model. Once on the Document Settings screen, the Document Business Rule option appears, and you can configure the settings using the same procedure described above.