GoFilament
You're reading the docs for v1.33.1, an older release. Go to v1.40.1 (latest).

Docs v1.33.1 Reference

Live Chat, AI Concierge & Multimodal Voice Feature Requests (pkg/support)

Updated and significantly enhanced in release v1.26.0, pkg/support delivers an enterprise-grade AI concierge, seamless live operator escalation, multimodal multilingual voice feature requests, and hierarchical multi-panel / multi-tenant routing.

Core Concepts & Architecture#

┌────────────────────────────────────────────────────────────────────────┐
│                   Customer / Mobile / Web Client                       │
│       • Multilingual Chat (English, Sinhala, Tamil, Arabic, etc.)      │
│       • Multimodal Voice Feature Requests (Microphone Audio Stream)    │
│       • Language Preference Cookie (golaravel_support_lang)            │
└──────────────────────────────────┬─────────────────────────────────────┘
                                   │
                                   ▼
┌────────────────────────────────────────────────────────────────────────┐
│             GoLaravel / GoFilament Support Concierge Engine            │
│  ┌──────────────────────────────────────────────────────────────────┐  │
│  │ 1. AI Support Concierge                                          │  │
│  │    • Answers inquiries instantly via Grounded Knowledge Base     │  │
│  │    • Auto-detects escalation triggers ("human agent", "help")    │  │
│  │    • Seamlessly flips mode to ModeLive for human takeover        │  │
│  └──────────────────────────────────┬───────────────────────────────┘  │
│                                     │                                  │
│  ┌──────────────────────────────────▼───────────────────────────────┐  │
│  │ 2. Multimodal Voice Feature Request Processor                    │  │
│  │    • Ingests audio in any language (Sinhala, Tamil, Arabic, etc.)│  │
│  │    • Preserves original audio bytes + Base64 for playback        │  │
│  │    • Transcribes & translates to English for engineering teams   │  │
│  │    • Checks system Knowledge Base:                               │  │
│  │      - If feature already exists: AI explains how to use it      │  │
│  │      - If new feature: rates Feasibility (simple vs complex)     │  │
│  │    • Dispatches real-time alerts to operators                    │  │
│  └──────────────────────────────────┬───────────────────────────────┘  │
│                                     │                                  │
│  ┌──────────────────────────────────▼───────────────────────────────┐  │
│  │ 3. Multi-Panel & Multi-Tenant Support Hierarchy                  │  │
│  │    • Tenant Admin Panels: Scoped to active tenant               │  │
│  │    • Super Admin Panels: Platform-wide visibility & monitoring    │  │
│  │    • Upstream Escalation: Tenant Admins can escalate to Super    │  │
│  └──────────────────────────────────────────────────────────────────┘  │
└────────────────────────────────────────────────────────────────────────┘
  • Ticket: Represents a support inquiry or feature request with Category (support, feature_request, bug, billing), Status (open, pending, escalated, resolved, closed), Mode (ai, live), Priority, TenantID, PanelID, and Feasibility (simple, complex, existing_feature).
  • VoiceRecording: Preserves original voice audio buffer (AudioData), web player payload (AudioBase64), original transcript, and English translation.
  • KnowledgeBase: Pre-seeded knowledge repository containing system capabilities up to v1.25.0.
  • LanguageCookieName: "golaravel_support_lang", persisting customer language across sessions.
  • ScopeSuperAdmin vs ScopeTenantAdmin: Configures whether the panel views all tickets globally or scopes to tenant records with upstream escalation.

Panel Configuration & Hierarchy#

import (
    "github.com/golaravel/gofilament/pkg/filament"
    "github.com/golaravel/gofilament/pkg/support"
)

// 1. Configure Super Admin Panel (Platform Hub)
superAdminPanel := filament.NewPanel("super_admin").
    Path("/super-admin").
    SuperAdminSupport(). // Enables cross-tenant global support visibility
    Resource(support.NewSupportResource(
        support.WithScope(support.ScopeSuperAdmin),
    ))

// 2. Configure Tenant Admin Panel (Customer Portal with Upstream Escalation)
tenantAdminPanel := filament.NewPanel("admin").
    Path("/admin").
    TenantAdminSupport("super_admin"). // Scoped to tenant, escalates to super_admin
    Resource(support.NewSupportResource(
        support.WithScope(support.ScopeTenantAdmin),
        support.WithTenantScoping(true),
        support.WithSuperAdminPanelID("super_admin"),
    ))

Multimodal Voice Feature Request Ingestion#

service := support.GetDefaultService()

// Ingest voice recording in Sinhala, Tamil, Arabic, English, etc.
ticket, aiReply, err := service.SubmitVoiceFeatureRequest(ctx, support.VoiceFeatureRequest{
    AudioBytes:      audioBytes,
    MimeType:        "audio/webm",
    DurationSeconds: 12.4,
    Language:        "si", // Sinhala
    UserKey:         "user_102",
    UserName:        "Kasun Perera",
    UserEmail:       "kasun@example.lk",
    TenantID:        "tenant_colombo",
    PanelID:         "admin",
})

// ticket.Voice.AudioData contains the original preserved audio
// ticket.Voice.TranslatedEnglish contains the English translation for engineers
// ticket.Feasibility contains "simple" or "complex"
// aiReply.Content contains localized AI feedback explaining acceptance or review

Support REST API Endpoints#

EndpointMethodDescription
/admin/api/support/ticketsGETList tickets (tenant-scoped or super-admin global)
/admin/api/support/messagePOSTSend message with automated AI response and auto-escalation
/admin/api/support/voice-featurePOSTIngest voice feature request in any language
/admin/api/support/audio/:idGETStream preserved audio recording for playback
/admin/api/support/escalatePOSTEscalate ticket to live agent or upstream super admin panel
/admin/api/support/languagePOSTSet persistent golaravel_support_lang cookie
/admin/api/support/knowledgeGETList known system features and capabilities

Generated from DOCUMENTATION.md at v1.33.1 · released Nov 17, 2026