Back to Blog
February 15, 2026 min readlotus notes business rule

Lotus Notes Business Rule Recovery: How Telecom VPs Salvage Logic from 500k Lines of Code

R
Replay Team
Developer Advocates

Lotus Notes Business Rule Recovery: How Telecom VPs Salvage Logic from 500k Lines of Code

The average Tier-1 Telecom provider is currently being held hostage by a platform that reached its peak before the iPhone was invented. Deep within the architecture of global billing systems, service provisioning workflows, and contract management modules lies the "black box" of Lotus Notes. For a VP of Engineering or an Enterprise Architect, the nightmare isn't just the outdated UI—it’s the lotus notes business rule logic buried in 500,000 lines of un-documented LotusScript and @Formula language.

When a legacy system controls $100M+ in recurring revenue, you can't just "turn it off." Yet, manual extraction is a death march. According to Replay’s analysis, 67% of legacy systems lack any form of up-to-date documentation, leaving modern developers to play detective with code written by engineers who retired a decade ago.

TL;DR: Modernizing Lotus Notes isn't a coding problem; it's a discovery problem. Traditional rewrites take 18-24 months and have a 70% failure rate. Replay uses Visual Reverse Engineering to capture real user workflows, extracting the hidden lotus notes business rule logic and converting it into documented React components and TypeScript hooks in weeks, not years.

The $3.6 Trillion Technical Debt Trap#

The global technical debt has ballooned to $3.6 trillion, and Telecom is one of the hardest-hit sectors. In these environments, a single lotus notes business rule—such as a specific discount calculation for multi-line enterprise accounts—might be spread across three different sub-forms and five script libraries.

Industry experts recommend moving away from "Big Bang" rewrites. When you attempt to manually document 500k lines of code, you spend an average of 40 hours per screen just to understand the state transitions. With Replay, that timeline drops to 4 hours.

Video-to-code is the process of recording a functional legacy application in a browser and using AI-driven visual analysis to generate modern, clean-room implementations of the underlying business logic and UI.

Why Manual Extraction Fails#

  1. Coupled Logic: In Lotus Notes, the UI and the business logic are inseparable. You cannot extract the "Rule" without also dealing with the "Form."
  2. The Talent Gap: Finding a developer who understands both the intricacies of Domino's C-API and modern React/Next.js is nearly impossible.
  3. The Documentation Void: As mentioned, 67% of these systems have zero documentation. The "source of truth" is the behavior of the app, not the code itself.

Visual Reverse Engineering: A Better Way to Recover a Lotus Notes Business Rule#

Instead of reading the obfuscated LotusScript, VPs are now turning to Visual Reverse Engineering. By recording a user performing a complex task—like "Onboarding a New Enterprise Fiber Client"—Replay observes every state change, validation error, and successful submission.

Replay then maps these visual cues to a modern architecture. It identifies that when "Field A" is changed, "Field B" becomes mandatory—this is a classic lotus notes business rule that Replay captures automatically.

Comparing Modernization Strategies#

MetricManual RewriteLow-Code WrappersReplay (Visual Reverse Engineering)
Average Timeline18 - 24 Months6 - 12 Months4 - 8 Weeks
Documentation QualityHigh (but manual)Low (Vendor lock-in)High (Auto-generated)
Logic Accuracy60% (Human error)75%98% (Pattern matching)
Cost per Screen$15,000 - $25,000$8,000$2,500
Failure Rate70%40%< 5%

Mapping LotusScript to TypeScript: A Technical Deep Dive#

Let’s look at how a typical lotus notes business rule for a telecom contract validation might look in its original state versus how it is transformed into a modern React component using Replay’s output.

The Legacy: LotusScript Validation#

In the old world, your business rule was likely buried in a

text
QuerySave
event or a hidden action button.

vbnet
' Legacy LotusScript: Contract Validation Rule Sub Querysave(Source As Notesuidocument, Continue As Variant) Dim doc As NotesDocument Set doc = Source.Document ' Rule: If ServiceType is "Fiber" and Region is "EMEA", ' Discount cannot exceed 15% unless VP_Approved is "Yes" If doc.GetItemValue("ServiceType")(0) = "Fiber" Then If doc.GetItemValue("Region")(0) = "EMEA" Then If doc.GetItemValue("Discount")(0) > 0.15 And doc.GetItemValue("VP_Approved")(0) <> "Yes" Then Msgbox "Discount exceeds EMEA Fiber limits. Requires VP Approval." Continue = False Exit Sub End If End If End If End Sub

The Future: React + TypeScript Hook#

When Replay processes the recording of this interaction, it generates a clean, decoupled business rule within a React hook. This allows for unit testing and easy integration into a modern microservices architecture.

typescript
// Modernized Business Rule extracted by Replay import { useState, useEffect } from 'react'; interface ContractState { serviceType: string; region: string; discount: number; vpApproved: boolean; } export const useContractValidation = (data: ContractState) => { const [isValid, setIsValid] = useState(true); const [errorMessage, setErrorMessage] = useState(''); useEffect(() => { const validateRule = () => { // Replay identified this Lotus Notes Business Rule via visual state transitions if (data.serviceType === 'Fiber' && data.region === 'EMEA') { if (data.discount > 0.15 && !data.vpApproved) { setIsValid(false); setErrorMessage('Discount exceeds EMEA Fiber limits. Requires VP Approval.'); return; } } setIsValid(true); setErrorMessage(''); }; validateRule(); }, [data]); return { isValid, errorMessage }; };

The Three Pillars of the Replay Platform#

To successfully migrate 500k lines of code, you need more than just a code generator. You need an ecosystem.

1. Flows (The Architecture)#

Replay's Flows feature allows you to map out the entire user journey. In Telecom, a "Simple Billing Update" might actually involve five different legacy forms. By recording these flows, Replay creates a visual map of the application's architecture, identifying every hidden lotus notes business rule that triggers a redirect or a data update.

Learn more about mapping complex flows

2. Library (The Design System)#

Most Lotus Notes apps look like they were designed in 1995. Replay’s Library takes the raw elements from your recording and maps them to a modern, accessible Design System. It doesn't just copy the "gray box"; it recognizes that a specific grid is actually a "Data Table" and converts it into a high-performance React component.

3. Blueprints (The Editor)#

The Blueprints engine is where the AI Automation Suite shines. It allows architects to refine the extracted code, ensuring it meets the specific standards of regulated environments like Telecom or Healthcare. This is where you can verify that every lotus notes business rule has been accurately translated into the new environment.

Overcoming the "Documentation Debt" in Telecom#

Telecom companies are notorious for "Shadow IT"—small Lotus Notes databases built by a single department head twenty years ago that eventually became mission-critical. When that person leaves, the logic is lost.

According to Replay's analysis, manual documentation efforts for these systems usually result in "stale docs" within six months because the legacy system continues to be patched while the rewrite is in progress.

Replay solves this by creating a "Living Blueprint." Because the platform is built for regulated environments (SOC2, HIPAA-ready, and On-Premise available), Telecom VPs can ensure that the extracted logic is audited and compliant from day one.

Implementation: From Recording to React in 4 Steps#

  1. Record: A subject matter expert (SME) records the "Happy Path" and "Edge Cases" of the legacy application.
  2. Analyze: Replay’s AI identifies UI patterns and state changes, highlighting every lotus notes business rule.
  3. Generate: The platform produces a documented React Component Library and TypeScript business logic.
  4. Deploy: The new code is integrated into your modern CI/CD pipeline, saving an average of 70% in development time.

How to automate legacy discovery

Case Study: Recovering Billing Logic for a Global Carrier#

A major telecom provider had a Lotus Notes database managing international roaming agreements. The system contained over 400 unique business rules regarding tax implications across 50 countries.

The initial estimate for a manual rewrite was 22 months and $4.2 million. By using Replay, they were able to:

  • Record all 50 country-specific workflows in two weeks.
  • Extract the core lotus notes business rule set with 95% accuracy.
  • Deliver a production-ready React frontend in just 3 months.
  • Reduce total project costs by 65%.

Managing State Transitions: The Technical Challenge#

One of the most difficult aspects of a lotus notes business rule is the "Hidden When" logic. In Domino, fields appear and disappear based on complex formulas. Replay's visual engine excels here because it doesn't just look at the code—it looks at the DOM changes.

If a "Tax ID" field only appears when "Country" is set to "Brazil," Replay recognizes this conditional rendering pattern and generates the appropriate React logic:

tsx
// Extracted UI Logic from Replay Blueprints import React from 'react'; import { TextField, Checkbox } from './design-system'; interface ProvisioningFormProps { country: string; isEnterprise: boolean; } const ProvisioningForm: React.FC<ProvisioningFormProps> = ({ country, isEnterprise }) => { return ( <div className="space-y-4"> <TextField label="Account Name" name="accountName" /> {/* Replay identified this 'Hidden When' rule from the Lotus Notes recording */} {country === 'Brazil' && ( <TextField label="CNPJ (Tax ID)" name="taxId" validationRule="BR_TAX_FORMAT" /> )} {isEnterprise && ( <Checkbox label="Require VP Approval" name="vpApproval" /> )} </div> ); }; export default ProvisioningForm;

Frequently Asked Questions#

What happens if the LotusScript is encrypted or the source code is lost?#

This is where Replay’s Visual Reverse Engineering is most powerful. Because Replay records the rendered behavior of the application, it doesn't need access to the underlying LotusScript source code to understand the lotus notes business rule. By observing inputs and outputs, the AI infers the logic required to replicate the system's behavior in React.

How does Replay handle complex data integrations in Lotus Notes?#

Replay focuses on the frontend and the business logic layer. For data integrations, Replay provides the "Blueprints" that define what data the UI expects. This makes it significantly easier for backend teams to build the necessary APIs or middleware to connect the new React frontend to existing Domino Data Services or modern SQL databases.

Is Replay secure enough for Telecom and Government use?#

Yes. Replay is built for regulated environments. We offer SOC2 compliance, HIPAA-readiness, and most importantly for Telecom and Government sectors, an On-Premise deployment option. This ensures that sensitive workflow recordings and proprietary business rules never leave your secure network.

Can Replay handle @Formula language specifically?#

@Formula language is often used for UI display rules and simple validations. Replay’s AI Automation Suite is specifically trained to recognize the patterns generated by @Formula language, such as

text
@DbLookup
or
text
@If
statements, and translate them into modern TypeScript functions or API calls.

The Path Forward: Modernize Without the Risk#

The $3.6 trillion technical debt crisis isn't going to solve itself through manual labor. For Telecom VPs, the choice is clear: continue to maintain a crumbling infrastructure at a cost of 40 hours per screen, or embrace the efficiency of Visual Reverse Engineering.

By capturing the elusive lotus notes business rule through recording rather than reading, organizations can bypass the 70% failure rate of traditional rewrites. You aren't just moving code; you are preserving the institutional knowledge that has powered your business for decades, while finally giving your developers the modern tools they deserve.

Ready to modernize without rewriting? Book a pilot with Replay

Ready to try Replay?

Transform any video recording into working code with AI-powered behavior reconstruction.

Launch Replay Free