---
# System prepended metadata

title: Untitled

---

```sequence
Title: Actualise age CRON (Every day a 2a.m)
Lambda->MongoDb(Leads): Get all lead where dob is not null
MongoDb(Leads)->Lambda: List
Lambda->Lambda: Calculate actual age
Lambda->MongoDb(Leads): Update age if different
```
---
```sequence
Title: Add carrier CRON (Every day a 2a.m)
Lambda->MongoDb(Piles): Get leads where mccmnc is not null and does not have operator
MongoDb(Piles)->Lambda: List
Lambda-->MongoDb(Mccmnc): Get operator with mccmnc value
MongoDb(Mccmnc)-->Lambda: Operator
Lambda->MongoDb(Piles): Add operator
Lambda->MongoDb(Leads): Add operator
```
---
```sequence
Title: Add end time drop CRON (Every minute)
Lambda->MongoDb(Drops): Get drops not finish
MongoDb(Drops)->Lambda: List
Lambda-->MongoDb(Piles): Get total sms not send
MongoDb(Piles)-->Lambda: Total
Lambda->MongoDb(Drops): Add actual timestamp when total not send is null
```
---
```sequence
Title: Transmite receive (Every minute)
Lambda->MongoDb(Piles): Get leads where sms is send and receiveTransmite value = false
Lambda->MongoDb(Campaigns): Get campaign used for sending
MongoDb(Campaigns)->Lambda: campaign
Lambda->MongoDb(Drops): Get drops used for sending
MongoDb(Drops)->Lambda: drop
Lambda->MongoDb(Leads): Update campaigns list received
Lambda->MongoDb(Leads): Update drops list received
```
---
```sequence
Title: Refresh content list (every minute)
Lambda->MongoDb(Lists): Get all lists
Lambda->MongoDb(Countries): Get all countries
Lambda-->Filter: Create filter per lists and countries
Filter-->Lambda: Json filter
Lambda->MongoDb(Lists): Update total leads matching
```
---
```sequence
Title: Remove imported file (every day at 2 a.m)
Lambda->MongoDb(FileLeads): Remove all files not imported
```
---
```sequence
Title: Import leads with CSV / XLSX file (every minute)
Lambda->MongoDb(FileLeads): Get one file not imported
MongoDb(FileLeads)->Lambda: file
Lambda-->AWS(S3): Get file
AWS(S3)-->Lambda: file, read and created lead object
Lambda->MongoDb(Leads): Save lead
```
---
```sequence
Title: Test domain (every day between 1 a.m and 5 a.m)
Lambda->MongoDb(AllDomain): Get domain not tested
MongoDb(AllDomain)->Lambda: List
Lambda-->MongoDb(Domain): Add domain available
```
---
```sequence
Title: Send sms (every minute)
Lambda(Mother)->SQS: Create 2000 packages with 50 awaiting sms inside
SQS->Lambda(Daughter): Send multiple request
Lambda(Daughter)-->Provider: Send sms request to provider
Provider-->Lambda(Daughter): message_id
Lambda(Daughter)->MongoDb(Piles): Save message_id
```
---
```sequence
Title: AI Optimization (every minute)
Lambda->MongoDb(Drops): Get drops not ended and AI activated
MongoDb(Drops)->Lambda: List
Lambda-->MongoDb(Piles): Activate the next batch if the conditions entered are met
```
---
```sequence
Title: Update statistique (every minute)
Lambda->MongoDb(DropStats): Get all dropstats
MongoDb(DropStats)->Lambda: List
Lambda->Lambda: Calculate stat
Lambda->MongoDb(DropStats): Update stat
```
---
```sequence
Title: Add Receive Sms Campain And Drop (every minute)
Lambda->MongoDb(Piles): Get all piles elem not traited
MongoDb(Piles)->Lambda: List
Lambda->MongoDb(Leads): Get all leads associated
MongoDb(Leads)->Lambda: List
Lambda->Lambda: Update list
Lambda-->MongoDb(Leads): Update campain and drops list receive
Lambda-->MongoDb(Piles): update transmite value
```
---
```sequence
Title: Hosting
Domains->66.29.142.199: Unsubscribe
66.29.142.199->SmsGenius: Number to unsubscribe
Domains-->66.29.142.199: Landing
66.29.142.199-->SmsGenius: Clic Log
66.29.142.199-->Landing Page: Redirect to landing page
Landing Page-->SmsGenius: Conversion Log
```
Liste des services AWS utilisés :

- Route 53 for domain management
- Certificate Manager for domain certificate management
- VPC for private network
- EC2 for creating VPS
- Amazon DocumentDB for MongoDB database
- S3 for storing country photos and uploaded files
- Lambda for cron tasks
- EventBridge for triggering cron tasks
- AWS Auto Scaling for scaling plan and automatic VPS provisioning
- AWS Firewall Manager for firewall creation and management
- CloudWatch for logs
- AWS Budgets for budget management
- Support for support
- SQS for managing SMS sending queues
- IAM for permission management
- EventBridge for cron job scheduling