Salesforce

First Steps:

Installlink: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t7Q000000YSl4QAG

Installkey: 8aA3osDkUmM5

 

1. Install the plugin with the provided installation link and password.

2. Give the users who shall be able to change the plugin settings the rights: „Maileon User“

3. Go to Maileon settings via the App list.

 

 

 

3.a

Enter your Maileon API Key

 

3.b

Generate a Webhook-Token and enter it.

The Token must be a minimum of 32 characters. You can use sites like passwordsgenerator.net to generate a random token.

3.c

„Lead/Contakt Owner“

This field is optional. You can enter the ID of the Salesforce user who will be displayed as the owner of the contacts / leads

 

3.d

Click on „Save Changes“ in the right hand corner to save the settings.

The connection with Maileon has been successfully completed if the check Icon appears.

 

3.e

„Deactivate Trigger“

With this checkbox you switch off the trigger logic temporarily. This can be useful to avoid conflicts with unit tests of other packages. If unsure leave it unchecked.

 

 

Site / Domain for Webhook:

 

Webhooks are used to sync unsubscriptions and DOI confirmations from Maileon to Salesforce.

To use the webhook functionality of the plugin you must create a public site in Salesforce which can be accessed by Maileon. This connection is secured by the prio created webhook-token.

 

1. Site Setups

a) Go to Setup -> Plattform-Tools -> User Interface -> Sites and Domains -> Sites

b) Or use this link: https://login.salesforce.com/lightning/setup/CustomDomain/home

c) Create a new page with „new“

d) Specify a name for the site. For example: Site for Maileon Webhook

e) Choose „WebhookStartPage“ as Active Site Homepage

f) Click save

g) Activate the site in the list of sites

h) Click on the site name -> site details -> public access settings

 

 

i) Click on Edit at „Enabled Apex Class access“ (Search for „MaileonWebhookService“)

j) Select „MaileonWebhookService“

k) open the site in your browser.

Your site is your site url + /services/apexrest/hook?token= + Webhook-Token

You should see the message: Webhook service setup successfull

 

 

 

Webhook settings in Maileon:

Unsubscription:

Add „&type=unsubscibe“ to your URL and add another parameter „id“ with contact field value „external ID“

 

DOI confirmation:

Add „&type=doi“ to your URL and add the parameters you want to see in Salesforce via JSON.

 

Custom field sync:

The following fields are always synced:

Name in Salesforce

Name in Maileon

Remark

LastName

LASTNAME

 

FirstName

FIRSTNAME

 

Name

FULLNAME

Only from SF -> Maileon. Is a combination of First + Lastname

Title

TITLE

 

Salutation

SALUTATION

Webhook Fallback: gender = m => Herr ; f => Frau

Birthdate

BIRTHDAY

 

(Mailing)Country

COUNTRY

 

(Mailing)State

STATE

 

(Mailing)City

CITRY

 

(Mailing)Street

STREET

 

(Mailing)PostalCode

ZIP

 

Company

ORGANIZATION

Only with Leads. If empty a N/A is saved

 

Additional fields can be synced with the so called Custom Field Sync.

Custom fields are synced when creating new Contacts/Leads by Webhook and when syncing Contacts/Leads from Salesforce to Maileon.

 

 

Goto:

Setup -> Plattform-Tools -> Custom-Code ->

Custom-Metadata-Types ->

Maileon-Custom-Field-Link ->

Manage-Records -> New

 

 

 

 

 

 

 

Label

Internal name. Recommendation is same name as in Maileon

Maileon Custom Field Link-Name

Filled automatically by Salesforce

SalesforceName

Name of the Salesforce Field in Contacts and Leads (API Name not UI Name!)

MaileonName

Custom field name in Maileon

 

Save. The added custom fields are also show in the Maileon App settings but can not be editet there.

 

Display of additional contact fields:

 

This integration uses fields that are not displayed in Salesforce by standard.

In detail this are the fields „Email Opt Out“, „DOI Timestamp“ and „DOI IP Adresse“.

 

To see these fields in the contact / lead details go to:

 

Setup -> Plattform-Tools -> Objects-and-Fields -> Object-Manager -> Contact (or Lead)

 

Click on the left side on „Page Layout“ then „Contact Layout“ (similar for Leads)

Now Drag the hidden fields from the list into to the desired location

Click on „Fields & Relationships“ on the left side

Click on one of the added fields

Click the middle top button labeled: Set Field-Level Security

Set the field visibility to your likings