Skip to content

Account Profile & Company Entity Module Documentation

4 min readUpdated: Nov 29, 2026
View as Markdown
Role Primary Use Case Key Capabilities
Customer Account Administrator Corporate telecom self-service management. View account balance, purchase additional DIDs, manage subscribed plans, and configure company profile.
Finance / Accounts Payable Wallet replenishment & invoice payments. Add funds via credit card / bank transfer, download official PDF invoices, and monitor transaction ledgers.
End Subscriber Personal usage tracking. Review outbound call history, check message logs, and inspect plan quota consumption.

Module Code: billing/client/account-profile
Route: /portal/settings
Backend Service: clientService.ts (ring2all-billing-api)
Database Table: customers
Brand Purity: 100% White-Label Compliant (Ring2All BSS)


  1. Executive Summary & Corporate Identity
  2. Technical Architecture & Profile Sync
  3. Visual Interface & Screen Breakdown
  4. Company Details, Tax ID & Invoicing Address
  5. FormGrid Standardization & Action Bar Controls
  6. Diagnostic CLI & Operational Playbooks
  7. Domain Glossary

The Account Profile & Company Entity module allows subscribers to manage their official corporate identity, authorized point-of-contact details, national tax registration numbers, and legal billing address used across all generated statements and PDF tax invoices.

+-------------------------------------------------------------------------------+
| COMMERCIAL & OPERATIONAL IMPACT |
+-------------------------------------------------------------------------------+
| β€’ Automated Tax Accuracy: Changes to company address and tax identification |
| are dynamically reflected on subsequent PDF invoices and tax receipts. |
| β€’ Emergency Notice Dispatch: Direct maintenance, dunning warnings, and low- |
| balance alerts to the verified primary administrative email and phone. |
| β€’ Self-Service Governance: Eliminates support tickets for routine corporate |
| contact and office relocation updates. |
| β€’ Strict Form Standards: Complies with Ring2All Level 2 Form UI guidelines |
| with FormGrid alignment and lower FixedActionBar controls. |
+-------------------------------------------------------------------------------+

When an administrator saves modifications in SettingsPage.tsx, the API validates the payload, updates PostgreSQL, and refreshes the client’s session context:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Client Web Browser (Portal UI) β”‚
β”‚ Route: /portal/settings β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ PUT /api/client/profile
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Ring2All BSS API Engine (Fastify 5 / Zod Schema) β”‚
β”‚ β€’ Validates International Phone E.164 & Postal Code Formats β”‚
β”‚ β€’ Sanitizes Tax ID & Legal Company Name β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό SQL UPDATE
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PostgreSQL 17 (customer accounts store) β”‚
β”‚ UPDATE customers SET company_name = ..., β”‚
β”‚ tax_id = ..., billing_address = ..., city = ... β”‚
β”‚ WHERE id = $authCustomerId β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ 200 OK + Refreshed Profile
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Client Session Context Hydration β”‚
β”‚ Updates React Context & Header Profile Display β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The profile form utilizes standardized FormBoxes and responsive FormGrids:

Account & Company Profile Settings

  • ModuleFormHeader: Fixed 56px header displaying the building icon, module title (Account Profile), and navigation back button.
  • Company Information Card: Fields for Primary Contact Name, Registered Company Name, Contact Phone, and National Tax ID.
  • Billing Address Card: Fields for Street Address, City, State/Province, Postal Code, and Country dropdown selector.
  • FixedActionBar: Bottom-anchored action bar featuring Cancel (resets form to original state without navigating) and Save Changes (submits payload).

The profile configuration controls corporate tax calculations:

  1. Tax Exemption Status: If a valid European VAT ID or US Resale Certificate number is filed and verified, the billing engine automatically applies zero-rated tax rules on invoice generation.
  2. E911 Consistency: By default, new DID acquisitions can inherit the registered company billing address for emergency dispatch routing.

In accordance with Ring2All UI Rule 8:

  • Standard Grid Structure: All form elements utilize grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-3 items-start.
  • Label Baseline: Every <Label> enforces min-h-[40px] flex items-center to guarantee vertical baseline alignment across adjacent columns.
  • Cancel Button Semantics: As per Rule 6, clicking Cancel restores the form to initial values without leaving the page.

Terminal window
su - postgres -c "psql -d ss_billing -x -c \"
SELECT name, company_name, phone, tax_id, billing_address, city, state, postal_code, country
FROM customers
WHERE id = 5;
\""

  • FixedActionBar: Bottom-docked UI toolbar housing primary persistence and form cancellation controls.
  • Tax ID / EIN: Employer Identification Number or Value Added Tax (VAT) registry code.
  • FormGrid: Standardized 4-column responsive grid layout ensuring field alignment.