Industry

Higher Education

Client

UCLA Anderson Executive Education

Record-Driven Invoice Generation in Salesforce

Role and Challenge

A branded Visualforce invoice PDF that adapts to payors, installment plans, and balance states, with built-in readiness checks.


Salesforce platform owner and developer · UCLA Anderson Executive Education · Part of the 2022–2026 platform build


Invoice generation had lived in the legacy system. Moving it into Salesforce meant that records needed PDF documents to be generated from records and show who pays, who attends, which payment schedule applies, and what is still due, in a clear, frictionless manner for the recipient. Invoices needed to accommodate multiple paths, ranging from Program types (Open Enrollment, Custom, Partner) to a wide variety of payment options, including automated installment/date processes, as well as outlier/manual scenarios.


My approach

  • Billing contact separate from participant. The “Bill to” block reads from the invoice’s Payor contact, company, and address. The participant’s name comes from the linked registration. A registration defaults to the participant as payor, and staff can name someone else.

  • Readiness as an explicit condition. Read-only checks confirm that the installment setup is complete and that registration and invoice values match. They feed one condition that controls the document body. If a check fails, the PDF shows correction guidance, such as a missing amount/date pair or a value mismatch, in place of a flawed invoice.

  • Content that adapts to the arrangement. A single dated payment appears as an enrollment fee, and multiple entries render as installment rows. Zero-dollar placeholders are excluded. Additional charges render as their own tables. Payment messaging changes for an outstanding balance, a paid-in-full invoice, or a credit, and payment instructions and an online-payment link appear only when a balance is due.

  • Presentation kept separate from financial logic. The page reads the stored invoice amount, payments applied, and balance. It doesn’t recalculate totals or update records.

  • Built for print. Explicit page dimensions, fixed table columns, aligned currency values, and page-break controls give clean output. A small Aura quick action opens the PDF from the record. In a new build I’d use an LWC headless quick action and leave the invoice page untouched.

Outcome

Staff generate branded invoices straight from an invoice record using live Salesforce data for the billing contact, schedule, payments, and balance. The design handles alternate payors and negotiated installment plans, and it flags incomplete schedules before an invoice goes out. Invoicing no longer depends on a separate platform and is tied directly to the registration and financial records the team already maintains.


What it shows


I translate billing rules into specific application behavior: I separate business roles, validate related values, change content by scenario, and keep presentation apart from financial record updates. I use code deliberately, only where declarative tools can’t deliver the result.