# Dynamic fields and rules to support Billing

Billing tables does not have dynamic field table to hold invoice level data like invoice number, invoice total, status etc. With this enhancement new field table is added to hold dynamic data at bill level. And also business rules are enhanced to support the dynamic data at bill level.

A new field table AsBillField will be introduced to hold dynamic fields of billing. This table will be populated by GenerateBill BR and updated by MaintainBill br. BillGuid and the FieldName are used as composite primary key for this table.

### AsBillField

AsBillField | BILLGUID | Unique Identifier
--- | --- | ---
| FIELDNAME | Unique Identifier
| BIGTEXTVALUE | The field holds the Big Text value
| CURRENCYCODE | The field holds the Currency code
| DATEVALUE | The field holds the Date value
| FIELDTYPECODE | The field holds the Type Code of the field
| FLOATVALUE | The field holds the Float Value
| INTVALUE | The field holds the Int value
| OPTIONTEXT | The field holds the OptionText for Radio and Combo box fields
| OPTIONTEXTFLAG | Indicates if the option text is available
| TEXTVALUE | The field holds the Text value

### BillScreen rule

BillScreen rule will be used to define dynamic fields of the bill. Only fields defined in the screen rule can be generated and updated to the BillField table.

This rule can have overrides at company, product and Plan level.

BillScreen SChema

    <BillScreen>

    <Fields>

    <Field>

    <Name>...</Name>

    <Display>...</Display>

    <DataType>...</DataType>

    </Field>

    <Field>...</Field>

    </Fields>

    </BillScreen>

### GenerateBill BR

GenerateBill rule is enhanced with Fields section to support dynamic fields. These fields should reference fields defined in the BillScreen rule.

GenerateBill rule Schema

    <GenerateBill>

    <Bill BILLDETAILARRAY="BillDetailArrayMV" BILLOWNERGUID=" " BILLOWNERTYPE=" ">

    <Tests>

    <Test>[Expression]</Test>

    </Tests>

    <ReferenceID PERSISTONRECYCLE="[Yes or No or Math Variable]">[MathVariable or Field]</ReferenceID>

    <Fields>

    <Field>

    <From></From>

    <To></To>

    </Field>

    <Field>...</Field>

    </Fields>

    </Bill>

    </GenerateBill>

### MaintainBill rule

A new sections CopyToBillFields is added to update dynamic bill fields. A new attribute BILLGUID is added to CopyToBillFields to update a single Bill. This is optional and can be used with From and To elements. FromCollection and To can be used to update multiple Bills at a time. FromCollection and From should not be used together. Reversing the activity with MaintainBill attached rule will revert the values back to the prior values in AsBillField table.

MaintainBill rule schema

    <MaintainBill>

    <AddToBill BILLGUID="">BillDetailReferenceGUIDArray1</AddToBill>

    <RemoveFromBill BILLGUID="">BillDetailReferenceGUIDArray2</RemoveFromBill>

    <CopyToBillFields BILLGUID="Guid">

    <Fields>

    <Field>

    <From></From>

    <To></To>

    </Field>

    <Field>...</Field>

    </Fields>

    <Fields>

    </CopyToBillFields>

    <MaintainBill>

    (Or)

    <MaintainBill>

    <AddToBill BILLGUID="">BillDetailReferenceGUIDArray1</AddToBill>

    <RemoveFromBill BILLGUID="">BillDetailReferenceGUIDArray2</RemoveFromBill>

    <CopyToBillFields>

    <Fields>

    <Field>

    <FromCollection></FromCollection>

    <To></To>

    </Field>

    </Fields>

    </CopyToBillFields>

    </MaintainBill>

### BillSearchScreen:

BillSearch screen is enhanced to include dynamic Bill fields. Search Criteria can define a field from AsBillField table to search for the matching records by using Group element with BillField value. Result section can have a column from AsBillField table by using Group element with BillField value.

BillSearchScreen rule Schema

    <BillSearchScreen>

    <Search>

    <Fields>

    <Field>

    <Name>SearchCriteriaFieldName</Name>

    <Group>Bill|BillField|BillDetail|BillDetailField|GroupCustomer|Class</Group>

    <Display>SearchFieldDisplayName</Display>

    <DataType>SearchFieldDataType</DataType>

    </Field>

    <Field>...</Fields>

    </Fields>

    </Search>

    <Results>

    <Table>

    <Column>

    <Name>ResultsFieldName</Name>

    <Display>ResultsFieldDisplayName</Display>

    <Group>Bill|BillField|GroupCustomer|Class</Group>

    <DataType>ResultsFieldDataType</DataType>

    </Column>

    <Column>...</Column>

    </Table>

    </Results>

    </BillSearchScreen>

## Required Manual Configuration Updates

Customers need to configure dynamic fields using BillScreen rule for Bill and need to update BillSearchScreen, GenerateBill, MaintainBill configurations to utilize dynamic fields of Bill. Default behavior will continue if no changes are made to the configuration of the Bill rules.

| Copyright © 2025, Oracle and/or its affiliates. All rights reserved. | About Oracle Insurance | Customer Support