Leadmetrics Tenant Creation Form - Admin Portal
Business Requirements Document (BRD)
Document Version: 1.3
Prepared by: Sana (Product Manager)
Date: April 20, 2026
Purpose: Business requirements specification for Leadmetrics Admin Portal tenant creation system
Table of Contents
- Executive Summary
- Background & Context
- Objectives
- Scope
- User Roles & Access
- Data Flow Overview
- User Journey
- Form Structure & Fields
- Field-Level Requirements
- Tax Logic & Validation Rules
- Invoice Generation Flow
- Success & Error Handling
- Post-Creation Workflows
- Integration Points
- Editable vs Non-Editable Fields
- Edge Cases & Scenarios
- Future Enhancements
1. Executive Summary
This BRD defines the requirements for the Tenant Creation Form in the Leadmetrics Admin Portal. This form enables the Onboarding team to create new customer accounts (tenants) after sales closure, configure billing settings, and automatically generate the first invoice in both Leadmetrics Portal and Zoho Books.
Key Features:
- Single-page form with smart tax calculation logic
- Automatic first invoice generation upon tenant creation
- Dual-system invoice creation (LM Portal + Zoho Books)
- Automated welcome email and login credentials
- Support for Indian GST compliance (SEZ, IGST, SGST+CGST)
- Custom and predefined pricing plans
- TDS deduction configuration
2. Background & Context
Current Workflow
- Sales team closes a deal and fills out a Google Form (“Customer Onboarding Responses”)
- Onboarding team manually copies data from Google Form into the Admin Portal Tenant Creation Form
- Upon form submission:
- Tenant is created in LM Portal with status = Onboarding
- First invoice is generated automatically
- Welcome email sent to customer
- Zoho Books profile and invoice created
Pain Points Addressed
- Manual data entry from Google Form to Admin Portal
- Complex Indian tax logic (GST, SEZ, IGST, SGST+CGST)
- Invoice sync between LM Portal and Zoho Books
- Tenant lifecycle management (Onboarding → Active)
3. Objectives
Primary Objectives
- Enable Onboarding team to create tenants efficiently with accurate tax calculations
- Automate first invoice generation in both LM Portal and Zoho Books
- Support Indian tax compliance (GST Treatment, Place of Supply, Tax Types)
- Streamline billing configuration for recurring subscriptions
Success Metrics
- Tenant creation time reduced from X minutes to Y minutes
- Invoice generation success rate > 95%
- Zero manual tax calculation errors
- Seamless Zoho Books integration
4. Scope
In Scope
- Tenant creation form with 4 sections:
- Location & Tax Details
- Company Information
- Primary Contact Person
- Plan & Billing
- Tax logic automation (Indian GST compliance)
- First invoice generation (one-time, auto-generated on creation date)
- Zoho Books integration (profile + invoice creation)
- Welcome email + login credentials email
- Field validation (GST, PAN, Email, Phone)
- Error handling (inline errors, Zoho sync failures)
Out of Scope
- Customer self-signup flow (separate BRD exists)
- Recurring invoice generation logic (covered in separate BRD)
- Tenant editing form (partial scope - see Section 15)
- Payment gateway integration
- Multi-currency manual override for predefined plans
- Automated Google Form to Admin Portal data sync
5. User Roles & Access
Admin Role
- Who: Onboarding team members, internal employees with Admin Portal access
- Permissions:
- Create new tenants
- Edit existing tenants (all fields except Plan, Tax Type, Currency)
- View tenant list
- Change tenant status (Onboarding → Active → Inactive → Locked)
- View invoices
Note: Currently, there is only ONE role in the Admin Portal - “Admin”. All users have the same permissions.
No Approval Workflow
- Tenant creation does not require approval
- No multi-level access control
- Direct creation upon form submission
6. Data Flow Overview
┌─────────────────┐
│ Sales Team │
│ (Google Form) │
└────────┬────────┘
│ Manual copy-paste
▼
┌─────────────────────────┐
│ Onboarding Team │
│ (Admin Portal Form) │
└────────┬────────────────┘
│ Click "Create Tenant"
▼
┌─────────────────────────┐
│ LM Portal Backend │
│ • Create Tenant │
│ • Status: Onboarding │
│ • Generate Invoice │
│ (Draft → Issued) │
└────────┬────────────────┘
│
├──────────────────┐
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Welcome Email │ │ Zoho Books │
│ + Credentials │ │ • Profile │
│ (Auto-sent) │ │ • Invoice │
└─────────────────┘ └─────────────────┘
│
▼
┌─────────────────────────┐
│ Tenant Listing Page │
│ (Admin redirected) │
└─────────────────────────┘7. User Journey
Happy Path
- Admin opens Admin Portal → Tenants → Create New Tenant
- Admin fills out form sections in order:
- Section 1: Location & Tax Details (Country → Region, State, GST, TDS)
- Section 2: Company Information (Names, PAN)
- Section 3: Primary Contact (Name, Email, Phone, Password)
- Section 4: Plan & Billing (Plan selection, Billing Address)
- Admin clicks “Create Tenant” button
- Form validates all fields
- Tenant created in LM Portal with status = Onboarding
- First invoice generated:
- Created in LM Portal (status: Draft, invoice number: null)
- Created in Zoho Books
- Zoho invoice number fetched back to LM Portal
- LM Portal invoice status updated to Issued
- Welcome email + login credentials sent to customer
- Success toast: “Tenant created successfully”
- Admin redirected to Tenant Listing Page
Alternative Paths
- Path A: Zoho invoice creation fails → Invoice remains in Draft status → Internal email sent to tech team
- Path B: Validation error → Inline error shown below field → Form submission blocked
- Path C: Duplicate email detected → Error shown → Form submission blocked
8. Form Structure & Fields
Section 1: Location & Tax Details
- Country *
- State * (conditional: shown only if Country = India)
- Region * (auto-populated, editable)
- Do you need to deduct TDS? (toggle, default: OFF)
- Does the company have GST registration? * (conditional: shown only if Country = India)
- If YES: GST Number field appears + SEZ checkbox (conditional)
- If NO: No additional fields
Section 2: Company Information
- Registered Company Name *
- Display Name * (auto-populated from Company Name, editable)
- PAN Number (optional, shown only if Country = India)
Section 3: Primary Contact Person
- Title (dropdown: Mr., Ms., Mrs., Dr.)
- First Name *
- Last Name *
- Email Address *
- Mobile Number * (with country code auto-populated)
- Password * (manual entry or Generate button)
Section 4: Plan & Billing
- Plan Type (toggle buttons: Pre-defined Plans / Custom Pricing)
- Select Plan * (conditional: shown if Plan Type = Pre-defined)
- Custom Price + Currency (conditional: shown if Plan Type = Custom)
- Billing Address:
- Name * (auto-populated from Company Name, editable)
- Street Address *
- Country * (auto-populated from Location section, editable)
- City *
- State/Province *
- Postal / ZIP Code (optional)
Note: First Invoice Billing Date is auto-set to tenant creation date (hidden from UI).
9. Field-Level Requirements
9.1 Country Field
| Attribute | Value |
|---|---|
| Field Type | Dropdown (single select) |
| Label | Country * |
| Required | Yes |
| Options | India, United States, United Kingdom, Singapore, UAE, Australia, Oman, etc. |
| Default | None (blank) |
| Validation | Must select a value |
| Behavior | • Auto-populates Region field • Auto-populates Country in Billing Address • Auto-sets country code for Mobile Number • Shows/hides State field (India only) • Shows/hides GST question (India only) • Shows/hides PAN field (India only) • Determines currency for pricing |
| Error Message | ”Please select a country” |
9.2 State Field
| Attribute | Value |
|---|---|
| Field Type | Dropdown (single select) |
| Label | State * |
| Required | Yes (only if Country = India) |
| Visibility | Conditional: Shown only when Country = India |
| Options | Kerala, Karnataka, Tamil Nadu, Maharashtra, Delhi, Gujarat, West Bengal, Rajasthan, Punjab, Haryana, Uttar Pradesh, Bihar, Odisha, Andhra Pradesh, Telangana, Assam, etc. (all Indian states) |
| Default | None (blank) |
| Validation | Must select a value if Country = India |
| Behavior | • Determines tax type (Kerala = SGST+CGST, Others = IGST) • Affects Place of Supply • Does NOT auto-populate Billing Address State |
| Error Message | ”Please select a state” |
9.3 Region Field
| Attribute | Value |
|---|---|
| Field Type | Dropdown (single select) |
| Label | Region * |
| Required | Yes |
| Options | India, United States, U.A.E, Oman, etc. |
| Default | Auto-populated based on Country |
| Auto-population Logic | • Country: India → Region: India • Country: United States → Region: United States • Country: UAE → Region: U.A.E • Country: Oman → Region: Oman |
| Editable | Yes (admin can manually override) |
| Validation | Must select a value |
| Behavior | • Determines currency for predefined plans • Filters available plans in dropdown • Does NOT sync to Zoho Books |
| Error Message | ”Please select a region” |
Currency Mapping:
- Region: India → Currency: INR (₹)
- Region: United States → Currency: USD ($)
- Region: U.A.E → Currency: AED
- Region: Oman → Currency: OMR (Omani Rial)
9.4 TDS Deduction Toggle
| Attribute | Value |
|---|---|
| Field Type | Toggle switch |
| Label | Do you need to deduct TDS? |
| Required | No |
| Default | OFF (TDS not deducted) |
| Behavior | • If ON: 2% TDS deducted from invoice amount • TDS percentage is fixed at 2% (no customization) • Syncs to Zoho Books |
| Editable After Creation | Yes |
9.5 GST Registration Question
| Attribute | Value |
|---|---|
| Field Type | Button group (2 options) |
| Label | Does the company have GST registration? * |
| Required | Yes (only if Country = India) |
| Visibility | Conditional: Shown only when Country = India AND State is selected |
| Options | • Yes, I have GST • No GST number |
| Default | None (no selection) |
| Validation | Must select one option if Country = India |
| Behavior | • If “Yes”: GST Number input field appears • If “No”: GST Treatment = “Unregistered Business” + State-based tax logic applies |
| Error Message | ”Please indicate GST registration status” |
9.6 GST Number Field
| Attribute | Value |
|---|---|
| Field Type | Text input (alphanumeric, uppercase) |
| Label | GST Number * |
| Required | Yes (only if “Yes, I have GST” is selected) |
| Visibility | Conditional: Shown only when GST question = “Yes, I have GST” |
| Format | 15 characters (e.g., 29ABCDE1234F1Z5) |
| Pattern | 2 digits + 10 alphanumeric + 1 letter + 1 digit + 1 letter |
| Validation | • Must be exactly 15 characters • Must match GST format pattern • Auto-converts to uppercase • Does NOT validate state code match |
| Behavior | • Triggers SEZ checkbox to appear • Syncs to Zoho Books • Affects GST Treatment |
| Error Message | ”Invalid GST number format. Must be 15 characters (e.g., 29ABCDE1234F1Z5)“ |
| Editable After Creation | Yes |
9.7 SEZ Customer Checkbox
| Attribute | Value |
|---|---|
| Field Type | Checkbox |
| Label | This is a SEZ (Special Economic Zone) customer |
| Required | No |
| Visibility | Conditional: Shown only when GST Number is entered |
| Default | Unchecked |
| Help Text | ”SEZ customers are exempt from GST. Select this only if the customer is registered under a Special Economic Zone.” |
| Behavior | • If checked: GST Treatment = “SEZ”, Tax Rate = 0% • If unchecked: GST Treatment = “Registered Business - Regular” + State-based tax logic applies |
| Editable After Creation | Yes (via backend intervention) |
9.8 Registered Company Name
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | Registered Company Name * |
| Required | Yes |
| Max Length | 255 characters |
| Validation | • Cannot be empty • No duplicate check (multiple companies can have same name) |
| Behavior | • Auto-populates Display Name field • Auto-populates Billing Address Name field • Appears on invoices and legal documents • Syncs to Zoho Books |
| Help Text | ”This will appear on invoices and legal documents” |
| Error Message | ”Please enter the registered company name” |
| Editable After Creation | Yes |
9.9 Display Name
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | Display Name * |
| Required | Yes |
| Max Length | 255 characters |
| Default | Auto-populated from Registered Company Name |
| Editable | Yes (admin can override) |
| Validation | Cannot be empty |
| Behavior | • Shows throughout the LM platform • Customer sees this name in their dashboard • Syncs to Zoho Books |
| Help Text | ”This is how your company name will appear throughout the platform” (highlighted in amber/yellow box) |
| Error Message | ”Please enter a display name” |
| Editable After Creation | Yes |
9.10 PAN Number
| Attribute | Value |
|---|---|
| Field Type | Text input (alphanumeric, uppercase) |
| Label | PAN Number (Optional) |
| Required | No |
| Visibility | Conditional: Shown only when Country = India |
| Format | 10 characters (e.g., ABCDE1234F) |
| Pattern | 5 letters + 4 digits + 1 letter |
| Validation | • Must be exactly 10 characters (if entered) • Must match PAN format pattern • Auto-converts to uppercase • Submission blocked if format is incorrect |
| Behavior | • Syncs to Zoho Books • Used for Indian tax compliance |
| Error Message | ”Invalid PAN number format. Must be 10 characters (e.g., ABCDE1234F)“ |
| Editable After Creation | Yes |
9.11 Primary Contact - Title
| Attribute | Value |
|---|---|
| Field Type | Dropdown |
| Label | Title |
| Required | No (pre-filled) |
| Options | Mr., Mrs., Ms. |
| Default | Mr. |
| Editable After Creation | Yes |
9.12 Primary Contact - First Name
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | First Name * |
| Required | Yes |
| Max Length | 100 characters |
| Validation | Cannot be empty |
| Behavior | • Combined with Last Name for full name • Used in welcome email personalization • Syncs to Zoho Books |
| Error Message | ”Please enter first name” |
| Editable After Creation | Yes |
9.13 Primary Contact - Last Name
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | Last Name * |
| Required | Yes |
| Max Length | 100 characters |
| Validation | Cannot be empty |
| Error Message | ”Please enter last name” |
| Editable After Creation | Yes |
9.14 Primary Contact - Email Address
| Attribute | Value |
|---|---|
| Field Type | Email input |
| Label | Email Address * |
| Required | Yes |
| Format | Valid email format (e.g., contact@company.com) |
| Validation | • Must be valid email format • Must be unique (no duplicate emails allowed) • Submission blocked if email already exists |
| Behavior | • Used for login credentials • Welcome email sent to this address • Syncs to Zoho Books • One email cannot be associated with multiple tenants |
| Error Message | • “Please enter a valid email address” • “This email is already associated with another tenant” |
| Editable After Creation | Yes |
9.15 Primary Contact - Mobile Number
| Attribute | Value |
|---|---|
| Field Type | Phone input with country code |
| Label | Mobile Number * |
| Required | Yes |
| Format | Country code (auto) + Phone number |
| Country Code Logic | • Country: India → +91 • Country: USA → +1 • Country: UK → +44 • Country: UAE → +971 • Country: Oman → +968 |
| Validation | • Must enter phone number • Format validation based on country |
| Behavior | • Country code auto-populated (locked) • Syncs to Zoho Books |
| Error Message | ”Please enter a valid mobile number” |
| Editable After Creation | Yes |
9.16 Primary Contact - Password
| Attribute | Value |
|---|---|
| Field Type | Text input (password type) with “Generate” button |
| Label | Password * |
| Required | Yes |
| Min Length | 8 characters (recommended) |
| Behavior | • Admin can type manually OR click “Generate Password” button • Generate button creates 8-character random password • Password sent via email to customer • Does NOT sync to Zoho Books |
| Error Message | ”Please enter a password” |
| Editable After Creation | Yes |
9.17 Plan Type
| Attribute | Value |
|---|---|
| Field Type | Toggle buttons (2 options) |
| Label | Plan Type |
| Required | Yes |
| Options | • Pre-defined Plans • Custom Pricing |
| Default | Pre-defined Plans (selected) |
| Behavior | • If “Pre-defined Plans”: Shows plan dropdown filtered by Region • If “Custom Pricing”: Shows custom price + currency input fields |
| Editable After Creation | No (Plan cannot be changed after creation) |
9.18 Select Plan (Pre-defined)
| Attribute | Value |
|---|---|
| Field Type | Dropdown |
| Label | Select Plan * |
| Required | Yes (only if Plan Type = Pre-defined) |
| Visibility | Conditional: Shown only when Plan Type = Pre-defined Plans |
| Options | Filtered by Region: • Region: India → Basic (₹24,999), Professional (₹49,999), Enterprise (₹99,999) • Region: USA → Basic ($299), Professional ($599), Enterprise ($1,199) • Region: UAE → Basic (AED 1,099), Professional (AED 1,899), Enterprise (AED 3,499) • Region: Oman → Starter (OMR 340) |
| Display Format | Plan name with price in dropdown (e.g., “Starter (340)“) |
| Behavior | • Currency auto-determined by Region • Pricing shown in dropdown • Syncs to Zoho Books |
| Error Message | ”Please select a plan” |
| Editable After Creation | No |
9.19 Custom Plan Pricing
| Attribute | Value |
|---|---|
| Field Type | Number input + Currency dropdown |
| Label | Monthly Price * |
| Required | Yes (only if Plan Type = Custom Pricing) |
| Visibility | Conditional: Shown only when Plan Type = Custom Pricing |
| Currency Field | • Manual dropdown selection • Options: INR, USD, AED, OMR, GBP, etc. • No validation or restrictions |
| Price Field | • No min/max limits • Admin can enter any amount |
| Behavior | • Currency and price are freeform (no auto-locking) • Syncs to Zoho Books |
| Error Message | ”Please enter a price” |
| Editable After Creation | No (Plan price cannot be changed) |
9.20 Billing Address - Name
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | Name * |
| Required | Yes |
| Default | Auto-populated from Registered Company Name |
| Editable | Yes (admin can override) |
| Behavior | • Used on invoices • Syncs to Zoho Books |
| Error Message | ”Please enter billing name” |
| Editable After Creation | Yes |
9.21 Billing Address - Street Address
| Attribute | Value |
|---|---|
| Field Type | Textarea |
| Label | Street Address * |
| Required | Yes |
| Max Length | 500 characters |
| Behavior | • Syncs to Zoho Books |
| Error Message | ”Please enter billing address” |
| Editable After Creation | Yes |
9.22 Billing Address - Country
| Attribute | Value |
|---|---|
| Field Type | Dropdown |
| Label | Country * |
| Required | Yes |
| Default | Auto-populated from Location & Tax Details → Country |
| Editable | Yes (admin can select different country) |
| Behavior | • Can be different from tax country • Syncs to Zoho Books |
| Error Message | ”Please select billing country” |
| Editable After Creation | Yes |
9.23 Billing Address - City
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | City * |
| Required | Yes |
| Behavior | • Syncs to Zoho Books |
| Error Message | ”Please enter city” |
| Editable After Creation | Yes |
9.24 Billing Address - State/Province
| Attribute | Value |
|---|---|
| Field Type | Dropdown (if Country = India), Text input (if Country ≠ India) |
| Label | State/Province * |
| Required | Yes |
| Options (India only) | Andaman and Nicobar Islands, Andhra Pradesh, Arunachal Pradesh, Assam, Bihar, Chandigarh, Chhattisgarh, Dadra and Nagar Haveli and Daman and Diu, Delhi, Foreign Country, Goa, Gujarat, Haryana, Himachal Pradesh, Jammu and Kashmir, Jharkhand, Karnataka, Kerala, Ladakh, Lakshadweep, Madhya Pradesh, Maharashtra, Manipur, Meghalaya, Mizoram, Nagaland, Odisha, Puducherry, Punjab, Rajasthan, Sikkim, Tamil Nadu, Telangana, Tripura, Uttar Pradesh, Uttarakhand, West Bengal |
| Default | Blank (does NOT auto-populate from Location & Tax Details → State) |
| Behavior | • For India: Dropdown to match Zoho Books state list • For other countries: Free text input • Syncs to Zoho Books |
| Error Message | ”Please select/enter state/province” |
| Editable After Creation | Yes |
9.25 Billing Address - Postal/ZIP Code
| Attribute | Value |
|---|---|
| Field Type | Text input |
| Label | Postal / ZIP Code |
| Required | No (Optional) |
| Behavior | • Syncs to Zoho Books if provided |
| Editable After Creation | Yes |
10. Tax Logic & Validation Rules
10.1 Tax Calculation Flow
The tax logic follows a hierarchical decision tree based on Country → State → GST Status → SEZ Status.
Mermaid Flowchart:
10.2 Tax Configuration Matrix
| Scenario | Country | State | GST Number? | SEZ? | GST Treatment | Tax Type | Tax Rate | Place of Supply |
|---|---|---|---|---|---|---|---|---|
| 1 | Outside India | N/A | N/A | N/A | Overseas | N/A | 0% | FC (Foreign Country) |
| 2 | India | Kerala | No | N/A | Unregistered Business | SGST + CGST | 9% + 9% | Kerala |
| 3 | India | Other States | No | N/A | Unregistered Business | IGST | 18% | [State Name] |
| 4 | India | Kerala | Yes | Yes | SEZ | N/A | 0% | Kerala |
| 5 | India | Kerala | Yes | No | Registered Business - Regular | SGST + CGST | 9% + 9% | Kerala |
| 6 | India | Other States | Yes | No | Registered Business - Regular | IGST | 18% | [State Name] |
| 7 | India | Other States | Yes | Yes | SEZ | N/A | 0% | [State Name] |
Kerala-Specific Tax Logic:
Kerala is Leadmetrics’ home state, which affects intra-state tax calculations:
-
When State = Kerala (intra-state transaction):
- Tax Type = SGST + CGST (State GST + Central GST)
- Tax Rate = 9% SGST + 9% CGST = 18% total
- Applies to BOTH:
- Unregistered businesses (Scenario 2)
- Registered businesses (Scenario 5)
-
When State ≠ Kerala (inter-state transaction):
- Tax Type = IGST (Integrated GST)
- Tax Rate = 18% IGST
- Applies to BOTH:
- Unregistered businesses (Scenario 3)
- Registered businesses (Scenario 6)
Note: The Kerala vs inter-state split applies to unregistered businesses identically to registered ones — GST registration status does not change the tax type (SGST+CGST vs IGST), only the GST treatment label (“Unregistered Business” vs “Registered Business - Regular”). The tax type is determined solely by the customer’s state relative to Kerala.
SEZ-Specific Tax Logic:
SEZ (Special Economic Zone) customers receive special tax exemptions:
- SEZ checkbox only appears when user has entered a valid GST Number
- When SEZ checkbox is ticked:
- GST Treatment = “SEZ” or “Special Economic Zone (SEZ)”
- Tax Rate = 0% (complete tax exemption)
- No Tax Type is shown (since no tax is applied)
- Help text displayed: “SEZ customers are exempt from GST”
- SEZ status applies regardless of state:
- Kerala SEZ customer = 0% tax (Scenario 4)
- Other state SEZ customer = 0% tax (Scenario 7)
Tax Field Display:
After the admin selects Country, State, GST status, and SEZ status, the following tax fields are automatically calculated and displayed as read-only purple badges in a gray box at the bottom of the Location & Tax Details section:
- Tax Treatment (e.g., “Overseas”, “Unregistered Business”, “SEZ”, “Registered Business - Regular”)
- Tax Type (e.g., “IGST”, “SGST & CGST”) - only shown when applicable (not shown for SEZ or Overseas)
- Tax Rate (e.g., “0%”, “18%”, “9% + 9%”)
- Place of Supply (e.g., “Foreign Country”, “Kerala”, “Karnataka”, “Delhi”)
These fields are visible to the admin for review but not editable - they are calculated automatically by the system based on the tax logic. They sync to Zoho Books as part of the tenant record.
10.3 Validation Rules Summary
Validation Trigger: All field validations are evaluated on form submission (when the admin clicks “Create Tenant”). Validations are not triggered on-type or on-blur. This keeps the data entry experience uninterrupted and is appropriate for internal admin users who are familiar with the required fields.
| Field | Validation Rule | Error Handling |
|---|---|---|
| Country | Required | Inline error: “Please select a country” |
| State | Required if Country = India | Inline error: “Please select a state” |
| Region | Required | Inline error: “Please select a region” |
| GST Number | • 15 characters • Pattern: 2 digits + 10 alphanumeric + 1 letter + 1 digit + 1 letter | Inline error + submission blocked |
| PAN Number | • 10 characters • Pattern: 5 letters + 4 digits + 1 letter | Inline error + submission blocked |
| • Valid email format • Unique (no duplicates) | Inline error + submission blocked | |
| Phone | Format based on country | Inline error |
| All required fields | Cannot be empty | Inline error: “This field is required” |
11. Invoice Generation Flow
11.1 Invoice Creation Sequence
11.2 Invoice Status Flow
First Invoice Generation:
-
Draft Status
- Invoice created in LM Portal
- Status:
Draft - Invoice Number:
null - Zoho sync pending
-
Zoho Sync Attempt
- LM Portal sends invoice to Zoho Books
- Waits for Zoho response
-
Success Path
- Zoho returns invoice number (e.g.,
INV-2024-001) - LM Portal updates:
- Status:
Draft→Issued - Invoice Number: Zoho invoice number
- Status:
- Invoice visible to customer
- Zoho returns invoice number (e.g.,
-
Failure Path
- Zoho sync fails
- Invoice remains in
Draftstatus - Invoice Number remains
null - Internal email sent to tech team with error details
- Customer does NOT see draft invoice
11.3 Draft Invoice Alert Email
Trigger: Zoho invoice creation fails
Recipients: Tech team (internal notification)
Email Content:
- Subject: “INTERNAL NOTIFICATION — DRAFT INVOICE ALERT”
- Tenant Name
- Invoice ID (LM Portal ID)
- Billed On date
- Created By (admin who created tenant)
- Invoice Status: DRAFT
- Error Message:
{{errorMessage}}
Screenshot reference: Image 5 in chat history
12. Success & Error Handling
12.1 Success Scenarios
| Event | Action | User Feedback |
|---|---|---|
| Tenant created successfully | • Tenant saved in LM Portal • Invoice generated (Draft → Issued) • Welcome email sent • Zoho profile + invoice created | • Toast notification: “Tenant created successfully” • Redirect to Tenant Listing page |
| Invoice synced to Zoho | • Invoice status updated to Issued • Invoice number populated | No user notification (background process) |
12.2 Error Scenarios
| Error Type | Cause | Error Message | Action |
|---|---|---|---|
| Validation Error | Required field empty | ”This field is required” | • Inline error below field • Form submission blocked |
| GST Format Error | Invalid GST number format | ”Invalid GST number format. Must be 15 characters (e.g., 29ABCDE1234F1Z5)” | • Inline error • Submission blocked |
| PAN Format Error | Invalid PAN number format | ”Invalid PAN number format. Must be 10 characters (e.g., ABCDE1234F)” | • Inline error • Submission blocked |
| Duplicate Email | Email already exists | ”This email is already associated with another tenant” | • Inline error • Submission blocked |
| Zoho Sync Failure | Zoho Books API error | (No user-facing error) | • Invoice remains in Draft • Internal email to tech team • Success toast still shown to admin |
12.3 Error Display Style
- Inline Errors: Red text displayed below each field with an error
- No Toast for Validation Errors: Errors shown only inline (toasts reserved for system/success messages)
- Scroll Behavior on Submit with Errors: When the admin clicks “Create Tenant” and one or more fields have validation errors, the page does not auto-scroll to the first error field. The view remains at the “Create Tenant” button position, and the admin must manually scroll up to locate and fix errors. Inline red errors below each invalid field serve as the visual indicator.
- No Loading Spinner: Form submission is instant (no loading state)
13. Post-Creation Workflows
13.1 Tenant Lifecycle
13.2 Onboarding → Active Transition
Trigger: Admin manually changes tenant status in Admin Portal
Requirements:
- Tenant must be in
Onboardingstatus - Admin clicks “Activate” button
- System shows confirmation modal with:
- Warning: “Billing cycle will begin”
- Auto-set Subscription Start Date (SSD) = Current date
- Projected next invoice date = SSD + 1 month
Actions:
- Tenant status updated:
Onboarding→Active - Subscription Start Date (SSD) set to current date
- Next Billing Date calculated (SSD + 1 month)
- Recurring invoice generation activated
- Audit log entry created:
- Updated By: Admin username
- Timestamp
- Old Status: Onboarding
- New Status: Active
- SSD: [date]
13.3 Recurring Invoice Generation
Trigger: Subscription Start Date (SSD) reached + monthly recurrence
Frequency: Monthly on the same date as SSD
Edge Cases:
- If SSD = 31st March → Next invoice = 30th April (last available date)
- If SSD = 31st January → Next invoice = 28th February (last available date)
Validation:
- SSD cannot be a past date when inputting/editing
- SSD cannot be changed after activation (requires backend intervention)
13.4 Re-activation Flow (Inactive → Active / Locked → Active)
Trigger: Admin clicks “Reactivate” button
Modal Shown:
- “Set new Subscription Start Date”
- SSD input field (default: current date, editable)
- Projected next invoice date preview
Actions:
- Tenant status updated to
Active - New SSD captured
- Audit log entry:
- Previous SSD: [old date]
- New SSD: [new date]
- Updated By: Admin
- Timestamp
- New recurring invoice generated based on new SSD
- No new first invoice generated (only recurring invoices resume)
14. Integration Points
14.1 Zoho Books Integration
Synced Fields:
| LM Portal Field | Zoho Books Field | Sync Timing |
|---|---|---|
| Title | Salutation | On tenant creation |
| First Name | First Name | On tenant creation |
| Last Name | Last Name | On tenant creation |
| Registered Company Name | Company Name | On tenant creation |
| Display Name | Display Name | On tenant creation |
| Email Address | Email Address | On tenant creation |
| Mobile Number | Mobile (Phone) | On tenant creation |
| Billing Address | Billing Address | On tenant creation |
| GST Number | GST Number (GSTIN) | On tenant creation |
| PAN Number | PAN Number | On tenant creation |
| TDS Toggle | TDS Applicable | On tenant creation |
| GST Treatment | GST Treatment | On tenant creation |
| Tax Type | Tax Type | On tenant creation |
| Tax Rate | Tax Rate | On tenant creation |
| Place of Supply | Place of Supply | On tenant creation |
| Plan + Price | Invoice Line Item | On invoice generation |
| Currency | Currency | On invoice generation |
Important Design Decision - Field Structure Alignment:
The LM Portal uses separate fields for Title (Salutation), First Name, and Last Name instead of a single “Full Name” field. This design choice ensures seamless data mapping with Zoho Books, which uses the same field structure:
- Zoho Books fields: Salutation, First Name, Last Name, Company Name, Display Name
- LM Portal fields: Title, First Name, Last Name, Registered Company Name, Display Name
This 1:1 field mapping eliminates data parsing errors and ensures clean synchronization between systems.
Auto-Selected Fields:
When creating a new tenant in LM Admin Portal:
- Customer Type is automatically set to “Business” (not user-selectable)
- This matches Zoho Books’ customer type categorization
- Individual customer type is not supported in the current implementation
Non-Synced Fields:
- Region (internal field, not sent to Zoho)
- Password (LM Portal only)
- Display Name help text
- Plan Type (Pre-defined vs Custom) - internal admin categorization only
14.2 Email Notifications
Email 1: Welcome Email
Trigger: Immediately after tenant creation
Recipient: Customer (Primary Contact Email)
Subject: Welcome to Leadmetrics
From: Leadmetrics noreply@leadmetrics.ai
Email Template:
[Leadmetrics Logo]
Welcome To Leadmetrics
Dear [Company Display Name],
Welcome to Leadmetrics! We're thrilled to have you on board and excited to support your journey in transforming the way you generate, track, and analyze leads.
Your account has been successfully activated and is now ready to use. You can begin tracking, analyzing, and optimizing your leads right away using our powerful tools and real-time insights designed to help you convert prospects into customers faster and more efficiently.
What's Next?
To get you started, we've sent your login credentials in a separate email for security reasons. Please check your inbox (and spam folder, just in case) for an email titled "Your Leadmetrics Credentials".
Need Help Getting Started?
Our support team and onboarding resources are here to help! Whether it's setting up tracking, creating your first campaign, or diving into analytics, we've got you covered. Visit our Help Center or reach out directly to support@leadmetrics.ai.
We're looking forward to seeing the great things you'll accomplish with Leadmetrics!
[Leadmetrics Logo]
Follow us on
[LinkedIn] [Instagram] [Facebook]
www.leadmetrics.ai | Blogs
+91 8590 468 816 | support@leadmetrics.aiEmail 2: Login Credentials Email
Trigger: Immediately after tenant creation
Recipient: Customer (Primary Contact Email)
Subject: Your Leadmetrics Credentials
From: Leadmetrics noreply@leadmetrics.ai
Email Template:
[Leadmetrics Logo]
Welcome to Leadmetrics
Hi [First Name] [Last Name],
We're thrilled to welcome you to Leadmetrics! Your account has been successfully activated and is now ready to use. You're just a few steps away from transforming your lead generation and analytics process.
You can start tracking, analyzing, and optimizing your leads right away using our smart tools and real-time insights.
Your Login Credentials
As mentioned, here are your secure login details:
┌─────────────────────────────────────────────────────────┐
│ Login: (To easily log in later, save this URL) │
│ Leadmetrics │
│ │
│ Username: [POC Email Address] │
│ │
│ Temporary Password: [Generated Password] │
└─────────────────────────────────────────────────────────┘
Please log in as soon as possible and update your password for enhanced security.
If you need help getting started, visit our Help Center or reach out to our support team at support@leadmetrics.ai
[Leadmetrics Logo]
Follow us on
[LinkedIn] [Instagram] [Facebook]
www.leadmetrics.ai | Blogs
+91 8590 468 816 | support@leadmetrics.aiEmail 3: Draft Invoice Alert (Internal)
Trigger: Zoho invoice creation fails
Recipient: Tech team (internal notification)
Subject: INTERNAL NOTIFICATION — DRAFT INVOICE ALERT
Content: See Section 11.3
14.3 Google Form Data Source
Source: Sales Team Google Form (“Customer Onboarding Responses”)
Fields Captured in Google Form:
- Timestamp (auto)
- Email address
- Business Entity Name
- Customer / Point of Contact (POC) Name
- POC Email Address
- POC Mobile Number (with Country Code)
- Business Region (Country)
- Subscription Plan
- Billing Start Date
- Tax Applicability (Indian Customer / Foreign Customer)
- Billing Address
- Tax ID (e.g., GST, VAT)
- Business Website (optional)
Data Flow:
- Sales team submits Google Form
- Onboarding team manually copies data from Google Form to Admin Portal
- No automated sync (future enhancement)
15. Editable vs Non-Editable Fields
Guiding Principle: Fields are split into two groups based on whether editing them would affect tax logic, invoicing, or subscription terms.
- Editable in admin UI: Fields that do not affect tax calculation or subscription pricing — primarily company identity, POC details, and the Billing Address modal.
- Non-editable in admin UI (backend intervention required): Fields under “Location & Tax Details” that drive tax logic, plus plan and pricing fields. These require a support ticket or direct database update because changes have downstream impact on Zoho sync, GST treatment, and invoice generation.
15.1 Editable Fields (After Creation)
Company & Contact Fields:
| Field | Editable? | Notes |
|---|---|---|
| Registered Company Name | ✅ Yes | |
| Display Name | ✅ Yes | |
| POC Title | ✅ Yes | |
| POC First Name | ✅ Yes | |
| POC Last Name | ✅ Yes | |
| POC Email | ✅ Yes | Must remain unique |
| POC Mobile | ✅ Yes | |
| Password | ✅ Yes |
Billing Address Modal Fields:
All fields inside the Billing Address modal are editable after tenant creation:
| Field | Editable? | Notes |
|---|---|---|
| Name | ✅ Yes | |
| Address (street address) | ✅ Yes | |
| City | ✅ Yes | |
| State (billing address) | ✅ Yes | Billing address state, independent of tax logic state |
| Country (billing address) | ✅ Yes | Billing address country, independent of tax logic country |
| Zip Code | ✅ Yes | |
| GST Number (billing address) | ✅ Yes | For invoice display only — does not affect tax calculation |
| PAN Number (billing address) | ✅ Yes | For invoice display only — does not affect tax calculation |
Important: The GST Number and PAN Number inside the Billing Address modal are used for invoice display purposes only. They are separate from the GST Number and PAN Number captured in the Location & Tax Details section at tenant creation, which drive tax treatment. Editing these billing address values does not trigger any tax recalculation.
15.2 Non-Editable Fields (After Creation)
The following fields are locked in the admin UI after tenant creation and require backend intervention (support ticket or direct database update) to modify. This is because changes impact Zoho sync, tax treatment, and invoice generation.
Location & Tax Details:
| Field | Editable? | Reason |
|---|---|---|
| Country (tax) | ❌ No | Drives GST applicability (India vs Overseas); changing breaks tax logic and Zoho sync |
| State (tax) | ❌ No | Drives Kerala vs IGST split; changing affects tax type retroactively |
| Region | ❌ No | Auto-determined from Country, not shown in edit UI |
| GST Number (tax) | ❌ No | Drives GST Treatment (“Registered” vs “Unregistered”); changing requires tax recalculation |
| TDS Toggle | ❌ No | Affects invoice amount calculation |
| SEZ Customer Checkbox | ❌ No | Drives 0% tax exemption; changing affects tax rate |
Plan & Billing:
| Field | Editable? | Reason |
|---|---|---|
| Plan Type (Pre-defined / Custom) | ❌ No | Subscription plan cannot be changed |
| Selected Plan | ❌ No | Subscription plan cannot be changed |
| Custom Price | ❌ No | Pricing locked after creation |
| Currency | ❌ No | Currency locked after creation |
| Tax Type (IGST / SGST+CGST) | ❌ No | Auto-calculated from Country + State, cannot be overridden |
Backend Intervention Scenarios:
- Customer changes from Unregistered to Registered business (or vice versa)
- Customer relocates to a different state (affecting Kerala vs inter-state tax type)
- Customer becomes an SEZ entity or loses SEZ status
- Plan upgrade/downgrade or pricing change
16. Edge Cases & Scenarios
16.1 Duplicate Email Prevention
Scenario: Admin tries to create a tenant with an email that already exists in the system.
Behavior:
- System checks for duplicate email during form submission
- If duplicate found:
- Inline error shown: “This email is already associated with another tenant”
- Form submission blocked
- Admin must use a different email
Note: One email ID cannot be associated with multiple tenants.
16.2 Zoho Profile Already Exists
Scenario: A customer profile already exists in Zoho Books with the same email or GST number.
Current Behavior: Not explicitly defined in requirements
Recommendation:
- System should check for existing Zoho profile before creation
- If found:
- Option A: Show warning to admin, allow override
- Option B: Link to existing Zoho profile instead of creating new one
- Option C: Block creation and show error
Action Required: Clarify desired behavior with stakeholders
16.3 Invoice Draft Status Handling
Scenario: Invoice created in LM Portal but Zoho sync fails.
Behavior:
- Invoice remains in
Draftstatus in LM Portal - Invoice number remains
null - Internal email sent to tech team
- Admin sees success toast: “Tenant created successfully”
- Tech team manually investigates and fixes Zoho sync
Customer Impact:
- Customer receives welcome email + credentials
- Customer can log in to LM Portal
- Customer does NOT see invoice (draft invoices are hidden from customer view)
- Once tech team fixes sync, invoice status updates to Issued and becomes visible to customer
16.4 Multiple GST Numbers (Out of Scope)
Scenario: Customer has multiple GSTINs for different states (e.g., offices in Kerala and Karnataka).
Current Behavior: Not supported
Workaround: Create separate tenant accounts for each GSTIN (not recommended)
Future Enhancement: Support multiple GSTINs per tenant with state-wise billing
16.5 Customer Changes from Unregistered to Registered
Scenario: Customer initially created without GST number, later obtains GST registration.
Current Behavior: Backend intervention required
Process:
- Customer contacts support
- Support ticket raised
- Tech team manually updates:
- GST Number
- GST Treatment
- Tax Type
- Place of Supply
- Future invoices reflect new tax settings
Future Enhancement: Self-service GST update form for admins
16.6 Billing Date Edge Cases
Scenario 1: SSD = 31st March, next month has only 30 days
Behavior:
- Next invoice date = 30th April (last available date)
Scenario 2: SSD = 31st January, February has only 28 days
Behavior:
- Next invoice date = 28th February (or 29th in leap year)
Scenario 3: Admin tries to set SSD as a past date
Behavior:
- Validation error: “Subscription Start Date cannot be in the past”
- Form submission blocked
16.7 Admin Forgets to Activate Tenant
Scenario: Tenant remains in Onboarding status indefinitely.
Current Behavior:
- No automated reminder system
- Tenant does not receive recurring invoices
- Customer can still use the platform
Future Enhancement:
- Automated reminder email to admin after X days in Onboarding
- Dashboard alert for pending activations
17. Future Enhancements
17.1 Short-Term Enhancements (Next 3-6 Months)
-
Automated Google Form Sync
- Auto-populate Admin Portal fields from Google Form data
- Reduce manual copy-paste errors
- Save onboarding team time
-
Scroll to First Error on Submit
- Current behavior (documented in Section 12.3): form does not auto-scroll on validation failure; admin must manually scroll up to find errors
- Enhancement: when admin clicks “Create Tenant” and validation fails, auto-scroll to the first field with an error and optionally focus the input
- Reduces cognitive load on long forms and prevents admins from missing errors at the top of the page
- Low implementation effort (standard HTML
scrollIntoView()behavior)
-
Save as Draft
- Allow admins to save incomplete forms
- Resume later from saved state
-
Pending Activations Dashboard
- Widget showing tenants in Onboarding status > 7 days
- Quick activate button
-
Duplicate Check Warning (Soft)
- Check for similar company names
- Show warning (not blocking) if potential duplicate found
-
GST Number Sync Safeguard (Billing Address ↔ Tax Settings)
- Problem: The billing-address GST Number is freely editable by admins for invoice display purposes (Section 15.1), while the tax-level GST Number in Location & Tax Details is locked and drives tax treatment (Section 15.2). If a customer’s real-world GST registration changes, an admin may update the billing-address GST assuming it flows everywhere — but tax treatment stays stale, causing incorrect GST computation on future invoices.
- Proposed safeguards (pick one or combine):
- Add a help-text tooltip on the billing-address GST field: “This is shown on invoices only. To update GST treatment for tax calculation, raise a support ticket.”
- Detect mismatch between billing-address GST and tax-level GST and show a warning banner in the tenant detail view prompting a backend review
- Lock the billing-address GST field once the tax-level GST is set, making both values sync via the backend intervention flow
- Prevents silent tax miscalculation that could lead to compliance issues or invoice corrections later
17.2 Medium-Term Enhancements (6-12 Months)
-
Auto-fill from GST Number (GST Portal Integration)
- Integrate with government GST verification API
- When admin enters GST Number, automatically fetch and populate:
- Registered Company Name (official name from GST records)
- Billing Address (Street, City, State, Postal Code)
- State (from GST number state code prefix)
- Reduces data entry errors and ensures consistency with official records
- Admin can review and edit pre-filled data if needed
- Validates GST number is genuine and active
-
Multi-GSTIN Support
- Allow multiple GST numbers per tenant
- State-wise billing logic
-
Self-Service GST Update
- Admin form to update customer from Unregistered → Registered
- Auto-recalculate future invoices
-
Approval Workflow
- Multi-level approval for high-value custom plans
- Approval history audit log
-
Advanced Plan Configuration
- Feature toggles per plan
- Usage limits and quotas
17.3 Long-Term Enhancements (12+ Months)
-
Multi-Currency Plans
- Support for currency conversion
- Regional pricing strategies
-
AI-Powered Data Entry
- Auto-fill fields from uploaded documents (e.g., GST certificate)
- OCR for address extraction
- Smart document parsing
Appendix A: Field Mapping (Google Form → Admin Portal)
| Google Form Field | Admin Portal Field | Section |
|---|---|---|
| Business Entity Name | Registered Company Name | Company Information |
| Customer / POC Name | First Name + Last Name | Primary Contact Person |
| POC Email Address | Email Address | Primary Contact Person |
| POC Mobile Number | Mobile Number | Primary Contact Person |
| Business Region (Country) | Country | Location & Tax Details |
| Subscription Plan | Plan Type + Select Plan | Plan & Billing |
| Billing Start Date | (Hidden - auto-set to creation date) | N/A |
| Tax Applicability | (Used to determine tax logic) | Location & Tax Details |
| Billing Address | Street Address | Plan & Billing |
| Tax ID (GST / VAT) | GST Number | Location & Tax Details |
| Business Website | (Not captured in Admin Portal) | N/A |
Note: Timestamp and Email address (first column in Google Form) are auto-generated by Google Forms and not directly mapped.
Appendix B: Status Definitions
| Status | Description | Triggered By |
|---|---|---|
| Onboarding | Tenant created but not yet activated. First invoice generated. Customer can log in. | Tenant creation (auto) |
| Active | Tenant activated. Subscription Start Date set. Recurring invoices generated monthly. | Admin activation |
| Inactive | Tenant deactivated. No recurring invoices. Customer cannot log in. | Admin deactivation |
| Locked | Tenant locked due to payment failure or policy violation. Customer cannot log in. | Payment failure / Admin action |
Appendix C: Glossary
| Term | Definition |
|---|---|
| Admin Portal | Internal web application used by Leadmetrics employees to manage tenants, invoices, and platform settings. |
| Tenant | A customer account on the Leadmetrics platform. |
| First Invoice | One-time invoice generated automatically on tenant creation date. |
| Recurring Invoice | Monthly invoice generated after Subscription Start Date (SSD). |
| SSD (Subscription Start Date) | Date when tenant moves from Onboarding to Active status. Recurring invoices start from this date. |
| GST (Goods and Services Tax) | Indian indirect tax. |
| GSTIN | GST Identification Number (15 characters). |
| SEZ (Special Economic Zone) | Designated area in India with tax exemptions. |
| IGST (Integrated GST) | Tax applicable on inter-state transactions (18%). |
| SGST (State GST) | Tax applicable on intra-state transactions (9%). |
| CGST (Central GST) | Tax applicable on intra-state transactions (9%). |
| TDS (Tax Deducted at Source) | 2% tax deducted from invoice amount. |
| PAN (Permanent Account Number) | 10-character tax identifier in India. |
| Zoho Books | Cloud-based accounting software used for invoicing and financial management. |
Document Change Log
| Version | Date | Changes | Author |
|---|---|---|---|
| 1.0 | April 19, 2026 | Initial business requirements document for Admin Portal tenant creation system | Sana |
| 1.1 | April 20, 2026 | Added Kerala vs inter-state clarifying note in Section 10.2; documented validation trigger timing (on submission) in Section 10.3; clarified scroll-on-error behavior as a documented design decision in Section 12.3 | Sana |
| 1.2 | April 20, 2026 | Restructured Section 15 (Editable vs Non-Editable Fields) to split Location & Tax Details (non-editable, backend intervention required) from Billing Address modal (fully editable, including billing-level GST/PAN for invoice display only); enriched “Scroll to First Error” entry in Section 17.1 with rationale and implementation note | Sana |
| 1.3 | April 20, 2026 | Added GST Number Sync Safeguard as future enhancement #6 in Section 17.1 to flag risk of stale tax treatment when admins update billing-address GST assuming it propagates to tax logic | Sana |
END OF DOCUMENT
For questions or clarifications, contact:
Sana - Product Manager, Leadmetrics
Email: sana@leadmetrics.ai