Skip to content

How it Works

The Import to Lime

  1. EDP exports csv files regurlarly
  2. Lime goes through each file and each row in the files.
  3. If delete behavior is used, some objects might be completly deleted or just soft deleted if they are not present in the files, depending on the configuration.
  4. Lime updates or creates the items in lime if the item has been updated since last time it was read.
  5. 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
        |
    
  6. The previusly successful imported files are removed. This is configurable for how long the files should be stored in the imported folder.

Delete behavior

The package comes with support for handling delete of limeobjects. There are three different levels of deletion to choose from (if you want any at all) 1. Keep deleted. This is the default behavior choosen if nothing else. This does nothing with the limeobject in Lime if they are present in Lime, but not in the files. 2. Soft delete. This sets the property "deleted_in_edp" (date/time property) to the current time on the limeobject. This property must exists on the limeobject if this feature should be used. 3. Hard delete. Actually deletes the limeobject.

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.