~~NOTOC~~ ====== Mautic ====== The current state of the integration with Mautic is a bidirectional synchronization of contacts and companies. All the work happens on the coreBOS side. Two workflows are in charge of sending the modifications to Mautic via its API and two notification webhooks are responsible for receiving information from Mautic and updating records inside coreBOS. To get the synchronization working we must configure both applications. ===== Configure Mautic ===== First, we must activate the API so coreBOS can send the information to Mautic. {{:en:integrations:mauticapienable.png|}} Then we configure two webhooks to send the Account/Company and Contact information from Mautic to coreBOS {{:en:integrations:mauticcontactwebhook.png|}} {{:en:integrations:mauticaccountwebhook.png|}} To get all that working in Mautic you must clear the cache. To the extreme where I had to go directly to the var/cache directory and delete all the files there. Finally, we must create two custom fields on the Contacts and Company modules to hold the coreBOS CRMID. * **company_corebos_id** in Companies * **corebos_id** in Contacts {{:en:integrations:mauticcontactcustomfield.png|}} ===== Configure coreBOS ===== In coreBOS we go to the Utilities page and click on Mautic card. Activate the integration and fill in the URL of your Mautic install and the credentials of the user to use to synchronize the information. {{:en:integrations:corebosmauticactivation.png|}} Next, we must create three workflows for each module. One to control the creation, the other for the update, and the last one for the delete operation. A total of six workflows that look like this: {{:en:integrations:coreboscontactsworkflows.png|}} {{:en:integrations:coreboscontactsworkflowcreate.png|}} {{:en:integrations:coreboscontactsworkflowupdate.png|}} {{:en:integrations:coreboscontactsworkflowdelete.png|}} It is very important to set the conditions of the workflows correctly or you will easily fall into an infinite loop where coreBOS sends information to Mautic and Mautic sends back the change. Finally, we have to create some Field Mapping Business maps to define which fields we want to synchronize in both directions. **MauticToContacts, MauticToAccounts, ContactsToMautic, AccountsToMautic** This is what the Contacts maps looked like in my tests. **MauticToContacts** MauticContact CoreBOS mautic_id id firstname firstname lastname lastname email email mailingstreet address1 mailingcity city mailingstate state mailingzip zip mailingcountry country mobile mobile homephone phone fax fax website website facebook facebook foursquare foursquare instagram instagram linkedin linkedin skype skype twitter twitter points points attribution attribution date_attribution attribution_date last_active last_active pref_locale preferred_locale pref_tz timezone leadsource Promoter CONST title title newsletter newsletter **ContactsToMautic** coreBOS MauticContact corebos_id id firstname firstname lastname lastname email email address1 mailingstreet city mailingcity state mailingstate zip mailingzip country mailingcountry mobile mobile phone homephone fax fax website website facebook facebook foursquare foursquare instagram instagram linkedin linkedin skype skype twitter twitter points points attribution attribution attribution_date date_attribution last_active last_active preferred_locale pref_locale timezone pref_tz title title newsletter newsletter MauticToAccounts MauticAccounts CoreBOS accountname companyname email1 companyemail website companywebsite AccountsToMautic coreBOS MauticAccount corebos_id account_no companyname accountname companyemail email1 mobile mobile companyphone phone companywebsite website ===== Notes ===== * Since the actions are separate, you can configure individual actions, like only creating or editing and not deleting. * you have full control of the fields that are synced through the maps * records are not really deleted: in coreBOS they will be marked as deleted setting a check box field in the record and in Mautic the corebos_id and company_corebos_id fields will be set to blank to stop the synchronization between the two applications for this record. ===== Going Forward ===== Some of the future goals are: * Delegate mass emails from coreBOS to Mautic * Send workflow emails using Mautic templates * Send coreBOS events to Mautic. For example, when an invoice is paid send the event to Mautic so it can trigger campaigns and other actions. * Enhance Mautic to make decisions using coreBOS information. For example, answering questions like, "Does this contact have unpaid invoices?" * Enhance Mautic to launch coreBOS workflows * Mass capture of events from everywhere