Customer
Customers
After having a sale being done and checked that the pay is done, at the same time, the system creates 3 different structures for each client. These structures are:
| STRUCTURE | DESCRIPTION |
|---|---|
| Users | Access to all the info relative to Agile tv and User such as name, email and other fields that can be checked in the schema site. |
Payment Cycle
Postpaid
Relative to POSTPAID subscritptions, we start from the point that the client has all the services activated, making their consumption, there will come a time that the billing process will be generated. Once this process is triggered, if the customer correctly pays their invoice, both their accounts and their subscriptions will not be affected and they will remain in an ACTIVATED state. In the event that the client has been unpaid, a series of barrings will be applied to make the payment or payments corresponding to the billing cycles unduly paid. At this point, it will be the MasBarrings API and department in charge of this operations.
graph TD
A([Monthly payment]) --> B{Correct pay?};
B --> |No|C[Add barring];
C --> D[MasBarrings];
D --> B;
B --> |Yes|E{{account & subscription Status = ACTIVE}};
E --> F([ACTIVATED]);
Prepaid
Relative to PREPAID subscriptions, always is being check the remaining balance. Depending on this balance, it tooks different acctions as you can see in the following graph.
graph TD
A([Check remaining balance]) --> B{have Balance?};
B --> |YES| D[Service OK] --> A;
B --> |NO| E[MAsBarrings] --> A;
User info
This type of info is storage in Users section.
Check and Update User info
There are three ways to consume this type of info.
- GET allow us to check all relative information to a user.
- PUT allow us to update the different fields relatives to the userβs info
- PATCH allow us to update the userβs email to activate agile tv services.
Accounts
As you can see in previous sections, at the time the sale is made and the client is correctly registered, the account field and the subscription field are created at the same time.
Migration of a subscription
All the migrations porcesses can be consult in this site Product migrations
graph TD
C3[MIGRATIONS] --> |NEW|D[ACCOUNTS];
C3 --> |EXISTING|D;
C3 --> C32[PREPAID];
C3 --> C33[POSTPAID];
C32 -.-> |NEW|D3;
C32 -.-> |EXISTING|D3;
D --> D3[POSTPAID];
D --> D4[PREPAID];
C33 -.-> |NEW|D4;
C33 -.-> |EXISTING|D4;
click C3 "accountmigrations.md" _self
click C32 "accountmigrations.md#migrateToPostpaidExistingAccount" _self
click C33 "accountmigrations.md#migrateToPrepaidNewAccount" _self
click D "accountmigrations.md#migrateSubscriptionNewAccount" _self
Other acctions
MasCustomers have more acctions or possibilities to interact with the clients info. In this diagram is shown all the different functionalities. You can click on them for more detailed information.
graph TD
A[Client] --> B1[PRODUCTS] & B2[SERVICES] & B3[BONUSES] & B4[PROMOTIONS] & B5[BARRINGS] & B6[WORKORDERS];
click B1 "/api/customers/2" _self
click B2 "/api/customers/2#getServicesSubscription" _self
click B3 "/api/customers/2#getBonusSubscription" _self
click B4 "/api/customers/2#getAccountPromotions" _self
click B5 "/api/customers/2" _self
click B6 "/api/customers/2" _self