Skip to content

Installation instructions

Preparations

Before you start the installation:

  • Have you ordered a Lime Marketing site?
  • Have you or the sales rep sent out the Newsletter Form?

    On-prem only: - Can we access the webclient externally?

What the customer needs to prepare or answer:

  • What sending domain do they want?
  • How do they work with consent and do they want to work with consent in Lime?

Installation

For installations in shared cloud, go to step 3.

1. Add lime-newsletter as a dependency to your solution

Run:

poetry add lime-newsletter

2. Build and deploy your solution

3. Install tables and fields

Now it's time to set up the required tables and fields. You can do this by running the addon installer in Lime Admin under Newsletter -> Setup or manually by following this specification.

On the Setup page you have a couple of options for how you want newsletter to be installed:

  • First you need to select the limetype(s) that should be used as Mailing Recipients
  • The possibility to add an emailhardbounce field to the limetypes related to Mailing Recipients
  • The possibility to add consent and consenttype tables to the database.
  • The possibility to add linkclick and emailopening tables

Info

If the customer is going to use consents it's important to check "Install the optional consent and consenttype tables" even if the solution is already using limepkg_consent since it adds a relation between a Marketing Activity and Consenttype

If you do not want to use the default tables for newsletter you can use any tables as long as the relations and structure is matching the required structure. The table and field names are then configured in Lime Admin if they differ from the default.

Before you proceed:

Warning

Make sure that the option fields campaign.type, campaign.campaignstatus have key values (some older core databases were lacking this).

4. Configure in LISA

(Optional) Add the following field manually in LISA

Recipient relation tables

database field type Swedish English Danish Norwegian Finnish Dutch
totaloptout yes/no Total opt-out Total opt-out Total opt-out Total opt-out Total opt-out Total opt-out

Add SQL expression

  • Add the SQL expression on mailing.htmlsendoutlink and mailing.htmlstatisticlink. The SQL expressions are found in text files in the folder lisa\sql_expressions in the assets.zip attached to the latest release in GitHub.

Desktop client (only)

This step is only necessary if Newsletter is supposed to be used from the Lime CRM Desktop Client. If webonly, continue to the next step.

  • Add the icons for the tables mailing, emailopening, linkcklick and recipient. The icons are found in the folder lisa\icons. If you cannot find the tables in LISA, log out and back in from the designer.
  • Add descriptive expressions for mailing, emailopening, linkcklick and recipient. The descriptive expressions are found in text files in the folder lisa\descriptives.
  • If your Lime CRM application already has an Actionpad for the marketing activity/campaign card: Add the code below to the campaign.html Actionpad. Otherwise, create an actionpad with the same database name as your marketing activity table and add the code.
    <button class="btn btn-lime btn-info" data-bind="openURL: 'https://app.bwz.se/customer/', text:'Open Lime Marketing', icon: 'fa-paper-plane-o'"></button>
    

Adjust the URL to your customers Lime Marketing site.

Create an API user

An API key in Lime CRM will be used at a later stage of the integration setup, make sure that the user for that API key has the correct permissions in the database.

Info

The Addon Installer will add the required user and group for you. You can skip the steps below if you installed the package with the Addon Installer.

  1. Create a Newsletter integration group in LISA.
  2. Create the API user in LISA with the following settings:
  3. Add the API user to the Newsletter integration group.
  4. Create an API key for the user and save it for later use.

Don't know how to create an API user? Follow instructions here.

Create policies

  1. Create new table policies for tbl_mailing, tbl_recipient, tbl_linkclick and tbl_emailopening, and set the following permissions for normal users.
Policy name R W A D Apply to
tbl_mailing mailing table
tbl_recipient recipient table
tbl_linkclick linkclick table - If link clicks are being used
tbl_emailopening emailopening table - If email openings are being used
  1. Set the correct permissions for the Newsletter integration group on each table policy. The group will need read permissions to all tables used by the integration. Then, apply these policies on the corresponding tables.
Policy name R W A D Apply to
tbl_person person table
tbl_campaign campaign table
tbl_company company table
tbl_participant participant table
tbl_mailing mailing table
tbl_recipient recipient table
tbl_linkclick linkclick table - If link clicks are being used
tbl_emailopening emailopening table - If email openings are being used
tbl_consenttype consenttype table
tbl_consent consent table
fld_consenttype consenttype field on consent table

5. Configuration

If you use person as recipient, continue with the configuration.

Otherwise, have a look at the instructions bellow.


The following step is only necessary to read if you are using another table than person as recipients,

Using another table than person as mailing recipients (If you didn't use the addon-installer)

If you want to use any type other than person as a mailing recipient you will need to add both read and write permissions for that table, e.g. company. If the import fields specify getting data from other tables than person you need to set read permissions on those affected as well (even if person is your mailing recipient).

Every relation between the person table and the tables used in newsletter must added to the company table. A few mandatory fields must also be added to the other table.

Info

The Addon Installer can fix the required structure to support a different recipient table. Just re-run the addon installer and select your limetype in the dropdown on the Setup page. Just make sure that there is an email field on your limetype.

In LISA you must do the following:

  • On the consent card, create a relation to company.
  • On the participant card, create a relation to company.
  • On the company card you need to do a few things:
  • Create a relation (tab) to recipient.
  • Create the following fields:
    • email,
    • emailhardbounce
    • totaloptout - not needed if using the consent table
    • Choose which fields to use as replacement for firstname and lastname. companyname can be used on both.
  • On the recipient table, verify that the relation to company was properly created.