Solutech Engineering

Autobilling

Solutech Licensing and Billing Automation System

Solutech SAT Autobilling

Welcome to the Autobilling section of Solutech SAT documentation. This section provides an overview of the Autobilling system, which automates the licensing and billing processes for Solutech SAT users.

Solutech Products Licensing

Technical Documentation

Purpose

The purpose of this document is to document how Solutech is going to implement licensing of its products across the board. From Kodie, SAT, KaziTime and any future innovations. Why we are doing this is to avoid the following scenarios:

  1. Having back and forth with the finance team on how much should be billed. We spent a lot of time waiting for customers to approve estimates.
  2. This document will contain up to date information of the any new innovation and their billable details hence information for everyone in the organization
  3. A software license documentation also provides legally binding definitions for the distribution and use of the software. End-user rights, such as installation, warranties, and liabilities, are also often spelled out in the software license, including protection of the developer’s intellectual property.

Solutech Products

Solutech Products refer to any Solutech Innovations. Currently, these are:

  1. Solutech SAT (We need a better name for this)
  2. Kodie
  3. KaziTime
  4. Dukasoft
  5. CRM

Explanation

For any client to use Solutech Products, they will be required to purchase licenses first. The key metrics will be:

  1. Type of Product
  2. Billing Cycle - Daily, Monthly, Bi Monthly, Quarterly, Semi Annually, Annually
  3. Number of Licenses
  4. Amount (Will be pre determined by the sales/finance team and set for that client on the Admin Portal). Solutech might need to pre-define non-negotiable prices in future.

Process Flow

Single Tenant Flow

  1. Client Account is created on Admin Portal.
  2. Client Contact for Finance is added to the created account. The contact has to be per the contact in the blue print document from the project kick off meeting.
  3. These details are synched to Zoho Books and a new account is created. The following fields are required for a new account creation on Zoho Books
  • Company Name
  • Clients Address
  • Clients Tax PIN
  • Currency i.e KES or USD
  • Tax rule i.e. Tax rule for VAT , Zero rated or Exempt
  • Billing Cycle (Monthly, Two Months, Quarterly etc)
  • Credit Term (30 Days, 60 Days etc)
  1. Amount of licenses the client needs are set on the billing account of the client per the explanation above by:
  2. Selecting the product i.e. Solutech SAT
  3. Selecting the product item i.e. Software License
  4. Selecting the license (i.e. Billable, Free)
  5. Selecting the license type (i.e Users, Admins, All Users)
  6. Entering the number of Licenses.
  7. Entering the amount (Per the Sales Contract) as at the time being, various clients have different negotiated rates.
  8. Selecting the billing cycle (i.e Monthly, Quarterly etc)
  9. Selecting the start of the billing period. This will auto populate the client_billing_cycles per the billing cycle. E.g. for a monthly client with a start billing_date of 1st April, this table will be auto populated with the rest of the months in the year.
  10. Once the Licenses information has been fed into the system, a Billing License Email will be sent to the Client Finance Contact, copying Solutech’s Accounts on the details of the licenses.
  11. The license quantities should be pushed to SAT deployment of the client with information about:
  12. Billable Licenses Qty - Licenses which need to be billed. Can be : Admins, Users or All Users
  13. Free Licenses Qty - Licenses issued to client for free (mostly for admins)
  14. Non Billable Licenses Qty - Solutech accounts only
  15. When creating/importing users in SAT, a check should always be made against the allowable licenses and the sub license type (admin, users, all users). Only the permissible licenses should be displayed on SAT i.e if a client only has Billable Licenses, when creating a user, the system should only show option for allocating Billable License. When a Client has run out of Licenses, they won’t be able to create new user accounts on SAT. The system should inform that their Finance Personnel should purchase or requisition the licenses.

Purchasing Additional Licenses

  1. To purchase additional licenses, the Finance Contact Personnel will login to SAT and specify: The number of licenses to purchase per license type. E.g. 5 All Users Licenses

Depending the existing rate for the client, this will compute new additional amount that will be added to the client’s invoicing depending on the billing cycle of the client:

For monthly billing, depending on the date the new licenses are purchased, the total amount will be prorated per the remaining days in the month and added into the current month's billing, to be billed at the end of the month with clear definition of the licenses added and when they were added.

For example, if a client has 10 licenses and on 20th March, they purchase 2 additional licenses, their billing on 1st April will be 10 licenses for 30 days (for April) and 2 licenses for 42 days (20th to 31st March plus 30 days in April). Remember invoices are billed in advance.

For quarterly billing, the above procedure for monthly will be followed and the invoice will be added into the quarterly billing. For quarterly in advance billing, the invoice will be sent immediately to the client. For quarterly after, the invoice will be sent in the next billing cycle.

For annual billing, the above procedure for monthly will be followed but the invoice will be send immediately to the client.

Reducing Number of Licenses

  1. If a client requires to reduce their licenses, the Finance Personnel will login to SAT and deactivate a user(s). The system should indicate how many available licenses are left unused and let the personnel decide if to delete them or leave them. De activating a user does not reduce number of licenses. To reduce number of licenses, after deactivating a user, the license has to be deleted. NB: To see option to delete a license, a user has to be deactivated first. (Alternatively, deleting their license deactivates the user automatically) Once a user is deactivated, they can be:
  2. Re-activated if the license has not been re-used by adding another user.
  3. Else, if license has been used, a user cannot be re-activated, and a license has to be purchased first.

Deleting a license will have no impact on the invoice as the client has already been billed. Licenses have to be deleted before the start of the customer’s billing cycle, otherwise, we will bill based on the licenses a client has on 1st of every month at 8AM EAT.

Proposed Changes

  1. Solutech needs to adopt a multi layered pricing model for monthly, quarterly and annual billing.
  2. Higher pricing for monthly customers, moderate for quarterly customers and cheap for annual customers. e.g.
MonthlyQuarterlySemi AnnuallyAnnually
Price (KES)KES 2,500KES 2,000KES 1750KES 1,500
Price (USD)USD 25USD 20USD 17.5USD 15

Cancelling Subscription

If a customer intends to cancel their subscription of a Solutech product, they can only do so at the end of their current billing cycle. This means that for a monthly customer, they cannot cancel in between the month, quarterly cannot cancel in between a quarter, semi annually cannot canel in between this period of 6 months, yearly cannot cancel in between the year.

Handling Credit Limits

All customers invoice will have 30 days credit limit and all invoices will fall due at the end of the current invoicing month, whichever comes first. This means that for a Feb invoice, it falls due on 28th or 29th.

It is expected that a customer settles their invoice within the credit days and failure to do so will result in the following measures being taken:

Depending on the day they make the payment, their credit days will be reduced per the days the payment surpassed the credit days. For example, for an invoice done on 1st March due on 31st March, and the client pays on 5th April, means that Solutech will have switched off services on 1st April.

Solutech will not issue an invoice on 1st April as the client’s services have been suspended temporarily until a payment is done.

When the payment is done on 5th April, Solutech will restore services and issue an invoice for the remaining days in April

Multi Tenant Flow

  1. For Multi Tenant Clients, the client will create their own account from the respective system. (We will determine if to create an extra subdomain e.g users.solutechapp.com to just allow onboarding of new tenants or whether to do this from admin.
  2. During the onboarding process, the client will be required to enter their details the details of the company including all tax data requirements, the number of licenses they require etc. We can determine if to offer a free trial and the period for such trials. Thereafter, the billing cycle will kick in.
  3. Depending on the name of the company per registration documents, the system will generate a client code. The code generation algorithm needs to be really good to ensure suitable client codes are generated correctly. However, we will need an extra eye to confirm the code before it is allocated to the client and communicated to email.
  4. The confirmation of the client code will be done after the client purchases licenses to begin using the system.

Technical

ADMIN PORTAL TABLES

licenses Fully documented on Jira ✅

This table will hold all the license information to distinguish the different licenses Solutech offers as sometimes we do offer free licenses to customers.

idAuto Increment
categorylicense, amc
nameBillable Licenses Free Licenses Non Billable Licenses AMC Promoters
slugbillable, free, non_billable, amc, promoters
billyes/no
status_idStatus ID from Status Table
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

license_types

Fully documented on Jira ✅

This table will hold info about the types of licenses for the various licenses.

idAuto Increment
nameAdmins Users All Users
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

products Fully documented on Jira ✅

This table will hold all the products information e.g. Solutech SAT, Kodie etc. This is because a client might be being offered multiple products by Solutech with different pricing and license quantities.

idAuto Increment
nameSolutech SAT, Kodie
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

product_items Fully documented on Jira ✅

A product has multiple items like licenses, setup fees, etc, but for now we will depend on the items created in Zoho Books

idAuto Increment
erp_code (Nullable)Line Item Code from Zoho Books
hs_id (Nullable)Product Item HS ID
nameName of Line Item
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

payment_modes Fully documented on Jira ✅

This table will hold all the payment modes.

idAuto Increment
nameCheque, Mpesa, Bank Transfer, etc
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

In future, we might look at having payment aggregators to enable clients make payments directly to us.

taxes Fully documented on Jira ✅

Different countries we serve might impose various taxes on the services we offer to clients in those countries. Hence, this table will contain the tax information of such taxes.

idAuto Increment
erp_code (Nullable, Unique)Tax ID on Zoho Books
name16% Digital Tax
rate16
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

product_items_hs_codes Fully documented on Jira ✅

For non vatable clients, when sending invoice to KRA, we need to define the export services hs code on the invoice if the product item has been tied to a product hs code.

idAuto Increment
tax_idTax ID
codeHS Code
nameZero Rated Services
descriptionZero Tax on Export Services
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

billing_cycles Fully documented on Jira ✅

This will hold the frequency of how clients are billed, i.e. Monthly, Quarterly etc

idAuto Increment
nameMonthly Two Months Quarterly Bi Annually Annually
months1 2 3 6 12
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

credit_terms Fully documented on Jira ✅

Different clients might have various credit terms with Solutech and these will be kept in this table.

idAuto Increment
name30 Days, 60 Days, 90 Days etc.
days30, 60, 90
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

accounts Fully documented on Jira ✅

A client may pay into a specific account maintained by Solutech and this needs to be captured.

idAuto Increment
erp_code (Nullable)Account ID on Zoho Books
nameName
currency_idCurrency ID on Admin
bank_nameBank Name
bank_branchBranch
bank_account_numberAccount Number
bank_codeBank Code
paybill_typeMpesa etc
paybill_number982800
paybill_account_numberSome cases can be different from Account Number
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

currencies Fully documented on Jira ✅

This will hold the details of the currencies Solutech invoices in.

idAuto Increment
erp_code (Nullable)Currency ID on Zoho Books
codeUSD, KES
symbol$, KES
baseTrue, False
nameUnited States Dollar, Kenya Shillings
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

currency_rates Fully documented on Jira ✅

This will hold the details of the exchange rates of the currencies

idAuto Increment
base_currency_idBase Currency ID
exchange_currency_idThe Currency being exchanged
rate140
dateDate (Unique for the specific day)
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

tax_devices Fully documented on Jira ✅

This will hold the details of the TIMS device.

idAuto Increment
nameTevin Device
typeTevin, Aclas (Dropdown)
ip_addressIP Address of the Device
sender_idSender ID of the Device
serial_numberSerial Number of the Device
port_numberPort Number of the Device
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

subscription_types Fully documented on Jira ✅

This table will differentiate subscription types because of training purposes and go live.

idAuto Increment
nameName
slug
status_idStatus ID
created_at, updated_at, deleted_at

integrations Fully documented on Jira ✅

This will hold the details of the Integrations Service.

idAuto Increment
nameIntegration Service e.g. Zoho Books
slugerp
client_idOauth Client ID
client_secretOauth Client Secret
oauth_urlOauth URL
redirect_urlRedirect URL
status_idStatus ID (Active, Inactive)
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

integration_details Fully documented on Jira ✅

This will hold the details of the Integrations Service for token management.

idAuto Increment
integration_idIntegration ID
access_tokenAccess Token generated by the service
refresh_tokenRefresh Token for generating new token when existing one expires
expires_inTime in seconds when the token expires
expired_atDate when the token expired/will expire
status_idStatus ID (Active, Inactive)
created_at, updated_at, deleted_at

tbl_clients_configurations Fully documented on Jira ✅

New additions to clients table.

tax_idTax ID
credit_term_idThis will determine when the invoice falls due. If invoice is not settled by this date, the client will be unable to use the system.
billing_cycle_idBilling Cycle ID
addressThe billing address
postal_code (Nullable)The postal code
city (Nullable)City
sync_to_erpYes, No (To prevent demo clients in Zoho)
erp_code (Nullable)Customer ID from Zoho Books
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP

tbl_users Fully documented on Jira ✅

New additions to users table.

When a new user is added, the following should be done: If they are of contact type - solutech_account (check using slug), create an entry in client_users for all active clients with sync_to_solutech as Yes so that the user can be synced to all clients.

erp_code (Nullable)Contact ID from Zoho Books
contact_type_id (Nullable)Contact Type ID
sync_to_erpYes, No
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP

contact_types Fully documented on Jira ✅

New table to cater for contact types. This is not to be confused with user types (Admin, Supervisor, User)

idAuto Increment
nameBilling, Super Admin, Solutech Account
slugbilling, super_admin, solutech_account
status_idStatus ID
created_by
updated_by (Nullable)
created_at, updated_at, deleted_at

countries Fully documented on Jira ✅

New additions to countries table.

tax_authorityName of Tax Authority in each country
updated_by (Nullable)User ID

client_contacts Fully documented on Jira ✅

The contacts of each client.

When a new client contact is added, the following should be done, create an entry into client_users as well with sync_to_solutech as Yes so that the contact can be synced to SAT of that specific client.

idAuto Increment
erp_code (Nullable)Client Contact ID in ERP
client_idClient ID
user_idUser ID
user_type_idUser Type ID
contact_type_idContact Type ID
erp_sync_statusYes, No
erp_sync_timeTime synced to ERP
solutech_sync_statusYes, No
solutech_sync_timeTime synced to Solutech System
status_idStatus ID (Active, Inactive)
created_by
updated_by (Nullable)
created_at, updated_at, deleted_at

email_logs Fully documented on Jira ✅

This table will log all communications sent from the system.

idAuto Increment
user_idUser ID (Nullable)
typeinvoice, payments etc
email_addressIncase an email address is entered manually
subjectSubject of the email
descriptionBody of the email
created_at, updated_at, deleted_at

client_subscriptions Fully documented on Jira ✅

This will track which product each client is subscribed to and their billing cycle. If a client’s subscription changes, we unsubscribe the current subscription and create a new record with the new changes. Subsequently, we end the current client licenses and create a new record and update the client_licenses_history accordingly.

idAuto Increment
client_idClient ID
solutech_id (Nullable)Solutech System ID
product_idProduct ID
product_item_idProduct Item ID
currency_idSince we invoice in KES and USD for international clients, we need to keep a track of this in the subscriptions table. In future, we might decide to invoice in a single currency, hence this is important.
date_subscribedDate the client’s subscription starts
discount_total (Nullable)Discount issued to client
discount_percent (Nullable)Discount issued to client
date_unsubscribed (Nullable)Date the client’s subscription ends
reason_unsubscribed (Nullable)
created_byThe user who created the subscription
updated_by (Nullable)The user who updated the subscription
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID
created_at, updated_at, deleted_at

client_licenses Fully documented on Jira ✅

To keep track of the quantities for each license for the various subscriptions, we create the client_licenses table. If the quantities change, we update the quantities accordingly and create a new record in \ table. Subsequently, we create a new invoice per the existing subscription billing cycle with the new line items.

idAuto Increment
client_idClient ID
solutech_id (Nullable)Solutech System ID
subscription_idSubscription ID
license_idLicense ID
license_type_idLicense Type ID
quantityThe number of licenses for the subscribed product and type of license
rateThe rate per the license. (This was removed from client_subscriptions because a client can have different licenses with different rates)
rate_typeper_month, per_day
start_dateStart date of the license (Available Only For Promoters)
end_dateEnd date/Expiry date of the license (Available Only For Promoters)
created_byUser ID
updated_by (Nullable)User ID
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID
created_at, updated_at, deleted_at

client_licenses_history Fully documented on Jira ✅

When a client adds new licenses or reduces them, we need to keep track of these changes. We will add this information in this table to preserve the history of the changes.

idAuto Increment
client_idClient ID
solutech_id (Nullable)Solutech System ID
subscription_idThe existing Subscription ID
client_license_idClient License ID
license_type_idLicense Type ID
current_qtyThe existing number of licenses
added_qty (Nullable)Any added licenses
removed_qty (Nullable)Any removed licenses
final_qtyThe final tally of licenses to be invoiced in the next billing cycle.
rateIncase the rate changes
rate_typeper_month, per_day
start_dateStart date of the license (Available Only For Promoters)
end_dateEnd date/Expiry date of the license (Available Only For Promoters)
change_date (Nullable)Date when the licenses were changed
created_byUser ID
updated_by (Nullable)
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID
created_at, updated_at, deleted_at

client_license_days Fully documented on Jira ✅

To keep track of the days a promoter license should be active.

idAuto Increment
client_license_idClient License ID
solutech_id (Nullable)Solutech ID
dayList of all the license weekdays applicable for promoters. I.e Monday, Tuesday e.t.c This will be used to generate the total number of billable days between the start and the end date, and the days the license should be active.
created_byUser ID
updated_byUser ID
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID
created_at, updated_at, deleted_at

client_billing_cycles Fully documented on Jira ✅

This table will contain information about billing cycles for the purposes of generating invoices through a scheduler. These cycles should always be generated at the start of the year for the entire year. If a client cancels their subscription, the remaining cycles from the date of cancellation should be disabled so that the client is not invoiced.

First, the cron should check the client’s billing cycle, if monthly, run each month If Quarterly, run at the start of the quarter If Semi-Annually, run at the start of Jan and June If Annually, run on 1st Jan.

idAuto Increment
client_idClient ID
subscription_idSubscription ID
billing_cycle_idBilling Cycle ID
billing_dateThe date we expect to bill the client
daysThe number of days to invoice
invoice_date (Nullable)The date the invoice was generated
sent_statusYes,No
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

invoice_reminders Fully documented on Jira ✅

idAuto Increment
name1st Reminder
email_template_idSelect email template for this invoice reminder
typeBefore_due_date, on_due_date, after_due_date, before_next_billing_cycle
daysDays before creation/dispatch of the invoice reminder
credit_term_idSelect the credit term to match the client
banner_message (optional)Invoice Banner Message
banner_color (optional)Warning, danger, info, success
send_email_reminder (true by default)Boolean, if set to true, it sends the email reminder to the contacts users
is_countdown (optional)Boolean, if set to true, the reminder works as a countdown banner
product_item_id (optional)Select the product Item that when set, will generate an invoice reminder based on the product item, i.e System setup
countdown_days (optional)Initial countdown days
status_idStatus ID (Active, Inactive)
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

invoices Fully documented on Jira ✅

This table will contain information about all invoices generated for clients per their billing cycle.

idAuto Increment
client_idClient ID
invoice_numberUnique number generated by Solutech
doc_idDocument ID
erp_codeUnique code generated by Zoho Books
solutech_id (Nullable)Solutech ID
tax_invoice_numberUnique number generated by KRA
emailThe email to where the invoice is emailed
phonePhone number of the finance personnel
nameThe name of the invoice
currency_idThe currency in which the invoice is invoiced in
addressThe billing address of the client
city (Nullable)
postal_code (Nullable)
invoice_dateThe date the invoice is generated, which should be in line with the billing period
sub_totalQty X Unit Price
tax_totalTotal tax amount if any
discount_total (Nullable)Total discount issued if any
discount_percent (Nullable)Discount percentage if any
gross_totalSub Total - Discount + Tax Amount
due_dateWhen the invoice is due, per the subscription plan. This is calculated per the credit terms. Consideration for Feb as 1 Month is not necessarily 30 Days.
sent_date (Nullable)The date the invoice was sent to the customer. Because an invoice can be generated before billing cycle due to additions/removals of licenses.
tax_qr_code (Nullable)QR Code generated by KRA TIMS device
tax_response (Nullable)Tax response
tax_sync_time (Nullable)The time the invoice was synced to KRA
tax_device (Nullable)Device used to sync the invoice
reminders (Nullable)Number of reminders sent (Default 0)
erp_sync_statusYes, No
erp_sync_time (Nullable)Time the invoice is synced to ERP
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID (Draft, Partially Paid, Fully Paid, Unpaid)
created_at, updated_at, deleted_at

invoice_items Fully documented on Jira ✅

This table will contain information about all invoices generated for clients per their billing periods.

idAuto Increment
invoice_idInvoice ID
client_license_idClient License ID (To keep a track of the product and license which was invoiced)
qtyTotal number of licenses
unit_priceThe rate from the subscription table
sub_totalQty X Unit Price
tax_totalTotal tax amount if any
discount_total (Nullable)Total discount issued if any
discount_percent (Nullable)Discount percentage if any
gross_totalSub Total - Discount + Tax Amount
descriptionNarration of the invoice items e.g. 2 new licenses added on 10th March 2023
status_idStatus ID
invoice_item_type[Upgrade, main] this is used in SAT to display or hide the banner
created_at, updated_at, deleted_at

client_invoice_reminders

Fully documented on Jira ✅

idAuto Increment
client_idClient ID
invoice_idInvoice ID
reminder_idReminder ID
dateDate when reminder was done
status_idActive, Inactive
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

payments Fully documented on Jira ✅

When a client makes a payment, we need to capture this information to keep track of unpaid invoices. Once a client makes a full payment, we update the invoice accordingly.

idAuto Increment
client_idClient ID
invoice_idInvoice ID
erp_code (Nullable)Unique code generated by Zoho Books
solutech_id (Nullable)Solutech System ID
amountThe invoiced amount
amount_paidTo keep track of partial payments
payment_mode_idPayment Mode ID
account_idAccount ID
date_paidThe date the invoice was paid
referencePayment transaction number
payer_name (Nullable)Name of who made payment
payer_email (Nullable)Email of who made payment
payer_phone (Nullable)Phone number of who made payment
receipt_date (Nullable)Date when the receipt was generated
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
created_at, updated_at, deleted_at

receipts

Fully documented on Jira ✅

idAuto Increment
client_idClient ID
payment_idPayment ID
doc_idDocument ID from documents table
erp_code (Nullable)Unique code generated by Zoho Books
solutech_id (Nullable)Solutech System ID
referencePayment transaction number
sent_dateThe date the receipt was sent to recipients (payer_email and contact person)
erp_sync_statusYes, No
erp_sync_time (Nullable)Time of syncing to ERP
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID
created_at, updated_at, deleted_at

documents

Fully documented on Jira ✅

This table will keep a track of all uploaded documents - invoices, receipts

idAuto Increment
referenceUnique reference for updating the document on cloud
pathDocument ID from documents table
nameInvoice, Receipt
status_idStatus ID
created_at, updated_at, deleted_at

email_templates

Fully documented on Jira ✅

This table will maintain the data of email templates to ensure there is uniforming of system communication.

idAuto Increment
nameInvoice Notification
slugnew_invoice
subjectNew Invoice ##Invoice_Number## from Solutech Limited
bodyThe body of the email
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

email_users

Fully documented on Jira ✅

This table will maintain the data of email users to determine who should receive which email communication.

idAuto Increment
user_idUser ID
email_template_idEmail Template ID
status_idStatus ID
created_byUser ID
updated_by (Nullable)User ID
created_at, updated_at, deleted_at

client_users Fully documented on Jira ✅

When a new account is created, it should be synced to all client deployments.

Modify the existing client_users table to add the following columns

sat_idAlready Exists (Rename to solutech_id). Make it Nullable.
sync_to_solutechYes, No
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_idStatus ID
created_at, updated_at, deleted_at

Clients, Accounts and Sub Accounts

Rename current tbl_client_configuration to accounts

tbl_client_configurationtbl_client_configuration
clientsclient_accountsclient_accountssub_accountsKey
ididididClients
category_idclient_nameclient_idaccount_idAccounts
erp_codeclient_codenamecountry_idSub Accounts
country_idaccount_manager_idurlcluster_idDropped
tax_idcategory_idclient_oauth_idmanager_id
currency_idclient_urlclient_oauth_secretclient_code
credit_term_idclient_typesync_modulessat_code
sector_idclient_idsync_languagesname
typeclient_secretsync_translation_labelsapp_icon
logo_image_idsync_modulessync_translationslogo_image_id
namesync_languagessync_schedulesdocument_image_id
tax_authority_pinsync_translation_labelssync_frequencysprimary_color
tax_numbersync_translationsapi_keyaccent_color
addresssync_schedulessolutech_sync_statuscontrast_color
postal_codesync_frequencyssolutech_sync_timesplash_icon_size
citysector_idcreated_atlogin_icon_size
sync_to_erpcluster_idupdated_atsolutech_sync_status
erp_sync_statusapi_keydeleted_atsolutech_sync_time
erp_sync_timeapp_iconcreated_at
status_idimage_idupdated_at
created_atdatabase_namedeleted_at
updated_atprimary_color
deleted_ataccent_color
contrast_color
splash_icon_size
login_icon_size
dukasoft_icon
status
tax_id
erp_code
erp_sync_status
erp_sync_time
tax_number
address
postal_code
city
country_id
currency_id
sync_to_erp
tax_authority_pin
created_at
updated_at
deleted_at
credit_term_id

Clients

Create table called clients

Fully documented on Jira ✅

idAuto Increment
solutech_id (Nullable)Solutech System ID
category_idCategory ID
erp_codeERP Code
country_idCountry ID
tax_idTax ID
currency_idCurrency ID
credit_term_idCredit Term ID
sector_idSector ID
type_idType ID
logo_image_idLogo Image
nameName of Client
tax_authority_pinTax PIN
tax_numberTax Number
addressAddress
postal_codePostal Code
cityAddress City
sync_to_erpYes, No
erp_sync_statusYes, No
erp_sync_timeTimestamp
solutech_sync_statusYes, No
solutech_sync_timeSync Timestamp
status_idStatus ID
created_at, updated_at, deleted_at

Client Accounts

Rename tbl_client_configuration to client_accounts

Fully documented on Jira ✅

idAuto Increment
solutech_id (Nullable)Solutech System ID
client_idClient ID
nameAccount Name
urlOauth URL
client_oauth_idClient Oauth ID
client_oauth_secretClient Oauth Secret
sync_modulesBoolean (True, False - 1, 0)
sync_languagesBoolean (True, False - 1, 0)
sync_translation_labelsBoolean (True, False - 1, 0)
sync_translationsBoolean (True, False - 1, 0)
sync_schedulesBoolean (True, False - 1, 0)
sync_frequencysBoolean (True, False - 1, 0)
api_keyAPI Key
solutech_sync_statusYes, No
solutech_sync_timeSync Timestamp
status_idStatus ID
created_at, updated_at, deleted_at

Sub Accounts

Create a table called client_sub_accounts

Fully documented on Jira ✅

idAuto Increment
solutech_id (Nullable)Solutech System ID
sat_id (Nullable)
account_idAccount ID
country_idCountry ID
cluster_idCluster ID
manager_idManager ID
client_codeClient Code
solutech_codeSolutech Code
nameSub Account Name
app_iconApp Icon
logo_image_idLogo Image ID
document_image_idDocument Image ID
primary_colorPrimary Colour
accent_colorAccent Colour
contrast_colorContrast Colour
splash_icon_sizeSplash Icon Size
login_icon_sizeLogin Icon Size
solutech_sync_statusSync Status
solutech_sync_timeSync Timestamp
created_at, updated_at, deleted_at

credit_notes Fully documented on Jira ✅

This table will contain information about credit notes on SAT Admin.

idAuto Increment
client_idClient ID
invoice_idInvoice ID
product_item_idProduct Item
credit_note_numberUnique number generated by Solutech
doc_idDocument ID
erp_codeZoho Books Credit Note ID
erp_credit_note_numberZoho Books Credit Note Number
solutech_id (Nullable)Solutech ID
tax_number (Nullable)Unique number generated by KRA
email (Nullable)The email to where the credit note is emailed
phonePhone number of the finance personnel
nameThe name of the credit note
currency_idCurrency
tax_idTax ID
addressThe billing address of the client
city (Nullable)
postal_code (Nullable)
sub_totalQty X Unit Price
discount_totalTotal Discount
tax_totalTotal tax amount if any
gross_totalSub Total - Discount + Tax Amount
balance
sent_date (Nullable)The date the invoice was sent to the customer. Because an invoice can be generated before billing cycle due to additions/removals of licenses.
tax_qr_code (Nullable)QR Code generated by KRA TIMS device
tax_response (Nullable)Tax response
tax_sync_time (Nullable)The time the invoice was synced to KRA
tax_device (Nullable)Device used to sync the invoice
erp_sync_statusYes, No
erp_sync_time (Nullable)Time the invoice is synced to ERP
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
is_emailedTrue, False
status_idStatus ID (Draft, Partially Paid, Fully Paid, Unpaid)
created_timeZoho Books timestamp the credit note was generated
updated_timeZoho Books timestamp the credit note was updated
created_at, updated_at, deleted_at

credit_note_items Fully documented on Jira ✅

This table will contain information about credit note line items.

idAuto Increment
credit_note_idCredit Note ID
account_id
name
qtyTotal number of product items
unit_priceThe rate from the subscription table
sub_totalQty X Unit Price
discount_totalTotal Discount
tax_totalTotal tax amount if any
gross_totalSub Total - Discount + Tax Amount
descriptionNarration of the credit note
status_idStatus ID
created_at, updated_at, deleted_at

Over Payments

Add bank_charges, refund_amount to payments table

When a customer makes a payment, insert into customer statement and customer statement items accordingly

customer_statements Fully documented on Jira ✅

Create a table called customer_statements to hold customer statement information.

idAuto Increment
client_idClient ID
solutech_id (Nullable)Solutech System ID
currency_idCurrency ID of the transaction
opening_balanceOpening Balance
transaction_idTransaction ID for the type_slug
type_sluginvoice, tax, payment, credit_note
amountAmount
closing_balanceClosing Balance
created_timeTransaction Timestamp
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Timestamp of syncing to Solutech System
descriptionNotes
status_idStatus ID
created_at, updated_at, deleted_at

Creating Invoices and Credit Notes on Admin

Invoices

Create invoice from having a Create Invoice button from Clients, or from Invoices Page

If from Clients Page, no need to select the Client, should be auto selected.

Create Invoice by entering the following fields:

  • Select Client
  • Select Client Account (Limit by clients)
  • Select Invoice Date
  • Select the Credit Terms and display the due date based on the Credit Terms

Have functionality to add multiple line items by:

Select the Product Item by either selecting or search selecting

  • Enter the Quantity
  • Enter the Rate
  • Select the Tax Rate

Have ability to delete a line item

Calculate the total amount on the fly and display it on the screen

After entering the line items, have the ability to specify the discount (if any)

The discount can be as a % or as an amount.

Add a field for adjustment (both positive and negative).

Then calculate the Sub Total, Tax Amount and Gross Total

Specify the Terms and Conditions

Have ability to save the invoice as:

  • Save as Draft or
  • Save and Send or (Send to Contact Persons)

If Saved as Draft, have ability to update the status of the invoice to Pending

If Save and Send, save status as Pending then

  • Sync the invoice to KRA TIMS
  • Sync the invoice to Zoho Books
  • Send the invoice to the contact persons per the email template

Credit Notes

Create Credit Noted from having a Create Credit Note button from Invoices, or from Credit Notes Page

If from Invoices Page, no need to select the Client, should be auto selected

Create Credit Note by entering the following fields:

  • Select Invoice
  • Prepoulate the Client/Customer field based on the invoice
  • Select Credit Note Date

Pre populate the line items with what is on the invoice already.

Allow the user to be able to update the quantities with the following validations:

  • Quantity cannot be updated upwards. Can only be same or less but not zero.
  • Tax rate should not change.

Calculate the updated total amount on the fly and display it on the screen

Then calculate the Sub Total, Tax Amount and Gross Total

Specify the Terms and Conditions

Have ability to save the invoice as:

  • Save as Draft or
  • Save as Open

If Saved as Draft, have ability to update the status of the Credit Note to Open

If Save as Open:

  • Sync the credit note to KRA TIMS
  • Sync the credit note to Zoho Books
  • Update the credit note on Admin with the erp_code and erp_credit_note_number from Zoho Books
  • Send the credit note to the contact persons per the email template
  • Sync the credit note to SAT

SAT TABLES

On SAT, we need visibility of the following:

  1. Ability of the configured Finance Admin to view licenses and history.
  2. Ability for Finance Admin to add new licenses.
  3. Ability for admins who can add users to add users based on the available licenses for that user category.
  4. Ability for admins who can add users to delete licenses. (Deleted licenses will not be refunded, but the change will be reflected in the next billing invoice. Such change of licenses has to be done before the billing/invoice date 8:00 AM EAT).

Working Methodology

Licenses Management

  1. Once licenses are created on Admin, they will be synced to the specific clients deployment.
  2. On SAT Admin, we will generate license keys per the number of the licenses issued. I.e. if 5 licenses are issued, generate random numbers concatenated with the clients Code. E.g. A59D-E89H-I4KL, AB14-KL8D-M4P8 etc
  3. When a new license is created, we will add a new license key.
  4. When licenses are removed, we will deactivate a subsequent number of license keys which were removed.
  5. To add new licenses, the system will display current licenses, then the admin can specify how many licenses they want to add, and the system will indicate how many total licenses they will have.
  6. Then they will get an estimate of their next months billing, broken down by with the changes.
  7. Then if they are okay, they can submit.
  8. The changes will be inserted in licenses and license_history tables accordingly.
  9. Then we will generate new license keys per the number of new licenses added (after activating any unallocated license keys).
  10. This will then sync to SAT Admin (Can be a separate scheduler).
  11. Then the client can now add users.

Users Management

  1. When a new user is added in Solutech SAT, an unused license key will be picked from the license_keys table, assigned to a user in users table, then marked as allocated in license_keys table.
  2. When a user is deactivated, their license key will be un allocated.
  3. If a license is unallocated, it can be removed (Made Inactive), which will reduce the clients licenses instantly, and this change will reflect in the next billing cycle.
  4. If a user needs to be re-activated, they can only be re-activated if there is an unallocated license key (Active). If not, the system should not allow them to be re-activated.
  5. If a user needs to be added and there are no licenses, the system should not allow them to add the user.
  6. The finance admin should first request for new licenses.

Contacts Management

When a contact is added in Admin for that client, we should create the user per the respective client in SAT.

The Process:

Adding New User
1Check if client has multiple license types
2If multiple, User has to select user type, then, check if there is Un Allocated and Active License for that user type
3If not multiple, check if there is Un Allocated and Active License
4If No, deny user addition
5If Yes, allow user addition
Deactivating User
1A user can be deactivated
2Remove the license from users table
3Set the license key as un allocated in license_keys table
Reactivating User
1Same follow procedure for adding new user
Adding New Licenses
1Display current licenses
2Allow Admin to specify how many new licenses they will need. If they have multiple licenses, specify which ones they are adding per category
3Calculate the new licenses and rates and display them to user Factor in any discounts Give breakdown per the billing cycle of the client
4User submits the application
5Update the record in licenses table (change keys_generated to No)
6Insert license_history table accordingly
7In license_keys, if there were unallocated inactive keys, activate them depending on number of added licenses, and create new ones if necessary.
8Submit the data to SAT Admin
9In SAT Admin, Update the record in client_licenses table
10Insert client_licenses_history table accordingly
11Create draft invoice and insert into invoice and invoice_items accordingly
License Key Algorithm
1Generate a unique key of 12 characters chunked into 3s of 4 characters, separated by a dash
2Check if it exists in the database
3If Yes, Store it and generate the next
4If No, generate another one

tbl_users

Add license_key_id to keep track of license allocated to a user

Add contact_type to keep track of Billing, Super Admin. Super Admin should have overall system administration not limited to roles.

license_key_idLicense Key ID
is_suspendedThe column is a boolean which is set to true when a user is suspended due to payment

user_types Modify the table to add solutech_id (Nullable)

We will use this column to reference the type of licenses a client has to determine if the client has enough licenses to add users or not.

license_subscriptions Fully documented on Jira ✅

idAuto Increment
erp_codeAdmin ID
product_nameProduct name (Solutech SAT)
product_item_nameProduct Item name (Solutech SAT License)
currencyCurrency name (KES, USD) etc
date_subscribedDate the client’s subscription starts
billing_cycleMonthly, Bi Monthly, Quarterly, Annual
discount_total (Nullable)Discount issued to client
discount_percent (Nullable)Discount issued to client
date_unsubscribed (Nullable)Date the client’s subscription ends
reason_unsubscribed (Nullable)
created_byThe user who created the subscription
updated_by (Nullable)The user who updated the subscription
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
status_nameStatus
created_at, updated_at, deleted_at

licenses Fully documented on Jira ✅

This table will maintain the data of licenses a client is entitled to at any given time.

idAuto Increment
erp_code (Nullable)
subscription_idLicense Subscription ID on SAT
company_erp_codeThe company erp_code on SAT referencing the sub account code on Admin
type_nameAdmins, Users, All Users
nameBillable Free Non Billable
slugbillable, free, non_billable
quantityNumber of Licenses
rateThe rate the customer is billed
rate_typePer Month, Per Day
currencyName of currency (KES, USD)
keys_generatedYes, No
erp_sync_statusY,N
erp_sync_timeTime of Syncing to Solutech Admin
erp_sync_responseSync response from Solutech Admin
status_nameStatus of the License
start_date (Nullable)Start date of the license if available(For promoters)
end_date (Nullable)End date of the license if available(For Training and promoters)
created_by_nameName of user on SAT Admin
updated_by_name (Nullable)Name of user on SAT Admin
created_at, updated_at, deleted_at

licenses_history Fully documented on Jira ✅

This table will maintain the data of licenses history so that the client can check any changes on their deployment.

idAuto Increment
license_idLicense ID
erp_code (Nullable)
type_nameAdmins, Users, All Users
nameBillable Free Non Billable
current_qtyCurrent number of licenses
added_qty (Nullable)Number of licenses added (if any)
removed_qty (Nullable)Number of licenses removed (if any)
final_qtyFinal number of licenses
change_dateThe date the change occured
rateTo track rate rate changes
rate_typePer Day , Per Month
currencyName of the currency (KES, USD)
start_date (Nullable)Start date of the license if available(For promoters)
end_date (Nullable)End date of the license if available(For Training and promoters)
created_by_nameName of user
updated_by_name (Nullable)Name of user
created_at, updated_at, deleted_at

license_days Fully documented on Jira ✅

This table will maintain the data of license days for promoters license type..

idAuto Increment
license_idLicense ID on SAT
erp_codeID of the record on SAT Admin
dayApplicable for promoters. The days they are allowed to use Solutech SAT
created_at, updated_at, deleted_at

license_keys Fully documented on Jira ✅

This table will maintain the data of licenses a client is entitled to at any given time.

idAuto Increment
license_idLicense ID on SAT
keyGenerated License Key
allocatedYes, No
expiry_date (Nullable)The date the key will expire
statusActive, Inactive
created_at, updated_at, deleted_at

license_keys_history Fully documented on Jira ✅

This table will maintain the history of license keys assigned to users at any given time and their expiration date.

idAuto Increment
license_key_idLicense Key ID on SAT
user_id (Nullable)Generated License Key
expiry_dateThe date key expired
created_at, updated_at, deleted_at

license_invoices Fully documented on Jira ✅

This table will maintain the data of licenses history so that the client can check any changes on their deployment.

idAuto Increment
invoice_numberUnique number generated by Admin
erp_codeUnique code generated by Zoho Books
tax_invoice_numberUnique number generated by KRA
nameThe name of the invoice
currencyThe name currency in which the invoice is invoiced in
invoice_dateThe date the invoice is generated, which should be in line with the billing period
doc_pathDocument path
sub_totalQty X Unit Price
tax_totalTotal tax amount if any
discount_total (Nullable)Total discount issued if any
discount_percent (Nullable)Discount percentage if any
gross_totalSub Total - Discount + Tax Amount
due_dateWhen the invoice is due, per the subscription plan. This is calculated per the credit terms. Consideration for Feb as 1 Month is not necessarily 30 Days.
sent_date (Nullable)The date the invoice was sent to the customer. Because an invoice can be generated before billing cycle due to additions/removals of licenses.
tax_qr_code (Nullable)QR Code generated by KRA TIMS device
tax_response (Nullable)Tax response
tax_sync_time (Nullable)The time the invoice was synced to KRA
tax_device (Nullable)Device used to sync the invoice
reminders (Nullable)Number of reminders sent (Default 0)
invoice_statusDraft, Partially Paid, Fully Paid, Unpaid
payment_statusPaid, Partially Paid, Unpaid
created_at, updated_at, deleted_at

license_invoice_items Fully documented on Jira ✅

This table will contain information of invoiced items.

idAuto Increment
invoice_idInvoice ID from SAT
license_idLicense ID (To keep a track of the product and license which was invoiced)
organization_erp_codeThe organization which the invoice items belongs to
typeMain or Upgrade
qtyTotal number of licenses
unit_priceThe rate from the subscription table
sub_totalQty X Unit Price
tax_totalTotal tax amount if any
discount_total (Nullable)Total discount issued if any
discount_percent (Nullable)Discount percentage if any
gross_totalSub Total - Discount + Tax Amount
descriptionNarration of the invoice items e.g. 2 new licenses added on 10th March 2023
created_at, updated_at, deleted_at

license_payments Fully documented on Jira ✅

Payments information from all tables.

idAuto Increment
invoice_idInvoice ID from SAT
erp_codeUnique code generated by Zoho Books
amountThe invoiced amount
amount_paidTo keep track of partial payments
currencyCurrency Name
payment_modePayment Mode
date_paidThe date the invoice was paid
referencePayment transaction number
payer_name (Nullable)Name of who made payment
payer_email (Nullable)Email of who made payment
payer_phone (Nullable)Phone number of who made payment
receipt_date (Nullable)Date when the receipt was generated
doc_pathDocument path
statusStatus
created_at, updated_at, deleted_at

Demo Users

There will be no provision for demo accounts once the billing system is operationalised. Therefore no functionality will be developed to cater for demo users.

Separation of Users and Support Accounts

With the introduction of a super admin, we need to limit the super admin to only view their users (Client users).

Therefore, System Users should be separated and a new menu for Support Accounts introduced. System users should contain all billable and free users. Support Accounts should contain non billable accounts which is Solutech users.

Companies

Fully documented on Jira ✅

Companies Changes on SAT

Rename product_company table to companies

Add the following columns

client_codeClient Codes per the Sub Account on Admin Portal
erp_codeUnique Code Shared for Admin Portal
image_urlImage URL
erp_sync_statusYes, No
erp_sync_timeTimestamp of sync to/from Admin Portal

Amend the Companies CRUD to persist the above data with the following validations:

  1. Client Codes have to be unique (on creation and update as well)
  2. You cannot deactivate/delete a company which has products or brands or users attached to it.
  3. Once client Code and ERP Code have been set, they cannot be modified. They can only be modified by a re-sync of new data from Admin.

license_credit_notes Fully documented on Jira ✅

This table will contain information about credit notes on SAT.

idAuto Increment
invoice_idInvoice ID on SAT
credit_note_numberUnique number generated by Solutech
doc_pathDocument Path URL
erp_codeZoho Books Credit Note ID
erp_credit_note_numberZoho Books Credit Note Number
tax_number (Nullable)Unique number generated by KRA
emailThe email to where the credit note is emailed
phonePhone number of the finance personnel
nameThe name of the credit note
currency_nameCurrency
tax_nameTax
addressThe billing address of the client
city (Nullable)
postal_code (Nullable)
sub_totalQty X Unit Price
discount_totalTotal Discount
tax_totalTotal tax amount if any
gross_totalSub Total - Discount + Tax Amount
balance
sent_date (Nullable)The date the invoice was sent to the customer. Because an invoice can be generated before billing cycle due to additions/removals of licenses.
tax_qr_code (Nullable)QR Code generated by KRA TIMS device
tax_response (Nullable)Tax response
tax_sync_time (Nullable)The time the invoice was synced to KRA
tax_device (Nullable)Device used to sync the invoice
erp_sync_statusYes, No
erp_sync_time (Nullable)Time the invoice is synced to ERP
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Time of syncing to Solutech System
is_emailedTrue, False
status_name(Draft, Partially Paid, Fully Paid, Unpaid)
created_timeZoho Books timestamp the credit note was generated
updated_timeZoho Books timestamp the credit note was updated
created_at, updated_at, deleted_at

credit_note_items Fully documented on Jira ✅

This table will contain information about credit note line items.

idAuto Increment
license_credit_note_idCredit Note ID on SAT
account_name
name
qtyTotal number of product items
unit_priceThe rate from the subscription table
sub_totalQty X Unit Price
discount_totalTotal Discount
tax_totalTotal tax amount if any
gross_totalSub Total - Discount + Tax Amount
descriptionNarration of the credit note
status_nameStatus Name
created_at, updated_at, deleted_at

Over Payments

Add bank_charges, refund_amount to payments table

license_customer_statements Fully documented on Jira ✅

Create a table called license_customer_statements to hold customer statement information.

idAuto Increment
erp_codeAdmin ID
currency_nameCurrency Name
opening_balanceOpening Balance
closing_balanceClosing Balance
created_timeTransaction Timestamp
solutech_sync_statusYes, No
solutech_sync_time (Nullable)Timestamp of syncing to Solutech System
descriptionNotes
status_nameStatus Name
created_at, updated_at, deleted_at

license_customer_statement_items Fully documented on Jira ✅

Create a table called customer_statement_items.

idAuto Increment
statement_idCustomer Statement ID from SAT
transaction_idTransaction ID for the type_slug from SAT
type_sluginvoice, payment, credit_note
amountAmount
descriptionNotes
status_nameStatus Name
created_at, updated_at, deleted_at

Are there scenarios where we do refund customers?

Upgrade Invoicing

Banner

Suspension

Manage Users - Licenses / Unlicensed

EMAIL TEMPLATES

Billing Subscription Email Template

Subject: Product Name Subscription Details

Dear [User Name], (Should be the name of the billing users)

[Client Name] [main/training] subscription for [Product Name] has been successfully created. Below you will find all the key information about your subscription.

Subscription Details:

  • Product: [Product Name]

  • Item: [Product Item Name]

  • Start Date: [Start Date]

  • End Date: [End Date] - Displayed if the Subscription is training or promoters.

  • Billing Cycle: [Monthly/Annual]

License Details:

12 All Users Licenses @ KES 4,000.00 Per User Per Month

Support:

For assistance or subscription changes, reach us at +(254) 795462921 | +(254) 742650893 Thank you for trusting [Product] for your journey ahead. Here’s to making data-driven decisions.

Best regards,

Finance Team

Invoice Email Template

Subject: [Product Name] [Billing Cycle] Invoice

Dear [User Name], (Should be the name of the billing users)

Your [billing cycle] [Client Name] invoice for [Product Name] is now available. Below are the invoice details and attached in this email is the PDF invoice.

Invoice Number: INV000010

Billing Period: 1st Oct 2023 - 31st Oct 2023

Billing Cycle: Monthly

Invoiced Amount: KES 120,000.00

Due Date: 31st Oct 2023

Please make a wire transfer payment to the following bank account:

Bank Name: PRIME BANK

Bank Country: KENYA

Bank Code: 010

SWIFT Code:

Account Name: SOLUTECH LIMITED

Account Number:

Bank Branch: PARKLANDS

Branch Code:

Lipa na Mpesa Paybill Number: (Displayed in currency is KES only)

Account Number is the Bank Account Number (Displayed in currency is KES only)

For assistance reach us at accounts@solutech.co.ke | +(254) 795462921.

Thank you for your business.

Best regards,

Solutech Finance Team

Invoice Reminder Email Template

Subject: [Product Name] [1st] Invoice Payment Reminder

Dear [User Name], (Should be the name of the billing users)

This is a billing reminder that your [Billing Cycle] [Product Name] invoice number [Invoice Number] which was generated on [Date Generated] is due on [Due Date].

Below are the invoice details and attached in this email is the PDF invoice.

Invoice Number: INV000010

Billing Period: 1st Oct 2023 - 31st Oct 2023

Billing Cycle: Monthly

Invoiced Amount: KES 120,000.00

Due Date: 31st Oct 2023

Please make a wire transfer payment to the following bank account:

Bank Name: PRIME BANK

Bank Country: KENYA

Bank Code: 010

SWIFT Code:

Account Name: SOLUTECH LIMITED

Account Number:

Account Currency:

Bank Branch: PARKLANDS

Lipa na Mpesa Paybill Number: (Displayed in currency is KES only)

Account Number is the Bank Account Number (Displayed in currency is KES only)

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

Best regards,

Solutech Finance Team

Invoice Due Date Email Template

Subject: [Product Name] Invoice Is Due

Dear [User Name], (Should be the name of the billing users)

This is a billing reminder that your [Billing Cycle] [Product Name] invoice number [Invoice Number] which was generated on [Date Generated] is due.

Your account is at risk of suspension in the next 7 days if no payment is received.

Below are the invoice details and attached in this email is the PDF invoice.

Invoice Number: INV000010

Billing Period: 1st Oct 2023 - 31st Oct 2023

Billing Cycle: Monthly

Invoiced Amount: KES 120,000.00

Due Date: 31st Oct 2023

Please make a wire transfer payment to the following bank account:

Bank Name: PRIME BANK

Bank Country: KENYA

Bank Code: 010

SWIFT Code:

Account Name: SOLUTECH LIMITED

Account Number:

Account Currency:

Bank Branch: PARKLANDS

Lipa na Mpesa Paybill Number: (Displayed in currency is KES only)

Account Number is the Bank Account Number (Displayed in currency is KES only)

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

Best regards,

Solutech Finance Team

Suspension Notice Email Template

Subject: Your [Product Name] Account Is At Risk of Suspension

Dear [User Name], (Should be the name of the billing users)

Your [Client Name] subscription for [Product Name] is at risk of suspension in the next 2days due to an unpaid balance of [Invoice Amount].

To avoid interruption of your [Product Name] services, please settle the due amount immediately.

Below are the invoice details and attached in this email is the PDF invoice.

Invoice Number: INV000010

Billing Period: 1st Oct 2023 - 31st Oct 2023

Billing Cycle: Monthly

Invoiced Amount: KES 120,000.00

Due Date: 31st Oct 2023

Please make a wire transfer payment to the following bank account:

Bank Name: PRIME BANK

Bank Country: KENYA

Bank Code: 010

SWIFT Code:

Account Name: SOLUTECH LIMITED

Account Number:

Account Currency:

Bank Branch: PARKLANDS

Lipa na Mpesa Paybill Number: (Displayed in currency is KES only)

Account Number is the Bank Account Number (Displayed in currency is KES only)

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

Best regards,

Solutech Finance Team

Suspended Notice Email Template

Subject: Your [Product Name] Account Is Temporarily Suspended

Dear [User Name], (Should be the name of the billing users)

Your [Client Name] subscription for [Product Name] has been temporarily suspended due to an unpaid balance of [Invoice Amount].

Please make a payment immediately to reactivate your account and continue enjoying your [Product Name] services.

Below are the invoice details and attached in this email is the PDF invoice.

Invoice Number: INV000010

Billing Period: 1st Oct 2023 - 31st Oct 2023

Billing Cycle: Monthly

Invoiced Amount: KES 120,000.00

Due Date: 31st Oct 2023

Please make a wire transfer payment to the following bank account:

Bank Name: PRIME BANK

Bank Country: KENYA

Bank Code: 010

SWIFT Code:

Account Name: SOLUTECH LIMITED

Account Number:

Account Currency:

Bank Branch: PARKLANDS

Lipa na Mpesa Paybill Number: (Displayed in currency is KES only)

Account Number is the Bank Account Number (Displayed in currency is KES only)

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

Best regards,

Solutech Finance Team

Receipt Email Template

Subject: [Product Name] Payment Receipt

Dear [User Name], (Should be the name of the billing users)

Payment of [Amount Paid] for Invoice Number [Invoice Number] has been confirmed successfully.

Attached in this email is the PDF receipt for your records.

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

Best regards,

Solutech Finance Team

P.S. Stay updated via [Social Media Links] for [Product Name] news and insights.

Subscription Upgrade Email Template

Subject: [Product Name] Licenses Upgrade

Dear [User Name], (Should be the name of the billing users)

Your [Client Name] [Product Name] [Subscription Type] subscription licenses have been successfully upgraded as detailed below:

License Details:

Previous: 12 All Users Licenses @ KES 4,000.00 Per User Per Month Upgraded: 5 All Users Licenses @ KES 4,000.00 Per User Per Month

Total: 17 All Users Licenses @ KES 4,000.00 Per User Per Month

Your next estimated billing at the end of the month will be [Estimated Billing Amount]

Best regards,

Solutech Finance Team

Subscription Downgrade Email Template

Subject: [Product Name] Licenses Downgrade

Dear [User Name], (Should be the name of the billing users)

Your [Product Name] [Subscription Type] subscription licenses have been successfully downgraded as detailed below:

License Details:

Previous: 12 All Users Licenses @ KES 4,000.00 Per User Per Month Downgraded: 5 All Users Licenses @ KES 4,000.00 Per User Per Month

Total: 7 All Users Licenses @ KES 4,000.00 Per User Per Month

Your next estimated billing in your next [Billing Cycle] billing cycle will be [Estimated Billing Amount]

Best regards,

Finance Team

P.S. Stay updated via [Social Media Links] for [Product Name] news and insights.

Customer Statement Email Template

Subject: Solutech Customer Statement - Customer Name - Start Date to End Date

Dear [User Name], (Should be the name of the billing users)

Below is Customer Name customer statement for the period 1st September 2023 to 30th October 2023 Start Date to End Date:

To view and download your complete statement, please click on the following link: [Customer Statement Link].

For assistance reach us at [Finance Email and Phone Number]. Thank you for your business.

Best regards, Solutech Finance Team P.S. Stay updated via [Social Media Links] for [Product Name] news and insights.

Credit Note Email Template

Subject: [Product Name] Credit Note for Invoice # Invoice No.

Dear [User Name], (Should be the name of the billing users)

Your [Client Name] invoice for [Product Name] has been generated. Below are the credit note details and attached in this email is the PDF document.

Credit Note Number: CN000004

Invoice Number: INV000010

Invoice Amount: KES 350,000.00

Credit Note Amount: KES 120,000.00

For assistance reach us at [Finance Email and Phone Number].

Thank you for your business.

Best regards,

Solutech Finance Team

P.S. Stay updated via [Social Media Links] for [Product Name] news and insights.

ROLL OUT PLAN

The development of this feature is approximated to take 1 month and 3 weeks of QA Testing and re-fixing bugs if at all any. Once a green light is given by the QA team, the Marketing and Finance teams will need to roll out the implementation as follows:

  • Marketing Team will need to communicate with all finance admins for the various Solutech Products detailing the following key information:
  • Changes in how Solutech will be handling licensing going forward.
  • Cease of sending estimates.
  • Cut off date of when the new billing implementation will begin.
  • Finance Admins to confirm their Solutech licenses with Solutech Finance Team at least a week prior to the cut off date.
  • Invoices will be shared on the first day of the month.
  • Invoice credit terms will be 30 days, upon which non payment will lead to automated system shut down.
  • If no payment is received, reminders will be sent on the following frequency:
  1. Payment Reminder - 10th, 15th, 20th date of the month.
  2. Account Suspension Warning - 25th date of the month.
  3. Your Solutech Account has been suspended - On the last date of that month (per the credit terms)
  • Finance Team will need to consolidate the Licenses for all the clients before the cut off period which the COO will advise upon getting green light from QA.

TIMELINE

Below is the set timeline for the development and implementation of this project.

#ITEMRESPONSIBLESTATUSPERIODSTART DATEEND DATE
1Development on Admin Portalbackend@solutech.co.keIn Progress10 Days17th July 202331st July 2023
2Development on SATbackend@solutech.co.keIn Progress4 Days25th July 202331st July 2023
3QA Testing + Fixesqa@solutech.co.ke backend@solutech.co.keIn Progress5 Days17th July 20234th Aug 2023
4Training to Solutech Internal Usersbackend@solutech.co.ke Solutech AccountsPending1 Day7th Aug 20237th Aug 2023
5Newsletter Content GenerationSolutech MarketingDone1 Day25th July 202331st July 2023
6Aggregating Finance Admins Data on Zoho CampaignsSolutech Marketing Solutech AccountsDone1 Day17th July 202328th July 2023
7Newsletter Communication with Finance AdminsSolutech MarketingDone1 Day1st Aug 20231st Aug 2023
8Harmonizing Client Solutech LicensesSolutech AccountsPending2 Months2nd Aug 20235th Sept 2023
CUT OFF PERIOD
9Deployment of the New Billing Processbackend@solutech.co.ke Solutech AccountsPending1 Day30th Sept 202330th Sept 2023

Improvements

  1. User Experience on Suspension

The below screen makes users think that there is an issue with the system, and users might not know what is the issue and who is responsible for it.

![][image1]

Therefore:

  1. We should not log out the users. Therefore, we need to change the logic of checking license during login and create a middleware which, when a user tries to do anything on the app, the license check is done and the appropriate message displayed to the user, and logout is not actioned.

  2. We need to a screen similar to the Fake GPS one with a clear message Your account license has been suspended, please contact your Finance Team. Then we can have a call button below the message with the company Admin Number. E.g. Call Jane Doe Call John Doe Call Jane John And a refresh button

  3. Once the billing issue is resolved they just need to refresh and resume operations. If they retry to refresh and the billing issue is not resolved, there should be a response that the account is still suspended. We can add a small caption that the user needs to tap on the refresh button once the billing issue is resolved.

  4. License Expiry Email Notifications

We need to add the following functionalities:

  1. When a customer downgrades, we will notify the users affected by the downgrade of their license expiry due to the downgrade.
  2. When a user is allocated to a license with an expiry, we will notify them of the expiry period of the license.
  3. For the two above scenarios, we will notify the user a day before that their license will expire the next day.
  4. For the above two scenarios, we will notify the user on the d-day once their license has been deactivated because of the expiry.

This will enable a user to have full knowledge of their license status.

Create a table on SAT user_license_notification_logs

idAuto Increment
user_idThe ID of the user being notified
license_key_idThe license key that the user has
subjectThe subject of the notification
messageThe message being sent out
created_at, updated_at, deleted_at
  1. Combining Upgrade Invoices

We need to add functionality to enable Finance Team to group upgrade invoices for a client, which will combine all upgrade invoices into the billing cycle licenses invoices as one invoice.

Therefore, when the monthly, quarterly etc invoices are being sent, all upgrade invoices done in the previous billing cycle, need to be added into the license invoice with the correct narrations.

This will make it easier for clients to reconcile their invoices easily especially the clients who do many upgrades within the billing cycle.

Admin Portal

Clients Table

In Admin, in clients table, add a field, combine_upgrade_invoices which should accept 1 and 0. By default this should be 0. 1 means Yes, 0 means No.

clients table:

combine_upgrade_invoicesTinyintMandatoryDefault 0

Combined Invoices Table

In Admin, create a new table called combined_invoices with the following fields.

combined_invoices table:

idInt (12)MandatoryAuto Increment
doc_idInt (12)MandatoryForeign key from Documents Table
client_idInt (12)MandatoryThe id of the client from clients table
client_viewableBooleanMandatory1- means the client can see the invoice 0 - means the client can not view the document since another one has been generated or the invoices in the document are fully paid
created_at, updated_at, deleted_atTimestamp

Modify client creation UI on the frontend to add a field for Combine Upgrade Invoices. The choices should be a checkbox, with values of 1 if checked and 0 if unchecked, and default as 0.

  1. Modify the client Model to add the new field.

  2. Modify the API for saving a client to accept the new field.

  3. Modify the API for retrieving client info to add the new field.

  4. On the frontend UI for displaying a client, display the new field data accordingly.

  5. Develop a new scheduler which runs at the end , which does the following:

  6. Loop through all clients who have combine_upgrade_invoices column checked and have unpaid or pending upgrade invoices.

  7. The scheduler should fetch the invoice details together with the invoice items.

  8. The scheduler should generate a new combined invoice document based on the upgrade invoices that are unpaid or pending and save it to spaces and the link in the documents model.

  9. Create a new combined invoice record with a doc_id as the reference to the newly created document and client_viewable as true. For all the other existing combined invoices for the client set them to client_viewable false

  10. If all the upgrade invoices are paid the scheduler shouldnt generate a new document. It should just set the existing document to client_viewable false

Create an api to be called by SAT which accepts the clientcode and returns the latest combined invoice document which is client viewable for that client. If not combined invoice exists, return the error message to the client that no combined invoice exists

Create a module called Can Request Combined Upgrade Invoice

SAT

Users assigned the module ‘Can Request Combined Upgrade Invoice’ should be able to see the request Invoices button on the invoices page. Once the button is clicked, an API call is made to the admin portal to get the document and display it to the user if it exists

  1. Customer Statements in Invoice Email

We need to add a functionality where by default, customers get the customer statement on email when the billing cycle invoice email is sent as well.

By default, the period can be from the start of the year, or the last one year (decision needs to be made on this)

This will enable customers to be aware of what they owe us and reduce the back and forth with our Finance Team.

  1. VAT Report (Invoices and Credit Notes)

Finance require these two key reports every month to file to KRA.

Currently we generate them manually which is quite some work we can automate to prevent the need of Finance Team having to ask for it from the engineering team.

We need to create two separate reports with filterable options for dates to pull credit notes and invoices reports with the following columns:

Credit Notes

id68
client_nameKINANGOP DAIRY LIMITED
kra_pinP051136314M
invoice_numberINV0001831
invoice_tax_invoice_number0020116240000000573
invoice_date2024-02-01 00:00
invoice_tax_sync_time2024-02-01 08:01
credit_note_tax_number0020116240000000620
credit_note_numberCN-0000059
erp_credit_note_numberCN-0000059
credit_note_nameCredit Note for INV0001831
tax_deviceKRAMW002202111011624
credit_note_tax_sync_time2024-02-01 09:16
invoice_sub_total1800
invoice_tax_total288
invoice_gross_total2088
credit_note_sub_total1800
credit_note_tax_total288
credit_note_gross_total2088
balance208800
credit_note_date2024-02-01 09:16

Invoices

id722
client_nameBAKHRESA GROUP
kra_pinNULL
invoiced_nameBAKHRESA GROUP
invoice_numberINV0001820
tax_invoice_number0020116240000000562
tax_deviceKRAMW002202111011624
invoice_date2024-02-01 00:00
tax_sync_time2024-02-01 00:21
invoice_typeinvoice
sub_total1000
tax_total0
gross_total1000
  1. Client Subscriptions Listing

The current listing of subscriptions is limited to a few records.

A pagination needs to be added, with the active subscriptions displayed first.

  1. Suspension Based on Setup Invoice

The system should be notified to ensure clients are also suspended due to the final setup invoice being overdue. This change was brought about because of customers not paying for the setup cost balance but continuing to pay the monthly license costs. Hence, if a customer has not paid the final setup cost, they should get reminders and suspension notifications, and suspension once the invoice is overdue.

TODO

Handle credit notes on SAT i.e if a credit note is issued on a license invoice the license keys associated with it should be deactivated

Proforma Invoices and Invoices Separation

Proforma Invoices Separation

On Admin Portal, the Proforma Invoices should be listed separately from the invoices.

On SAT Portals for clients, the Proforma Invoices should be listed separately from the invoices so that there is better clarity to clients as well.

On this page

Solutech SAT AutobillingSolutech Products LicensingPurposeSolutech ProductsExplanationProcess FlowSingle Tenant FlowPurchasing Additional LicensesReducing Number of LicensesProposed ChangesCancelling SubscriptionHandling Credit LimitsMulti Tenant FlowTechnicallicenses Fully documented on Jira ✅license_typesFully documented on Jira ✅products Fully documented on Jira ✅product_items Fully documented on Jira ✅payment_modes Fully documented on Jira ✅taxes Fully documented on Jira ✅product_items_hs_codes Fully documented on Jira ✅billing_cycles Fully documented on Jira ✅credit_terms Fully documented on Jira ✅accounts Fully documented on Jira ✅currencies Fully documented on Jira ✅currency_rates Fully documented on Jira ✅tax_devices Fully documented on Jira ✅subscription_types Fully documented on Jira ✅integrations Fully documented on Jira ✅integration_details Fully documented on Jira ✅tbl_clients_configurations Fully documented on Jira ✅tbl_users Fully documented on Jira ✅contact_types Fully documented on Jira ✅countries Fully documented on Jira ✅client_contacts Fully documented on Jira ✅email_logs Fully documented on Jira ✅client_subscriptions Fully documented on Jira ✅client_licenses Fully documented on Jira ✅client_licenses_history Fully documented on Jira ✅client_license_days Fully documented on Jira ✅client_billing_cycles Fully documented on Jira ✅invoice_reminders Fully documented on Jira ✅invoices Fully documented on Jira ✅invoice_items Fully documented on Jira ✅client_invoice_remindersFully documented on Jira ✅payments Fully documented on Jira ✅receiptsFully documented on Jira ✅documentsFully documented on Jira ✅email_templatesFully documented on Jira ✅email_usersFully documented on Jira ✅client_users Fully documented on Jira ✅Clients, Accounts and Sub AccountsClientsFully documented on Jira ✅Client AccountsFully documented on Jira ✅Sub AccountsFully documented on Jira ✅credit_notes Fully documented on Jira ✅credit_note_items Fully documented on Jira ✅Over Paymentscustomer_statements Fully documented on Jira ✅Creating Invoices and Credit Notes on AdminInvoicesCredit NotesSAT TABLEStbl_usersAdd license_key_id to keep track of license allocated to a useruser_types Modify the table to add solutech_id (Nullable)license_subscriptions Fully documented on Jira ✅licenses Fully documented on Jira ✅licenses_history Fully documented on Jira ✅license_days Fully documented on Jira ✅license_keys Fully documented on Jira ✅license_keys_history Fully documented on Jira ✅license_invoices Fully documented on Jira ✅license_invoice_items Fully documented on Jira ✅license_payments Fully documented on Jira ✅Demo UsersSeparation of Users and Support AccountsCompaniesFully documented on Jira ✅license_credit_notes Fully documented on Jira ✅credit_note_items Fully documented on Jira ✅Over Paymentslicense_customer_statements Fully documented on Jira ✅license_customer_statement_items Fully documented on Jira ✅Invoice Reminder Email TemplateInvoice Due Date Email TemplateSuspension Notice Email TemplateSuspended Notice Email TemplateReceipt Email TemplateSubscription Upgrade Email TemplateSubscription Downgrade Email TemplateCustomer Statement Email TemplateROLL OUT PLANTIMELINEImprovementsUser Experience on SuspensionTherefore:License Expiry Email NotificationsCombining Upgrade InvoicesAdmin PortalClients TableCombined Invoices TableSATCustomer Statements in Invoice EmailVAT Report (Invoices and Credit Notes)Credit NotesInvoicesClient Subscriptions ListingSuspension Based on Setup InvoiceProforma Invoices and Invoices SeparationProforma Invoices Separation