Invoice Line Item
The Invoice Line Item object in Maica represents the specific Item level detail associated with an Invoice.
Fields & Relationships
The table below provides a comprehensive overview of all fields and relationships for the Invoice Line Item object in Maica. Please refer to the table below for detailed information.
Click here to view and download the complete Invoice Schema.
Validation Rules
The list below outlines the Validation Rules applied to the Invoice Line Item Object in Maica.
Please refer to the list below for more detailed information on each Validation Rule.
Support Item is Mandatory
This rule makes sure the Support Item is mandatory.
Rule Name
VAL_INVOICE_LINE_ITEM_0001
Error Message
VAL_0001: The Support Item is mandatory.
Error Location
Support Item
ISBLANK(maica_cc__Support_Item__c)
Automation
Flows
The list below outlines the Flows applied to the Invoice Line Item Object in Maica.
Please refer to the list below for more detailed information on each Flow.
Status Management
This flow evaluates and updates the status of an invoice line item.
Flow Label
Maica - Invoice Line Item Status Management
API Name
maica__Invoice_Line_Item_Status_Management
Type
Autolaunched Flow
Flow Summary
This flow ensures that the invoice line item status is accurately updated based on the calculated values and specified conditions.
Starts on invoice line item creation or update.
Evaluates the status based on various conditions and calculations.
Assigns the appropriate status (Entered, Claimed, Fully Paid, Partially Paid, Not Paid).
Trigger Handlers
The list below outlines the Trigger Handlers applied to the Invoice Line Item Object in Maica.
Please refer to the list below for more detailed information on each Trigger Handler.
Invoice Line Rollup Expenditure
This trigger is designed to manage the rollup of expenditures for invoice line items in Maica.
Load Order
1
Label
InvoiceLineRollupExpenditure_MDTM
Invoice Line Booking Item
This trigger is designed to manage the booking items for invoice line items in Maica.
Load Order
2
Label
InvoiceLineBookingItem_MDTM
Invoice Line Item → Plan Budget Link
This Invoice Line Item trigger ensures every Invoice Line Item is automatically linked to the appropriate Plan Budget, and was rolled out with the Support at Home updates. This automation removes the need for manual intervention and supports accurate financial traceability, reporting, and compliance under Support at Home. It is detailed below:
Component Behaviour
When an Invoice Line Item is created, the trigger evaluates the record and attempts to populate the Plan Budget lookup field.
If a matching Plan Budget is found, the lookup is set automatically.
If no match exists, the Plan Budget field remains blank. This is an acceptable outcome and does not generate an error.
The trigger runs only on create, not on updates or deletions.
This ensures invoice data remains consistently aligned with the budgets defined in Service Agreements and their associated Plans.
Data Model
The trigger relies on attributes across the Invoice Line Item, Agreement Item, Service Agreement, and Plan Budget objects. These fields provide the necessary inputs for matching.
Invoice Line Item
Agreement Item
Lookup
References the Agreement Item that defines the service being invoiced.
Budget Type
Picklist
Defines the budget type for the line item. Uses a global value set aligned with Plan Budgets.
Plan Budget
Lookup
Populated automatically by the trigger if a matching Plan Budget is found.
Plan Budget
Status
Picklist
Identifies whether the Plan Budget is active. The trigger only considers active Plan Budgets.
Budget Type
Picklist
Defines the budget type of the Plan Budget. Must match the Invoice Line Item’s Budget Type.
Agreement Item
Service Agreement
Lookup
Links the Agreement Item to its parent Service Agreement.
Service Agreement
Plan
Lookup
Links the Service Agreement to the parent Plan, which contains related Plan Budgets.
Process Flow
The trigger logic follows a straightforward process:
Invoice Line Item is created
Trigger executes immediately on create.
Traverse relationships
From Invoice Line Item → Agreement Item → Service Agreement → Plan.
Retrieve Plan Budgets
Gather all Plan Budgets linked to the Plan.
Filter Plan Budgets
Status must equal Active.
Budget Type must equal the Budget Type on the Invoice Line Item.
Populate Plan Budget
If one matching record is found, populate the Plan Budget lookup on the Invoice Line Item.
If no match is found, leave the Plan Budget field blank with no error.
Calculation Logic
The trigger does not perform financial calculations itself; it ensures records are correctly linked so downstream calculations and reports remain accurate.
Matching Criteria:
PlanBudget.Status = 'Active' AND PlanBudget.BudgetType = InvoiceLineItem.BudgetType
Assignment:
InvoiceLineItem.PlanBudget = Matching PlanBudget.Id
Null Handling: If no match is found, the field is left blank. No logging or error is raised.
Last updated
Was this helpful?