Classify Contract Key Terms
You can categorize or classify the contractual key terms based on your business specific rules. Classification provides a quick preview of the key terms that need attention. It highlights the risks in the contract, brings attention to the terms that aren’t standard and outlines the favorable and non favorable terms in a contract.
- If above 5, the classification is Good
- If between 3 and 5, it might be classified as Neutral
- If less than 5, then the classification might be Bad.
You can classify the key terms after they're extracted from the contract documents. Classifying key terms helps stakeholders get quick insights from the contract so that they can make informed decisions.
Enable the Classify Contract Key Terms Feature
- Navigate to .
- Click the Enterprise Contracts offering.
- Click Opt In.
- Click Features (the pencil icon) and navigate to the
Extract Key Terms from Contract Documents Using Generative AI
parent feature as shown: - Expand the parent to display the
Classify Contract Key Terms
child feature and select the checkbox in the Enable column.Note: The child opt in can’t be enabled without the parent opt in being enabled. - Click Done to save the changes and return to the
Offerings page.
For more information, see the New Feature Opt-In Section of the Oracle Applications Cloud - Using Functional Setup Manager guide on the Oracle Help Center (docs.oracle.com).
Security and Privileges to Classify Key Terms
- Edit Key Term Values (OKC_EDIT_KEY_TERM_VALUES_PRIV)
- Use Generative AI Features in Sales (ZCA_USE_GENAI_IN_SALES_PRIV)
- Edit Contract (OKC_EDIT_CONTRACT_PRIV)
Classification Code Lookups
The classification codes are user-defined and you can add them in the Key Terms Classification Codes lookup. Use the user defined lookup Key Terms Classification Measures to enter measures such as hours, minutes, days, percentage and so on. This field is available only for key terms with Number output type. For example, for a Renewal Period key term, the Updated Value is 3 and Measure is Years and for a Renewal Percentage key term, the Updated Value is 10 and Measure is Percentage.
Key Term Classification Rules
The configuration of Groovy scripts for classification of key terms is done in Application Composer using a sandbox for developing and testing your scripts. Here's how to create a sandbox:
- Navigate to .
- Click Create Sandbox.
- Specify a name and select .
- In the Publishable field, select Yes.
- Click Create and Enter.
- Click the Application Composer icon.
Name | Description |
---|---|
Rule 1 | If the key term Renewal Cap Percentage is more than
2, then the key term is classified as Non-standard , else
classified as Standard |
Rule 2 | If the key term Price Hold value is Yes, then the key
term is classified as Present, else classified as
Absent |
Rule 3 | If the contract type is Sell : No lines and Renewal
Period is < 3 years, it’s Non-standard, if it’s >= 3
years it’s Standard |
Here's how to create a field trigger to activate a key term classification rule.
- Click .
- In the Application field, select ERP and SCM Cloud.
- From the Objects area, select as shown:
- From the Triggers tab, in the Field
Triggers region click Add to create a new
field trigger as shown:
- Validate the Groovy script and click Save and Close.
Once you validate the Groovy script, you can classify the key terms from the Key Term Values tab of a contract as shown:
Click Classify to call the Groovy script and based on the rules you’ve written, the classification happens, and you can see the values in the Classification field. The values entered in the Updated Value field can be used for classification. The response returned by the LLM is populated in the Extracted Value and Updated Value fields. If the response isn’t in the format that you want for classification, then you can change the value in the Updated Value field and use that value for classification.
Sample Groovy Script for Key Term Classification Rules
Here's sample Groovy script for the rules describes in the Key Term Classification Rules section.
def typeName;
def count = 0;
def renewal;
def renewalCapVal;
def renewalCapPrcnt;
try{
//Below snippet will get Contract Type Name Using Id and MajorVersion of the
Contract def vo = newView('ContractVO')
def vc = newViewCriteria(vo)
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('Id')
vci1.setOperator('=')
vci1.setValue(DnzChrId)
def vci2 = vcr.ensureCriteriaItem('MajorVersion')
vci2.setOperator('=')
vci2.setValue(MajorVersion)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
def row = vo.first();
if(row != null)
{
typeName = row.getAttribute('ContractTypeName')
}
//Iterate through KeyTerms to classify key terms such as Renewal Cap Percentage,
//Based on the rules, user must populate ClassificationCode with appropriate Lookup Code
def contKeyTerms = contractKeyTerms
while(contKeyTerms.hasNext()){
def keyTermrow = contKeyTerms.next();
// Implementing Rule #1
if(keyTermrow.getAttribute('KeyTermName') == 'Renewal Cap Percentage'){
renewalCapPrcnt = keyTermrow.getAttribute('UpdatedValue')
if(renewalCapPrcnt > '2')
keyTermrow.setAttribute("ClassificationCode","OKC_CLASSIFY_NON_STD")
else
keyTermrow.setAttribute("ClassificationCode","OKC_CLASSIFY_STD")
}
// Implementing Rule #2
if(keyTermrow.getAttribute('KeyTermName') == 'Price Hold'){
if(keyTermrow.getAttribute('UpdatedValue') == 'Yes')
keyTermrow.setAttribute("ClassificationCode","OKC_CLASSIFY_PRESENT")
else
keyTermrow.setAttribute("ClassificationCode","OKC_CLASSIFY_ABSENT")
}
}
// Implementing Rule #3
//Re-Iterate through KeyTerms to Classify the Renewal Period
def contKeyTermsUpd = contractKeyTerms
while(contKeyTermsUpd.hasNext()){
def keyTermUpdrow = contKeyTermsUpd.next();
if(keyTermUpdrow.getAttribute('KeyTermName') == 'Renewal Period’){
if(typeName == "Sell : No lines"){
if(keyTermrow.getAttribute('UpdatedValue') < 3 != 'NONE'){
keyTermUpdrow.setAttribute("ClassificationCode","OKC_CLASSIFY_NON_STD")
}
if(keyTermrow.getAttribute('UpdatedValue') >= 3){
keyTermUpdrow.setAttribute("ClassificationCode","OKC_CLASSIFY_STD")
}
}
}
}
}
catch(Exception e){
def message = "There is an error in the implementation. Please contact Administrator";
adf.error.warn(message)
}