Skip to content

Configuration

Add-on Configuration

Configuration is done in Lime Admin. ERP Connector works with instances, one instance must be configured for each ERP system/database. 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 Add-on 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:

  1. Create unique erp_id and erp_status properties for each instance, in the example above we'd recommend naming them erp_id_visma, erp_status_visma and erp_id_navision, erp_status_navision.

  2. 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.

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"
    }
  ]
}

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 config for company.

{
      "property": "erp_id",
      "isDefault": true
    },
    {
      "property": "erp_turnover_yearnow",
      "isDefault": false
    },
    {
      "property": "erp_turnover_lastyear",
      "isDefault": false
    },
    {
      "property": "emailinvoice",
      "isDefault": false
    },
    {
      "property": "erp_status",
      "isDefault": false
    },
    {
      "property": "erp_firstsynced",
      "isDefault": false
    },
    {
      "property": "erp_lastsynced",
      "isDefault": false
    }