Skip to content

Configuration - Dun & Bradstreet Business Contacts

This section describes how you configure ACD for D&B. You need to configure ACD in these places:

Runtime Configuration

ACD fetches two objects from D&B Business Contacts: company and worksite. The worksite is what maps 1:1 to company records in Lime CRM and is an actual place where you can work. What D&B calls company is not created in Lime CRM as any object, but since it has data that is of interest in Lime CRM, we fetch also the company.

All available properties are documented in the BBC API. The endpoints that we fetch data from are:

All countries covered by the D&B Business Contacts API are listed with the /countries endpoint. One of these countries can be picked as the default country for company searches. For this to work, valid credentials are needed in the application configuration.

Example

This is an example configuration for ACD with D&B Business Contacts. See general configuration for a description of each parameter.

{
  "mapping": [
    {
      "limeProperty": "name",
      "providerProperty": "worksite.name"
    },
    {
      "limeProperty": "postaladdress1",
      "providerProperty": "worksite.postalAddress.address"
    },
    {
      "limeProperty": "postaladdress2",
      "providerProperty": "worksite.postalAddress.co"
    },
    {
      "limeProperty": "postalzipcode",
      "providerProperty": "worksite.postalAddress.zipcode"
    },
    {
      "limeProperty": "postalcity",
      "providerProperty": "worksite.postalAddress.city"
    },
    {
      "limeProperty": "country",
      "providerProperty": "worksite.country.name"
    },
    {
      "limeProperty": "visitingaddress1",
      "providerProperty": "worksite.visitAddress.address"
    },
    {
      "limeProperty": "visitingaddress2",
      "providerProperty": "worksite.visitAddress.co"
    },
    {
      "limeProperty": "visitingzipcode",
      "providerProperty": "worksite.visitAddress.zipcode"
    },
    {
      "limeProperty": "visitingcity",
      "providerProperty": "worksite.visitAddress.city"
    },
    {
      "limeProperty": "www",
      "providerProperty": "worksite.internet.url"
    },
    {
      "limeProperty": "phone",
      "providerProperty": "worksite.phones.LeasedLine.number"
    },
    {
      "limeProperty": "registrationno",
      "providerProperty": "company.nationalRegistrationNumber"
    },
    {
      "limeProperty": "acd_unittype",
      "providerProperty": "worksite.type.name"
    },
    {
      "limeProperty": "acd_unitstatus",
      "providerProperty": "worksite.status.name"
    },
    {
      "limeProperty": "acd_email",
      "providerProperty": "worksite.internet.email.address"
    },
    {
      "limeProperty": "acd_maintradecode",
      "providerProperty": "worksite.business.activities.mainActivity.code"
    },
    {
      "limeProperty": "acd_maintrade",
      "providerProperty": "worksite.business.activities.mainActivity.description"
    },
    {
      "limeProperty": "acd_legalname",
      "providerProperty": "company.name"
    },
    {
      "limeProperty": "acd_legalform",
      "providerProperty": "company.legalForm.code"
    },
    {
      "limeProperty": "acd_vatno",
      "providerProperty": "company.vatNo"
    },
    {
      "limeProperty": "acd_turnover",
      "providerProperty": "company.economy.turnover.value"
    },
    {
      "limeProperty": "acd_turnovercurrency",
      "providerProperty": "company.economy.turnover.currency"
    },
    {
      "limeProperty": "acd_groupname",
      "providerProperty": "company.group.parent.name"
    },
    {
      "limeProperty": "acd_noofemployeescompany",
      "providerProperty": "company.business.numberOfEmployees.code"
    },
    {
      "limeProperty": "acd_noofemployeesunit",
      "providerProperty": "worksite.business.numberOfEmployees.code"
    },
    {
      "limeProperty": "acd_netprofit",
      "providerProperty": "company.economy.netProfit.value"
    },
    {
      "limeProperty": "acd_netprofitcurrency",
      "providerProperty": "company.economy.netProfit.currency"
    }
  ],
  "propertiesToPopulateSearchWith": {
    "searchText": [
      "registrationno"
    ]
  },
  "limetypeCompany": "company",
  "propertyProviderId": "acd_id",
  "propertyLastUpdated": "acd_lastupdated",
  "propertyResponsible": "coworker",
  "propertySavingError": "acd_errormessage",
  "propertyName": "name",
  "provider": "dnbbc",
  "customCommandId": "",
  "dnbbc": {
    "onlyShowActive": false,
    "onlyShowHQ": false,
    "language": "en",
    "defaultCountry": "ALL"
  },
   "last_checked_for_updates": "2022-06-10 07:10:03"
}

Explicit Naming

The configuration in Lime Admin is done using explicit naming in the sense that you have to specify from which of the two objects (company or worksite the data should be fetched from).

Example: The property name on the worksite is accessed by writing worksite.name in the configuration in Lime Admin.

Flattening of Arrays

As D&B Business Contacts returns arrays for data that Lime CRM only wants to store in fields, these properties must be treated with special care. The general rules are:

Rule Number 1

If the array contains objects with a property called type, then the first occasion of each unique type is added as a property directly on the property that holds the array in the API response.

Example: The array phones typically holds objects with type equals LeasedLine or Fax. In the configuration in Lime Admin you would then have to do this: worksite.phones.LeasedLine.number, worksite.phones.LeasedLine.blocked or worksite.phones.Fax.number.

Rule Number 2

The first one of the objects in the array is added as a property directly on the property that holds the array in the API response.

Example: The array worksite.internet.emails can contain zero to many email addresses. In the configuration in Lime Admin you would then have to do this: worksite.internet.email.address or worksite.internet.email.blocked. Notice that email is now specified in singular.

Option fields

There is possibility to store data from D&B into an option field in Lime CRM. You need to do two things to do this:

  1. Map your Lime CRM field to the property from D&B. Important: The property from D&B needs to be a CodeAndNameProperty which means that both a code property and a name property exists. Map your Lime CRM field to the code property!

    Example:

        {
          "limeProperty": "acd_noofemployeescompany",
          "providerProperty": "company.business.numberOfEmployees.code"
        }
    
  2. Put the D&B codes as keys for your options in your option field. Important here to have empty as an key for default option.

    Example:

        ({
          "sv": "",
          "no": "",
          "fi": "",
          "en_us": "",
          "da": "",
          "key": "empty",
          "stringorder": "1",
          "default": "true"
        },
        {
          "sv": "0 anställda",
          "no": "0 employees",
          "fi": "0 employees",
          "en_us": "0 employees",
          "da": "0 employees",
          "key": "AA01",
          "stringorder": "2"
        })
    

The including lip package provides a more complete example. Check D&B Business Contacts API documentation for information about which keys to use.

Application Configuration

ACD is using the application level configuration in order to configure API credentials for D&B.

Windows on-premise Installations

For Windows on-premise installations, the application level configuration is expressed in the file:

%ProgramData%\Lundalogik\LIME Pro Server\application_config.yaml

Add the following to the application_config.yaml file:

<application-name>:
  secrets:
    addon-acd:
      dnbbc:
        credentials:
          client_id: <dnbbc-client-id>
          secret: <dnbbc-secret>

Restart the web server.

Cloud

For Cloud installations, the application level configuration is configured in CAFE (Cloud Administration).

Add the following to the Secret box in the application configuration in CAFE:

addon-acd:
  dnbbc:
    credentials:
      client_id: <dnbbc-client-id>
      secret: <dnbbc-secret>

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": "Dun & Bradstreet Information",
          "controls": [
            {
              "property": "acd_id",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_unittype",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_unitstatus",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_email",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_noofemployeesunit",
              "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_legalform",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_vatno",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_noofemployeescompany",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_turnover",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_turnovercurrency",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_netprofit",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_netprofitcurrency",
              "readonly": true,
              "visibleOnCreate": false
            },
            {
              "property": "acd_groupname",
              "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_unittype",
      "isDefault": false
    },
    {
      "property": "acd_unitstatus",
      "isDefault": false
    },
    {
      "property": "acd_email",
      "isDefault": false
    },
    {
      "property": "acd_noofemployeesunit",
      "isDefault": false
    },
    {
      "property": "acd_maintradecode",
      "isDefault": false
    },
    {
      "property": "acd_maintrade",
      "isDefault": false
    },
    {
      "property": "acd_legalname",
      "isDefault": false
    },
    {
      "property": "acd_legalform",
      "isDefault": false
    },
    {
      "property": "acd_vatno",
      "isDefault": false
    },
    {
      "property": "acd_noofemployeescompany",
      "isDefault": false
    },
    {
      "property": "acd_turnover",
      "isDefault": false
    },
    {
      "property": "acd_turnovercurrency",
      "isDefault": false
    },
    {
      "property": "acd_netprofit",
      "isDefault": false
    },
    {
      "property": "acd_netprofitcurrency",
      "isDefault": false
    },
    {
      "property": "acd_groupname",
      "isDefault": false
    }