Skip to content

Configuration

1. Design the Callout

Let us say you want to create a Callout that says "❕ This customer has unpaid invoices". The Callout should be shown on the Company card and, of course, only be shown if the customer has unpaid invoices.

The first thing you need to do is to create the filter set Unpaid invoices (if you don't already have it). This is done, as usual, in the web client by doing the following:

  1. Navigate to All Invoices.
  2. Create your filter for unpaid invoices.
  3. Save this filter set as Unpaid invoices.

The second thing you do is to create your Callout.

  1. Navigate to Lime Admin ➡ Settings ➡ Callouts and click Add item.
  2. Set the following properties:

    Name: Unpaid invoices

    Limetype: Invoice

    Filter: Unpaid invoices

    Icon: exclamation_mark

    Color: rgb(var(--color-red-default))

  3. Set Default texts accordingly:

    Language: Default

    Heading: Unpaid invoices!

    Content (Markdown): This company has one or more unpaid invoices!

  4. Click Save

unpaid_invoices_configuration_example

Example configuration of the Callout "Unpaid invoices".

2. Add the Callout to a card

Once you have designed your Callout, you need to add it to a card. In our example with Unpaid invoices, we want to add the Callout to the Company card.

  1. Navigate to Views ➡ Company ➡ Card
  2. In the Widgets section, add the following configuration:

Name:

lwc-limepkg-callout-card

Properties:

{
    "name": "<Given name of the callout i.e. Unpaid invoices>"
}

The Callout 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 Callout will default to:

  1. A field with the same name as the limetype (if it exists)
  2. If it doesn't, Use first relation property of the correct Lime Type that it finds.

If that is not the correct one to use, you can specify what property to use by adding the property relationPropertyName, with the name of the property as the value. like this:

{
    "name": "<Given name of the callout i.e. Unpaid invoices>",
    "relationPropertyName": "other_company_relation_field"
}

unpaid_invoices_configuration_example

Example configuration of adding the Callout "Customer with unpaid invoices" to the Company card.

unpaid_invoices_configuration_example

The end result.

Technical specification

Name Default value Description
Name N/A Unique name of your callout (used as reference in the view configuration later)
Limetype N/A The card where the callout is shown if it matches the filter
Filter N/A The filter that decides if the callout is shown or not
Icon The icon of the chosen limetype What icon the callout should show
Color The color of the chosen limetype What color the callout should have. We have guidelines here

Display texts

Name Default value Description
Language N/A Language of the heading and content. The Default option is used if the users language doesn't match any configured language
Heading N/A Header of the callout
Content (Markdown) N/A The content (text) of your callout in markdown. Cheat sheet