Configuration¶
These are the places the ERP Connector need to be configured:
- Runtime configuration. Both general settings and calculation settings.
- View configuration.
- Application configuration. This is covered under Calculations.
Runtime Configuration¶
The runtime configuration is done in Lime Admin, under Settings -> ERP Connector.
The ERP Connector works with instances. One instance must be configured for each ERP system and ERP database.
For the standard objects the following applies:
Object | Instance Is Needed |
---|---|
Customers | ✔️ |
Invoices | |
Invoice rows | |
Orders | ✔️ |
Order rows | |
Articles | ✔️ |
Article groups | ✔️ |
Contact persons | ✔️ |
If you want to add more objects to the integration through customizations, then you need to add one instance per new object.
Common Parameters¶
Parameter | Values | Comment |
---|---|---|
syncUserId | String | Numeric id of the API sync user (erpsync@lime) |
Instance Parameters¶
Parameter | Values | Comment |
---|---|---|
name | String | Your unique id for the instance, eg company-fortnox |
system | String | |
systemDisplayName | String | Custom name used on the button in the clients. If left empty, the default name of the system will be used |
instanceGroup | String | Group instances by a name. If several instances have the same instance group, the first instance synced is the one that will "own" the syncing of the object and the other instances will be disabled. This should in most cases be empty on all instances |
limetype | String | Limetype that you want connected to the ERP system |
propertyErpId | String | ERP id property |
propertyErpStatus | Option | ERP status property |
propertyErpErrorMessage | Option | ERP error message property |
propertyErpFirstSynced | Date | ERP first synced property |
propertyErpLastSynced | Date | ERP last synced property |
propertiesSynced | Array | List of properties that trigger sync when changed |
groups | Array | List of groups that should see the app |
updateGroups | Array | List of groups that should see and use the button in the app |
Example Runtime Configuration¶
Example configuration for Visma Business with a custom display name.
{
"syncUserId": "1", // IMPORTANT - change user to erpsync@lime in the dropdown
"instances": [
{
"name": "company-visma",
"system": "vismabusiness",
"systemDisplayName": "Visma",
"limetype": "company",
"instanceGroup": "",
"propertyErpId": "erp_id",
"propertyErpStatus": "erp_status",
"propertyErpErrorMessage": "erp_errormessage",
"propertyErpFirstSynced": "erp_firstsynced",
"propertyErpLastSynced": "erp_lastsynced",
"propertiesSynced": [
"name",
"registrationno",
"emailinvoice",
"phone",
"invoiceaddress1",
"invoiceaddress2",
"invoicecity",
"invoicezipcode",
"country",
"visitingaddress1",
"visitingaddress2",
"visitingcity",
"visitingzipcode",
"coworker"
],
"groups": [
"Administrators",
"Users"
],
"updateGroups": [
"Administrators"
]
}
]
}
Advanced¶
Instance Groups with Multiple ERPs¶
It's possible to have several ERP systems on the same limetype. For example, a company should be synced to either Visma or Navision depending on the region or type of business it operates in. With instance groups the approach is that the first ERP system that gets a "Send to ERP" click will "own" the syncing of the object from then on, and the other ERP systems in the instance group will be disabled.
The additional steps for configuring instance groups are:
-
Create unique
erp_id
anderp_status
properties for each instance, in the example above we'd recommend naming themerp_id_visma
,erp_status_visma
anderp_id_navision
,erp_status_navision
. -
Make up a name or number for the instance group and enter it in both instances Instance group setting.
erp_id
and erp_status
system properties
The only properties that can't be shared between instances in the same group are erp_id
and erp_status
- they must be unique in each instance.
Automatically Create Invoice Based on Order¶
This only applies if orders are synced.
- If the customer always wants to create invoices from orders directly, set both the default value and readonly properties of the field
order.create_invoice_from_order
to True in LISA. - If the customer never wants to create invoices from orders, set the default value property of the field
order.create_invoice_from_order
to False in LISA and the readonly property to True. - If the customer wants to decide manually per order in Lime before it is sent over to the ERP system; set the readonly property of the field
order.create_invoice_from_order
to False in LISA, and set the default value property to the option that is best suited for the customer as the standard option.
View Configuration¶
The following needs to be added to the views in the Web Client.
Company¶
Card¶
Add the below under the section for Addresses:
{
"property": "invoiceaddress1",
"visibleOnCreate": false
},
{
"property": "invoicezipcode",
"visibleOnCreate": false
},
{
"property": "invoicecity",
"visibleOnCreate": false
}
Add the below under the section Additional Info:
{
"property": "emailinvoice",
"visibleOnCreate": false
}
Add a new section for the ERP information.
{
"title": "ERP Information",
"controls": [
{
"property": "erp_id",
"readonly": true,
"visibleOnCreate": false
},
{
"property": "erp_turnover_yearnow",
"readonly": true,
"visibleOnCreate": false
},
{
"property": "erp_turnover_lastyeartodate",
"readonly": true,
"visibleOnCreate": false
},
{
"property": "erp_turnover_lastyear",
"readonly": true,
"visibleOnCreate": false
},
{
"property": "erp_ytdgrowth",
"readonly": true,
"visibleOnCreate": false
}
]
}
Add ERP Connector's web component to the card view configuration as below or add lwc-limepkg-erp-connector
to the web component slot in the UI of Lime Admin.
{
"components": [
{
"name": "lwc-limepkg-erp-connector"
}
]
}
List¶
If you want the ERP id to be shown in the lists of related objects, set your header to for example this:
{
"header": [
{
"property": "name"
},
{
"property": "buyingstatus"
},
{
"property": "erp_id"
},
{
"property": "coworker"
}
]
}
Search¶
If you want the ERP id to be shown in the search results, set your header to for example this:
{
"header": [
{
"property": "name"
},
{
"property": "buyingstatus"
},
{
"property": "erp_id"
},
{
"property": "coworker"
}
]
}
Table¶
Add the below to the table view config for company.
{
"property": "erp_id",
"isDefault": true
},
{
"property": "erp_turnover_yearnow",
"isDefault": false
},
{
"property": "erp_turnover_lastyear",
"isDefault": false
},
{
"property": "erp_salestrend",
"isDefault": true
},
{
"property": "erp_ytdgrowth",
"isDefault": true,
"component": {
"name": "lwc-limepkg-erp-connector-sales-trend-table",
"props": {}
}
},
{
"property": "emailinvoice",
"isDefault": false
},
{
"property": "erp_status",
"isDefault": false
},
{
"property": "erp_firstsynced",
"isDefault": false
},
{
"property": "erp_lastsynced",
"isDefault": false
}
Two-way Sync¶
If the ERP system has been picked as the leading system and Lime CRM as the following system for customers, but prospects still are supposed to be handled in Lime CRM only, then Variants can be used on the company card config to make the integrated fields readonly when a company is synced with the ERP system.
Either use the field ERP status as Variant field or make sure to always set the Buying status field to Customer when there is the ERP ID field gets a value, and use the Buying status field as Variant field. Setting that field automatically can be achieved with an Automation in Lime CRM.
For setting fields as readonly in the Lime CRM desktop client, adjust the Consts
at the top of the VBA module AO_ERPConnector_ERPMaster
.
Parameter | Values | Default Value | Comment |
---|---|---|---|
m_bUpdateFromLimeOK |
True or False |
False |
States whether the user will be allowed to modify integrated fields and see the update in ERP button or not. |
m_sClassName |
String | "company" |
Only used for validation purposes at the moment. The database name of the table that is used as a company in the integration. |
m_sErpSystem |
String | "" |
Which ERP system the integration is running towards. Must be one of the following strings: vismaadministration , vismabusiness , navision , fortnox , economic , vismanet , bladministration , businesscentral , powerofficego , vismaeekonomi , exactonline , uniconta , tripletex , maconomy . |
m_sReadonlyFields |
String | According to Base Solution and standard ERP Connector | Semicolon separated list of database field names for the fields to set as readonly on integrated companies. |
m_sReadonlyFieldsVisiting |
String | According to Base Solution and standard ERP Connector | Semicolon separated list of database field names for the visiting address fields to set as readonly when integrating with some ERP systems. |
m_sFieldNameErpId |
String | "erpid" |
The database name of the field on the m_sClassName table that contains the ERP Id. |
Additional Synced Objects¶
For other objects included in the sync except company, where an instance was configured in the run-time config, add the following view config.
Card¶
Add ERP Connector's web component to the card view configuration as below or add lwc-limepkg-erp-connector
to the web component slot in the UI of Lime Admin.
{
"components": [
{
"name": "lwc-limepkg-erp-connector"
}
]
}
Table¶
Add the below to the table view config
{
"property": "erp_id",
"isDefault": true
},
{
"property": "erp_status",
"isDefault": false
},
{
"property": "erp_firstsynced",
"isDefault": false
},
{
"property": "erp_lastsynced",
"isDefault": false
}