Configuration¶
Application Config¶
The application config is a little different depending on if using the read from disk or read from SFTP server. Below you will find examples of both the options.
Warning
Please note that the exported EDP files does not contain any headers for the different columns. This problem is solved for this package by manually specifying the columns in the application config for each files as you can see below. The order of the columns in the application config must match the order in the files. It is however possible to choose what and how many columns you want to use in the Lime Admin config.
Option 1, read from disk¶
Lime App: # <-- Change this to your Lime Application name.
config:
edp:
path_type: "osfs"
path: "C:\\Integrations\\Future\\" # If it is a network path example: \\\\server2\\Folder1\\Import\\
customer_fileprefix: "LimeKund" # Change these prefixes if neccessary.
serviceplace_fileprefix: "LimeAnlaggning" # Change these prefixes if neccessary.
service_fileprefix: "LimeTjanst" # Change these prefixes if neccessary.
custom_columns: # The package contains a default. If the integration you are configuring has extra columns, the columns can be overwritten here. The files are delivered without column headers.
lime_customer:
[
"Kundnr",
"Personnr1",
"Personnr2",
"Efternamn1",
"Förnamn1",
"Efternamn2",
"Förnamn2",
"Kundadress",
"KundPostnr",
"KundOrt",
"KundLand",
"TelefonBostad",
"TelefonArbete",
"TelefonMobil",
"Epostadress",
"Fax",
"BetalningssättText",
"AGMedgivandeFr¨nBGÅter",
"EFakturaBanknamn",
"KundkategoriText",
"KundUpphördDatum",
"KundStatus",
"EpostOK",
"SMSOK",
"KundTyp",
"KundSkapad",
"SenastÄndrad",
"CUSTOMER_SPECIFIC_FIELD1",
"CUSTOMER_SPECIFIC_FIELD2",
]
lime_serviceplace:
[
"Kundnr",
"Anlnr",
"AnläggningAdress",
"AnläggningPostnr",
"AnläggningOrt",
"Fastighetsbeteckning",
"Fastighetsnyckel",
"AnläggningKontakt",
"AnläggningTelefon",
"AvläsningsDistrikt",
"LTA",
"Populärnamn",
"AnläggningNyckelNr",
"AnläggningPortkod",
"AnläggningUpphördDatum",
"Anläggningskategori",
"AnläggninUtskicksadress",
"AnläggningSkapad",
"SenastÄndrad",
]
lime_service:
[
"Kundnr",
"Anlnr",
"Tjänstnr",
"Mätarnr",
"SenastFaktureradTomDatum",
"SenasteFakturanr",
"TjänstStartDatum",
"TjänstSlutDatum",
"Taxa",
"Mätarplacering",
"TjänstNyckelNr",
"Årsförbrukning",
"Tömningsfrekvenskod",
"RHDistriktkodText",
"Slanglängd",
"Brunnstyp",
"Behållarestorlek",
"Xkoordinat",
"Ykoordinat",
"Lägenhet",
"Tomtyta",
"ÖvrigtAntal",
"AntalBehållare",
"Bevakning",
"Mätarstorlek",
"Behållare",
"Avfallstyp",
"TjänstSkapad",
"SenastÄndrad",
"Taxebenämning",
"Produkt",
"Delprodukt",
]
Option 2, read from SFTP¶
Lime App: # <-- Change this to your Lime Application name.
config:
edp:
path_type: "sftp"
path: "/" # Only / if the files are dumped in the root directory of the SFTP, otherwise something like /EdpExport or whatever the customer have setup
sftp:
address: "11.111.11.111" #
port: 22 # default is 22, but can be other things also
account: "EdpImport" # the username for logging into the sftp server
customer_fileprefix: "LimeKund" # Change these prefixes if neccessary.
serviceplace_fileprefix: "LimeAnlaggning" # Change these prefixes if neccessary.
service_fileprefix: "LimeTjanst" # Change these prefixes if neccessary.
custom_columns: # The package contains a default. If the integration you are configuring has extra columns, the columns can be overwritten here. The files are delivered without column headers.
lime_customer:
[
"Kundnr",
"Personnr1",
"Personnr2",
"Efternamn1",
"Förnamn1",
"Efternamn2",
"Förnamn2",
"Kundadress",
"KundPostnr",
"KundOrt",
"KundLand",
"TelefonBostad",
"TelefonArbete",
"TelefonMobil",
"Epostadress",
"Fax",
"BetalningssättText",
"AGMedgivandeFr¨nBGÅter",
"EFakturaBanknamn",
"KundkategoriText",
"KundUpphördDatum",
"KundStatus",
"EpostOK",
"SMSOK",
"KundTyp",
"KundSkapad",
"SenastÄndrad",
"CUSTOMER_SPECIFIC_FIELD1",
"CUSTOMER_SPECIFIC_FIELD2",
]
lime_serviceplace:
[
"Kundnr",
"Anlnr",
"AnläggningAdress",
"AnläggningPostnr",
"AnläggningOrt",
"Fastighetsbeteckning",
"Fastighetsnyckel",
"AnläggningKontakt",
"AnläggningTelefon",
"AvläsningsDistrikt",
"LTA",
"Populärnamn",
"AnläggningNyckelNr",
"AnläggningPortkod",
"AnläggningUpphördDatum",
"Anläggningskategori",
"AnläggninUtskicksadress",
"AnläggningSkapad",
"SenastÄndrad",
]
lime_service:
[
"Kundnr",
"Anlnr",
"Tjänstnr",
"Mätarnr",
"SenastFaktureradTomDatum",
"SenasteFakturanr",
"TjänstStartDatum",
"TjänstSlutDatum",
"Taxa",
"Mätarplacering",
"TjänstNyckelNr",
"Årsförbrukning",
"Tömningsfrekvenskod",
"RHDistriktkodText",
"Slanglängd",
"Brunnstyp",
"Behållarestorlek",
"Xkoordinat",
"Ykoordinat",
"Lägenhet",
"Tomtyta",
"ÖvrigtAntal",
"AntalBehållare",
"Bevakning",
"Mätarstorlek",
"Behållare",
"Avfallstyp",
"TjänstSkapad",
"SenastÄndrad",
"Taxebenämning",
"Produkt",
"Delprodukt",
]
secrets:
edp:
sftp:
password: "super_secret_password"
Lime Admin config¶
The package comes with a Lime Admin config that can be used for custom mapping of columns from the edp files to properties in Lime. To find the configuration head over Settings -> EDP Integration in Lime Admin. To quickly get a config up and running look at this example provided here: Addon EDP configuration
Update Customer in EDP from Lime¶
It's now possible to update 6 fields on the customer object in EDP from Lime CRM. To be able to do this some configuration is needed.
- The Lime customer must talk to Vertigis to upgrade their EDP environment to be able to activate the EDP REST API.
- We need to get the URL and credentials to this API.
- Add integration monitor cards for the export with integration key "edp.export" if not added already.
When we have recieved these credentials we now can start to configure the two-way-integration.
- Add the export element to the config and the edp_secret in the secret section. Please note no trailing slash in edp_url.
Lime App:
config:
edp:
export:
edp_url: https://futurerestapi.edp.se/api
edp_key: TGltZTAxLWVkcC1hcGkta2V5
secrets:
edp:
edp_secret: 1eeec60b4a49439788fbcb1711df14d9
- Now go to the webadmin page and EDP-integration config page. Create a new item under "EDP Export".
-
Fill in fields and mapping schema (example below):
-
Inactive: If ticked in, it wont send anything to EDP.
- EDP Endpoint: EDPFutureKund/AndraKontaktuppgifter
- Call method: PUT
- Lime object: Customer
- EDP ID: The field on the customer object that holds the EDP ID.
- Create history with request result: If ticked in a history note will be created related to the updated object in Lime. This history note will contain the fields that were updated and with that information.
- Fill in what fields you want to send over to EDP. To know which fields in EDP that can be updated please check their EDP REST API swagger page.
Complete config example:
{
"display_name": "Company",
"inactive": false,
"create_history": true,
"mapping": [
{
"use_fixed_value": false,
"edp_property": "telefonMobilKontakt1",
"lime_property": "mobilephone"
},
{
"use_fixed_value": false,
"edp_property": "telefonMobilKontakt2",
"lime_property": "mobilephone2"
},
{
"use_fixed_value": false,
"edp_property": "epostKontakt1",
"lime_property": "email"
},
{
"use_fixed_value": false,
"edp_property": "epostKontakt2",
"lime_property": "email2"
},
{
"use_fixed_value": false,
"edp_property": "smsKontakt1",
"lime_property": "sms1"
},
{
"use_fixed_value": false,
"edp_property": "smsKontakt2",
"lime_property": "sms2"
}
],
"edp_endpoint": "EDPFutureKund/AndraKontaktuppgifter",
"callmethod": "PUT",
"limetype": "company",
"edp_id": "edpid"
}