@extends('crm.layouts.master') @section('title', 'System Manual') @section('page-css') @endsection @section('main-content')
{{-- ===================== TABLE OF CONTENTS ===================== --}} {{-- ===================== CONTENT ===================== --}}
{{-- OVERVIEW --}}

System Overview

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.

ComponentURLPurpose
CRMallstocktrading.comAgent, manager and admin interface for lead and trade management
Client Portalallstocktrading.com/portalClient self-service: view portfolio, request withdrawals, upload KYC
Technology Stack: Laravel 10 · PHP 8.1 · MySQL · Bootstrap 5 · Pusher WebSockets · TradingView Charts
{{-- ROLES --}}

User Roles & Access Levels

Every CRM user has an access_level that determines what they can see and do. There are four levels:

RoleBadgeCapabilities
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.

Granular Agent Permissions

Beyond role-based access, individual agents can have per-permission flags set by their manager:

  • Can Delete Lead — allows the agent to delete leads
  • Can Call Lead — enables the call button on lead detail
  • Can Add Notes — allows adding notes to accessible leads and clients
  • Can Delete Notes — allows deleting notes from accessible leads and clients
  • Can Add Lead Transaction — enables the deposit entry form
  • Lead Column Access — restricts which data columns are visible in the leads table
{{-- DASHBOARD --}}

Dashboard

All Roles

The dashboard is the home screen after login. The content displayed varies by role.

Admin / Office Manager

  • User counts — total users, admins, office managers, desk managers, agents
  • Lead count — scoped to all leads (Admin) or office leads (Office Manager)
  • Total offices and desks
  • Trading Overview widgets — pending deposits, pending withdrawals, active portal clients, KYC pending count, approved deposits this month (with quick-links)
  • Lead list status table — breakdown of leads by status per list
  • Deposit stats chart — last 30 days deposit amount and count line charts
  • Lead status doughnut chart — distribution by status

Desk Manager

  • Total users they manage, total leads in their desk
  • Lead status chart for their desk

Agent

  • Personal client status chart
{{-- LEAD MANAGEMENT --}}

Lead Management

All Roles

The Leads section is the core of the CRM. It provides a DataTable of all accessible leads with filtering and sorting.

Lead Statuses

Each lead has one of the following statuses:

  • Test — test or quality-assurance lead
  • Call back — timed callback scheduled in Callbacks and Calendar
  • In Call — an agent is currently speaking with the lead
  • Straight to voicemail — call reached voicemail directly
  • No answer — called but no response
  • Not interested — declined
  • No Money — currently has no funds available
  • Low Potential — assessed as having low conversion potential
  • Failed Deposit — attempted deposit was unsuccessful
  • Wrong info — supplied information is incorrect
  • Wrong number — supplied telephone number is incorrect
  • Need to call — ready for initial or next contact
  • FTD — first deposit approved and lead promoted to Clients

Client Statuses

Clients 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.

Assigning Clients

Managers assign clients to agents according to their office and desk responsibilities.

Lead Fields

FieldDescription
First / Last NameClient name
EmailPrimary contact email (used for portal login)
PhonePrimary phone number
BrandBrand/source the lead came from
CountryLead's country (used for agent routing)
StatusCurrent lead status (see above)
FTDFirst Time Deposit flag (0/1)
AmountTotal deposit amount recorded
Office / Desk / AgentOrganisational assignment
KYC Statusnot_submitted / pending / under_review / approved / rejected
is_client1 = promoted to trading client with wallet
portal_access1 = can log in to client portal

Creating Leads

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.

{{-- LEAD DETAIL --}}

Lead Detail Page

All Roles (scope varies)

The lead detail page is the primary workspace for managing an individual client. Access it from the Leads table.

Information Panel

  • Name, email, phone, country, brand, registration date, assigned agent
  • Total transactions value, current status
  • Quick actions: Change status, office, desk, agent assignment inline

Notes

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).

Deposits (Legacy)

Agents can log a simple deposit amount here. Office Managers can approve pending entries. This feeds the lead's amount and ftd fields.

For the full multi-currency trading wallet system, use Trading → Deposits instead.

Call Again

Schedule a callback with a date and time. Appears in the Callbacks section for that agent.

History

Automatic audit trail of all changes made to the lead (status changes, reassignments, etc.).

Client Portal Access Office Manager Admin

The "Client Portal Access" card allows managers to:

  • Set Portal Password — set or reset the client's portal password. Optionally enable portal access at the same time. A welcome email is sent on first-time setup.
  • Toggle Portal Access — enable or disable the client's ability to log in to the portal without changing the password.
  • View Portfolio — opens the trading portfolio page for this client.

KYC Documents

Upload KYC documents directly from the lead detail page. Document types: Passport, ID Card, Driver's Licence, Utility Bill, Bank Statement, Selfie.

Call Issues

Report a call issue (subject, description). Issues appear in the Call Issues queue for Admin review.

{{-- USERS --}}

User Management

Admin Office Manager Desk Manager

Manage CRM user accounts. Each manager can only manage users they created.

Creating a User

Required fields: Name, Username, Password, and Access Level. Optional fields are email credentials, Office, Desk, and Extension for PBX calling.

User Detail Page

Shows the user's transaction history, deposit records, and activity log. Managers can edit user info, reset passwords, and configure access permissions from here.

User Access Permissions

From the user detail page, managers can configure per-user permissions:

PermissionEffect
Can Delete LeadShows/hides the delete button on lead detail
Can Call LeadEnables/disables the call button
Can Add NotesShows/hides the notes entry form and authorizes note creation
Can Delete NotesShows delete controls and authorizes note deletion
Can Add Lead TransactionShows/hides the deposit entry form
Lead Column AccessControls which columns are visible in the leads table
{{-- OFFICES & DESKS --}}

Offices & Desks

Admin Office Manager (Desks only)

Offices Admin

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.

  • Working Hours — set from/to time for each office; used for call routing
  • PBX Name — the identifier used in the phone system

Desks

Desks belong to an office and group agents into teams. Desk Managers oversee their desk's leads and agents. Create desks under Users → Desks.

{{-- CALLS --}}

Calls & Active Calls

Making a Call All (with extension)

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.

Ensure the agent's extension field is filled in the user profile before attempting to call.

Active Calls Monitor Admin Office Manager

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).

Auto Dialer Agents

The auto dialer automatically dials through a queue of New leads. Requires:

  • Agent has an extension configured
  • Leads have status=New, valid phone, and zero previous calls
  • Lead's country is in the agent's allowed countries list

The auto dialer runs continuously until the agent stops it or the queue is exhausted. Status broadcasts in real time via Pusher WebSockets.

{{-- CALLBACKS --}}

Callbacks

All Roles

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.

{{-- PENDING DEPOSITS (LEGACY) --}}

Pending Deposits (Legacy)

Admin Office Manager

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.

For multi-currency wallet deposits with full ledger tracking, use Trading → Deposits.
{{-- CALENDAR --}}

Calendar & Events

All Roles

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.

{{-- COMMUNICATIONS --}}

Communications

Email Inbox All Roles

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.

Email credentials are configured per-user in the user profile (IMAP settings).

WhatsApp Messages Admin

Manage a library of reusable WhatsApp message templates. Agents with an existing server-managed WhatsApp connection can send templates from the client detail page.

  • Create, edit, and delete message templates
  • Send from client detail when the agent has an existing WhatsApp connection

SMS Gateway Admin Office Manager

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.

Requires SMS_API_KEY to be configured in the environment settings.

Chat with AI All Roles

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.

Requires CHAT_GPT_KEY (OpenAI API key) to be configured.
{{-- CALL ISSUES --}}

Call Issues

Admin (manage) All (report)

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).

{{-- REMOTE DESKTOP --}}

Remote Desktop

All Roles

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.

{{-- ALLOWED IPS --}}

Allowed IPs

Admin

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 IP firewall middleware is currently disabled by default. Enable it in the middleware stack when needed.
{{-- =================== TRADING PLATFORM =================== --}}

Trading Platform — Overview

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.

ModuleWhat it DoesAccess
SymbolsConfigure tradeable instruments and price feedsAdmin
DepositsApprove/reject client fund deposits into walletsAdmin Office Manager
TradesExecute buy/sell orders on behalf of clientsAdmin Office Manager
WithdrawalsProcess client withdrawal requestsAdmin Office Manager
KYC QueueReview and approve client identity documentsAdmin Office Manager
PortfolioView a client's full position and P&L summaryAdmin Office Manager
{{-- SYMBOLS --}}

Symbols

Admin only

Symbols are the tradeable instruments available in the system. Each symbol appears in trade execution forms and the client portal.

Creating a Symbol

FieldDescriptionExample
TradingView SymbolFull exchange:ticker used for live chartsBINANCE:BTCUSDT, NASDAQ:AAPL, FX:EURUSD, COMEX:GC1!
Display NameHuman-readable name shown in the UIBitcoin / USDT
CategoryAsset classcrypto / forex / stocks / commodities
Base CurrencyThe asset being tradedBTC
Quote CurrencyThe settlement currencyUSDT
Price Feed IDIdentifier for the automated price API (see table below)bitcoin
Decimal PlacesPrice display precision (0–8)2 for stocks, 5 for forex, 8 for crypto

Price Feed ID by Category

CategoryAPI UsedPrice Feed ID FormatExamples
CryptoCoinGecko (free, no key)CoinGecko coin IDbitcoin, ethereum, ripple
ForexFrankfurter / ECB (free, no key)6-character pairEURUSD, GBPJPY, USDJPY
StocksYahoo Finance (free, no key)Yahoo ticker symbolAAPL, TSLA, MSFT, GOOGL
CommoditiesYahoo Finance (free, no key)Yahoo futures codeGC=F (Gold), CL=F (Oil), SI=F (Silver), NG=F (Nat. Gas)

Live Chart Button

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.

Set Price Manually

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.

Automated Price Feed

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.

{{-- TRADING DEPOSITS --}}

Deposits

Admin Office Manager

Creating a Deposit

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.

Approving a Deposit

  1. Find the pending deposit in the table and click Approve
  2. The system credits the client's wallet in the specified currency
  3. A ledger entry is recorded for audit purposes
  4. The lead is promoted to is_client = 1 if not already
  5. If the client has portal access, an email notification is sent automatically

Rejecting a Deposit

Click Reject on a pending deposit. No wallet change occurs. The client receives an email notification (if portal access is enabled).

Once approved or rejected, a deposit cannot be changed. Contact a system administrator if a correction is needed.
{{-- TRADING TRADES --}}

Trade Execution

Admin Office Manager

The Trades page shows all executed trades and provides the trade ticket modal for executing new orders on behalf of clients.

Executing a Trade

  1. Click New Trade
  2. Select the Client — their available wallet balances display automatically
  3. Select the Symbol — the latest price loads automatically as a placeholder
  4. Choose Side: BUY or SELL
  5. Select the settlement Currency (must match the wallet you want to debit/credit)
  6. Enter Quantity and optionally override the Price (leave blank to use latest)
  7. Optionally enter a Fee and Note
  8. The estimated total updates in real time as you type
  9. Click Execute Trade

BUY Trade Logic

  • Validates the client has sufficient wallet balance (quantity × price + fee)
  • Debits the wallet by the total cost
  • Creates or updates the client's position (adds quantity, recalculates average entry price)
  • Posts a double-entry ledger record

SELL Trade Logic

  • Validates the client holds enough quantity of the symbol
  • Credits the wallet by the proceeds (quantity × price − fee)
  • Reduces the position; closes it entirely if quantity reaches zero
  • Posts a double-entry ledger record
A client must have an approved deposit (funded wallet) before a BUY trade can be executed.
{{-- WITHDRAWALS --}}

Withdrawals

Admin Office Manager

Withdrawals can be created by the CRM team or requested directly by the client from the portal. All withdrawals start as pending.

Creating a Withdrawal (CRM)

Click New Withdrawal, select the client, currency, and amount. The system validates the client has enough balance before creating the request.

Approving a Withdrawal

  1. Review the pending withdrawal request
  2. Click Approve
  3. System debits the client's wallet
  4. A ledger entry is posted
  5. Client receives an email notification (if portal access enabled)

Rejecting a Withdrawal

Click Reject. No wallet debit occurs. The client is notified by email.

Client-Initiated Withdrawals (Portal)

Clients can request withdrawals themselves from allstocktrading.com/portal → Transactions. These appear in the CRM withdrawal queue with status pending for manager review.

{{-- KYC --}}

KYC Verification

Admin Office Manager

Document Types

The system accepts the following identity document types:

  • Passport
  • National ID Card
  • Driver's Licence
  • Utility Bill (proof of address)
  • Bank Statement
  • Selfie / Liveness photo

Document Statuses

StatusMeaning
pendingUploaded by client, awaiting review
under_reviewReviewer has opened it but not yet decided
approvedDocument verified and accepted
rejectedDocument rejected — client notified with reason

KYC Queue (CRM)

The KYC Queue shows all pending documents from all clients. Click a document to open the review page. From there you can:

  • Approve — mark the document as verified
  • Mark Under Review — flag for additional checking
  • Reject — enter a rejection reason; the client is notified by email

The lead's overall kyc_status is automatically recalculated after each document action. A lead reaches approved only when all submitted documents are approved.

Uploading KYC on Behalf of a Client (CRM)

Admins and managers can upload KYC documents directly from the lead detail page on the client's behalf.

{{-- PORTFOLIO --}}

Portfolio View

Admin Office Manager

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:

  • All open positions with symbol name, quantity, average entry price
  • Current market value (if price is available)
  • Unrealised P&L in currency and percentage
  • Client wallet balances by currency
  • Recent trade history
{{-- WALLETS & LEDGER --}}

Wallets & Ledger

Client Wallets

Each client has a separate wallet for each supported currency: USD, EUR, CAD, AUD. Wallets are created automatically on first deposit. The balance reflects:

  • + Approved deposits
  • − BUY trade costs (quantity × price + fee)
  • + SELL trade proceeds (quantity × price − fee)
  • − Approved withdrawals

Double-Entry Ledger

Every financial operation posts a LedgerEntry with two LedgerLines (debit + credit) for full accounting auditability. Entry types:

TypeTrigger
depositDeposit approved
withdrawalWithdrawal approved
trade_buyBUY trade executed
trade_sellSELL trade executed
{{-- PRICE FEED --}}

Automated Price Feed

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.

If a symbol has no price_feed_id, its price must be updated manually using the Set Price button on the Symbols page.
{{-- =================== CLIENT PORTAL =================== --}}

Client Portal — Overview

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).

Portal access must be explicitly enabled per client by an Admin or Office Manager from the lead detail page in the CRM.

Setting Up Portal Access

Admin Office Manager
  1. Open the client's lead detail page in the CRM
  2. Scroll to the Client Portal Access card
  3. Click Set Portal Password and enter a password (min 8 characters)
  4. Check Enable portal access now to activate immediately, or leave unchecked to set up the password first
  5. Click Save Password — a welcome email is automatically sent to the client on first-time setup with their login credentials
  6. To enable/disable access later without changing the password, use the Toggle Portal Access button

Client Dashboard (Portal)

Client

After logging in, clients see their personal financial overview:

  • Wallet Balances — current balance in USD, EUR, CAD, and AUD
  • Open Positions — all current holdings with symbol, quantity, current price, total value, and unrealised P&L (with colour indicator)
  • Recent Deposits — last 5 deposit entries with status badges
  • Recent Trades — last 5 executed trades
  • KYC Status Banner — if KYC is not approved, a prominent notice with a link to upload documents is shown

Clicking a position name opens the detailed position page with a full TradingView live chart.

KYC Upload (Portal)

Client

Clients access the KYC page from the sidebar or via the dashboard banner. They can:

  • See all previously submitted documents with their current review status
  • Upload new documents (supported types: Passport, ID Card, Driver's Licence, Utility Bill, Bank Statement, Selfie)
  • Receive email notification when a document is approved or rejected (with rejection reason if applicable)
Accepted file formats: PDF, JPG, JPEG, PNG. Maximum file size is determined by the server configuration.

Transactions (Portal)

Client

The Transactions page shows a complete financial history and allows clients to request withdrawals.

Withdrawal Request

  1. Select the currency to withdraw from (current balance shown)
  2. Enter the withdrawal amount (must not exceed available balance)
  3. Optionally add a note (e.g. destination bank details)
  4. Click Request Withdrawal
  5. The request appears in the CRM Withdrawals queue as pending
  6. The client receives an email when the request is approved or rejected by the manager

History Tables

  • Withdrawal History — all withdrawal requests with status and date
  • Deposit History — all deposits with approval status
  • Trade History — all executed trades

Position Detail & Charts (Portal)

Client

Clicking a position on the dashboard opens the position detail page, which includes:

  • Position Stats — quantity held, average entry price, current value, unrealised P&L (with percentage)
  • Live TradingView Chart — full interactive chart showing the real-time price of the asset. Supports all TradingView drawing tools, indicators, and timeframes. The chart is locked to the position's symbol.
  • Trade History — all buy/sell transactions for this specific symbol

Account Settings (Portal)

Client

Accessible from the top navigation. Clients can:

  • View their profile information (name, email, KYC status)
  • Change their portal login password (requires entering current password)
Clients cannot change their email address from the portal. Contact your account manager for email changes.
{{-- =================== PBX =================== --}}

PBX — Overview

Admin only

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.

PBX features interact with live telephony infrastructure. Changes take effect immediately on the phone system.

PBX Dashboard

Admin

Displays real-time and historical call statistics:

  • Total calls in the last 24 hours
  • Breakdown by disposition: Answered, No Answer, Busy, Failed
  • Average call duration
  • Top 5 countries by call volume
  • Current PBX account balance

Add credit to the PBX account using the balance top-up form on this page.

Auto Dialer

Admin

Auto Dialer Dashboard

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.

View Jobs

Lists all auto-dialler jobs (queued, running, completed) with lead counts and completion status.

Call Logs

Historical log of all calls made through the auto dialler with disposition, duration, agent, and lead information.

Caller ID (ANI) Management

Admin

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.

CDR Report (Call Data Records)

Admin

The CDR Report provides a searchable log of all calls processed by the PBX. Fields include:

  • Call Date & Time
  • Source (caller number)
  • Destination (callee number)
  • Duration (seconds)
  • Billable Duration
  • Disposition: ANSWERED, NO ANSWER, BUSY, FAILED

Use CDR data to monitor agent call activity, audit call volume, and troubleshoot call issues.

Monitor Extensions & DID Management

Admin

Monitor Extensions

View the current status of all agent extensions: registered/unregistered, idle, in-call. Useful for real-time monitoring of agent availability.

Manage DIDs

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.

Asterisk Info

Raw Asterisk server information panel showing version, uptime, active channels, and system health.

Flash Operator Panel

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

Admin

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.

Return Clients

Admin

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.

{{-- =================== REFERENCE =================== --}}

Common Workflows

Onboarding a New Trading Client

  1. Lead is created and assigned to an agent in Leads section
  2. Agent makes contact, lead expresses interest in trading
  3. Agent updates status to Deposit
  4. Office Manager creates a Trading Deposit for the lead and approves it — this funds the wallet and promotes the lead to is_client = 1
  5. Admin/Manager goes to the lead detail page → Client Portal Access card → sets portal password and enables access
  6. Client receives welcome email with login credentials
  7. Client logs in to allstocktrading.com/portal and uploads KYC documents
  8. Manager reviews KYC in the KYC Queue and approves documents
  9. Trading can begin — manager executes trades on client's behalf

Executing and Closing a Position

  1. Navigate to Trading → Trades → New Trade
  2. Select client, symbol, BUY, currency, quantity
  3. Verify estimated cost against available balance
  4. Submit — wallet debited, position created
  5. To close: repeat with SELL side, same symbol, same or partial quantity
  6. Wallet is credited with proceeds; position is reduced or closed

Processing a Client Withdrawal

  1. Client submits request via portal Transactions page (or manager creates in CRM)
  2. Request appears in Trading → Withdrawals with status pending
  3. Manager verifies client details and confirms withdrawal amount
  4. Click Approve — wallet is debited, ledger entry posted
  5. Client receives email confirmation
  6. Process actual transfer to client through your payment provider (outside the system)

Daily Agent Call Workflow

  1. Agent logs in and checks the Dashboard
  2. Goes to Clients and opens an assigned client
  3. Reviews the client history and notes
  4. Clicks Call — PBX dials through their extension
  5. After call, updates lead status and adds a note with call outcome
  6. If client requests callback, adds a Call Again entry
  7. Checks Callbacks section for any due follow-ups
{{-- NOTIFICATIONS --}}

Email Notifications

The system sends automated email notifications to clients for key events. All notifications are sent only to clients with portal_access = 1.

EventTriggerEmail Content
Portal WelcomeFirst-time portal password set (with access enabled)Login URL, email address, and password
Deposit ApprovedDeposit status changed to approvedDeposit amount, currency, and account balance info
Deposit RejectedDeposit status changed to rejectedNotice of rejection with contact instructions
Withdrawal ApprovedWithdrawal approved by managerAmount, currency confirmation
Withdrawal RejectedWithdrawal rejected by managerNotice of rejection with contact instructions
KYC Document ApprovedKYC document status set to approvedDocument type confirmed, account verification progress
KYC Document RejectedKYC document status set to rejectedDocument type, rejection reason, re-upload instructions
{{-- TROUBLESHOOTING --}}

Troubleshooting

Agent Cannot Make Calls

  • Verify the agent has an extension set in their user profile
  • Confirm the extension is registered in FreePBX
  • Check that Can Call Lead permission is enabled for the agent
  • Verify the lead's phone_status is valid

Lead Not Visible to Agent

  • Check that the agent's country list includes the lead's country
  • Confirm the client is assigned to the correct office, desk, and agent
  • Ensure the lead's phone status is valid (not blocked)
  • Confirm the lead is not already assigned to another agent

Client Cannot Log In to Portal

  • Verify portal_access = 1 on the lead (check Toggle Portal Access in CRM)
  • Confirm a portal password has been set (the card shows whether it is set)
  • Make sure the client is using their email address (not username) to log in
  • Reset the password from the Client Portal Access card if needed

Deposit Not Reflecting in Portal Balance

  • Confirm the deposit status is approved (not just pending)
  • Ensure is_client = 1 and portal_access = 1 are set on the lead
  • Check the correct currency wallet — each currency is a separate balance

Withdrawal Fails (Insufficient Balance)

  • Check the client's wallet balance for the requested currency in Portfolio view
  • Remember that pending (unapproved) BUY trades may not yet have reduced the displayed balance
  • Verify there are no other pending withdrawals consuming the balance

KYC Status Not Updating

  • Lead KYC status is recalculated from all document statuses automatically
  • A lead reaches approved only when all submitted documents are approved
  • If one document is rejected, the overall lead status becomes rejected
  • Ask the client to re-upload the rejected document

Symbol Price Not Updating

  • Verify the symbol has a valid price_feed_id configured (see Symbols page)
  • Check the cron job is running: crontab -l on the server should show a schedule:run entry
  • Test manually: php artisan trading:fetch-prices --dry-run
  • Check storage/logs/price-feed.log for errors
  • Use the Set Price button as a manual override

TradingView Chart Not Loading

  • Ensure the symbol's tv_symbol field is set correctly (e.g. BINANCE:BTCUSDT)
  • Verify the TradingView symbol format uses the correct exchange prefix
  • The chart requires an internet connection to load from TradingView's CDN
  • Check the browser console for JavaScript errors
{{-- end doc-content --}}
{{-- end doc-wrap --}} @endsection @section('page-js') @endsection