Skip to content

Subscriptions

Subscriptions is Lubb ERP's shared billing and provisioning backbone: a common customer → domain → subscription → activation spine that every product line (hosting, domains, IPTV, bulk SMS, fibre/LTE, PBX/voice, number porting) is scoped and provisioned against, plus the monthly Bill Run that turns active subscriptions into invoices. It is used by operations/provisioning staff (processing activations, managing services, cancelling/suspending subscriptions) and by finance staff (running and completing the monthly bill run, emailing/texting invoices).

The same tables are installed on every product site (data, IPTV, bulk-SMS, the tc hub, and the per-ERP sites mm/eldo/vehicledb) so records from different spokes can be scoped, linked and billed the same way, without each spoke owning its own copy of customer/billing logic.

What you can do

  • Browse and edit Subscriptions — the recurring service a customer is billed for (domain/username/line identifier, subscription type, provider reference, quantity, status, live-verified Service Status).
  • Send a Subscription Setup Email (preview or send) with the customer's real credentials — PBX extension/SIP password, hosting control-panel/FTP/mailbox logins, phone numbers — resolved live from the provider when not already captured.
  • Verify Service (single row, selected rows, or "Verify All Active") against the live provider panel (FusionPBX/InterWorx/Cloudflare/Axxess) to catch drift between the billed status and what's actually live.
  • Manage Service, SiteWorx Login and PBX Login — one-click, already-authenticated access into the underlying hosting/voice panel for a subscription.
  • Cancel a subscription (immediate or, from the row action, scheduled to month-end), partially cancel a block quantity (e.g. reduce an airtime/channel count), Disable/Resume a subscription for real on its provider (where a real disable/resume path exists — otherwise the action is held back rather than faking the status).
  • Browse Activations — the provisioning workflow queue (Activation / Deactivation / Suspend records) raised automatically from submitted Sales Invoice lines, and Process them (runs the item's provisioning function, creates/updates the Subscription, sends the confirmation email) individually, in bulk, or combined into one email for several units of the same repeatable package.
  • Reset a stuck activation back to Pending to reprocess it from scratch, and Create Shipment (via The Courier Guy) for activations that require physical delivery.
  • Track number-porting jobs on the Porting Requests board — resend the LOA, cancel, mark provisioned, and download the signed LOA / ID document.
  • Browse Sub Users (reseller-users) — a reseller's own end-user accounts, billed either directly or against their parent reseller — and log in to the Service Portal as one of them.
  • Review Service Domains (subscription-groups) — a materialized customer/reseller ⇒ domain index used as a cross-check for duplicate/split customer records, with each domain's linked subscriptions expandable inline.
  • Run the monthly Bill Run: generate draft invoices for every active subscription, review them, Complete the run (posts every draft to the GL), then Email Invoices and SMS Invoices as two independent, re-runnable send passes.

Common tasks

  1. Activate a newly-sold service Open Activations, find the Pending row raised from the sales invoice line, and click Process. The modal runs the item's provisioning function (e.g. provision_hosting, provision_pbx_extension, provision_domain_name), creates/updates the matching Subscription, and sends the activation confirmation email. Several units of the same repeatable package (airtime top-ups, unlimited channels, mobile extensions, LTE accounts) for one customer can instead be selected and run with Process together (one email), so the customer gets a single combined confirmation.

  2. Send or resend a Subscription Setup Email From Subscriptions, click Subscription Setup Email on the row. It previews the rendered email (customer name, service reference, and live-resolved credentials where applicable — SIP extension/password, hosting panel/FTP/mailbox logins) before sending; re-running it just re-sends the same template with current data.

  3. Cancel or reduce a subscription Click Cancel Subscription on the row (takes effect at month-end, same as the customer portal's self-service cancel) or use bulk Cancel selected for an immediate cancel. For a quantity-based subscription (e.g. airtime blocks), the same modal supports cancelling only part of the quantity instead of the whole row. Cancelling attempts a best-effort deprovision of the upstream service; the local cancel stands either way.

  4. Disable or resume a service Use Disable / Resume (row or bulk) to act on the real provider — PBX extensions/numbers, InterWorx hosting, or Axxess fibre/LTE for disable; fibre (Splynx) for resume today. A subscription type with no real disable/resume path is held back and reported separately, so the local status never claims an action that didn't actually happen on the provider.

  5. Track a number port Once a provision_number_porting activation is processed, its Porting Request row appears on the Porting Requests board. Use Resend LOA to re-send the signed letter of authority, Mark Provisioned once the port is live, or Cancel to abandon it; Download LOA / Download ID Doc retrieve the customer's uploaded documents.

  6. Run and complete the monthly bill run From Bill Run, click Create Bill Run, choose the month, and submit — this raises one draft Sales Invoice per customer (at Customer prices) and one per reseller end-user (at Reseller prices) for every active subscription, deleting and recreating any existing draft run for that month first. Review the drafts via View Drafts, then click the run's Complete button to submit every draft to the GL. Once Completed, use Email Invoices and SMS Invoices independently — each only reaches invoices still missing that channel, so either can be re-clicked safely or run on its own.

Data model

  • Subscription (subscriptions) — the billable unit: customer/reseller-user owner, service identifier (domain_name), catalogue item link, provider reference, quantity, status (active/suspended/cancelled), live-verified service_status, and cached provisioning credentials.
  • Activation (activations) — a provisioning workflow record (Activation/Deactivation/Suspend), one per invoice-line unit, carrying the provision function to run, in-flight form inputs/results, and (for stock items) courier shipment fields.
  • ResellerUser (reseller_users) — a reseller's end-user/sub-account, billed directly or against its parent reseller (an AccCustomer row).
  • PortingRequest (porting_requests) — the number-porting LOA sub-record paired 1:1 with a porting Activation (numbers to port, routing domain/extensions, LOA/ID document paths, per-slot provisioning timestamps).
  • SubscriptionGroup (subscription_groups) — a materialized customer/reseller-user ⇒ domain index (subscription/provider counts, discrepancy notes) used as a duplicate-record cross-check; not itself consulted for live routing decisions.
  • BillRun / Balance (bill_runs, balances) — a billing sweep's header (period, status, invoice count/total, customer-vs-reseller totals) and a per-tenant running balance.

Other modules build directly on this spine rather than owning their own customer/billing tables: IPTV, bulk SMS, hosting/domains and fibre/LTE (Splynx/Axxess) each scope their product-specific rows (lines, numbers, domains) to the same Subscription/Activation/SubscriptionGroup records, and PBX/voice services resolve their routing domain through a subscription's domain_name/portal_domain. The books site (tc) is where Subscriptions get priced (Customer vs Reseller price list) and billed; product-only sites carry the same tables without the accounting/pricing columns being populated.

Configuration & integrations

  • FusionPBX — live extension lookup/credentials for pbx_extension subscriptions (REST API) plus a read-only Postgres connection to read the SIP password.
  • InterWorx (interworx_host1/interworx_host3) — hosting account/FTP/mailbox credential resolution and password resets for hosting subscriptions; also backs the SiteWorx SSO login button.
  • Axxess / Splynx — fibre and LTE provider panels; Splynx is currently the only provider with a real "resume" path wired into the Resume action.
  • The Courier Guy — shipment booking for stock-item activations (Create Shipment).
  • Portal org SMTP (portal_org_smtp) — sends the Subscription Setup Email and bill-run invoice emails through a reseller/portal tenant's own SMTP override when one is configured, falling back to the site default.
  • Branding settings — company name/logo used in activation and setup emails, overridable per reseller.
  • Accounting catalogue (AccItem, price lists) — every activation/subscription resolves its catalogue item for pricing, email templates and the Bill Run's Customer/Reseller price selection; only present on books sites.

API reference

Every grid in this module is generic config-driven CRUD served by the shared grid engine — there are no bespoke REST routes per entity. All paths below sit under /grid.

MethodPathPurpose
GET/grid/subscriptions/dataList/filter/search Subscriptions
POST/grid/subscriptionsCreate a Subscription
PUT/grid/subscriptions/{row_id}Update a Subscription
POST/grid/subscriptions/action/{key}Row/bulk/toolbar action (e.g. subscription_setup_email, verify_service, cancel, disable, resume, manage_service, siteworx_login, pbx_login, axxess_usage)
GET/grid/activations/dataList/filter/search Activations
POST/PUT/grid/activations, /grid/activations/{row_id}Create/update an Activation
POST/grid/activations/action/{key}Row/bulk action (process, process_combined, reset, create_shipment)
GET/grid/porting-requests/dataList Porting Requests
POST/grid/porting-requests/action/{key}resend_loa, cancel, mark_provisioned, download_loa, download_id
GET/grid/reseller-users/dataList Sub Users
POST/PUT/grid/reseller-users, /grid/reseller-users/{row_id}Create/update a Sub User
POST/grid/reseller-users/action/login_as_resellerImpersonate a Sub User into the Service Portal (superuser-only)
GET/grid/subscription-groups/dataList Service Domains, with subscriptions nested master/detail
GET/grid/bill-run/dataList Bill Runs
POST/grid/bill-run/action/processCreate Bill Run — generate/regenerate draft invoices for a period
POST/grid/bill-run/action/completeComplete — submit a run's draft invoices to the GL
POST/grid/bill-run/action/email_invoicesEmail every submitted invoice the run raised that hasn't been emailed yet
POST/grid/bill-run/action/sms_invoicesText the invoice link to every eligible billing party that hasn't been texted yet
GET/grid/{slug}/statsSummary cards for a grid (e.g. Bill Run's customer/reseller/currency split, Subscriptions' active count)

Standard list/create/update/delete verbs follow the same /grid/{slug} pattern for every grid above; row-level buttons not listed as separate handlers (e.g. Activations' view_invoice link) are client-side deep links into other grids rather than API calls.

Lubb ERP Documentation