Distributors & Wholesalers Management — Overview & module guide

Module: Distributors & Wholesalers Management v1.8.8

Complete distributors and wholesalers management — brands, products, warehouses, inventory, sales orders, and reports.

How to use in BIXCRM (daily operations)

  1. Sign in to the admin area with a role that includes Distributors & Wholesalers Management permissions.
  2. Open Distributors Wholesalers (sidebar) or search for Distributors & Wholesalers Management in the admin menu.
  3. Start on the Dashboard (if available) to see open tasks, pending approvals, and KPIs.
  4. Review Settings after upgrades — new options may need defaults for your company.
  5. Create or import master data first; most modules block transactions until masters exist.
  6. Run the main business flow (create → submit → approve → post/complete) using the screens listed in Admin menu below.
  7. Use Reports / Analytics screens to reconcile stock, finance, compliance, or SLA metrics.
  8. For integrations (API, EDI, gateways, tax), confirm credentials in Settings and monitor logs or webhook delivery screens.
  9. Train staff with role-based access — give approvers approve permissions only, operators create/edit on their area.
  10. If something fails overnight, check BIXCRM cron ran and open the module log / failed queue screen if present.

Admin menu — where to work

Open the Distributors & Wholesalers Management section in the admin sidebar. Screens your staff may use (depending on role):

  • Account Statement
  • Analytics
  • Brands
  • Categories
  • Commissions
  • Dashboard
  • Delivery Routes
  • Distributors
  • Inventory
  • Pick Lists
  • Place Order
  • Price Lists
  • Product Catalog
  • Products
  • Promotions
  • Quick Order
  • Rebates
  • Reports
  • REST API
  • Sales Orders
  • Sales Returns
  • Settings
  • Shipments
  • Territory Managers
  • Transfer Requests
  • Vans
  • Van Sales
  • Warehouses
  • Webhooks

Detailed guide — features, workflows, API & FAQ

Module status

AreaStatus
--------------
Product master (brands, categories, products)Complete
Multi-warehouse inventory & lot trackingComplete
Distributor management & statementsComplete
Sales orders, returns, invoicingComplete
Price lists, commissions, promotions, rebatesComplete
Pick/pack/ship, transfer requestsComplete
Van sales, routes, mobile APIComplete
REST API with rate limitingComplete
Client portal (orders, catalog, statement)Complete
Webhooks with URL validationComplete
Territory manager RBACComplete
Security hardening (MIME, SSRF, CSRF, territory scope)Complete
CodeCanyon packaging (LICENSE, CHANGELOG, docs)Complete
Complete uninstall cleanupComplete

Features

  • Product master via BIXCRM Items + module extension fields
  • Distributors via BIXCRM Clients + credit limits, territories, customer tiers, statements
  • Multi-warehouse stock (internal engine or Nasbix Inventory Management)
  • Sales order workflow: draft → approval → partial/full delivery → invoice
  • Tiered & volume pricing via price lists
  • Sales rep commission rules (calculated on delivery)
  • Multi-currency sales orders
  • REST API (Bearer token) for products, distributors, orders, stock
  • Distributor client portal (orders, catalog, self-service ordering, statement, repeat order)
  • Audit trail on sales orders and commission payouts
  • Automatic credit hold on overdue invoices
  • Commission payout workflow (approve / mark paid / export)
  • Pick/pack/ship workflow with pick lists and shipment records
  • Batch/lot tracking with FIFO consumption and expiry alerts
  • Transfer requests with optional approval workflow
  • Promotions & coupon codes with auto-apply and redemption tracking
  • Volume rebate programs with tiered accruals and payout workflow
  • Outbound webhooks with HMAC signatures, delivery log, and cron retry queue
  • Analytics dashboard (KPIs, trends, promotion ROI, top distributors)
  • Van sales with mobile stock, route stops, and cash collections
  • Delivery routes with driver assignment, stop visits, and completion webhooks
  • Dashboard/analytics query caching for scale
  • REST API pagination (limit, offset, since)
  • Sales returns with optional BIXCRM credit notes
  • 11 report types with Excel/PDF export
  • Territory manager scoping for field teams
  • Integration with Purchase Management (GRN, reorder PO)

Permissions

PermissionDescription
-------------------------
dw_brandsBrand management
dw_productsProducts
dw_warehousesWarehouses
dw_inventoryStock operations
dw_distributorsDistributor master
dw_sales_ordersSales orders
dw_sales_returnsSales returns
dw_price_listsPrice lists & customer tiers
dw_commissionsCommission rules
dw_promotionsPromotions & coupons
dw_rebatesRebate programs
dw_webhooksOutbound webhooks
dw_analyticsAnalytics dashboard
dw_vansVan fleet & van stock
dw_routesDelivery routes
dw_van_salesField van sales
dw_apiREST API keys
dw_reportsReports
dw_territoriesTerritory assignments
dw_settingsModule settings

Finance rules (v1.8+)

  • Ledger: Delivered orders count as receivable only when no BIXCRM invoice is linked. Invoices are the receivable source once created.
  • Receivables aging: Uninvoiced delivered orders + open invoice balances + opening balance. No double-counting.
  • Tax mapping: Invoices and credit notes created from orders/returns include BIXCRM line taxes from item tax settings, with fallback to calculated or default rate.

REST API (v1.8+)

Enable in module settings (dw_enable_rest_api). Create API keys under Distributors & Wholesalers → REST API.

Authentication uses the Authorization: Bearer {token} header only.

GET  /distributors_wholesalers/api/products
GET  /distributors_wholesalers/api/distributors
GET  /distributors_wholesalers/api/orders
GET  /distributors_wholesalers/api/orders/{id}
POST /distributors_wholesalers/api/orders
GET  /distributors_wholesalers/api/stock
GET  /distributors_wholesalers/api/vans?van_id={id}
GET  /distributors_wholesalers/api/routes?date=YYYY-MM-DD
POST /distributors_wholesalers/api/van_sales
Authorization: Bearer {token}

Van/route endpoints require Enable van/route mobile API in module settings.

Client portal (v1.8+)

Distributor contacts see Sales Orders and Account Statement in the client area at /clients/dw/*.

Tests

Install dev dependencies once:

cd modules/distributors_wholesalers && composer install

Unit tests (no database):

composer test

Related modules

  • Inventory Management — optional stock engine
  • Purchase Management — GRN sync, reorder purchase orders

Extended module documentation

Table of contents

  1. [Overview](#overview)
  2. [Installation](#installation)
  3. [Menu & permissions](#menu--permissions)
  4. [Sales order workflow](#sales-order-workflow)
  5. [Finance & receivables](#finance--receivables)
  6. [REST API](#rest-api)
  7. [Client portal](#client-portal)
  8. [Webhooks](#webhooks)
  9. [Integrations](#integrations)
  10. [Security](#security)
  11. [Uninstall](#uninstall)

---

Overview

Distributors & Wholesalers extends BIXCRM for wholesale and distribution operations:

AreaDescription
-------------------
ProductsBIXCRM Items + dw_product_details extension
DistributorsBIXCRM Clients + dw_distributor_details extension
StockMulti-warehouse engine or Nasbix Inventory Management
OrdersFull order-to-cash with approval, delivery, invoicing
Field salesVan stock, routes, mobile API

Version 1.8.6 — all six implementation phases complete.

---

Menu & permissions

Admin path: Distributors & Wholesalers (sidebar)

PermissionFeature
---------------------
dw_brands / dw_categories / dw_productsProduct master
dw_warehouses / dw_inventoryStock
dw_distributorsDistributor master
dw_sales_orders / dw_sales_returnsOrder workflow
dw_price_lists / dw_commissionsPricing & incentives
dw_promotions / dw_rebatesPromotions
dw_webhooks / dw_apiIntegrations
dw_vans / dw_routes / dw_van_salesField sales
dw_analytics / dw_reportsReporting
dw_territoriesField team scoping
dw_settingsModule configuration

Each permission supports: view, create, edit, delete, approve.

---

Sales order workflow

Statuses: draft → pending_approval → approved → partially_delivered → delivered → invoiced

  1. Create order (admin, quick order, or client portal).
  2. Credit limit and approval threshold checks on submit.
  3. Approve → pick list (optional auto-create) → ship → deliver.
  4. Create BIXCRM invoice from delivered order.
  5. Commission calculated on delivery; promotions/rebates applied per settings.

---

Finance & receivables

  • Delivered orders without invoice count as receivable.
  • Once invoiced, BIXCRM invoice is the receivable source (no double-count).
  • Distributor statements combine ledger entries, open invoices, and uninvoiced deliveries.
  • Credit hold blocks new orders when overdue threshold exceeded.

---

REST API

Enable in Settings (dw_enable_rest_api). Create keys under REST API.

Authorization: Bearer {token}
MethodEndpoint
------------------
GET/distributors_wholesalers/api/products
GET/distributors_wholesalers/api/distributors
GET/POST/distributors_wholesalers/api/orders
GET/distributors_wholesalers/api/stock
GET/distributors_wholesalers/api/vans
GET/distributors_wholesalers/api/routes
POST/distributors_wholesalers/api/van_sales
  • Read/write scopes per key
  • Rate limit per key (default 60/min; configurable)
  • Bearer header only — query-string tokens are not accepted
  • Pagination: limit, offset, since on list endpoints

---

Client portal

Distributor contacts access /clients/dw/*:

  • Order list and detail
  • Product catalog and self-service ordering
  • Repeat order from previous order
  • Account statement (PDF)

Requires distributor flag on client record and portal ordering enabled in settings.

---

Webhooks

Configure under Distributors & Wholesalers → Webhooks.

Events: order.created, order.approved, order.delivered, order.partially_delivered, order.invoiced, shipment.created, van_sale.completed, route.completed.

  • HMAC-SHA256 signature in X-DW-Signature header
  • Only public HTTP/HTTPS URLs accepted (private/reserved IPs blocked)
  • Delivery log with response codes

---

Integrations

ModuleIntegration
---------------------
Inventory ManagementStock sync via warehouse mapping
Purchase ManagementGRN posting, reorder PO from low-stock suggestions

---

Security

ControlImplementation
-------------------------
Admin authBIXCRM AdminController session
Permissions20 feature groups with approve capability
Territory RBACNon-admin staff with territory assignments see scoped data only
API authSHA-256 hashed tokens, Bearer header, rate limits
CSRFBIXCRM forms + AJAX hash refresh
UploadsExtension whitelist + MIME validation
WebhooksURL validation, HMAC signatures
SQL/XSSParameterized queries, e() / html_escape() in views

Run smoke tests:

php modules/distributors_wholesalers/tests/dw_logic_test.php

---

Extended module documentation

Table of contents

  1. [Overview](#overview)
  2. [Installation](#installation)
  3. [Menu & permissions](#menu--permissions)
  4. [Sales order workflow](#sales-order-workflow)
  5. [Finance & receivables](#finance--receivables)
  6. [REST API](#rest-api)
  7. [Client portal](#client-portal)
  8. [Webhooks](#webhooks)
  9. [Integrations](#integrations)
  10. [Security](#security)
  11. [Uninstall](#uninstall)

---

Overview

Distributors & Wholesalers extends BIXCRM for wholesale and distribution operations:

AreaDescription
-------------------
ProductsBIXCRM Items + dw_product_details extension
DistributorsBIXCRM Clients + dw_distributor_details extension
StockMulti-warehouse engine or Nasbix Inventory Management
OrdersFull order-to-cash with approval, delivery, invoicing
Field salesVan stock, routes, mobile API

Version 1.8.6 — all six implementation phases complete.

---

Menu & permissions

Admin path: Distributors & Wholesalers (sidebar)

PermissionFeature
---------------------
dw_brands / dw_categories / dw_productsProduct master
dw_warehouses / dw_inventoryStock
dw_distributorsDistributor master
dw_sales_orders / dw_sales_returnsOrder workflow
dw_price_lists / dw_commissionsPricing & incentives
dw_promotions / dw_rebatesPromotions
dw_webhooks / dw_apiIntegrations
dw_vans / dw_routes / dw_van_salesField sales
dw_analytics / dw_reportsReporting
dw_territoriesField team scoping
dw_settingsModule configuration

Each permission supports: view, create, edit, delete, approve.

---

Sales order workflow

Statuses: draft → pending_approval → approved → partially_delivered → delivered → invoiced

  1. Create order (admin, quick order, or client portal).
  2. Credit limit and approval threshold checks on submit.
  3. Approve → pick list (optional auto-create) → ship → deliver.
  4. Create BIXCRM invoice from delivered order.
  5. Commission calculated on delivery; promotions/rebates applied per settings.

---

Finance & receivables

  • Delivered orders without invoice count as receivable.
  • Once invoiced, BIXCRM invoice is the receivable source (no double-count).
  • Distributor statements combine ledger entries, open invoices, and uninvoiced deliveries.
  • Credit hold blocks new orders when overdue threshold exceeded.

---

REST API

Enable in Settings (dw_enable_rest_api). Create keys under REST API.

Authorization: Bearer {token}
MethodEndpoint
------------------
GET/distributors_wholesalers/api/products
GET/distributors_wholesalers/api/distributors
GET/POST/distributors_wholesalers/api/orders
GET/distributors_wholesalers/api/stock
GET/distributors_wholesalers/api/vans
GET/distributors_wholesalers/api/routes
POST/distributors_wholesalers/api/van_sales
  • Read/write scopes per key
  • Rate limit per key (default 60/min; configurable)
  • Bearer header only — query-string tokens are not accepted
  • Pagination: limit, offset, since on list endpoints

---

Client portal

Distributor contacts access /clients/dw/*:

  • Order list and detail
  • Product catalog and self-service ordering
  • Repeat order from previous order
  • Account statement (PDF)

Requires distributor flag on client record and portal ordering enabled in settings.

---

Webhooks

Configure under Distributors & Wholesalers → Webhooks.

Events: order.created, order.approved, order.delivered, order.partially_delivered, order.invoiced, shipment.created, van_sale.completed, route.completed.

  • HMAC-SHA256 signature in X-DW-Signature header
  • Only public HTTP/HTTPS URLs accepted (private/reserved IPs blocked)
  • Delivery log with response codes

---

Integrations

ModuleIntegration
---------------------
Inventory ManagementStock sync via warehouse mapping
Purchase ManagementGRN posting, reorder PO from low-stock suggestions

---

Security

ControlImplementation
-------------------------
Admin authBIXCRM AdminController session
Permissions20 feature groups with approve capability
Territory RBACNon-admin staff with territory assignments see scoped data only
API authSHA-256 hashed tokens, Bearer header, rate limits
CSRFBIXCRM forms + AJAX hash refresh
UploadsExtension whitelist + MIME validation
WebhooksURL validation, HMAC signatures
SQL/XSSParameterized queries, e() / html_escape() in views

Run smoke tests:

php modules/distributors_wholesalers/tests/dw_logic_test.php

---

Features

Complete distributors and wholesalers management — brands, products, warehouses, inventory, sales orders, and reports.

  • Product master via BIXCRM `Items` + module extension fields
  • Distributors via BIXCRM `Clients` + credit limits, territories, customer tiers, statements
  • Multi-warehouse stock (internal engine or Nasbix Inventory Management)
  • Sales order workflow: draft → approval → partial/full delivery → invoice
  • Tiered & volume pricing via price lists
  • Sales rep commission rules (calculated on delivery)
  • Multi-currency sales orders
  • REST API (Bearer token) for products, distributors, orders, stock
  • Distributor client portal (orders, catalog, self-service ordering, statement, repeat order)
  • Audit trail on sales orders and commission payouts
  • Automatic credit hold on overdue invoices
  • Commission payout workflow (approve / mark paid / export)
  • Pick/pack/ship workflow with pick lists and shipment records
  • Batch/lot tracking with FIFO consumption and expiry alerts
  • Transfer requests with optional approval workflow
  • Promotions & coupon codes with auto-apply and redemption tracking
  • Volume rebate programs with tiered accruals and payout workflow
  • Outbound webhooks with HMAC signatures, delivery log, and cron retry queue
  • Analytics dashboard (KPIs, trends, promotion ROI, top distributors)
  • Van sales with mobile stock, route stops, and cash collections

Permissions

Granular staff capabilities are registered on activation. Assign them under Setup → Staff → Roles for the Distributors & Wholesalers Management capability group.

Typical capabilities include view, create, edit, delete, plus module-specific actions (approve, export, settings, API access).

Cron Jobs

Background tasks (if enabled) run through BIXCRM's main cron. Example crontab (every 5 minutes):

* * * * * php /path/to/bixcrm/index.php cron/index > /dev/null 2>&1

Check module settings for scheduled jobs (alerts, sync, reports, retention).

After activation — configuration checklist

  1. Go to Setup → Modules and activate Distributors & Wholesalers Management.
  2. If prompted, click Upgrade Database or reload admin — migrations run automatically.
  3. Assign permissions under Setup → Staff → Roles.
  4. Open the module menu and configure settings.
  5. BIXCRM 3.0+
  6. PHP 7.4+ (8.1+ recommended)
  7. MySQL 5.7+ / MariaDB 10.3+ (InnoDB)
  8. PHP extensions: mysqli, json, mbstring, curl, fileinfo

One-time setup (first time only)

  1. Setup → Modules → activate Distributors & Wholesalers Management.
  2. Setup → Staff → Roles → assign Distributors & Wholesalers Management permissions (view, create, edit, delete, approve, export, settings as needed).
  3. Open Distributors & Wholesalers Management → Settings and complete company defaults, prefixes, integrations, and notification options.
  4. Create master data (warehouses, products, templates, accounts, routes, etc.) before processing live transactions.
  5. Enable BIXCRM cron (php /path/to/bixcrm/index.php cron/index) for sync, retries, alerts, and scheduled jobs.
  6. Optionally enable REST API / webhooks in module settings if you integrate external systems.

BIXCRM Knowledge Base — usage guide generated from module README and documentation.

Did you find this article useful?