Skip to Content
Apps & PortalsManageLeadmetrics Tenant Creation Form - Admin Portal

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

  1. Executive Summary
  2. Background & Context
  3. Objectives
  4. Scope
  5. User Roles & Access
  6. Data Flow Overview
  7. User Journey
  8. Form Structure & Fields
  9. Field-Level Requirements
  10. Tax Logic & Validation Rules
  11. Invoice Generation Flow
  12. Success & Error Handling
  13. Post-Creation Workflows
  14. Integration Points
  15. Editable vs Non-Editable Fields
  16. Edge Cases & Scenarios
  17. 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

  1. Sales team closes a deal and fills out a Google Form (“Customer Onboarding Responses”)
  2. Onboarding team manually copies data from Google Form into the Admin Portal Tenant Creation Form
  3. 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

  1. Enable Onboarding team to create tenants efficiently with accurate tax calculations
  2. Automate first invoice generation in both LM Portal and Zoho Books
  3. Support Indian tax compliance (GST Treatment, Place of Supply, Tax Types)
  4. 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:
    1. Location & Tax Details
    2. Company Information
    3. Primary Contact Person
    4. 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

  1. Admin opens Admin Portal → Tenants → Create New Tenant
  2. 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)
  3. Admin clicks “Create Tenant” button
  4. Form validates all fields
  5. Tenant created in LM Portal with status = Onboarding
  6. 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
  7. Welcome email + login credentials sent to customer
  8. Success toast: “Tenant created successfully”
  9. 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

AttributeValue
Field TypeDropdown (single select)
LabelCountry *
RequiredYes
OptionsIndia, United States, United Kingdom, Singapore, UAE, Australia, Oman, etc.
DefaultNone (blank)
ValidationMust 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

AttributeValue
Field TypeDropdown (single select)
LabelState *
RequiredYes (only if Country = India)
VisibilityConditional: Shown only when Country = India
OptionsKerala, Karnataka, Tamil Nadu, Maharashtra, Delhi, Gujarat, West Bengal, Rajasthan, Punjab, Haryana, Uttar Pradesh, Bihar, Odisha, Andhra Pradesh, Telangana, Assam, etc. (all Indian states)
DefaultNone (blank)
ValidationMust 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

AttributeValue
Field TypeDropdown (single select)
LabelRegion *
RequiredYes
OptionsIndia, United States, U.A.E, Oman, etc.
DefaultAuto-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
EditableYes (admin can manually override)
ValidationMust 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

AttributeValue
Field TypeToggle switch
LabelDo you need to deduct TDS?
RequiredNo
DefaultOFF (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 CreationYes

9.5 GST Registration Question

AttributeValue
Field TypeButton group (2 options)
LabelDoes the company have GST registration? *
RequiredYes (only if Country = India)
VisibilityConditional: Shown only when Country = India AND State is selected
Options• Yes, I have GST
• No GST number
DefaultNone (no selection)
ValidationMust 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

AttributeValue
Field TypeText input (alphanumeric, uppercase)
LabelGST Number *
RequiredYes (only if “Yes, I have GST” is selected)
VisibilityConditional: Shown only when GST question = “Yes, I have GST”
Format15 characters (e.g., 29ABCDE1234F1Z5)
Pattern2 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 CreationYes

9.7 SEZ Customer Checkbox

AttributeValue
Field TypeCheckbox
LabelThis is a SEZ (Special Economic Zone) customer
RequiredNo
VisibilityConditional: Shown only when GST Number is entered
DefaultUnchecked
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 CreationYes (via backend intervention)

9.8 Registered Company Name

AttributeValue
Field TypeText input
LabelRegistered Company Name *
RequiredYes
Max Length255 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 CreationYes

9.9 Display Name

AttributeValue
Field TypeText input
LabelDisplay Name *
RequiredYes
Max Length255 characters
DefaultAuto-populated from Registered Company Name
EditableYes (admin can override)
ValidationCannot 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 CreationYes

9.10 PAN Number

AttributeValue
Field TypeText input (alphanumeric, uppercase)
LabelPAN Number (Optional)
RequiredNo
VisibilityConditional: Shown only when Country = India
Format10 characters (e.g., ABCDE1234F)
Pattern5 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 CreationYes

9.11 Primary Contact - Title

AttributeValue
Field TypeDropdown
LabelTitle
RequiredNo (pre-filled)
OptionsMr., Mrs., Ms.
DefaultMr.
Editable After CreationYes

9.12 Primary Contact - First Name

AttributeValue
Field TypeText input
LabelFirst Name *
RequiredYes
Max Length100 characters
ValidationCannot 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 CreationYes

9.13 Primary Contact - Last Name

AttributeValue
Field TypeText input
LabelLast Name *
RequiredYes
Max Length100 characters
ValidationCannot be empty
Error Message”Please enter last name”
Editable After CreationYes

9.14 Primary Contact - Email Address

AttributeValue
Field TypeEmail input
LabelEmail Address *
RequiredYes
FormatValid 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 CreationYes

9.15 Primary Contact - Mobile Number

AttributeValue
Field TypePhone input with country code
LabelMobile Number *
RequiredYes
FormatCountry 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 CreationYes

9.16 Primary Contact - Password

AttributeValue
Field TypeText input (password type) with “Generate” button
LabelPassword *
RequiredYes
Min Length8 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 CreationYes

9.17 Plan Type

AttributeValue
Field TypeToggle buttons (2 options)
LabelPlan Type
RequiredYes
Options• Pre-defined Plans
• Custom Pricing
DefaultPre-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 CreationNo (Plan cannot be changed after creation)

9.18 Select Plan (Pre-defined)

AttributeValue
Field TypeDropdown
LabelSelect Plan *
RequiredYes (only if Plan Type = Pre-defined)
VisibilityConditional: Shown only when Plan Type = Pre-defined Plans
OptionsFiltered 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 FormatPlan 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 CreationNo

9.19 Custom Plan Pricing

AttributeValue
Field TypeNumber input + Currency dropdown
LabelMonthly Price *
RequiredYes (only if Plan Type = Custom Pricing)
VisibilityConditional: 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 CreationNo (Plan price cannot be changed)

9.20 Billing Address - Name

AttributeValue
Field TypeText input
LabelName *
RequiredYes
DefaultAuto-populated from Registered Company Name
EditableYes (admin can override)
Behavior• Used on invoices
• Syncs to Zoho Books
Error Message”Please enter billing name”
Editable After CreationYes

9.21 Billing Address - Street Address

AttributeValue
Field TypeTextarea
LabelStreet Address *
RequiredYes
Max Length500 characters
Behavior• Syncs to Zoho Books
Error Message”Please enter billing address”
Editable After CreationYes

9.22 Billing Address - Country

AttributeValue
Field TypeDropdown
LabelCountry *
RequiredYes
DefaultAuto-populated from Location & Tax Details → Country
EditableYes (admin can select different country)
Behavior• Can be different from tax country
• Syncs to Zoho Books
Error Message”Please select billing country”
Editable After CreationYes

9.23 Billing Address - City

AttributeValue
Field TypeText input
LabelCity *
RequiredYes
Behavior• Syncs to Zoho Books
Error Message”Please enter city”
Editable After CreationYes

9.24 Billing Address - State/Province

AttributeValue
Field TypeDropdown (if Country = India), Text input (if Country ≠ India)
LabelState/Province *
RequiredYes
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
DefaultBlank (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 CreationYes

9.25 Billing Address - Postal/ZIP Code

AttributeValue
Field TypeText input
LabelPostal / ZIP Code
RequiredNo (Optional)
Behavior• Syncs to Zoho Books if provided
Editable After CreationYes

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:

Rendering diagram…

10.2 Tax Configuration Matrix

ScenarioCountryStateGST Number?SEZ?GST TreatmentTax TypeTax RatePlace of Supply
1Outside IndiaN/AN/AN/AOverseasN/A0%FC (Foreign Country)
2IndiaKeralaNoN/AUnregistered BusinessSGST + CGST9% + 9%Kerala
3IndiaOther StatesNoN/AUnregistered BusinessIGST18%[State Name]
4IndiaKeralaYesYesSEZN/A0%Kerala
5IndiaKeralaYesNoRegistered Business - RegularSGST + CGST9% + 9%Kerala
6IndiaOther StatesYesNoRegistered Business - RegularIGST18%[State Name]
7IndiaOther StatesYesYesSEZN/A0%[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.

FieldValidation RuleError Handling
CountryRequiredInline error: “Please select a country”
StateRequired if Country = IndiaInline error: “Please select a state”
RegionRequiredInline 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
Email• Valid email format
• Unique (no duplicates)
Inline error + submission blocked
PhoneFormat based on countryInline error
All required fieldsCannot be emptyInline error: “This field is required”

11. Invoice Generation Flow

11.1 Invoice Creation Sequence

Rendering diagram…

11.2 Invoice Status Flow

First Invoice Generation:

  1. Draft Status

    • Invoice created in LM Portal
    • Status: Draft
    • Invoice Number: null
    • Zoho sync pending
  2. Zoho Sync Attempt

    • LM Portal sends invoice to Zoho Books
    • Waits for Zoho response
  3. Success Path

    • Zoho returns invoice number (e.g., INV-2024-001)
    • LM Portal updates:
      • Status: DraftIssued
      • Invoice Number: Zoho invoice number
    • Invoice visible to customer
  4. Failure Path

    • Zoho sync fails
    • Invoice remains in Draft status
    • 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

EventActionUser 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 TypeCauseError MessageAction
Validation ErrorRequired field empty”This field is required”• Inline error below field
• Form submission blocked
GST Format ErrorInvalid GST number format”Invalid GST number format. Must be 15 characters (e.g., 29ABCDE1234F1Z5)”• Inline error
• Submission blocked
PAN Format ErrorInvalid PAN number format”Invalid PAN number format. Must be 10 characters (e.g., ABCDE1234F)”• Inline error
• Submission blocked
Duplicate EmailEmail already exists”This email is already associated with another tenant”• Inline error
• Submission blocked
Zoho Sync FailureZoho 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

Rendering diagram…

13.2 Onboarding → Active Transition

Trigger: Admin manually changes tenant status in Admin Portal

Requirements:

  • Tenant must be in Onboarding status
  • 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:

  1. Tenant status updated: OnboardingActive
  2. Subscription Start Date (SSD) set to current date
  3. Next Billing Date calculated (SSD + 1 month)
  4. Recurring invoice generation activated
  5. 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:

  1. Tenant status updated to Active
  2. New SSD captured
  3. Audit log entry:
    • Previous SSD: [old date]
    • New SSD: [new date]
    • Updated By: Admin
    • Timestamp
  4. New recurring invoice generated based on new SSD
  5. No new first invoice generated (only recurring invoices resume)

14. Integration Points

14.1 Zoho Books Integration

Synced Fields:

LM Portal FieldZoho Books FieldSync Timing
TitleSalutationOn tenant creation
First NameFirst NameOn tenant creation
Last NameLast NameOn tenant creation
Registered Company NameCompany NameOn tenant creation
Display NameDisplay NameOn tenant creation
Email AddressEmail AddressOn tenant creation
Mobile NumberMobile (Phone)On tenant creation
Billing AddressBilling AddressOn tenant creation
GST NumberGST Number (GSTIN)On tenant creation
PAN NumberPAN NumberOn tenant creation
TDS ToggleTDS ApplicableOn tenant creation
GST TreatmentGST TreatmentOn tenant creation
Tax TypeTax TypeOn tenant creation
Tax RateTax RateOn tenant creation
Place of SupplyPlace of SupplyOn tenant creation
Plan + PriceInvoice Line ItemOn invoice generation
CurrencyCurrencyOn 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.ai

Email 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.ai

Email 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:

  1. Timestamp (auto)
  2. Email address
  3. Business Entity Name
  4. Customer / Point of Contact (POC) Name
  5. POC Email Address
  6. POC Mobile Number (with Country Code)
  7. Business Region (Country)
  8. Subscription Plan
  9. Billing Start Date
  10. Tax Applicability (Indian Customer / Foreign Customer)
  11. Billing Address
  12. Tax ID (e.g., GST, VAT)
  13. 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:

FieldEditable?Notes
Registered Company Name✅ Yes
Display Name✅ Yes
POC Title✅ Yes
POC First Name✅ Yes
POC Last Name✅ Yes
POC Email✅ YesMust remain unique
POC Mobile✅ Yes
Password✅ Yes

Billing Address Modal Fields:

All fields inside the Billing Address modal are editable after tenant creation:

FieldEditable?Notes
Name✅ Yes
Address (street address)✅ Yes
City✅ Yes
State (billing address)✅ YesBilling address state, independent of tax logic state
Country (billing address)✅ YesBilling address country, independent of tax logic country
Zip Code✅ Yes
GST Number (billing address)✅ YesFor invoice display only — does not affect tax calculation
PAN Number (billing address)✅ YesFor 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:

FieldEditable?Reason
Country (tax)❌ NoDrives GST applicability (India vs Overseas); changing breaks tax logic and Zoho sync
State (tax)❌ NoDrives Kerala vs IGST split; changing affects tax type retroactively
Region❌ NoAuto-determined from Country, not shown in edit UI
GST Number (tax)❌ NoDrives GST Treatment (“Registered” vs “Unregistered”); changing requires tax recalculation
TDS Toggle❌ NoAffects invoice amount calculation
SEZ Customer Checkbox❌ NoDrives 0% tax exemption; changing affects tax rate

Plan & Billing:

FieldEditable?Reason
Plan Type (Pre-defined / Custom)❌ NoSubscription plan cannot be changed
Selected Plan❌ NoSubscription plan cannot be changed
Custom Price❌ NoPricing locked after creation
Currency❌ NoCurrency locked after creation
Tax Type (IGST / SGST+CGST)❌ NoAuto-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:

  1. Invoice remains in Draft status in LM Portal
  2. Invoice number remains null
  3. Internal email sent to tech team
  4. Admin sees success toast: “Tenant created successfully”
  5. 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:

  1. Customer contacts support
  2. Support ticket raised
  3. Tech team manually updates:
    • GST Number
    • GST Treatment
    • Tax Type
    • Place of Supply
  4. 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)

  1. Automated Google Form Sync

    • Auto-populate Admin Portal fields from Google Form data
    • Reduce manual copy-paste errors
    • Save onboarding team time
  2. 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)
  3. Save as Draft

    • Allow admins to save incomplete forms
    • Resume later from saved state
  4. Pending Activations Dashboard

    • Widget showing tenants in Onboarding status > 7 days
    • Quick activate button
  5. Duplicate Check Warning (Soft)

    • Check for similar company names
    • Show warning (not blocking) if potential duplicate found
  6. 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)

  1. 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
  2. Multi-GSTIN Support

    • Allow multiple GST numbers per tenant
    • State-wise billing logic
  3. Self-Service GST Update

    • Admin form to update customer from Unregistered → Registered
    • Auto-recalculate future invoices
  4. Approval Workflow

    • Multi-level approval for high-value custom plans
    • Approval history audit log
  5. Advanced Plan Configuration

    • Feature toggles per plan
    • Usage limits and quotas

17.3 Long-Term Enhancements (12+ Months)

  1. Multi-Currency Plans

    • Support for currency conversion
    • Regional pricing strategies
  2. 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 FieldAdmin Portal FieldSection
Business Entity NameRegistered Company NameCompany Information
Customer / POC NameFirst Name + Last NamePrimary Contact Person
POC Email AddressEmail AddressPrimary Contact Person
POC Mobile NumberMobile NumberPrimary Contact Person
Business Region (Country)CountryLocation & Tax Details
Subscription PlanPlan Type + Select PlanPlan & Billing
Billing Start Date(Hidden - auto-set to creation date)N/A
Tax Applicability(Used to determine tax logic)Location & Tax Details
Billing AddressStreet AddressPlan & Billing
Tax ID (GST / VAT)GST NumberLocation & 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

StatusDescriptionTriggered By
OnboardingTenant created but not yet activated. First invoice generated. Customer can log in.Tenant creation (auto)
ActiveTenant activated. Subscription Start Date set. Recurring invoices generated monthly.Admin activation
InactiveTenant deactivated. No recurring invoices. Customer cannot log in.Admin deactivation
LockedTenant locked due to payment failure or policy violation. Customer cannot log in.Payment failure / Admin action

Appendix C: Glossary

TermDefinition
Admin PortalInternal web application used by Leadmetrics employees to manage tenants, invoices, and platform settings.
TenantA customer account on the Leadmetrics platform.
First InvoiceOne-time invoice generated automatically on tenant creation date.
Recurring InvoiceMonthly 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.
GSTINGST 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 BooksCloud-based accounting software used for invoicing and financial management.

Document Change Log

VersionDateChangesAuthor
1.0April 19, 2026Initial business requirements document for Admin Portal tenant creation systemSana
1.1April 20, 2026Added 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.3Sana
1.2April 20, 2026Restructured 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 noteSana
1.3April 20, 2026Added 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 logicSana

END OF DOCUMENT

For questions or clarifications, contact:
Sana - Product Manager, Leadmetrics
Email: sana@leadmetrics.ai

© 2026 Leadmetrics — Internal use only