How it Works¶
The Import to Lime¶
- EDP exports csv files regurlarly
- Lime goes through every row in the files and checks if the item has been updated since last time it was read.
- Lime updates or creates the items in lime
- a successfully processed file is moved to 'imported' and any rows that could not be imported are saved in a file in the folder 'failed'.
path to EDP files │ LimeKund_20220103.csv │ LimeAnlaggning_20220103.csv │ LimeTjanst_20220103.csv │ └───imported │ │ LimeKund_20220102.csv │ │ LimeAnlaggning_20220102.csv │ │ LimeTjanst_20220102.csv │ │ │ └───failed │ LimeKund_20220101.csv |
Set Contract Status¶
Contract status is calculated based on service's dates. (A contract is a limetype that collects services based on utility) 1. A contract is considered Active if there are active services currently. 2. A contract is considered Inactive if there are no active services.
Set Customer Status¶
Customer status is calculated based on contract statuses. 1. A customer is considered Active if there are active services currently. 2. A customer is considered Inactive if there are no active services. 3. A customer is considered a Former customer if it has had active services.
Handle expiring services¶
When the enddate of a serice is reached, the status calculations of contracts and customers are triggered. 1. A customer is considered Active if there are active services currently. 2. A customer is considered Inactive if there are no active services. 3. A customer is considered a Former customer if it has had active services.