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