Campaign combine:
- Template
- Conditions on the list of customers. For example, all the males above 30 years. (for our exercise each campaign can handle one condition)
- Time to send the campaign.
- Priority
First of all I split all my Layers to next one:
- MyApplicationName.Api
- MyApplicationName.Azure.Function
- MyApplicationName.BLL
- MyApplicationName.Models
- MyApplicationName.Sender.Organiser
The main princepie is next:
Azure function runed on the some cloud invoke the Api Controller, then I generate Campings and using Priority Queue I "Send" my Templates
Parse HTML using HTMLAgilityPack
To run Azure function use Azurity
More about Priority Queue
Parse CSV file using Csv Helper