Configuration¶
Use the Web Client's Admin pages for configuration. The configuration is written in JSON and consists of an Array
of Objects
where each Object
defines a single Info Tile. The properties of each Info Tile are divided into different sections in the configuration which are listed below.
Parameters¶
Valid properties are listed below.
Parameter | Values | Default Value | Section | Comment |
---|---|---|---|---|
name |
string |
N/A | basic | Required. A unique name for the tile. |
limetype |
string |
N/A | basic | Required. Limetype name. |
filter |
string |
N/A | basic | Required. Web Client filter ID - e.g. "webclient.deal.won" |
type |
"COUNT" or "SUM" |
N/A | basic | Required. Type of value calculated from the filter. |
property |
string |
N/A | basic | Required if type : "SUM" . The property name (database name) of the field used for summation. |
color |
string |
N/A | basic | CSS name, #value or lime- color. If this parameter is omitted, the Web Client's default color for the current Lime Type is used. |
icon |
string |
N/A | basic | Name of icon to display. If this parameter is omitted, the Web Client's default icon for the current Lime Type is used. |
inactive |
boolean |
false |
visibility | Indicating whether the tile should be hidden (on all devices). |
phone |
boolean |
true |
visibility | Indicating whether the tile should be displayed on mobile phones. |
groups |
[string] |
ALL | visibility | Array of strings with usergroup names required to see this tile, e.g. ["Admins", "Sales Managers"] . If groups is empty or omitted it will be visible for everyone. If the whole visibility section is empty or omitted it will be visible for everyone. |
prefix |
string |
N/A | details | Any character(s) placed before the value, e.g. "€" or "$" . |
suffix |
string |
N/A | details | Any character(s) placed after the value, e.g. "st" , "SEK" or "deals" . |
divisor |
number |
N/A | details | Any number used to divide the value, e.g. 1000 , 1000000 , 0.01 . |
decimals |
number |
N/A | details | When using divisor , you may configure the maximum number of decimals shown in the calculated value. |
lang |
string |
N/A | label | Required. Language to be used on the Info Tile. See more info below. |
text |
string |
N/A | label | Required. Label text to be used on the Info Tile. See more info below. |
Filter ID¶
The id of the filter is used in the configuration (parameter named filter
) to let Info Tiles know which filter the calculation should be based on.
Finding the filter id (Web Client):
Label Configuration¶
Labels should be short and descriptive, such as Won Deals.
Localization¶
Labels are localized using an array
with objects each containing language code and label text. A default
label can be used as fallback if the browser is using a language which has not been specified.
Array with browser language codes and localization:
"label": [
{
"lang": "da",
"text": "Røde pølser"
},
{
"lang": "no",
"text": "Olympiske gull"
},
{
"lang": "sv",
"text": "Köttbullar"
},
{
"lang": "fi",
"text": "Ei saa peittää"
},
{
"lang": "default",
"text": "Fish & Chips"
}
]
Example configuration¶
The example below works with Lime Base Solution v7.10.0.
{
"tiles": [
{
"basic": {
"name": "Active customers",
"limetype": "company",
"filter": "webclient.company.activecustomers",
"type": "COUNT"
},
"visibility": {
"inactive": false,
"groups": [
"Administrators"
]
},
"label": [
{
"lang": "sv",
"text": "Aktiva kunder"
},
{
"lang": "default",
"text": "Active customers"
}
]
},
{
"basic": {
"name": "Prospects",
"limetype": "company",
"filter": "webclient.company.prospects",
"type": "COUNT"
},
"label": [
{
"lang": "sv",
"text": "AProspekts"
},
{
"lang": "default",
"text": "Prospects"
}
]
},
{
"basic": {
"name": "Ongoing marketing activities",
"limetype": "campaign",
"filter": "webclient.campaign.ongoingactivities",
"type": "COUNT"
},
"label": [
{
"lang": "sv",
"text": "Pågående marknadsaktiviteter"
},
{
"lang": "default",
"text": "Ongoing marketing activities"
}
]
},
{
"basic": {
"name": "Today's notes",
"limetype": "history",
"filter": "webclient.history.todayshistory",
"type": "COUNT"
},
"label": [
{
"lang": "sv",
"text": "Dagens historik"
},
{
"lang": "default",
"text": "Today's notes"
}
]
},
{
"basic": {
"name": "My sales activities this month",
"limetype": "history",
"filter": "webclient.history.mysalesactivitiesthismonth",
"type": "COUNT"
},
"label": [
{
"lang": "sv",
"text": "Mina säljaktiviteter denna månad"
},
{
"lang": "default",
"text": "My sales activities this month"
}
]
},
{
"basic": {
"name": "My won deals this month",
"limetype": "deal",
"filter": "webclient.deal.mywondealsthismonth",
"type": "SUM",
"property": "value"
},
"details": {
"suffix": "MSEK",
"divisor": 1000000,
"decimals": 2
},
"label": [
{
"lang": "sv",
"text": "Mina vunna affärer denna månad"
},
{
"lang": "default",
"text": "My won deals this month"
}
]
}
]
}
Adding Info Tiles to the Start Page¶
The most common use of addon-infotiles is to use them on the Start Page
You add the info tiles to the start page just as you would add any other widget to the start page.
- In the Name field you type
infotiles-tile
- In the Properties field you type
{
"config": "Prospects"
}
where "Prospects" is the Unique Name of the Info Tile you wish to add. Repeat for each Info Tile.
Adding Info Tiles to Cards¶
It's possible to add an Info Tile to other views that can display custom web components, like the built-in Card view.
Let's say that you have created the following "My Active Deals" filter:
And that we have created the appropriate config for the Info Tile:
We can now configure this Info Tile to be displayed on the Company card view. Go to the Company -> Card configuration, and find the Web components section. Add a new web component configuration. Enter infotiles-tile
in the Name field, and in the Properties section, enter the following:
{
"config": "my-deals"
}
The Info Tile will automatically detect that it is being shown in the context of a specific Lime Object (which we will call "the current Lime Object"), and will add to the existing filter that the filtered items also must be related to the current Lime Object. If the filtered items are of a Lime Type that has more than one relation to the Lime Type of the current Lime Object, the Info Tile will default to using the first relation property of the correct Lime Type that it finds. If that is not the correct one to use, a specific property can be specified by adding the relationPropertyName
key, with the name of the property as the value. For example:
{
"config": "my-deals",
"relationPropertyName": "customer"
}
Show info tiles one or more relations away¶
Dot notation is supported for relationPropertyName
, which enables possibilities to show Info Tiles for Lime Types that might be directly related to the Lime Type at hand. Let's say that you on a ticket (helpdesk
) and want to see if anyone has logged time (timereport
) the last three days on the active ticket's customer. You already have an Info Tile called "Recent time reports" for Time reports. If you add this configuration to the Properties section:
{
"config": "Recent time reports",
"relationPropertyName": "company.helpdesk._id"
}
you will get this result:
You can even add an Info Tile that shows how many open tickets the customer has, on the actual ticket. This is done by adding this configuration ("Active tickets" is an existing Info Tile):
{
"config": "Active tickets",
"relationPropertyName": "company.helpdesk._id"
}
resulting in this result: