FolksCRM

Sales & CRM Platform — User Manual

Version 1.0  |  June 2026  |  MasGen Innovations

14 Modules · 89 Tables · 597 Stored Procedures · Campaign-to-Cash Pipeline
01

Introduction, Architecture & the Revenue Pipeline

FolksCRM is the Sales & CRM member of the Folks product family. It runs on a single Microsoft SQL Server engine and is organised into fourteen modules that take a prospect from the very first marketing touch all the way to a settled invoice. Everything is built on the same SQL-first discipline used across FolksHR and FolksPMS — no ORM, no LINQ in business logic, and every operation routed through a named stored procedure.

SQL is the engine

All workflow, calculation, aggregation and approval logic lives in stored procedures. The API coordinates; the UI presents.

Two classes of procedure

SP_ = single-table CRUD (5 per table). DevSP_ = multi-table workflows, dashboards, conversions, approvals.

Blazor Server UI

.NET 9 Blazor Web App, server-interactive render. Kanban, forecasts and dashboards update live over SignalR.

RBAC & audit

Roles → menus → page actions, plus per-user overrides. Every state-changing DevSP writes an activity-log row.

1.1 The fourteen modules

#ModulePurposeKey entities
1UM LockedIdentity, roles, employees, menus, privileges, audit, inbox.Users, Roles, Employees, MainMenu, SubMenu, UserRolePrivileges, ActivityLog
2MasterDataShared lookups used everywhere.Countries, Currencies, Industries, LeadSources, OpportunityStages, TaxCodes, UnitsOfMeasure
3AccountB2B companies, addresses, hierarchy, team.Accounts, AccountAddresses, AccountTeam, AccountTags, Tags
4ContactPeople, multi-account links, channels.Contacts, ContactAccounts, ContactCommunicationPreferences, ContactEmails/Phones
5LeadTop of funnel — capture, score, convert.Leads, LeadScoringRules, LeadScoreHistory, LeadAssignmentRules, LeadNotes
6OpportunityDeal pipeline, stages, forecast.Opportunities, OpportunityProducts, OpportunityCompetitors, OpportunityStageHistory
7ActivityTasks, calls, meetings, notes, calendar.Activities, ActivityParticipants, ActivityReminders, ActivityAttachments
8QuoteProposals with approval & revisions.Quotes, QuoteLines, QuoteRevisions, QuoteApprovals
9OrderSales orders & fulfillment.Orders, OrderLines, OrderShipments, OrderShipmentLines
10CampaignMarketing campaigns & ROI.Campaigns, CampaignTargetLists, EmailTemplates, CampaignExecutions, CampaignResponses
11ProductCatalogProducts, pricebooks, inventory.Products, ProductCategories, Pricebooks, PricebookItems, DiscountRules
12BillingInvoices, payments, aging.Invoices, InvoiceLines, Payments, Receipts, AgingBuckets
13WorkflowGeneric approval & notification engine.WorkflowDefinitions, WorkflowInstances, WorkflowSteps, WorkflowEscalations
14ReportsCross-module analytics, read-only.ReportDefinitions, ReportSchedules, ReportRuns

1.2 The revenue pipeline at a glance

Records carry forward. A campaign earns a lead; a qualified lead converts to an account + contact + opportunity; a won opportunity becomes a quote, then an order, then an invoice that ages in receivables.

Campaign
Lead
Opportunity
Quote
Order
Invoice

1.3 The technology stack

Backend API
ASP.NET Core 9 Web API — layered DAL → BLL → BFL → Controller per module.
Frontend
.NET 9 Blazor Web App, server-interactive render mode, SignalR live updates.
Database
Microsoft SQL Server — catalog FolksCRM_Dev_V1.
Auth
Bearer token issued by the UM login DevSP; validated on every API call.
Namespaces
CF.MasGen.FolksCRM.<Module>.*
How to read this manual. Each module chapter follows the same shape: Purpose → Key screens → Tables & fields → Step-by-step flows → Statuses → Tips & pitfalls. Pair it with the Exercise Workbook to practise each flow on live data.
02

Login, Roles & Common Page Operations

Every session starts at the login screen. Once authenticated, the left navigation is built from your role's privileges — you only ever see the menus and buttons you are allowed to use.

Bearer token auth Role-based menus Audited actions

2.1 Signing in

Login
superadmin
••••••••••
Sign inForgot password?
  1. Enter your username and password; click Sign in.
  2. The login DevSP validates credentials and returns your user record, roles and a token seed.
  3. The token is stored in localStorage and attached as Authorization: Bearer <token> on every subsequent call.
  4. You land on the home dashboard mapped to your role's default path.

2.2 The standard page anatomy

Almost every list screen in FolksCRM shares the same toolbar and grid so the muscle memory transfers from module to module.

  • Search & filter strip — server-side; sends your criteria to the list DevSP.
  • Add — opens a modal or right-side drawer form (hidden if you lack the Add privilege).
  • Data grid — server-paged, sortable columns, status badges, row actions.
  • Export — pushes the current filtered set to CSV/PDF.
  • Refresh — re-runs the list DevSP without losing your filters.

2.3 Roles you'll meet

RoleSeesTypical actions
SuperAdminEverythingSetup, security, master data, all transactions
Sales RepOwn leads, opps, accounts, quotes, activitiesWork the pipeline, build quotes, log activities
Sales ManagerTeam pipeline & forecastReassign, approve quotes, read leaderboard
MarketerCampaigns, leads, templatesBuild lists, send, track ROI
FinanceOrders, invoices, paymentsIssue, collect, age, dun
Greyed-out Add button? Your role lacks the Add privilege for that page. Ask an admin to grant it under User Management → Page Privileges, or apply a per-user override.
03

User Management (UM)

Locked

UM is the foundation module — it owns identity, role-based access, the employee directory, the menu/privilege engine, the audit log and the workflow inbox. It is ported verbatim from FolksHR and is functionally frozen; only its Blazor markup may be restyled. Every other module wires its SecurityService here.

Functionally frozen 13 tables Menu & privilege engine

3.1 What it manages

Employees & users

Directory with profile image; a user account links to an employee and one or more roles.

Departments & designations

Hierarchical departments; designations map to default roles.

Roles & privileges

Per-role, per-sub-menu flags: View / Add / Edit / Delete / Approve, plus per-user overrides.

Audit & inbox

Activity log of who/what/when; a workflow listener feeds each user's approval inbox.

3.2 Key pages

PageRouteUse
Employee List / Registration/um/employeesOnboard staff, set department, designation, image
Department / Designation Master/um/departmentsBuild the org structure
Role Management/um/rolesCreate roles & default privileges
Menu Management/um/menusConfigure main/sub menus & page routes
Page Privilege Assignment/um/privilegesGrant View/Add/Edit/Delete/Approve per role
Activity Log/um/auditFilterable audit trail
Notification Inbox/inboxPending approvals across all modules
Out of scope. Functional change requests against UM (new columns, contract changes) require a re-baseline and are not part of v1. Restyle only.
Foundation data

Master Data & the Customer Book

Before any deal moves, the lookups and the customer book must exist. Chapters 4–6 cover the data every other module reads from.

04

Master Data — Lookups & Picklists

Master Data is the single home for cross-cutting lookup tables, so the same currency, industry or stage list is reused everywhere instead of being duplicated per module. It is owned by administrators and loaded once at app start.

12 lookups Activate without delete Drag-reorder stages

4.1 The lookups

LookupNotes / extra fields
Countries → States → CitiesCascading; used by every address picker
CurrenciesCode, symbol; tags amounts across quotes/orders/invoices
IndustriesClassifies accounts & segments target lists
Lead Sources / Lead StatusesDrive lead attribution and the Kanban columns
Opportunity StagesProbability %, SortOrder, type — the pipeline backbone
Payment TermsNet 30 / 60 etc.; sets invoice due dates
Tax CodesRate & type; applied on quote/order/invoice lines
Units of MeasureBound to products (UnitsOfMeasureID / UoMName)
Document Types · Salutations · TitlesSmaller reference lists

4.2 The Master Data Console

Master Data Console  ·  /master
StageProbabilityOrderStatus
Prospecting10%1ActiveEdit
Qualification25%2ActiveEdit
Proposal50%3ActiveEdit
Negotiation75%4ActiveEdit
Closed Won100%5WonEdit
Pick-list bundle. A single DevSP returns every active lookup the FE needs at startup, cached client-side — so dropdowns load instantly. Reorder stages by drag; the order persists atomically.
Pitfall. Don't hard-delete a lookup value that's already referenced (e.g. a stage in use). Deactivate it instead — historical records keep their reference.
05

Account — Companies & Hierarchy

Core

An Account is a B2B company or organisation — the anchor for the sales hierarchy, addresses, the account team and the full 360° history. Every opportunity, quote, order and invoice ultimately rolls up to an account.

5 tables Parent/child hierarchy Merge duplicates

5.1 Account form — key fields

Account Name *
Legal/trading name — mandatory.
Industry *
From Master Data; drives segmentation.
Owner *
The user responsible for the relationship.
Parent Account
Links a subsidiary to its parent for hierarchy roll-up.
Annual Revenue · Employees
Firmographics for prioritisation.
Addresses
One or more — Billing / Shipping / Other.

5.2 The 360° detail page

Open any account to a tabbed drawer that aggregates everything in one place via DevSP_Account_GetById_Full and DevSP_Account_GetTimeline.

  • Profile — firmographics, owner, parent.
  • Addresses — billing/shipping/other.
  • Team — add/remove members with a role on the account.
  • Timeline — merged activities, opportunities, quotes/orders and invoices, newest first.

5.3 Common actions

ActionWhat happens
Create (composite)Account + initial address + team in one transaction
Reassign ownerOwner change + activity log + workflow listener for the new owner
Link to parentBuilds the hierarchy tree (recursive CTE)
MergeFolds a duplicate into the target, repointing all child FKs
Bulk importDriven from a staging table populated by CSV
Merge is one-way. Always merge the duplicate into the record you want to keep — the source account's links are repointed and the source is retired.
06

Contact — People & Channels

A Contact is a person. Unlike accounts, a contact can be linked to several accounts at once (many-to-many) with one marked primary — perfect for consultants, partners and group buyers. Contacts also hold communication preferences for compliant outreach.

4 tables Multi-account links Opt-in/opt-out per channel

6.1 Linking & preferences

Account links

Attach a contact to one or more accounts; flag one primary and set a role (e.g. Decision Maker).

Comm preferences

Per-channel opt-in/opt-out (email, SMS, WhatsApp, call) with a reason — respected by Campaign sends.

6.2 Contact 360°

Contacts  ·  /contacts
NameTitlePrimary AccountEmailStatus
Aisha RahmanCTONorthwind Ltdaisha@northwind.comActive
Liam ChenProcurement HeadContoso PLCliam@contoso.comActive
Sara OkoyeConsultant3 accountssara@advisory.ioB2C
Tip. When you convert a lead, FolksCRM can create the Contact and attach it to a new or existing Account in the same step — no double entry. See Chapter 7.
The pipeline pillar

From first touch to a forecastable deal

Chapters 7–9 cover the heart of the CRM: capturing leads, working opportunities through the stages, and logging the activities that move them.

07

Lead — Capture, Score & Convert

Core

A Lead is an unqualified prospect. Leads can be captured by hand, through a web-to-lead form, or imported in bulk. They are scored, assigned, qualified — and finally converted in a single click into an Account, a Contact and an Opportunity.

5 tables Grid + Kanban Rule-based scoring One-click convert

7.1 The lead lifecycle

Captured
Form, web, or import
Scored
Rules write history
Assigned
Owner or queue
Qualified
Or disqualified w/ reason
Converted
Account+Contact+Opp

7.2 Grid & Kanban

Toggle the list between a classic grid and a Kanban grouped by lead status. KPI tiles across the top come from DevSP_Lead_DashboardCounts.

New
38
Working
21
Qualified
12
Disqualified
7

7.3 Conversion — what it builds

The convert wizard runs one atomic DevSP_Lead_Convert:

  1. Insert (or reuse) an Account from the lead's company.
  2. Insert (or reuse) a Contact from the lead's person.
  3. Optionally create an Opportunity (you can set name & amount in the wizard).
  4. Stamp the lead's converted_to_* ids and timestamp.
  5. Write an activity-log row and emit a workflow listener for the new owner.
No double entry. Because conversion reuses existing accounts/contacts when matched, you won't create duplicates for a company you already sell to.
Admin tip. Define scoring rules (criteria + weight) and assignment rules (criteria → owner/queue) so new leads are scored and routed automatically on capture.
08

Opportunity — Pipeline & Forecast

Core

The Opportunity is the active deal — the heart of the funnel. It carries an amount, a stage, an expected close date, products, competitors and a team, and feeds the pipeline forecast.

6 tables Drag-stage Kanban Forecast snapshots Win/Loss reasons

8.1 The stage Kanban

Opportunity Kanban  ·  /opportunities/kanban
ProspectingQualificationProposalNegotiationClosed Won
Acme — $24k
10%
Northwind — $80k
25%
Contoso — $150k
50%
Globex — $60k
75%
Initech — $45k
Won

Drag a card to a new column and DevSP_Opportunity_ChangeStage updates the stage, writes a stage history row (with duration-in-stage) and emits a workflow listener if the stage is gated.

8.2 Deal detail tabs

Products

Add from the catalog; qty × unit price − discount auto-computes the line total.

Competitors

Track rival vendors with strengths/weaknesses per deal.

Team

Assign roles — lead, support, technical.

Timeline & history

Stage changes + activities + quotes/orders in one stream.

8.3 Forecast & close

The forecast dashboard groups pipeline by stage × month × owner, weighting each deal by its stage probability. Mark a deal Won or Lost with a reason; a won deal can be converted to a Quote in one click (Chapter 12). A weekly snapshot DevSP preserves the pipeline for trend analysis.

Weighted pipeline. Forecast value = Σ (deal amount × stage probability). Adjust probability bands on a stage in Master Data and the whole forecast re-weights.
09

Activity — Tasks, Calls, Meetings & Calendar

Activities are the day-to-day work that moves deals. An activity is polymorphic — it can be linked to a Lead, Account, Contact, Opportunity, Quote or Order — so wherever you are, you can log what happened and schedule what's next.

4 tables Polymorphic links Reminders

9.1 Activity types & views

TypeUse
TaskTo-do with a due date & priority
CallPhone log with outcome
MeetingScheduled, shows on the calendar
NoteFree-text record
  • My Activities — grouped Today / This week / Overdue.
  • Team Activities — manager view across reports.
  • Calendar — month/week/day for meetings & calls.
Auto follow-ups. Stage changes on a Lead or Opportunity can auto-create a follow-up task via DevSP_Activity_AutoCreateFollowUp — nothing falls through the cracks.
Demand & supply

Marketing reach and the product catalog

Chapters 10–11 cover how leads are generated at scale and how the products you sell are priced.

10

Campaign — Marketing & ROI

Campaigns drive demand and tie back to lead attribution. Build a target list by criteria, author an email template, schedule an execution, then track opens, clicks, replies and bounces — and compute ROI against budget.

6 tables Criteria target lists ROI = revenue ÷ cost

10.1 Campaign flow

Plan
Budget & timeline
Build list
By criteria
Template
Placeholders
Execute
Schedule send
Measure
Responses & ROI

10.2 Tracking & attribution

MetricSource
Sent / FailedCampaignExecutions counters
Open / Click / Reply / Bounce / UnsubscribeCampaignResponses events
Lead attributioncampaign_id stamped on the Lead
ROIactual_revenue ÷ actual_cost
v1 note. Email sending uses a mock SMTP queue; opt-outs from a contact's communication preferences are still honoured before a recipient is queued.
11

Product Catalog — Products & Pricebooks

The catalog feeds every line item on opportunities, quotes and orders. It holds products, a category tree, pricebooks (default + customer-specific), discount rules and on-hand inventory per warehouse.

7 tables Pricebooks Discount rules

11.1 Pricing resolution

When a line needs a price, DevSP_Product_GetPriceForContext resolves it from the right pricebook for the customer, quantity and date, then applies the best applicable discount rule:

Product + Customer + Qty + Date
   ↓
Applicable Pricebook price
   − best matching Discount Rule
   = Net unit price

11.2 Inventory

EventInventory effect
Order line confirmed qty committed
Order cancelled+ qty released
Stock received+ qty on hand
Tip. Set a product inactive rather than deleting it — its sales history (opportunities, quotes, orders that reference it) stays intact.
Quote-to-Cash

Turn a won deal into collected cash

Chapters 12–14 walk the back half of the pipeline: the proposal, the committed order, and the invoice that gets paid.

12

Quote — Proposals & Approval

Core

A Quote is the formal price offering between Opportunity and Order. It supports a line builder, header & line discounts, a multi-level approval chain, revisions that preserve history, PDF generation and customer accept/reject.

5 tables Approval chain Revisions

12.1 Quote statuses

Draft
Pending
Approved
Sent
Accepted
Rejected
Expired

12.2 The line builder

Quote QUO-1042  ·  v2  ·  Pending Approval
ProductQtyUnitDisc%TaxLine total
FolksCRM Pro (annual)25$24010%5%$5,670
Onboarding package1$3,0000%5%$3,150
Save draft Submit for approval

12.3 Approval & conversion

  1. Submit for approval emits a workflow listener to the approver(s).
  2. Approver approves/rejects with comments; on approve the status advances.
  3. Generate the PDF payload and send to the contact.
  4. Record the customer's accept/reject.
  5. Convert to Order in one click — lines carry over (Chapter 13).
Revisions. Editing an approved quote creates a new revision (a JSON snapshot of the prior header + lines), so you always have the full negotiation trail.
13

Order — Sales Orders & Fulfillment

An Order is a committed deal that drives fulfillment and invoicing. Create it from an accepted quote in one click, or manually. Confirm to lock editing, then ship in full or in parts and watch per-line shipped-vs-ordered update live.

5 tables Partial shipments Convert to invoice

13.1 Order statuses

StatusMeaning
DraftEditable, not yet committed
ConfirmedLocked; fulfillment can begin
Partially ShippedSome lines shipped
ShippedAll lines shipped
ClosedFulfilled & invoiced
CancelledWith a captured reason

13.2 Creating a shipment

The composite shipment DevSP inserts the shipment + its lines, increments each OrderLine.qty_shipped, and recomputes the order status — all in one transaction.

Convert to invoice works on a confirmed or partly-shipped order, carrying lines into Billing. See Chapter 14.
14

Billing — Invoices, Payments & Aging

Core

Billing is money-in. Create an invoice from an order (or manually), issue it, record full or partial payments, generate receipts, and watch receivables age across buckets — with a dunning list for overdue accounts.

5 tables Partial payments Aging buckets

14.1 Invoice statuses & payment

Recording a payment runs DevSP_Invoice_RecordPayment_Composite: it writes the payment, generates a receipt, then recomputes the invoice status and balance.

Invoice INV-2087  ·  Partially Paid
Total
$8,820.00
Paid
$5,000.00 (2 payments)
Balance due
$3,820.00
Due date
2026-06-30 (Net 30)

14.2 Receivables aging

0–30 days
$42k
31–60 days
$18k
61–90 days
$9k
90+ days
$6k

A scheduled aging-snapshot DevSP refreshes the buckets; the dunning-candidates DevSP produces the list of overdue invoices to chase, which the FE renders as an email queue.

Void, don't delete. Cancelling money records is done via a void (with reason + audit). Hard delete is reserved for elevated roles.
Cross-cutting

The engine behind every approval and number

Chapters 15–16 cover the two modules every other one leans on: the workflow engine and the reporting layer.

15

Workflow — Approval Engine

Bridge

Workflow is the generic approval/notification engine. Other modules just emit a "listener" row; this module owns the inbox, the router, the SLA escalation and the notification dispatch.

5 tables One inbox for all modules SLA escalation

15.1 How a request flows

  1. A module calls DevSP_Workflow_Trigger(Module, EntityType, EntityID, Event, Payload) after its primary write.
  2. The engine picks the matching definition and writes the first step for the right approver.
  3. The approver sees it in their inbox and approves/rejects with comments.
  4. On approve → advance to the next level or mark the instance Complete; on reject → notify the originator.
  5. If a step is older than its due time, the escalation sweep bumps it to the next-up approver.

15.2 What triggers workflow

ModuleEvent
QuoteSubmit for approval
OrderConfirm (if gated)
BillingIssue / Void (if gated)
OpportunityStage promotion (if configured)
Your inbox. The bell badge in the top bar counts your pending steps — across every module — from a single DevSP_Workflow_Inbox call.
16

Reports & Dashboards

The Reports module is pure-read cross-module analytics. Each dashboard is one or more read-only DevSPs; admins can register new report definitions that point at any DevSP and schedule them to email recipients.

5 dashboards CSV / PDF export Scheduled runs

16.1 The five role dashboards

Sales Rep

My pipeline, my activities, my won this month.

Sales Manager

Team pipeline, activity & forecast.

Marketing

Campaign ROI, lead-source mix, conversion %.

Finance

AR aging, paid this month, top debtors.

Executive

Revenue, top accounts, win-rate trend, deal size.

16.2 The conversion funnel

The headline report tracks the rate at each hand-off — Lead → Opportunity → Quote → Order → Invoice — so you can see exactly where deals leak.

Leads1,000
Opportunities320
Quotes180
Orders110
Invoices paid98
17

Status Reference & Troubleshooting

17.1 Status reference

EntityStatuses (in order)
LeadNew → Working → Qualified / Disqualified → Converted
OpportunityProspecting → Qualification → Proposal → Negotiation → Closed Won / Closed Lost
QuoteDraft → Pending Approval → Approved → Sent → Accepted / Rejected / Expired
OrderDraft → Confirmed → Partially Shipped → Shipped → Closed / Cancelled
InvoiceDraft → Issued → Partially Paid → Paid / Overdue / Cancelled
WorkflowStarted → (per step: Pending → Approved/Rejected) → Complete / Rejected

17.2 Common issues

I can't see a menu item I expect
Your role lacks the View privilege for that sub-menu. An admin grants it under UM → Page Privileges, or adds a per-user override. The left nav is built from your privileges, so it refreshes on next login.
My quote won't convert to an order
A quote must be in status Accepted to convert. Check the approval timeline — if it's still Pending Approval, the approver hasn't acted yet.
Lead conversion created a duplicate account
Conversion reuses an existing account only when it matches. If names differ (e.g. "Acme" vs "Acme Inc"), it creates a new one. Use Account → Merge to fold the duplicate into the keeper.
A dashboard shows stale numbers
Aging and pipeline snapshots are refreshed by scheduled DevSPs (run via the admin "Run Job" page in v1). Re-run the relevant job, then refresh the dashboard.
I get "401 Unauthorized" mid-session
Your bearer token expired or was cleared from localStorage. Sign in again to obtain a fresh token.

17.3 Scheduled jobs (v1 = manual "Run Job")

JobCadence (v2)
Pipeline snapshotWeekly
AR aging refreshNightly
Dunning candidatesDaily
Workflow escalation sweepHourly
Overdue remindersDaily
18

Glossary

Account
A B2B company/organisation — the relationship anchor.
Contact
A person; can be linked to several accounts.
Lead
An unqualified prospect, top of the funnel.
Opportunity
An active, forecastable deal moving through stages.
Pipeline
All open opportunities, grouped by stage.
Quote
A formal price offering with approval & revisions.
Order
A committed deal that drives fulfillment & billing.
Invoice
A bill to a customer; ages until paid.
Aging bucket
A receivables band: 0–30 / 31–60 / 61–90 / 90+ days.
Pricebook
A named price list; default plus customer-specific overrides.
Pipeline forecast
Σ (deal amount × stage probability), grouped by month/owner.
SP_ / DevSP_
Single-table CRUD procedure / multi-table workflow procedure.
RBAC
Role-based access control — menus & actions gated by role.
Workflow listener
A row a module emits to request an approval/notification.
Next step. Put it into practice — open the Exercise Workbook and run a single deal from first touch to settled invoice.