Configuration¶
1. Configuration in Lime Admin¶
Open Lime admin -> Add-ons -> Newsletter from the webclient (switch to code view depending on lime-server version) - there should be a default config there. If you are using an older server version that does not support lime-admin 2 you still use the old YAML
format.
In the best of worlds, this doesn't need to be touched since you have installed the LIP package. But sometimes the customer does not want some features (for example linkklick or emailopening) then you can remove these from the code.
- Edit the config if you don't want the default setup. Examples of how the config can be edited can be found HERE.
- Save the configuration (even if you haven't change anything).
An example of what a valid config may look like can be found HERE. Note: this code includes examples that you need to remove.
Before you proceed
- Can you save the config?
- Have you double checked the parts that aren't validated?
- Have you changed to config instance name from
default
? (Only do so if you havn't followed the default setup and if it's really necessary) In that case you need that name in the next step.
2. Set up cards and views in Lime Web client¶
This step is only necessary if Newsletter is supposed to be used from the Lime CRM Web Client.
Configure the views and cards for all tables added by the LIP package installation.
If you have the defaut setup you can copy the views found HERE. Then go to each card and switch to code view and paste it there.
Also show:
mailing
as a relation on thecampaign
card.consenttype
as a field on thecampaign
card and table view.total opt-out
as a field on theperson
card and table view.emailhardbounce
as a field on theperson
card and table view.recipient
as a relation on theperson
card.consent
as a relation on theperson
card.linkclick
as a relation on theperson
card. Only if they are going to use the link click feature.emailopening
as a relation on theperson
card. Only if they are going to use the email opening feature.
2 - Add the integration in Lime Marketing¶
Log in to your Lime Marketing site and go to Administration -> Integrations and add a Lime CRM integration from the button in the top left corner.
Enter the URL to newsletter -> application webclient base URL + /newsletter.
The base URL is the webclient url/application name. Its the same URL as you find in the API docs up until/api.
Enter the API-key for the integration to use.
The Configuration page will look like this with quite a few validation errors and warnings. This is OK, fix the warnings by filling out the required information and click validate at the top left corner. It's really important that you get the URL and API key correct - we won't be able to give you any hints until it's correct.
Leave the configuration name empty unless you have changed the config name from default in Lime admin.
The column settings are specified in the Lime CRM Admin config under importfields
. All you need to do now is to map them to properties on the Newsletter recipient. The required ones are email and an id for the person in Lime CRM.
Lastly you will be able to see your consent mappings from the Lime CRM Admin config listed here.
6 - Verify¶
If everything is validating and no more errors are displayed you are ready to verify.
- Create a test marketing activity in Lime CRM.
- Add yourself as a participant.
- Create a mail message in Lime Marketing.
- Import the participant list from the marketing activity you just made in Lime CRM.
- Send the email.
- Open the email and click on some links.
- Follow up the link clicks and email opening in Lime (if you have that configured)
7. Design customer templates¶
If everything works, you are done with the configuration. Now it's time to:
- design the customer email template
- edit the publication settings
- configure the sending domain.
Follow the Newsletter Delivery instructions HERE. For Lime empolyees only.
If tables and fields don't follow default setup¶
The following steps are only necessary to read if the database does not follow the default setup or if you are using another table than person as recipients.
Things you need to change
- Tables and fields if they don't follow the default setup. Change the name on right part of the ':'. All table names and fields are validated when saving the config so if there are any errors we'll let you know. All tables have a name property which can be changed and they have their fields configured under properties were you also can change its configured value.
"tables": {
"campaign": {
"name": "customcampaign", <-- change this part
"properties": {
"campaignstatus": "customstatus", <-- and this
Using the company table instead of the person table¶
When the required fields are set up in LISA, some mapping has to be done in the config.
"default":{
"tables":{
"consent":{
"properties":{
"person": "company"
}
},
"participant":{
"properties":{
"person": "company"
}
},
"person":{
"name": "company",
"properties":{
"email": "email",
"emailhardbounce": "emailhardbounce",
"firstname": "name",
"lastname": "name",
"totaloptout": "totaloptout"
}
},
"recipient":{
"properties":{
"person": "company"
}
}
}
}
Sending newsletters to multiple Lime Objects¶
It's possible to have several configurations, for cases when you have an additional setup of tables, for example if you want to do send-outs to companies in addition to the standard contact persons.
The standard configuration is called default
.
You can simply copy the default configuration and call it something else like companies
.
Then log into Newsletter and configure a new integration point with the new name under Configuration name.
Example Lime Admin Configuration¶
Here you have an example Lime Admin config that you can copy. It includes examples that you need to change for your configuration. Further down you also have default configuration for the tables and views for the tables added by the LIP-package. (Only necessary if newsletter is supposed to be used from the webclient).
Add-ons --> Newsletter (JSON)¶
{
"default": {
"enabled": true,
"configversion": 2,
"consentsource": "newsletter",
"consenttypemapping": {
"consenttypemappings": [
{
"consenttype": 1001,
"publications": [
{ "publication": 10 }
]
},
{
"consenttype": 1002,
"publications": [
{ "publication": 20 },
{ "publication": 30 }
]
}
]
},
"optinsettings": {
"enabled": true,
"create_duplicates": false,
"publications": [123, 256],
"limetypesetting": {
"name": "person",
"email_field_name": "email",
"fieldmappings": {
"email": "email",
"firstname": "firstname",
"lastname": "lastname"
}
}
},
"linkclickenabled": true,
"emailopeningenabled": true,
"getrecipientsenabled": true,
"objectcontent": [{
"queryname": "coworker_query",
"query": {
"limetype": "coworker",
"responseFormat": {
"object": {
"_id": {
"_alias": "coworkerid"
},
"firstname": null,
"lastname": null,
"email": null,
"office": {
"visitingaddress1": null
}
}
},
"filter": {
"op": "=",
"key": "_id",
"exp": "{0}"
}
}
},
{
"queryname": "deals_query",
"query": {
"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}"
}
}
}],
"tables": {
"campaign": {
"name": "campaign",
"campaigntypes": [
{
"type": "email"
}
],
"campaignstatuses": [
{
"status": "planned"
},
{
"status": "ongoing"
}
],
"properties": {
"campaignstatus": "campaignstatus",
"consenttype": "consenttype",
"mailing": "mailing",
"name": "name",
"participant": "participant",
"type": "type"
}
},
"consent": {
"name": "consent",
"properties": {
"approved": "approved",
"consenttype": "consenttype",
"date": "date",
"person": "person",
"source": "source"
}
},
"mailing": {
"name": "mailing",
"properties": {
"mailingid": "mailingid",
"subject": "subject",
"campaign": "campaign",
"recipient": "recipient",
"senddate": "senddate",
"sendoutlink": "sendoutlink",
"statisticlink": "statisticlink"
}
},
"linkclick": {
"name": "linkclick",
"properties": {
"person": "person",
"mailing": "mailing",
"linkname": "linkname",
"linkurl": "linkurl",
"linkvalue": "linkvalue",
"linkclicktime": "linkclicktime",
"linkcategoryid": "linkcategoryid",
"linkcategoryname": "linkcategoryname"
}
},
"participant": {
"name": "participant",
"properties": {
"campaign": "campaign",
"person": "person"
},
"importfields": {
"person": {
"_id": null,
"firstname": null,
"lastname": null,
"email": null,
"company": {
"name": null
}
}
}
},
"person": {
"name": "person",
"properties": {
"email": "email",
"recipient": "recipient",
"emailhardbounce": "emailhardbounce",
"totaloptout": "totaloptout"
}
},
"recipient": {
"name": "recipient",
"options": {
"sendoutstatus": {
"bounce": "bounce",
"clicked": "clicked",
"open": "open",
"sent": "sent",
"optout": "optout"
}
},
"properties": {
"mailing": "mailing",
"person": "person",
"sendoutstatus": "sendoutstatus"
}
},
"emailopening": {
"name": "emailopening",
"properties":{
"mailing": "mailing",
"person": "person",
"emailopeningtime": "emailopeningtime"
}
}
}
}
}
YAML¶
default:
enabled: true
configversion: 2
consentsource: newsletter
consenttypemapping:
consenttypemappings:
- consenttype: 1001
publications:
- publication: 10
- consenttype: 1002
publications:
- publication: 20
- publication: 30
tables:
campaign:
name: campaign
campaigntypes: # optional
- type: email
campaignstatuses: # optional
- status: planned
- status: ongoing
properties:
campaignstatus: campaignstatus
consenttype: consenttype # optional
mailing: mailing
name: name
participant: participant
type: type
consent:
name: consent
properties:
approved: approved
consenttype: consenttype
date: date
person: person
source: source
mailing:
name: mailing
properties:
mailingid: mailingid
subject: subject
campaign: campaign
recipient: recipient
senddate: senddate
sendoutlink: sendoutlink
statisticlink: statisticlink
participant:
name: participant
properties:
campaign: campaign
person: person
importfields: # modify this for your solution
person:
_id: null
firstname: null
lastname: null
email: null
company:
name: null
person:
name: person
properties:
email: email
recipient: recipient
emailhardbounce: emailhardbounce # optional
totaloptout: totaloptout # optional
recipient:
name: recipient
options:
sendoutstatus:
bounce: bounce
clicked: clicked
open: open
sent: sent
optout: optout
properties:
mailing: mailing
person: person
sendoutstatus: sendoutstatus
Example tables and views (webclient)¶
Mailing - mailings¶
{
"card": {
"header": [
{
"property": "subject"
}
],
"sections": [
{
"collapsed": true,
"layout": {
"columns": 5,
"dense": true
},
"controls": [
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "campaign"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "subject"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "senddate",
"format": "date"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "sendoutlink",
"readonly": true
},
{
"layout": {},
"component": {
"props": {}
},
"property": "statisticlink",
"readonly": true
}
],
"title": "untitled"
}
],
"relations": [
{
"property": "recipient"
},
{
"property": "linkclick"
},
{
"property": "emailopening"
}
]
},
"list": {
"header": [
{
"property": "subject"
}
],
"subheader": [
{
"property": "senddate",
"format": "date"
},
{
"property": "campaign"
}
]
},
"search": {
"header": [
{
"property": "subject"
},
{
"property": "campaign"
}
],
"subheader": [
{
"property": "senddate",
"format": "date"
}
]
},
"table": {
"columns": [
{
"isDefault": true,
"component": {
"props": {}
},
"property": "campaign"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "mailingid"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "subject"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "sendoutlink"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "statisticlink"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "mailmessageid"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "senddate"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "id"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "createdtime"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "timestamp"
}
]
},
"general": {
"icon": "gmail",
"color": "rgb(var(--color-blue-light))",
"create": false,
"views": [
{
"view": {
"props": {},
"name": "limec-table-view"
},
"title": "webclient.limeobject.table-view",
"icon": "insert_table"
},
{
"view": {
"props": {},
"name": "limec-list-view"
},
"title": "webclient.limeobject.list-view",
"icon": "activity_feed_2"
}
],
"globalTablesMenu": false,
"enableGlobalSearch": true
}
}
Mailing recipient - recipient¶
{
"card": {
"header": [
{
"property": "mailing"
}
],
"sections": [
{
"collapsed": true,
"layout": {
"columns": 5,
"dense": true
},
"controls": [
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "mailing"
},
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "person"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "sendoutstatus"
}
],
"title": "untitled"
}
]
},
"list": {
"header": [
{
"property": "mailing"
},
{
"property": "person"
}
]
},
"search": {
"header": [
{
"property": "mailing"
},
{
"property": "person"
}
]
},
"table": {
"columns": [
{
"isDefault": true,
"component": {
"props": {}
},
"property": "person"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "mailing"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "sendoutstatus"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "id"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "createdtime"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "timestamp"
}
]
},
"general": {
"icon": "mailbox_opened_flag_up",
"color": "rgb(var(--color-amber-darker))",
"create": false,
"views": [
{
"view": {
"props": {},
"name": "limec-list-view"
},
"title": "webclient.limeobject.list-view",
"icon": "activity_feed_2"
},
{
"view": {
"props": {},
"name": "limec-table-view"
},
"title": "webclient.limeobject.table-view",
"icon": "insert_table"
}
],
"enableGlobalSearch": true
}
}
Consent type - consenttype¶
{
"card": {
"header": [
{
"property": "title"
}
],
"sections": [
{
"collapsed": true,
"layout": {
"columns": 5,
"dense": true
},
"controls": [
{
"layout": {},
"component": {
"props": {}
},
"property": "title"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "active"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "description"
}
],
"title": "untitled"
}
],
"relations": [
{
"property": "consent"
},
{
"property": "campaign"
}
]
},
"list": {
"header": [
{
"property": "title"
}
]
},
"search": {
"header": [
{
"property": "title"
}
]
},
"table": {
"columns": [
{
"isDefault": true,
"component": {
"props": {}
},
"property": "title"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "active"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "id"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "createdtime"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "timestamp"
}
]
},
"general": {
"icon": "checkmark",
"color": "rgb(var(--color-lime-darker))",
"create": false,
"views": [
{
"view": {
"props": {},
"name": "limec-table-view"
},
"title": "webclient.limeobject.table-view",
"icon": "insert_table"
},
{
"view": {
"props": {},
"name": "limec-list-view"
},
"title": "webclient.limeobject.list-view",
"icon": "activity_feed_2"
}
],
"enableGlobalSearch": true,
"globalTablesMenu": false
}
}
Legal base & consent - consent¶
{
"card": {
"header": [
{
"property": "consenttype"
}
],
"sections": [
{
"collapsed": true,
"layout": {
"columns": 5,
"dense": true
},
"controls": [
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "consenttype"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "approved"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "note"
},
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "person",
"contactInfo": true
}
{
"layout": {},
"component": {
"props": {}
},
"property": "source"
}
],
"title": "untitled"
}
],
"relations": []
},
"list": {
"header": [
{
"property": "consenttype"
}
],
"subheader": [
{
"property": "person"
}
]
},
"search": {
"header": [
{
"property": "consenttype"
}
],
"subheader": [
{
"property": "person"
}
]
},
"table": {
"columns": [
{
"isDefault": true,
"component": {
"props": {}
},
"property": "consenttype"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "approved"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "note"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "person"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "id"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "createdtime"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "timestamp"
}
],
"actions": [
{
"params": {},
"id": "limepkg_consent.create-consents",
"label": "limepkg_consent.create-consents"
}
]
},
"general": {
"icon": "handshake",
"color": "rgb(var(--color-green-default))",
"create": false,
"views": [
{
"view": {
"props": {},
"name": "limec-table-view"
},
"title": "webclient.limeobject.table-view",
"icon": "insert_table"
},
{
"view": {
"props": {},
"name": "limec-list-view"
},
"title": "webclient.limeobject.list-view",
"icon": "activity_feed_2"
}
],
"enableGlobalSearch": true,
"globalTablesMenu": false
}
}
Link click - linkclick¶
{
"card": {
"header": [
{
"property": "mailing"
}
],
"sections": [
{
"collapsed": true,
"layout": {
"columns": 5,
"dense": true
},
"controls": [
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "mailing",
"readonly": true
},
{
"layout": {},
"component": {
"props": {}
},
"property": "linkname",
"readonly": true
},
{
"layout": {},
"component": {
"props": {}
},
"property": "linkurl",
"readonly": true
},
{
"layout": {},
"component": {
"props": {}
},
"property": "linkvalue",
"readonly": true
},
{
"layout": {},
"component": {
"props": {}
},
"property": "linkclicktime",
"format": "datetime",
"readonly": true
},
{
"layout": {},
"component": {
"props": {}
},
"property": "linkcategoryname",
"readonly": true
},
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "person",
"readonly": true
}
],
"title": "untitled"
}
]
},
"list": {
"header": [
{
"property": "mailing"
}
],
"subheader": [
{
"property": "person"
},
{
"property": "linkclicktime",
"format": "datetime"
}
]
},
"search": {
"header": [
{
"property": "mailing"
}
],
"subheader": [
{
"property": "person"
}
]
},
"table": {
"columns": [
{
"isDefault": true,
"component": {
"props": {}
},
"property": "linkclicktime"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "mailing"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "person"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "id"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "createdtime"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "timestamp"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "linkvalue"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "linkurl"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "linkname"
}
]
},
"general": {
"icon": "hand_cursor",
"color": "rgb(var(--color-cyan-darker))",
"create": false,
"views": [
{
"view": {
"props": {},
"name": "limec-table-view"
},
"title": "webclient.limeobject.table-view",
"icon": "insert_table"
},
{
"view": {
"props": {},
"name": "limec-list-view"
},
"title": "webclient.limeobject.list-view",
"icon": "activity_feed_2"
}
],
"enableGlobalSearch": true
}
}
Email Opened - emailopening¶
{
"card": {
"header": [
{
"property": "mailing"
}
],
"sections": [
{
"collapsed": true,
"layout": {
"columns": 5,
"dense": true
},
"controls": [
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "mailing"
},
{
"layout": {},
"query": {
"filter": {}
},
"component": {
"props": {}
},
"property": "person"
},
{
"layout": {},
"component": {
"props": {}
},
"property": "emailopeningtime",
"format": "datetime"
}
],
"title": "untitled"
}
]
},
"list": {
"header": [
{
"property": "mailing"
}
],
"subheader": [
{
"property": "person"
},
{
"property": "emailopeningtime"
}
]
},
"search": {
"header": [
{
"property": "mailing"
},
{
"property": "emailopeningtime",
"format": "datetime"
}
],
"subheader": [
{
"property": "person"
}
]
},
"table": {
"columns": [
{
"isDefault": true,
"component": {
"props": {}
},
"property": "emailopeningtime"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "mailing"
},
{
"isDefault": true,
"component": {
"props": {}
},
"property": "person"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "id"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "createdtime"
},
{
"isDefault": false,
"component": {
"props": {}
},
"property": "timestamp"
}
]
},
"general": {
"icon": "gmail",
"color": "rgb(var(--color-teal-default))",
"create": false,
"inlineCreate": false,
"views": [
{
"view": {
"props": {},
"name": "limec-table-view"
},
"title": "webclient.limeobject.table-view",
"icon": "insert_table"
},
{
"view": {
"props": {},
"name": "limec-list-view"
},
"title": "webclient.limeobject.list-view",
"icon": "activity_feed_2"
}
],
"enableGlobalSearch": true,
"globalTablesMenu": false
}
}