Mautic Integration (Mautic 1.2.4 and SuiteCRM 7.5.1)

Does anyone actually have Matic/SuiteCRM sync working with the SugarCRM plugin? I’ve been trying to get it to work for a few days now. The API works, the cron job runs without error, but I don’t get any contacts/leads pushed or pulled and no data is synced? Anyone actually have this working?

There are a couple of issues (at least) on the Mautic GitHub that are about SugarCRM/SuiteCRM integration. Since they recently added code to this integration, there could be new bugs. But at least hopefully you’ll find people there who can answer questions.

1 Like

Thx. Yeah, I’ve been combing the Mautic forum for anything about SuiteCRM/SugarCRM integration. I found a lot of helpful stuff but still no joy. If I get it working I’ll post a complete tutorial for everyone!

2 Likes

@pgr @pstevens, I’m literally working on getting this setup as we speak and happened to come over here to see if there was any more movement on SuiteCrm codebase and saw your most recent posts.

This actually is working for me now. There are some caveats of course.

  1. I made the mistake of using the wrong integration name which doesn’t output an error that would let you know (i.e. OAuth error is really an integration name error)

Use “Sugarcrm” as the integration

  1. I’m running v2.11.0 of Mautic with the sugar-bugs branch merged in

I know that I’m able to:

  1. Pull leads from SuiteCrm -> Mautic Contacts
  2. Push Contacts from Mautic -> SuiteCrm leads
  3. Pull changed lead data, SuiteCrm -> Mautic Contacts
  4. Follows sync path when conflict in data (i.e I change first name on Mautic, it was overwritten by First Name on SuiteCrm)

I’ll be doing more testing now. A big thing I want to make sure works is I was using “Timeline Link” in salesforce when I would push the Mautic Timeline URL to a field in CRM in order to use it as a subpanel or link button.

P.s. the command I’m running:

./app/console mautic:integration:synccontacts -i Sugarcrm -a '2 hour'
1 Like

P.s. I’ll be updating information about it in the following PR: https://github.com/mautic/mautic/pull/5244

I know I’m so close. You’re cron job set up looks a little different. I’ll try that. I’ve used a bunch of variations from the Mautic forum.

/app/console mautic:integration:synccontacts --integration=“Sugarcrm” --time-interval=“4 days”

this is the current one, I’ve tried. I’v tried with and without the “” and with different time intervals including negative ones. No luck. I have made the change on GIT in reference to “contacts” vs “contact” in the file. I’ll try your cron job script and see if that helps. Glad to know there is light at the end of the tunnel!

The notation should matter (i.e. -I vs --integration OR -a vs --time-interval). One frustrating thing I noticed is that the documented notation of “-10 minutes” is wrong, it should be “10 minutes”.

I tested running this script with I think “700 days” and it imported on my test setup everything I wanted it to.

How did you actually get it to sync? if I do -i Sugarcrm it runs but gives the following:

Executing console mautic:integration:fetchleads -i Sugarcrm

Command to fetch contacts from integration
Fetch contacts command is starting

Fetching contacts…

0 contacts were updated and 0 contacts were created

Fetching companies
Fetch companies command is starting

0 companies were updated and 0 companies were created

Updating/creating leads from Mautic to Sugarcrm
Number of contacts pushed: 0 updated, 0 created, 0 had errors and 0 were ignored (likely duplicates or didn’t match field criteria)

If I add a time interval like -a ‘2 hour’ like you have (or any other time interval) it tells me this:

Executing console mautic:integration:synccontacts -i Sugarcrm -a '2 hour ’

[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments “command”.

mautic:integration:fetchleads [-i|–integration INTEGRATION] [-d|–start-date START-DATE] [-t|–end-date END-DATE] [–fetch-all] [-a|–time-interval [TIME-INTERVAL]] [-l|–limit [LIMIT]] [-f|–force] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–]

It appears that the formatting may be wrong for those quotes.
Try:

./app/console mautic:integration:synccontacts --integration="Sugarcrm" --time-interval="2 hours"

Obviously, make sure you’ve create a new Lead/Contact/Account or Contact/Company within the two hour window.

Ok I’ve got it pulling new leads and contacts. However, couple of issues.

If I select “Company Name” in the lead to be “Account” in Mautic, it won’t work. It only works if I leave the Account name blank.

Also, quick question, is this supposed to update? Like if i change something in SuiteCRM, lets say the address, will it update in Mautic?

Also if I the Points in Mautic change, will it update my Points field in SuiteCRM (I’ve created the field and mapped it pointing back to SuiteCRM).

I’ve only generally tested it quickly and not thoroughly so I haven’t seen the Account issue; although now I’ll make sure to look.

These are all great questions and I don’t have the answer, I would test each case and document them here: https://github.com/mautic/mautic/pull/5244

I know from my testing that changing a record in SuiteCRM after it had been pulled to Mautic did update it in Mautic; however, the reverse did not happen - in face it overwrote it. But I believe that’ show it’s supposed to work as I chose the “sync direction” to be SuiteCrm -> Mautic.

Once again, I’m not sure about points; however, from my last statement, I bet you (should) be able to make the points field mapping having the sync direction be Mautic first and then it would continually update in SuiteCrm. At least that’s how I would think that should work.

Once again, I would test these, document it in the PR for Mautic.

Might even be able to setup some sort of integration testing…

I have installed SuiteCRM and Mautic Successfully. Also got SuiteCRM authorized successfully in the Mautic plugin Section. Also Checked features option of the plugin and mapped the required fields.
But when I create a new contact it doesn’t get pushed or pulled from The SuiteCRM or Mautic.
What might be the issue?
Please help

You have to set up a cron job to fetch:leads and sync:contacts. Check the documentation.

Are those jobs just for mautic?

Is this example correct?
php public_html/mkt/app/console mautic:fetch:leads > /dev/null 2>&1
php public_html/mkt/app/console mautic:sync:contacts > /dev/null 2>&1

You shouldn’t have to do both of those commands anymore. It would just be

./app/console mautic:integration:synccontacts --integration="Sugarcrm" --time-interval="2 hours"
1 Like

It works. I am using Mautic 2.12.2 and Suite 7.10.2
I got bi-directional updates working just by using the plugin as is.

1 Like

Really? Can you confirm. I can push contacts from SuiteCRM to Mautic and push contacts from Mautic to Suite CRM. However, if I update a field in Mautic I can’t get it to update SuiteCRM (I have made Mautic the “master” in the plugin configuration for this particular field).

Are you saying after a contact is pushed it does sync changes to records on both sides?

I can confirm that Suite-Mautic integration “works” and is bidirectional as per Mautic 2.13.
I have conducted many tests and we are about to start using it in production.

However there are a number of small bugs that make it tricky to sync some specific field types (Mautic Points, Suite Booleans, Suite-Mautic Select fields and others)
Also some behaviours are now as expected.

Mautic 2.14 includes some improvements and fixes but I am not using it yet (was out of beta a week ago)

However the main issue with some field types didn’t make it to this release, hopefully it will be included and the integration will be far smoother after that.

Keep in mind that this integration can only sync Mautic contacts to Suite Leads. There is not yet any developement (that I’m aware of) for integrating Suite Contacts.

Does anyone have the activity sync working between Mautic and SuiteCRM? ie: do the “open email” records from Mautic go to the history tab in SuiteCRM? If so how did you accomplish this?

Sorry, never tried.

If it helps, what I usually do is add points to whoever reads and extra points to whoever clicks on a link, then I can use the Mautic_Points (custom field) to do whatever is needed…
Alternatively I guess you could add a custom field for the particular action you want to track and modify it in Mautic when the link is clicked (using a campaign) and pass that field to Suite.

1 Like