@extends('crm.layouts.master') @section('title', 'System Manual') @section('page-css') @endsection @section('main-content')
This platform is an integrated Lead Management CRM with a full Trading Module and Client Portal. It is designed for financial services teams managing client leads, executing trades on behalf of clients, and providing clients with a self-service investment portal.
| Component | URL | Purpose |
|---|---|---|
| CRM | allstocktrading.com | Agent, manager and admin interface for lead and trade management |
| Client Portal | allstocktrading.com/portal | Client self-service: view portfolio, request withdrawals, upload KYC |
Every CRM user has an access_level that determines what they can see and do. There are four levels:
| Role | Badge | Capabilities |
|---|---|---|
| Admin | Admin | Full system access. Manages all users, offices, desks, PBX, symbols, and all trading operations. Only role with PBX access. |
| Office Manager | Office Manager | Manages leads, users, desks, and trading operations (deposits, trades, withdrawals, KYC) scoped to their office. Cannot access PBX or create offices. |
| Desk Manager | Desk Manager | Manages users and leads within their desk. Can access the Trading section for executing trades. Cannot access PBX or approve deposits. |
| Agent | Agent | Manages their own assigned leads. Can add notes, schedule callbacks, and log deposit requests. No access to management sections. |
| Client (Portal) | Client | Portal-only access at allstocktrading.com/portal. Views own portfolio, uploads KYC, requests withdrawals. Separate authentication system. |
Beyond role-based access, individual agents can have per-permission flags set by their manager:
The dashboard is the home screen after login. The content displayed varies by role.
The Leads section is the core of the CRM. It provides a DataTable of all accessible leads with filtering and sorting.
Each lead has one of the following statuses:
Test — test or quality-assurance leadCall back — timed callback scheduled in Callbacks and CalendarIn Call — an agent is currently speaking with the leadStraight to voicemail — call reached voicemail directlyNo answer — called but no responseNot interested — declinedNo Money — currently has no funds availableLow Potential — assessed as having low conversion potentialFailed Deposit — attempted deposit was unsuccessfulWrong info — supplied information is incorrectWrong number — supplied telephone number is incorrectNeed to call — ready for initial or next contactFTD — first deposit approved and lead promoted to ClientsClients use Callback, Test, Interested, Awaiting deposit, In the money, No answer, Not interested, and Need to call. Callback requires a future date and time and appears in both Callbacks and Calendar. Awaiting deposit is informational and does not create a deposit.
Managers assign clients to agents according to their office and desk responsibilities.
| Field | Description |
|---|---|
| First / Last Name | Client name |
| Primary contact email (used for portal login) | |
| Phone | Primary phone number |
| Brand | Brand/source the lead came from |
| Country | Lead's country (used for agent routing) |
| Status | Current lead status (see above) |
| FTD | First Time Deposit flag (0/1) |
| Amount | Total deposit amount recorded |
| Office / Desk / Agent | Organisational assignment |
| KYC Status | not_submitted / pending / under_review / approved / rejected |
| is_client | 1 = promoted to trading client with wallet |
| portal_access | 1 = can log in to client portal |
Use the Add Lead button (or import via Public Leads). Required fields: first name, last name, email, phone, country. Optional: brand, office, desk, agent assignment.
The lead detail page is the primary workspace for managing an individual client. Access it from the Leads table.
All users can add timestamped notes that appear in reverse chronological order. Notes show the author's name and cannot be edited — only deleted (if the user has delete permission).
Agents can log a simple deposit amount here. Office Managers can approve pending entries. This feeds the lead's amount and ftd fields.
Schedule a callback with a date and time. Appears in the Callbacks section for that agent.
Automatic audit trail of all changes made to the lead (status changes, reassignments, etc.).
The "Client Portal Access" card allows managers to:
Upload KYC documents directly from the lead detail page. Document types: Passport, ID Card, Driver's Licence, Utility Bill, Bank Statement, Selfie.
Report a call issue (subject, description). Issues appear in the Call Issues queue for Admin review.
Manage CRM user accounts. Each manager can only manage users they created.
Required fields: Name, Username, Password, and Access Level. Optional fields are email credentials, Office, Desk, and Extension for PBX calling.
Shows the user's transaction history, deposit records, and activity log. Managers can edit user info, reset passwords, and configure access permissions from here.
From the user detail page, managers can configure per-user permissions:
| Permission | Effect |
|---|---|
| Can Delete Lead | Shows/hides the delete button on lead detail |
| Can Call Lead | Enables/disables the call button |
| Can Add Notes | Shows/hides the notes entry form and authorizes note creation |
| Can Delete Notes | Shows delete controls and authorizes note deletion |
| Can Add Lead Transaction | Shows/hides the deposit entry form |
| Lead Column Access | Controls which columns are visible in the leads table |
Offices are the top-level organisational unit. Each office can have a PBX name, company name, and working hours. Leads and agents are assigned to offices.
Desks belong to an office and group agents into teams. Desk Managers oversee their desk's leads and agents. Create desks under Users → Desks.
Agents with a configured PBX extension can call leads directly from the lead detail page. The system dials the lead's phone number through the Asterisk PBX.
The Active Calls page shows all currently live calls across the team in real time (via WebSocket push). Displays: agent name, lead name, call duration, and call type (manual/auto-dialer).
The auto dialer automatically dials through a queue of New leads. Requires:
The auto dialer runs continuously until the agent stops it or the queue is exhausted. Status broadcasts in real time via Pusher WebSockets.
The Callbacks section shows all scheduled call-back entries for the current user. Callbacks are created from the lead detail page by clicking Call Again and selecting a date and time.
Past-due callbacks are highlighted. Clicking a callback takes you directly to the lead detail page.
This is the original simple deposit approval queue (separate from the full trading wallet system). Shows deposits recorded by agents on lead detail pages that are awaiting approval (status = 0).
Approving a deposit sets status = 1, records the approval date, and updates the lead's amount and ftd fields.
The Calendar displays events linked to leads. Agents see only events for their own leads. Managers see all events within their scope.
Create events from the Calendar page by selecting a date, choosing a lead, and entering a description. Events are useful for scheduling follow-ups, meetings, and reminders.
View incoming emails from the past 30 days via IMAP. The inbox displays the sender, subject, and date. Click any email to read the full content. Attachments can be downloaded from the email detail view. Compose and reply features are available.
Manage a library of reusable WhatsApp message templates. Agents with an existing server-managed WhatsApp connection can send templates from the client detail page.
Send SMS messages to leads from the dedicated SMS page. Supports Flash SMS (message displayed immediately on recipient's screen without being stored). Powered by the configured SMS API gateway.
SMS_API_KEY to be configured in the environment settings.An integrated AI chatbot (powered by OpenAI GPT) that can help agents with scripting, objection handling, compliance queries, and general assistance. The conversation is session-based and not stored permanently.
CHAT_GPT_KEY (OpenAI API key) to be configured.Agents can report call-related problems from the lead detail page (e.g. bad number, wrong person, technical fault). Admins review the issues queue and mark them as Fixed or Pending.
Fields: Subject, Description, Date, Time, Status (Pending / Fixed).
Create a remote support session room directly from the sidebar. Share the room link with a client or colleague for screen sharing / remote assistance. Rooms can be created and deleted as needed.
Manage an IP whitelist for firewall-level access control. Each entry has an IP address, a label, and an active/inactive toggle. When the firewall middleware is enabled, only requests from listed IPs are allowed through.
The Trading Platform extends the CRM with a complete multi-asset brokerage back-office. It manages client wallets, trade execution, deposit and withdrawal workflows, and a live client portal with TradingView charts.
| Module | What it Does | Access |
|---|---|---|
| Symbols | Configure tradeable instruments and price feeds | Admin |
| Deposits | Approve/reject client fund deposits into wallets | Admin Office Manager |
| Trades | Execute buy/sell orders on behalf of clients | Admin Office Manager |
| Withdrawals | Process client withdrawal requests | Admin Office Manager |
| KYC Queue | Review and approve client identity documents | Admin Office Manager |
| Portfolio | View a client's full position and P&L summary | Admin Office Manager |
Symbols are the tradeable instruments available in the system. Each symbol appears in trade execution forms and the client portal.
| Field | Description | Example |
|---|---|---|
| TradingView Symbol | Full exchange:ticker used for live charts | BINANCE:BTCUSDT, NASDAQ:AAPL, FX:EURUSD, COMEX:GC1! |
| Display Name | Human-readable name shown in the UI | Bitcoin / USDT |
| Category | Asset class | crypto / forex / stocks / commodities |
| Base Currency | The asset being traded | BTC |
| Quote Currency | The settlement currency | USDT |
| Price Feed ID | Identifier for the automated price API (see table below) | bitcoin |
| Decimal Places | Price display precision (0–8) | 2 for stocks, 5 for forex, 8 for crypto |
| Category | API Used | Price Feed ID Format | Examples |
|---|---|---|---|
| Crypto | CoinGecko (free, no key) | CoinGecko coin ID | bitcoin, ethereum, ripple |
| Forex | Frankfurter / ECB (free, no key) | 6-character pair | EURUSD, GBPJPY, USDJPY |
| Stocks | Yahoo Finance (free, no key) | Yahoo ticker symbol | AAPL, TSLA, MSFT, GOOGL |
| Commodities | Yahoo Finance (free, no key) | Yahoo futures code | GC=F (Gold), CL=F (Oil), SI=F (Silver), NG=F (Nat. Gas) |
Each symbol in the table has a Chart button that opens a full TradingView live chart modal using the symbol's tv_symbol field. No API key is required for chart display.
Use the Set Price button to manually enter the current price for a symbol. This is useful when the automated feed is not configured, or to override a feed temporarily.
Prices are fetched automatically every 15 minutes via the trading:fetch-prices artisan command (runs via server cron). A --dry-run flag is available for testing without saving.
Click New Deposit and select a client, enter an amount, currency (USD / EUR / CAD / AUD), optional reference number (wire ref, transaction ID), and notes. The deposit is created with status pending.
is_client = 1 if not alreadyClick Reject on a pending deposit. No wallet change occurs. The client receives an email notification (if portal access is enabled).
The Trades page shows all executed trades and provides the trade ticket modal for executing new orders on behalf of clients.
Withdrawals can be created by the CRM team or requested directly by the client from the portal. All withdrawals start as pending.
Click New Withdrawal, select the client, currency, and amount. The system validates the client has enough balance before creating the request.
Click Reject. No wallet debit occurs. The client is notified by email.
Clients can request withdrawals themselves from allstocktrading.com/portal → Transactions. These appear in the CRM withdrawal queue with status pending for manager review.
The system accepts the following identity document types:
| Status | Meaning |
|---|---|
pending | Uploaded by client, awaiting review |
under_review | Reviewer has opened it but not yet decided |
approved | Document verified and accepted |
rejected | Document rejected — client notified with reason |
The KYC Queue shows all pending documents from all clients. Click a document to open the review page. From there you can:
The lead's overall kyc_status is automatically recalculated after each document action. A lead reaches approved only when all submitted documents are approved.
Admins and managers can upload KYC documents directly from the lead detail page on the client's behalf.
Access via the View Portfolio link on any client's lead detail page, or via Trading → Trades → the client name link.
The portfolio page shows:
Each client has a separate wallet for each supported currency: USD, EUR, CAD, AUD. Wallets are created automatically on first deposit. The balance reflects:
Every financial operation posts a LedgerEntry with two LedgerLines (debit + credit) for full accounting auditability. Entry types:
| Type | Trigger |
|---|---|
deposit | Deposit approved |
withdrawal | Withdrawal approved |
trade_buy | BUY trade executed |
trade_sell | SELL trade executed |
Prices are fetched every 15 minutes via the server cron job. The command php artisan trading:fetch-prices processes all active symbols that have a price_feed_id configured.
Use php artisan trading:fetch-prices --dry-run to test without writing to the database. Price fetch logs are written to storage/logs/price-feed.log.
price_feed_id, its price must be updated manually using the Set Price button on the Symbols page.The Client Portal at allstocktrading.com/portal is a separate, client-facing interface where trading clients can self-service their account. It uses a separate authentication guard — clients log in with their email address and portal password (set by their account manager).
After logging in, clients see their personal financial overview:
Clicking a position name opens the detailed position page with a full TradingView live chart.
Clients access the KYC page from the sidebar or via the dashboard banner. They can:
The Transactions page shows a complete financial history and allows clients to request withdrawals.
pendingClicking a position on the dashboard opens the position detail page, which includes:
Accessible from the top navigation. Clients can:
The PBX section provides deep integration with the Asterisk/FreePBX telephony system. All PBX features are accessible only to Admin users via the sidebar PBX menu.
Displays real-time and historical call statistics:
Add credit to the PBX account using the balance top-up form on this page.
Provides a real-time view of all active auto-dialler sessions across all agents. Shows agent name, extension, call status, and current lead being dialled.
Lists all auto-dialler jobs (queued, running, completed) with lead counts and completion status.
Historical log of all calls made through the auto dialler with disposition, duration, agent, and lead information.
Configure which phone number (Caller ID / ANI) is presented to recipients based on the destination country. This allows the system to automatically use a local-appearing number when calling leads in different regions.
Each entry maps a country to a caller ID number. The PBX uses this mapping to set the outbound ANI automatically.
The CDR Report provides a searchable log of all calls processed by the PBX. Fields include:
Use CDR data to monitor agent call activity, audit call volume, and troubleshoot call issues.
View the current status of all agent extensions: registered/unregistered, idle, in-call. Useful for real-time monitoring of agent availability.
DID (Direct Inward Dialling) numbers are telephone numbers that route directly to the system. Manage which DIDs are active, which route to which extensions or ring groups, and review DID assignment.
Raw Asterisk server information panel showing version, uptime, active channels, and system health.
A visual switchboard panel (Flash Operator Panel) for drag-and-drop call management — transfer calls, monitor channels, and manage hold queues in real time.
Feature codes are short dial sequences (e.g. *72 for call forward) that activate PBX features. This page lists all configured feature codes with their description and dial string.
Configure routing rules so that when a specific caller number rings the system, the call is automatically routed to a specific agent or extension. Used to reconnect clients with their dedicated account manager when they call back.
Each entry maps a caller number to a destination extension.
Depositis_client = 1pendingThe system sends automated email notifications to clients for key events. All notifications are sent only to clients with portal_access = 1.
| Event | Trigger | Email Content |
|---|---|---|
| Portal Welcome | First-time portal password set (with access enabled) | Login URL, email address, and password |
| Deposit Approved | Deposit status changed to approved | Deposit amount, currency, and account balance info |
| Deposit Rejected | Deposit status changed to rejected | Notice of rejection with contact instructions |
| Withdrawal Approved | Withdrawal approved by manager | Amount, currency confirmation |
| Withdrawal Rejected | Withdrawal rejected by manager | Notice of rejection with contact instructions |
| KYC Document Approved | KYC document status set to approved | Document type confirmed, account verification progress |
| KYC Document Rejected | KYC document status set to rejected | Document type, rejection reason, re-upload instructions |
phone_status is validportal_access = 1 on the lead (check Toggle Portal Access in CRM)approved (not just pending)is_client = 1 and portal_access = 1 are set on the leadapproved only when all submitted documents are approvedrejectedprice_feed_id configured (see Symbols page)crontab -l on the server should show a schedule:run entryphp artisan trading:fetch-prices --dry-runstorage/logs/price-feed.log for errorstv_symbol field is set correctly (e.g. BINANCE:BTCUSDT)