Setting Up Rules

Page Name

Definition Name

Usage

Rules Page

CS_RULES

Set up authored document rules.

A rule is a user-defined set of conditions that the system uses to determine whether to add specific clauses or sections to a generated authored document. Rules also determine whether an alternate clause should substitute the initial clause that is intended for the document.

When a document is generated, rules can reference bind variables, which enable you to retrieve actual field values from a transaction record or wizard response. Depending on how an author responds to wizard questions or other transactional bind values that are specific to the document, rules can determine whether to include additional content within the document.

See Understanding Bind Variables.

This list summarizes how you use rules:

  • Create standard rules to evaluate transactional information.

    You can define a rule to check for a specific supplier. Using the predefined bind variable VENDOR_ID, which is supplied by PeopleSoft Supplier Contract Management, you can retrieve the actual field value from a purchasing contract transaction and include the content that is specific for that supplier.

  • Create alternate rules to substitute a main clause with an alternate clause.

    An example of using an alternate clause might be when a main clause limits liability, but under certain conditions, such as a specific supplier ID, you need to substitute a liability clause with a modified version. You can do this by creating an alternate rule that checks whether the Supplier (VENDOR_ID) bind variable is XYZ. You can add an alternate clause and associated rule in the Alternates section of the Clause Definition Page.

  • Create standard rules to evaluate wizard responses.

    Rules that are used in conjunction with wizard responses provide a powerful tool for controlling additional content when documents are generated. You use this feature by defining wizard variables. First, you define a wizard with related question groups and questions, which are designed to prompt the document author for specific values. Second, you create a rule for the system to evaluate those values and take the appropriate action to add content in the completed document.

    For example, to use a rule in a wizard that adds an on-site inspection section to a building document, you would follow these steps:

    1. Create a wizard that contains the question "Is an on-site inspection required?"

    2. As a result of step 1, a wizard variable defined as %%ONSITEINSP%% is populated with a yes or no value.

    3. Create a rule called ONSITE that has the criteria to check If ONSITEINSP = Y.

    4. If the rule is true, the system includes the INSPECTION section in the Content Elements grid for the rule.

    5. Place the ONSITE rule in the document configurator where you want to insert the inspection section.

    6. A document author creates a document using the wizard and responds Yes to the inspection question.

    7. The system processes the rule when the document is generated and, based on the response, determines to include the INSPECTION section in the document.

Note: If you enter an unformatted rule value that requires a formatted value, the system automatically formats the value that you enter.

See Setting Up Rules.

Effective Dating

Rules are effective-dated so that you can revise them over time without affecting prior versions of the rule. The system includes the correct version of an active rule when a document is generated based on the start date of the contract. Each rule has its own identifier, and you can control the Active or Inactive status for the rule.

Rule Criteria

You can establish basic rule criteria for standard and alternate rules with basic operands and binds. Basic queries can reference multiple bind variables and values, but all comparisons must be processed with a basic and or or statement for the criteria. You can also use more advanced rules that use parentheses to combine statements for more complex data sets when needed.

Repeating Rules

A repeating rule has binds that are from a transaction level that is greater than zero. If a rule is created for a child-level transaction that repeats, such as a contract item line for a transaction at level one, then the content types and their children that are attached to that rule are transferred into the document for each row of a repeating rule.

Content elements (sections and clauses) that are listed for a rule should not have binds, or should have only level-zero binds, or the same level binds as the criteria. For example, if the criteria for a transactional contract item is at level one, then the system cannot list content element objects in the rules grid at a level greater than one.

You can include only rules with bind variables that are greater than level zero in a repeating section of the same level. For example, if the rule evaluates a bind variable for the transactional contract item ID at level one, the rule must be included on a section that also contains a bind variable at the same level. Thus, you cannot include rules with bind variables that are greater than level zero on the document configurator. Furthermore, if you do require a content element to contain a bind value that is greater than level zero, then the bind variable must be associated with the same record view as the bind that is used within the rule.

See Understanding Bind Variables.

Alternate Rules

When rules are attached to alternate clauses, the system uses the rule to determine which alternate clause to use. Each alternate clause can have a rule attached to it. The attached rule must have a type of Alternate. The system checks the alternate rules, in sequence, to find the first alternate for which the rule is true. If no rule is true, the system uses the original main clause and does not make a substitution.

When a document is generated, if a substitution takes place, the system replaces the lead clause information with the alternate clause information in the document.

Note: Clause substitutions occur for only a primary clause and not an alternate clause. In the previous example, if the alternate clause has alternate clauses and rules defined for it, the system does not evaluate those alternate clauses.

Use the Rules page (CS_RULES) to set up authored document rules.

Navigation:

Supplier Contracts > Manage Contract Library > Contract Library Rules

This example illustrates the fields and controls on the Rules page.

Rules page

Use this page to define rule definitions, criteria, and the content to include when the rule is true. A rule can be associated directly with a document configurator or associated with a section. Rules are a set of conditions that, when evaluated, render a true or false result. When a standard rule type is true, the system includes additional clauses or sections in the document configurator or within a section in the configurator. The system adds these to the Content Elements grid on the Document Configurator Definition Page and into the document when you use the configurator to generate an authored document.

When an alternate rule type is true, the system substitutes the alternate clause that is defined for the primary clause for which the alternate is a member. Use the Clause Definition Page to define the alternate clause. The system bases rules on the transactional-based or wizard-based bind variables that it resolves when a document is generated and refreshed.

You can define basic or advanced criteria for rules. The difference between basic and advanced criteria is that advanced rules enable you to place parentheses markers around statements and create combinations of query-type, statement, or both in the rule criteria.

Field or Control

Description

Copy From

Click to access the Copy Information From page (CS_RULE_COPY_SP). The button is available when you are adding a new rule and enables you to copy an existing rule to create the new rule. When you click the button, the system provides a list of existing rules. After you make the copy, you can incorporate new values into the rule.

Rule Type

Select a value that determines how the system uses the rule. Values include:

Standard: Select to use this rule with any section or configurator. This is the default value for new rules.

Alternate: Select to use this rule with alternate clauses. The system links the rule to the alternate clause on the parent clause and not within the rule itself.

Show Advance Criteria and Show Basic Criteria

Click this toggle button to determine advanced criteria or define basic criteria.

Basic Criteria

Use this section to define basic selection criteria for a rule. This feature enables you to define basic queries to evaluate one or more transactional or wizard bind variables. When a document is generated or refreshed, the system renders a true or false result and takes the appropriate content action, such as including an additional clause or substituting an alternate clause.

Field or Control

Description

And or Or

When more than one row of criteria exists within basic criteria, the system can evaluate all rows using and or or statements:

  • When using and, all rows of the criteria must evaluate as true for the rule to be true.

  • When using or, if any row of the evaluated criteria is true, then the rule is true.

Advanced Criteria

Use this section to define advanced criteria for a rule. Advanced criteria enable you to define more complex sets of criteria. You can use advanced criteria when the basic criteria for a rule is not sufficient. Advanced criteria enables you to place open and close parentheses around one or more criteria, and enables you to use the AND and OR constructions when needed.

Field or Control

Description

Open

Select the open parenthesis character to signify the start of a group of criteria to enclose. For example, if you have three criteria, you can create a selection criteria of (A or B) and C by placing an open parenthesis on the line for A.

Bind Variable

Select a bind variable for retrieving field values from a record. The variable that you select determines the field type that you must use in the Value field.

Operator

Select a value that determines the action that the system applies to the criteria that you define from the bind variable record and the value in the Value field. For example, to place amounts that are equal to or greater than 100,000 from the transaction bind variable into the document, use the => operator and enter 100000 in the Value field. You should enter the correct form of the criteria to match the operation that you want the system to perform.

Values are:

<: Include values that are less than the value that you enter in the Criteria field.

<=: Include only values that are less than or equal to the Criteria field.

<>: Include values that are not equal to the value that you enter in the Criteria field.

=: Include only values that are equal to the Criteria field.

>=: Include values that are equal to or greater than the Criteria field.

>: Include values that are greater than the Criteria field.

Value

Enter the value to use when applying the operators. For example, if you select >= in the Operator field for an item description bind variable, you could enter 100000 as the value. The system will include only values that are equal to or above 100000.

Close

Select the close parenthesis character to signify the end of a group of criteria to enclose. For example, if you have three criteria, you can create a selection criteria of (A or B) and C by placing a close parenthesis on the line for B.

AND or OR

Select AND or OR. This field enables you to create or modify statements for the operators and criteria that you enter. Select AND to create additional criteria and apply a logical and between the rule criteria. Select OR to create a logical or between the rule criteria.

Question Mapping

Displays the wizard question if a bind variable exists in a wizard. When the system creates and refreshes the document, it populates the bind. If a variable is a transactional bind, the system displays the record, field, and level associated with the transactional bind. This column is displayed when viewing a rule from the Document Configurator page.

This field is not shown when adding a new rule.

Question Group

Displays the question group in which the rule is used. This column is displayed when viewing a rule from the Document Configurator page.

This field is not shown when adding a new rule.

Source Transaction

Displays the source transactions that are applicable to this rule when the rule uses a wizard bind. This column is displayed when viewing a rule from the Document Configurator page.

This field is not shown when adding a new rule.

Content Elements

Use this section to select document elements to which you want to attach standard type rules. This grid appears only for standard rules. Clauses in this section do not apply alternates.

Field or Control

Description

Sequence

For standard rules, enter the sequence in which the system should add sections and clauses during document generation.

Content Type

Select Clause or Section.

Content ID

Select the clause or section ID.

Content Format

Select Full Text or Reference Text. This selection determines which content to include for a clause. For sections, the content format is always Full Text.