Billing Engine
The billing engine creates a billing file every month that contains all the usages of every customer
Overview
The Billing Engine consists of:
- billing engine, a scheduled task is performed the 1st of every month. It will calculate the usages of every active device per customer. Create a SEAP file (billing file) and transfer this file to SEAP via an MFT file transfer.
flow
Retrieve SSID for all companies
Define how many active devices (NBIOT) per company(Postgesql)
Define the amount of messages sent (per device or all devices) per company (Historian)
calculate Usages
- Calculating verticals product (use product billing field)
- Calculating IOT connectivity (use iot bundle field)
- retrieve data from ADX
- Calculating IOT overages (use iot bundle field)
- Calculating API subscription usage (PHASE 2)
- Calculating additional streams usage (PHASE 2)
Create xml SEAP file
Persist SEAP file in storage account in the seap container
Connect to MFT via SFTP connection (ssh check how to do it via node)
Send SEAP file to MFT over SFTP
Send mail when transfer failed
manual excecution
The billing is scheduled once a month but can also be triggered mannually by calling http://localhost:5000/calculate from inside the instance.