Technical¶
Configuration explanations¶
Here is an explanation of all the components that can be configured in lime-admin
Consent type mapping¶
In version 2 of the newsletter integration we introduced support for different types of send-outs, e.g newsletters and product information.
This can be done by mapping consent types in Lime CRM to publications in Lime Marketing. Consenttype
mapping is used to tell lime-newsletter which consent type to use for what publication(s).
You can for example map the Product info consent type in Lime CRM to the publications Lime CRM customer info, Lime Go customer info and Lime Easy customer info:
You need the ids of the consent type and the publications in question. The id of the publication can be found by pressing the i-symbol in the list of publications in Lime Marketing.
If you don't have consent type and consent tables in your database leave the consenttypemapping
empty
Import fields¶
You can specify which properties from the Marketing Activity participants you want to be available in Lime-Marketing using the Import fields
under the Required limetypes
-> Participant limetype settings
in the configuration in Lime Admin.
This can later be used when replacing merge fields in your emails. For example if you want to use the firstname property of a person in an email, first you add person.firstname
in your Import fields
. You can later map the property to an existing recipient property in Lime Marketing or create a new one. This is done in Administration > Integrations > "Your integration name" > Newsletter settings.
In the picture below you can see how the mapping looks like and where you can create a new recipient property. The property can later be used in your email, for example "Hello $$recipient.Firstname$$
", if you have mapped the property to the "Firstname" recipient property.
Id and email are mandatory for the integration to work. The id is later used to connect a recipient to a 'person' in Lime CRM.
All importfields
must start from the participant
limetype but can be any related properties found on the card.
Note that only one-to-one (like participant to
person) or *many-to-one* (like
personto
company`) relations are supported.
Example using person:
Example using company:
All importfields must start from the participant
card but can be any related properties found on the card.
Note that only one-to-one (like participant
to person
) or many-to-one (like person
to company
) relations are supported.
Date, time and set properties are not supported.
The importfields are validated on the server and will display an error if any non-existing tables or fields are being used. Read access to any fields used are also validated.
Campaign types and campaign statuses¶
Campaigntypes
and campaignstatus
are used to filter which marketing activities that should be selectable in Lime-Marketing. You can change which types and statuses of campaign you want to see in Newsletter under Required limetypes
-> Campaign limetype settings
:
If you leave these empty all marketing activities will be selectable in Lime-Marketing
Note that when using lime-newsletter and addon-lime-event the same filter for the campaigns must be used in both configs.
Opt-in settings¶
You can configure the integration to automatically create new limeobjects when someone submits the opt-in form of one or more chosen publications. The feature requires that the limetype has an email field. You must also make sure that all the required fields for the limeobject are present in the Field mappings
section. The same applies for the opt-in form in Lime Marketing, all the required fields must be present and set to required in the form.
¶
In the section Field mappings
the first field is the name of the lime property and the second field is the recipient property name in Lime Marketing. The recipient property name in Lime Marketing can be found in Administration -> Email recipient properties.
As mentioned you need to make sure that all required properties on the limetype have required form fields on the opt-in form in Lime Marketing. The integration cant create the lime type if not all required fields have data. So make sure that all the required fields has its corresponding field in Lime Marketing and that they are marked as required. Open this editor by clicking on the "Subscription form" link on the publication settings page.
Settings¶
You can control if the feature is active with the Enabled
field.
Create duplicates
controls if you should be able to create a new object if there is already an object with the same email address.
Publications
contain the ids of all publications that should be able to create new objects. Leave this empty if you want opt-ins from all publications to create objects.
Limetype settings¶
Limetype to create
is the limetype you want to create, for example person
or lead
.
Email property for limetype
is the email field on the selected limetype. Note that the field must be present in the Field mappings
.
Field mappings
is a list of mapped properties between Lime properties and Marketing recipient properties. Map the lime property and the corresponding Marketing opt-in form field name.
It is not possible to map to a property on a relation field. Simple field types works. I.e. the following types: string, text, link, integer, decimal, date, phone, mobilephone.
Opt-in eventhandler¶
All opt-in events are always published to the event handler on the lime.lime_newsletter
exchange and newsletter.opt_in
routing key. The event handler payload will contain:
- The publication name and id found in the webhook payload
- The email address of the recipient who opted in
- The full webhook payload from lime-marketing
If a person who already exists in Lime CRM opts in the person record id will be added to the payload as well.
Example opt-in event payload:¶
{
"person": {"Id": 1001},
"publication": {
"id": 123,
"name": "Nyhetsbrev",
},
"email": "[email protected]",
"original_event": {
"Publication": {
"Id": 123,
"Name": "Nyhetsbrev"
},
"MailRecipient": {
"Id": 17,
"Email": "[email protected]",
"Properties": {}
},
"ResponseWasUpdated": false,
"Form": {
"Id": 220,
"Name": "Opt-in: Nyhetsbrev",
"FormType": "SUBSCRIPTION",
"FormResponseId": 21,
"FormFieldValues": [
{
"Id": 44,
"Name": "Email",
"FormFieldPropertyType": "EMAIL",
"ControlType": "TEXT",
"Value": "[email protected]",
"Values": [],
"FieldLabel": "Email",
"ValueOptions": [],
"FormFieldDataType": "Email"
}
],
"FormFields": [
{
"Id": 80,
"Name": "Email",
"FormFieldPropertyType": "EMAIL",
"ControlType": "TEXT",
"FieldLabel": "Email",
"FormFieldDataType": "Email"
}
]
},
"FormResponseType": "PublicationOptIn",
"EventRaisedUtcTimeStamp": "2025-06-08T11:55:46.372831"
}
}
Link clicks¶
Link click settings are used for enabling the tracking of link clicks in Lime.
These settings are found under Optional limetypes
in the left hand menu.
The Linclick enabled
checkbox controls whether linkclicks should be created or not.
Configure the limetype by selecting the linkclick limetype, the other fields will automatically be mapped if they exist in the database:
Set the value for person
to the object you are sending your newsletter to (e.g. company
or person
).
See required structure for instructions on how to set up the link click card.
Mail openings¶
Email opening settings are used for enabling the tracking of email openings in Lime.
These settings are found under Optional limetypes
in the left hand menu.
The Email opening enabled
checkbox controls whether emailopenings should be created or not.
Configure the limetype by selecting the emailopening limetype, the other fields will automatically be mapped if they exist in the database:
Set the value for person
to the object you are sending your newsletter to (e.g. company
or person
).
See required structure for instructions on how to set up the emailopening card.
Get Recipients¶
With the getrecipientsenabled
in your config you can control whether you want to be able to fetch mailing recipients from a mailing into Lime Marketing. If the property is not included in the config the value is by default set to true. Contact the Marketing Tech team for more information.
Object content¶
The Object content
config is a list of lime-queries.
Set a unique queryname
for each item.
Paste your lime-query in the code-editor.
You can use all features of lime-query like nested objects and setting aliases for your fields.
But it's important to set the exp
value of the filter to "{0}"
since this is what is inserted from the search input in Lime Marketing.
Since Vue can not handle properties stating with '_'
or '$'
it is recommended to create an alias for any system properties like '_id'
or '_descriptive'
. If you forget to do this, the illegal characters will automatically be cleaned by Lime Marketing before you insert the data.
Not sent due to...¶
Enable the 'Not sent status'
functionality by checking 'Not sent status' enabled
on the start page for each configuration instance.
This will allow you to see why some recipients did not recieve the mail.
not_sent_due_to_optout
: The recipient has previously done an optout from the current publication or a total opt-outnot_sent_due_to_bounce
: The recipient has bounced in a previous sendout for this lime-marketing sitenot_sent_due_to_shared_block_list
: The recipient is on the "shared block list". It means that they have previously bounced for another customer.
You can test the not_sent_due_to_shared_block_list
functionality by adding the recipient [email protected]
to your sendout.
How to Create a Content Block for the Object Content Integration¶
The content block is created using standard HTML. The object content data is inserted with Vue syntax. Read more about Vue here.
Required HTML-attributes:
-
data-editor-query-name
: The name of the query defined in the Lime Admin config. -
data-editor-contentblock-editor-type
: Must be set toBizWizard.CMS.Editors.LimeCRM
. -
data-editor-get-content-as-list
: This determines if the data should be fetched as the first limeobject matching the lime-query filter or a list of all matching objects.
Example¶
The query for this contentblock looks like this:
{
"limetype": "deal",
"responseFormat": {
"object": {
"_id": {
"_alias": "dealid"
},
"name": null,
"value": null,
"coworker":{
"_id": {
"_alias": "coworkerid"
},
"firstname": null,
"lastname": null
},
"company":{
"name": null
}
}
},
"filter": {
"op": "=",
"key": "coworker._id",
"exp": "{0}"
}
}
<table data-editor-contentblock align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td data-editor-contentblock-editor data-editor-contentblock-editor-type="BizWizard.CMS.Editors.LimeCRM" data-editor-query-name="deals_query" data-editor-get-content-as-list="true" data-editor-contentblock-editor-name="LimeCRM Content">
<table align="center" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="center">
<table style="margin: 10px 40px;">
<tr>
<td v-for="m in objectContent" data-editor-contentblock-editor data-editor-contentblock-editor-name="Deal" data-editor-contentblock-editor-type="BizWizard.CMS.Editors.Text">
<table style="padding:10px; margin: 0px 5px; background-color:#FFFFFF">
<tr>
<td>
<table style="line-height:1.3em; padding-top:10px">
<tr>
<td ><span id="content-body"><strong style="color: #00b3a7">{{m.name}}</strong></span></td>
</tr>
<tr>
<td><span id="content-body">{{m.value}}</span></td>
</tr>
<tr>
<td>
<span id="content-body">{{m.coworker.firstame}} {{m.coworker.lastname}}</span>
</td>
</tr>
<tr>
<td>
<span id="content-body">{{m.company.name}}</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
To insert the data you can use the Vue viewmodel objectContent
. This will either be an object or a list of objects depending on the value of the data-editor-get-content-as-list
attribute.
Use dot-notation on the viewmodel to access data from a single object result:
<span>{{objectContent.name}}</span>
Use vue syntax on the table data tag to loop through list results:
<td v-for="m in objectContent"></td>
Access data from iterated objects through dot-notation on the alias ('m'
):
<span>{{m.name}}</span>
Remember that Vue can not have properties starting with '_'
. Any underscores will be cleaned automatically from the object content model if you forget to create an alias in your lime-query.
To insert an image to your contentblock you will need to access the image through an url as a property on the limeobject.
Then you use the Vue method v-bind:src
to display the image:
<td align="center"><img v-bind:src="m.imageurl" alt="Image of coworker" width="150"></td>
Content Block Structure¶
A breakdown of the required structure, based on the example block above.
The Container¶
<table data-editor-contentblock align="center" border="0" cellspacing="0" cellpadding="0">
.
.
.
data-editor-contentblock
: Used to identify the table which contains the content block.
The Editable Data¶
<td data-editor-contentblock-editor data-editor-contentblock-editor-type="BizWizard.CMS.Editors.LimeCRM" data-editor-query-name="deals_query" data-editor-get-content-as-list="true" data-editor-contentblock-editor-name="LimeCRM Content">
.
.
.
<td v-for="m in objectContent" data-editor-contentblock-editor data-editor-contentblock-editor-name="Deal" data-editor-contentblock-editor-type="BizWizard.CMS.Editors.Text">
data-editor-contentblock-editor
: Identifies a section which should be editable in the right hand menu.
The example above contains two instances of this attribute. The outermost, in combination with the `data-editor-contentblock-editor-type="BizWizard.CMS.Editors.LimeCRM"`attribute, adds the main editor in which you execute your search.
The inner adds a text editor for each company-table created from the search results in order to enable editing of the individual table data blocks.
-
data-editor-query-name
: The name of the query defined in the Lime Admin config. -
data-editor-get-content-as-list
: Determines if the result should be fetched as a list or as a single object. -
data-editor-contentblock-editor-name
: Sets the name of the content block editor.
Required structure¶
This is the standard structure that the integration expects and needs to function properly, however every table and field name can be configured in the lime-admin config.
In order to get the consent flow working you must have the relations to the campaign and person tables.
If you do not want to use consents you can hide the consenttype
and consent
table, but they must still exist in your database.
You must also have at least one consent type created.
Mailing¶
Field name | Required | Suggested local name(en/sv) | Field type | Description |
---|---|---|---|---|
subject | x | Subject/Titel | Text field | The subject from the mailing (1024 characters) |
campaign | x | Marketing activity/Marknadsaktivitet | relation (1:n campaign-mailing) | Relation to the campaign, a campaign can have many mailings |
statisticlink | x | Statistics link/Statistiklänk | Link field | Hidden field used to hold statistic link from Lime Marketing (1024 characters) |
sendoutlink | x | Sendout link/Utskickslänk | Link field | Hidden field used to hold send out link from Lime Marketing, i.e the actual layout of the mail sent (1024 characters) |
htmlstatisticlink | x | Statistics/Statistik | HTML-tab | SQL-expression: mailing.[statisticlink]. Displays the content of the statistic link |
htmlsendoutlink | x | Sendout/Utskick | HTML-tab | SQL-expression: mailing.[sendoutlink]. Displays the content of the send out link |
mailingid | x | Newsletter ID | Text field | The mailing id from Lime Marketing, should be hidden |
senddate | x | Sent/Skickat | Date | The date when the mailing was sent |
recipient | x | Mailing recipient/Utskicksmottagare | relation (1:n mailing-recipient) | Relation tab to the recipients, a mailing can have many recipients |
linkclick | Relation(1:n mailing-linkclick) | Relation to linkclick, a mailing can have many linkclicks (Only add if using linkclick) | ||
emailopening | Relation(1:n mailing-emailopening) | Relation to emailopening, a mailing can have many emailopenings (Only add if using emailopening) |
Recipient¶
Field name | Required | Suggested local name(en/sv) | Field type | Description |
---|---|---|---|---|
person | x | Person | relation: (1:n person-recipient) | Relation to the person, a person can have many recipients |
mailing | x | Mailing/E-postutskick | relation: (1:n mailing-recipient) | Relation to the mailing, a mailing can have many recipients |
sendoutstatus | x | Sendout status/Utskicksstatus | Option list(sent, open, clicked, bounce, optout, not_sent_due_to_optout, not_sent_due_to_bounce, not_sent_due_to_shared_block_list) | Used to set status for the mailing. must contain correct option keys |
Marketing activity(Campaign)¶
Field name | Required | Field type | Description |
---|---|---|---|
name | x | Text field | Name of the marketing activity |
type | Option list | Used to filter out the kind of campaigns to see in Newsletter | |
campaignstatus | Option list | Used to filter out the status of campaign to see in Newsletter | |
participant | x | Relation(1:n campaign-participant) | The participants that will get the sendout |
mailing | x | Relation(1:n campaign-mailing) | The mailing sent in Newsletter |
consenttype | Relation(n:1 campaign-consenttype) | Send mail to persons with a consent of this type |
Person¶
Field name | Required | Field type | Description |
---|---|---|---|
x | Link field | Email to person IMPORTANT | |
totaloptout | Checkbox | Shows if the person has done an optout in Newsletter, if set the person will not be included when importing campaign participants | |
emailhardbounce | Checkbox | Shows if the person has a hard bounce in Newsletter | |
recipient | x | Relation(1:n person-recipient) | Relation to recipient, a person can have many recipients |
consent | Relation(1:n person-consent) | Relation to consent, a person can have many consents. | |
participant | x | Relation(1:n person-participant) | Relation to participant, a person can have many participants |
linkclick | Relation(1:n person-linkclick) | Relation to linkclick, a person can have many linkclicks (Only add if using linkclick) | |
emailopening | Relation(1:n person-emailopening) | Relation to emailopening, a person can have many emailopenings (Only add if using emailopening) |
Participant¶
Field name | Required | Field type | Description |
---|---|---|---|
person | x | Relation(1:n person-participant) | Relation to person(Can be changed to something else e.g Company) |
campaign | x | Relation(1:n campaign-participant) | Relation to campaign |
Consenttype (Optional)¶
Field name | Required | Field type | Description |
---|---|---|---|
title | x | Text field | Name of the consenttype |
consent | x | Relation(1:n consenttype-consent) | Relation to consent |
campaign | x | Relation(1:n consenttype-campaign) | Relation to campaign |
Consent (Optional)¶
Field name | Required | Field type | Description |
---|---|---|---|
person | x | Relation(n:1 consent-person) | Relation to person |
consenttype | x | Relation(n:1 consent-consenttype) | Relation to consenttype |
approved | x | checkbox | Approved consent equals a Newsletter opt-in |
source | x | Option list | Where did the consent come from |
Linkclick (Optional)¶
Field name | Required | Suggested local name(en/sv) | Field type | Description |
---|---|---|---|---|
person | x | Person/Person | Relation(n:1 linkclick-person) | Relation to person (or other table connected to recipients) |
mailing | x | Mailing/Utskick | Relation(n:1 linkclick-mailing) | Relation to mailing |
linkname | x | Name/Namn | string | Name of the link (1024 characters) |
linkurl | x | URL/URL | string | the URL of the link (1024 characters) |
linkvalue | x | Value/Värde | integer | the value of the link |
linkclicktime | x | Click time/Tid för länkklick | time | the timestamp of the link click |
linkcategoryid | x | integer | id of the link category (Should be hidden) | |
linkcategoryname | x | Category/Kategori | string | name of the link category (1024 characters) |
Emailopening (Optional)¶
Field name | Required | Suggested local name(en/sv) | Field type | Description |
---|---|---|---|---|
person | x | Person/Person | Relation(n:1 emailopening-person) | Relation to person (or other table connected to recipients) |
mailing | x | Mailing/Utskick | Relation(n:1 emailopening-mailing) | Relation to person (or other table connected to recipients) |
emailopeningtime | x | Opening time/Tid för öppning | time | the timestamp of the emailopening |
Endpoints¶
These are the endpoints that are used by the lime-newsletter integration.
The requests are made to the Lime solution https://\<DOMAIN>/\<APP-NAME>
Method | URL |
---|---|
GET | newsletter/v2/campaigns/ |
GET | newsletter/v2/campaign/{int:idcampaign}/participants/ |
GET | newsletter/v2/campaign/{int:idcampaign}/ |
POST | newsletter/v2/mailing/ |
GET | newsletter/v2/participantfields/ |
GET | newsletter/v2/participants/{int:idcampaign}/ |
GET | newsletter/v2/participants/{int:idcampaign>/{int:idconsenttype}/ |
GET | newsletter/v2/recipients/{int:idmailing}/ |
GET | newsletter/v2/publicationmapping/ |
GET | newsletter/v2/verify/ |
POST | newsletter/v2/webhook/ |
GET | newsletter/v2/objectcontent/{string:queryname}/ |
GET | newsletter/v2/capabilities/ |
Web components¶
lime-newsletter contains the IFramed Content component that makes it possible to display Lime Marketing content in an IFrame. The component can be configured to display any content.
Example use case: View the url of the statistics link property on the mailing card in a custom tab
Add the component by adding lwc-lime-newsletter-iframed-content
to your limetype under Views -> Custom Tabs
Properties:¶
urlPropertyName: The property on the limetype which contains the url of the content to display in the component.
customHeight: A custom height value (e.g. "1637px", "100%"). If no custom height is defined the component defaults to 100%.
customWidth: A custom width value (e.g. "950px", "100%"). If no custom width is defined the content defaults to 100%.
customBackgroundColor: A custom background color for the iFrame container. If no custom color is defined the color defaults to #FFFFF (white).
customScrolling: Should scrolling be enabled in the iFrame? Default to "auto" but can be set to "yes" or "no".