====== New customer creation ======
=== Steps ===
* Create a new **tenant**.
* Add the purchased **numbers** to the shared file [[https://becloudsolutionssrl.sharepoint.com/:x:/r/sites/IT_Billing/_layouts/15/Doc.aspx?sourcedoc=%7B03326DA4-B2C5-4838-9706-0EBAF2190980%7D&file=Costi-fornitori-Tecnici.xlsx&action=default&mobileredirect=true|Costi fornitori tecnici]].
* Add the customer's **name** to the file [[https://becloudsolutionssrl.sharepoint.com/:x:/r/sites/IT_Billing/_layouts/15/Doc.aspx?sourcedoc=%7B313F6BC5-5A4F-4CFC-BA4E-902C23F8D496%7D&file=Traffico-Telefonico_2026.xlsx&action=default&mobileredirect=true | Traffico Telefonico]].
* Add the purchased **numbers** to the file [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/numbers.csv | CDRs numbers]].
* Create the **Customer object** in the customers array in the [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/cdrs.py | cdrs.py]].
* Create the **Result object** in the results array in the [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/Monthly/monthlyResults.py | monthlyResults.py]] file.
* The customer's **name** must be added in the customers array to the [[https://git.ccaas.becloudsolutions.com/BeCloud/Recharges/src/branch/main/recharges.php | Recharges]] file.
* The customer's **name** must be added to the [[https://grafana.ccaas.becloudsolutions.com/d/cedg4a4h1qxa8f/voice-balance-monitor?orgId=1&from=now-6h&to=now&timezone=browser | Voice balance dashboard]] on Grafana.
* An [[https://grafana.ccaas.becloudsolutions.com/alerting/list |Alert rule]] on Grafana must be created for the new customer.
* The customer's **name** must be added to the Monitor database.
===== New tenant creation =====
To create a new {{0:logobecloud.png?30}}tenant you can follow the [[new_tenant_creation]] guide.
===== IT Billing =====
The purchased **numbers** must be entered in the shared file in {{0:sharepoint.png?20}}[[https://becloudsolutionssrl.sharepoint.com/:x:/r/sites/IT_Billing/_layouts/15/Doc.aspx?sourcedoc=%7B03326DA4-B2C5-4838-9706-0EBAF2190980%7D&file=Costi-fornitori-Tecnici.xlsx&action=default&mobileredirect=true|IT Billing]] for **technical supplier costs**.
\\ Depending on the carrier you are using, you will need to add a row to the table or add a unit in the quantity column.\\
The customer's **name** must be added to the {{0:sharepoint.png?20}}[[https://becloudsolutionssrl.sharepoint.com/:x:/r/sites/IT_Billing/_layouts/15/Doc.aspx?sourcedoc=%7B313F6BC5-5A4F-4CFC-BA4E-902C23F8D496%7D&file=Traffico-Telefonico_2026.xlsx&action=default&mobileredirect=true | Traffico Telefonico]] file.
\\ Add a new sheet, copy an existing one and delete the data inside of it. \\
===== BeCloud's Git =====
Once you open {{0:logobecloud.png?30}}[[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs | this link]], you will find yourself in the CDRs repository. \\
* Click on [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/numbers.csv | numbers.csv]], then click on the {{0:editgitea.png?25}} //edit// button and add one or more lines with the **number**, customer's **name** and the **rate** applied to the number.
* Click on [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/cdrs.py | cdrs.py]], then click the {{0:editgitea.png?25}} //edit// button and create the **Customer object** with the customer's **name** and all **zeros** in the customers array. The zeros will be filled in during the course of the code and represent the inbound/outbound cost for each carrier. \\ Follow this example: customers = [
Customer("Name",0,0,0,0,0,0,0,0,0,0,0,0),
...
]
* Click on the [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/Monthly/ | Monthly folder]] and on [[https://git.ccaas.becloudsolutions.com/BeCloud/CDRs/src/branch/main/Monthly/monthlyResults.py | monthlyResults.py]], then click the {{0:editgitea.png?25}} //edit// button and create the **Result object** with the customer's **name**, the name of the **carrier** in **__all caps__** and all **zeros** in the results array. The zeros will be filled in during the code and represent the inbound/outbound cost of BeCloud and the customer. \\ Follow this example: results = [
Result("Name","CARRIER",0,0,0,0),
...
]
\\
Once you open {{0:logobecloud.png?30}}[[https://git.ccaas.becloudsolutions.com/BeCloud/Recharges | this link]], you will find yourself in the Recharges repository. \\ Click on [[https://git.ccaas.becloudsolutions.com/BeCloud/Recharges/src/branch/main/recharges.php | recharges.php]], then click the {{0:editgitea.png?25}} //edit// button and add the customer's **name** in the customers array.
===== Grafana =====
* Once you open {{0:grafana.png?50}}[[https://grafana.ccaas.becloudsolutions.com/d/cedg4a4h1qxa8f/voice-balance-monitor?orgId=1&from=now-6h&to=now&timezone=browser | this link]], you will find yourself in the Voice balance monitor. \\ To add a new customer, you have to click the {{0:editgrafana.png?36}} //edit// button, then go to an existing panel, click on the //three dots//, hover your mouse over the “more” option and then click on //duplicate//.{{0:duplicategrafana.png?250}}\\ Once you have created the copy, you will need to edit it by **replacing** the field //title// and the value of the column //customer// with the name of the new customer. \\ Here's an example with the customer //"Alidays"//: \\ {{0:titlegrafana.png?250}} \\ {{0:customergrafana.png}} \\ Now you can **save** and exit the edit mode.
* Once you open {{0:grafana.png?50}}[[https://grafana.ccaas.becloudsolutions.com/alerting/list| this link]], you will find yourself in the Alert rules list and you have to look to the Balances_monitor. \\ To add a new customer, you have to click the //more// button of an existing alert rule and click on //duplicate// \\ {{0:duplicatealertrulesgrafana.png}} \\ Once you have created the copy, you will need to edit it by **replacing** the field //title// and the value of the column //customer// with the name of the new customer. \\ Here's an example with the customer //"Alidays"//: \\ {{0:titlealertrulesgrafana.png?320}} \\ {{0:customergrafana.png}} \\ Now you can **save** and exit the edit mode.
===== Database =====
You must add the customer's name to the **“recharges”** and **“customers”** tables in the **Monitor** database of the **Monitoring** machine.