Skip to content

Configuration - Brønnøysundregistrene

This section describes how you configure ACD for Brønnøysundregistrene. You need to configure ACD in these places:

Runtime Configuration

ACD uses Brønnøysundregistrene API to provide company data. It's a one-to-one mapping between Lime CRM's company limetype and Brønnøysundregistrene's /enheter & /underenheter endpoints.

To see available mapping properties, head over to Brønnøysundregistrene's Swagger documentation and look at the example response. When you are mapping Brønnøysundregistrene's data to Lime properties in the configuration, you should be aware that the result from Brønnøysundregistrene is flattened and prefixed with company.

The search is performed using either the /enheter endpoint or both the /enheter and /underenheter endpoints, depending on whether subunits should be included in the search results or not. The user can choose to include subunits at each company search. The default setting can be set in the runtime config by adding the following to the configuration:

"brreg": {
    "includeSubunits": true
  }

Example

This is a complete Brønnøysundregistrene provider specific configuration for ACD. See general configuration for a description of each parameter.

{
  "brreg": {
    "includeSubunits": false
  },
  "mapping": [
    {
      "limeProperty": "name",
      "providerProperty": "company.navn"
    },
    {
      "limeProperty": "postaladdress1",
      "providerProperty": "company.forretningsadresse.adresse.0"
    },
    {
      "limeProperty": "postalzipcode",
      "providerProperty": "company.forretningsadresse.postnummer"
    },
    {
      "limeProperty": "postalcity",
      "providerProperty": "company.forretningsadresse.poststed"
    },
    {
      "limeProperty": "visitingaddress1",
      "providerProperty": "company.forretningsadresse.adresse.0"
    },
    {
      "limeProperty": "visitingzipcode",
      "providerProperty": "company.forretningsadresse.postnummer"
    },
    {
      "limeProperty": "visitingcity",
      "providerProperty": "company.forretningsadresse.poststed"
    },
    {
      "limeProperty": "postaladdress1",
      "providerProperty": "company.beliggenhetsadresse.adresse.0"
    },
    {
      "limeProperty": "postalzipcode",
      "providerProperty": "company.beliggenhetsadresse.postnummer"
    },
    {
      "limeProperty": "postalcity",
      "providerProperty": "company.beliggenhetsadresse.poststed"
    },
    {
      "limeProperty": "visitingaddress1",
      "providerProperty": "company.beliggenhetsadresse.adresse.0"
    },
    {
      "limeProperty": "visitingzipcode",
      "providerProperty": "company.beliggenhetsadresse.postnummer"
    },
    {
      "limeProperty": "visitingcity",
      "providerProperty": "company.beliggenhetsadresse.poststed"
    },
    {
      "limeProperty": "www",
      "providerProperty": "company.hjemmeside"
    },
    {
      "limeProperty": "registrationno",
      "providerProperty": "company.organisasjonsnummer"
    },
    {
      "limeProperty": "acd_legalform",
      "providerProperty": "company.organisasjonsform.kode"
    },
    {
      "limeProperty": "acd_maintradecode",
      "providerProperty": "company.naeringskode1.kode"
    },
    {
      "limeProperty": "acd_maintrade",
      "providerProperty": "company.naeringskode1.beskrivelse"
    },
    {
      "limeProperty": "acd_legalname",
      "providerProperty": "company.navn"
    },
    {
      "limeProperty": "acd_noofemployeescompany",
      "providerProperty": "company.antallAnsatte"
    }
  ],
  "propertiesToPopulateSearchWith": {
    "searchText": [
      "registrationno"
    ]
  },
  "limetypeCompany": "company",
  "propertyProviderId": "acd_id",
  "propertyLastUpdated": "acd_lastupdated",
  "propertyResponsible": "coworker",
  "propertySavingError": "acd_errormessage",
  "provider": "brreg",
  "customCommandId": "",
  "propertyName": "name",
  "last_checked_for_updates": "2022-06-10 07:10:03"
}

View Configuration

Add ACD's web component and the newly created fields to the company view configuration as described below.

Company

Card

Note

Remember to do this for all existing variants.

  1. Add ACD's web component acd-update-object as a widget on the card view configuration. image

  2. Add the following as a section to your card view configuration.

        {
          "title": "Brønnøysundregistrene Information",
          "controls": [
            {
              "property": "acd_id",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_lastupdated",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_legalform",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_maintradecode",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_maintrade",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_legalname",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_noofemployeescompany",
              "readonly": true,
              "visibleOnCreate": false
            }
          ]
        }
    

Table

Add the following as column properties to the table view configuration.

    {
      "property": "acd_id",
      "isDefault": false
    },
    {
      "property": "acd_lastupdated",
      "isDefault": false
    },
    {
      "property": "acd_legalform",
      "isDefault": false
    },
    {
      "property": "acd_maintradecode",
      "isDefault": false
    },
    {
      "property": "acd_maintrade",
      "isDefault": false
    },
    {
      "property": "acd_legalname",
      "isDefault": false
    },
    {
      "property": "acd_noofemployeescompany",
      "isDefault": false
    }