This article describes how to set up the integration between Salesforce and Mautic, including how to configure the integration to pass Mautic Activities into SalesForce and some Recommendations & Best Practices. This integration leverages the REST API and the only Salesforce editions that enable APIs are:
If your Salesforce account is not one of the above, please contact Mautic support or your Salesforce rep to learn about upgrade options. If you have one of the Salesforce Editions listed above, please follow the steps below to enable the plugin
Here is the official documentation about how to get the key and secret.
Make sure the Selected OAuth Scopes are Access and manage your data (API) and Perform requests on your behalf at any time (refresh_token, offline_access).
Copy the Consumer Key and Secret.
You have two options with the Salesforce integration to push Mautic activities into Salesforce. One option is to pass the activities into a custom object that allows the activities to be reportable. The other way is to set up a custom URL field in Salesforce and then Mautic will insert a contact’s timeline link.
Option 1: Make activities reportable – you first need to set up a custom object in your Salesforce instance. Please set up the object as it is described below
Step 1: On the initial screen of creating a custom object, make sure the Label field is populated with the value
Timeline and the Object Name is
mautic_timeline. This will auto-populate a few fields and then you have the option to populate other fields that haven’t pre-populated with values that relate to your business or this object. These additional fields do not impact the activities.
Step 2: When you save this initial screen, you will be taken to the custom objects screen where you can set up the custom fields. Create the 7 custom fields that match the below format exactly:
This is the only one that needs to be set up as a unique – select
do not allow duplicate values in Salesforce (API names for these will be auto populated)
Step 3: When enabling the activity object, you need to tick the Activity checkbox in the Mautic plugin configuration and also specify the namespace prefix if it's available in Salesforce.
Step 4: On the Mautic side, make sure
Activity is checked in the Features tab of the Salesforce plugin.
Step 5 (repeat for both leads and contacts): Edit the layout, and scroll to the related list for the Mautic timeline. Click the wrench to edit, and select Activity Date from Available Fields and add it to the Selected Fields. Save the layout.
For more help with editing related lists in Salesforce, visit the Salesforce help center
Step 6: Unpublish your plugin then re-publish. Save and close
Once you re-publish the plugin, Mautic will look at all of your contacts from the last 7 days then update those corresponding contacts or leads in Salesforce with the correct activities. The activity sync API takes about 8-10 minutes to push activities over from Mautic to Salesforce.
Option 2: Contact’s timeline link – you need to create a custom URL field within Salesforce. On the Mautic plugin page, go to the
Contact Mapping tab and search for the newly created URL field in the list of Salesforce fields. Map this field to the Mautic,
Contact’s timeline link field. This will display a link in Salesforce that, when clicked on, will open a new window, displaying all activities related to the contact. This is the same view that you have within Mautic’s timeline history on individual contact records.
Note – these items will not be reportable within Salesforce.
Since you’ll need to determine the direction of the update, within the mapping, choose the arrow that points from Mautic to Salesforce. In order for your sales reps to click on the link and view the contact’s history, they will need to be set up as users within Mautic.
If you want to test an integration plugin to ensure that it is configured properly, you have 3 options on how to do that. A contact can be pushed to integration via these places:
Use any of those triggers to test the plugin and see if the contact appears in the integration.
contact mappingin the plugin. This will allow you to build reports that include contacts with a Salesforce ID within Mautic.
Triggered action push contacts to integrationbecause this will safely allow you to test the mapping of your custom field with a select number of contacts.
Push contacts to Integration, so you can make sure the fields mapped appropriately.
Activity, you need to have a namespace prefix entered. This field is right below the Activity field on the Features tab.
Unknowninto Salesforce. If you have the
Pull contacts from integrationturned on to pull those fields into Mautic then Mautic will not populate those fields with Unknown. They will be left blank.
Integration Campaign Membersthen select the campaign you’d like to use