Skip to content

Technical

ACD consists of four parts:

  1. Frontend with Lime Web Components (in webclient).
  2. Frontend with Lime Bootstrap (in desktop client).
  3. Python endpoints.
  4. Scheduled task for automatic updates

Frontend - Web Client

ACD for the web client is built on Lime Web Components interfaces which provide an API and component life cycle management for the web client. More information can be found here: Lime Web Components. Most of the elements used in ACD are Lime Elements. More information about Lime Elements can be found here: Lime Elements

Frontend - Desktop client

The desktop app is created with Lime Bootstrap but aims to mimic the look and feel of the web client component. Since Lime Bootstrap doesn't offer the same component based approach as Lime Web Components, it consists of two separate apps as described below.

ACD Modal

The app for searching and acquiring companies. A dialog is shown from VBA with the app inside it. From the app the user can also decide to instead create a company manually, i.e., the "normal" way in Lime CRM.

ACD

A app living in the actionpad of the company inspector. If the company is synced with the data provider (it has a provider id) the app will show. The app shows what data provider that is the source, as well as when the company was last synced from the data provider. A button to refresh the company's data is available.

Python endpoints

CompanyEndpoint - POST

  /company/

Fetch company from configured data source by source ID and create a CRM company. If a limeid is provided, the corresponding CRM company will be updated. It will return the created/updated Lime CRM company id.

Example json payload:

{
  "sourceid": "115:11111111",
  "limeid": 1002     // Optional
}

Example response:

{
   "id": 1002
}

Search - GET

  /search/

Search for companies in the configured data provider and map them to a Lime CRM company if possible. Different data providers allows for different search opportunities.

Example json payload for dnbbc as a data provider:

{
  "query": {
    "searchText": "Lime technologies",
    "onlyActiveCompanies": False,
    "onlyHeadOffices": True
  }
}

Note

The query value should be a JSON string.

Example response (tuple with search result and the number of total search hits):

([{"name": "Lime technologies", "city": "Lund", "country": "SE"}], 1)

CreditsafeCountries - GET

  /creditsafe/countries/

Returns available countries in your Creditsafe subscription.

Example response:

[
  {
    "text": "Sweden",
    "value": "SE",
    "selected": true | false
  }
]

MetaData - GET

  /meta-data/

Serves the dekstop app with translations and config values. This endpoint takes no input data.

Example response:

{
  "config": {"provider": "dnbbc", ... },
  "translations": {"title": "Add company", ... }
}

The configuration dict is filtered, all configuration values is not included, only the ones that is needed.

The translation dict only includes translations related to this add-on and the language is the same as the current session's. If the current language is not supported, English is returned.

Scheduled task for automatic updates

If enabled in the application config the scheduled task will fetch updates from the provider's API every night. The task will go through the following steps:

  • Check if automatic updates is supported for the configured provider
  • Request the latest changes from the provider and map the response to valid limeobjects. Check out the "How it works" page of a provider to read up on provider specific details.
  • Save all changes to the Lime database. The provider id dictates which limeobject will be updated.
  • Add a history to every company with an overview of the changes

Provider Specifics

Dun & Bradstreet Business Contacts

Charging

Using the search API is free. It is when you do a GET on a specific company/worksite/person that Dun & Bradstreet counts it as a purchase. Updating a company in Lime CRM that you already have bought from Dun & Bradstreet is counted as a subscription, which has a lower price per ID. That price is paid per year, which means you can do several updates during a year for the same cost as one update.