BTW, I am already using Mautic 2.14, works as before with some minor improvements. 2.14.1 fixes some moreā¦
Still no one working on Syncing contacts (I have also adapted and discarded this development, we deal with leads only on the Mautic side and when they are converted they stop updating)
Thx. Yes I sync the points field already.
I followed the above steps to link Mautic and SuiteCRM but I get the below error when I click the āAuthorise Appā button
Authorization failed with the error message, 'There was an unknown error encountered when trying to obtain the access token.'
Any ideas???
Iām running Mautic 2.15.0 and SuiteCRM 7.11.2
Letās start with the basics. Did you set up an access token?
Hi
In SuiteCRM I did the following
- Logged in as admin
- Went to Administrator -> Admin
- Went to OAuth Keys
- Clicked on āCreate OAuth Keyā and entered the following
- āConsumer Key Name - MauticCRM
- āConsumer Key - MCrmAPI
- āConsumer Secret - MySecret123
- Clicked Save
In Mautic I did the following
- Logged in as admin
- Went to Settings -> Plugins
- Clicked on SugarCRM and entered the following
- āPublished - Yes
- āSugar CRM URL - https ://crm.example.com (Note I added a space on the URL so it would display on the forum, no space on the real entry)
- āClient Key - MCrmAPI
- āClient Secret - MySecret123
- āSugarCRM username - admin
- āSugarCRM password - password
- āSugarCRM Version - 6.x/community
- Click āAuthorise Appā
Popup window appears with the below error
Authorization failed with the error message, 'There was an unknown error encountered when trying to obtain the access token.'
Iām running
- Mautic 2.15.0
- SuiteCRM 7.11.2
Both on the same server
- Ubuntu 16 LTS
- MySQL 5.7
- PHP 7.1
- Apache2
(Two virtual hosts, crm.example.com and mautic.example.com)
[/ul]
Canāt see any errors in any http access logs or message logs.
Any ideas on what Iāve done wrong?
Many thanks in advance.
OK great, thanks for sharing. All that looks great. Iām on virtually the same set up and I have it working doing the exact same process. (Double checked mine against yours).
Are you 100% sure the key/secret donāt have a space a the end after you cut/paste? (Iāve had this problem many times)
Are you 100% sure the username/password is correct (Iāve also done this many times so thatās why I ask).
Hi
Just changed all the passwords to something simple P455w0rd123 as I had previously used passwords with #@ etc in them
That made no difference.
All typed in by hand, no cut&paste extra spaces.
Are you running the same versions as me?
Iām on:
PHP 7.1
(Apache)
SuiteCRM 7.11.2
Mautic 2.15
But Iāve had this working on many previous versions of SuiteCRM and Mautic for over a year at least.
Hmm, I donāt see anything wrong with your setup, Have you tried re-setting your file permissions in SuiteCRM? This is always the first thing I do when thereās no obvious problem, and it fixes so many issues.
The user name and password your using is an Admin? Thatās the only other thing I can think of.
Putting the mautic site aside, and just looking at the SuiteCRM site.
Is there a way of testing the OAuth setup?
Maybe a URL to navigate to and pass the credentials to; to test for a successful setup?
Maybe a certain log file, to look for errors?
Sorted!!!
pstevens, many thanks for your help, it was greatly appreciated.
My problem turned out to be a silly schoolboy error.
Both the SuiteCRM and Mautic are on the same server. That server was virtualised.
I was trying to get each site to talk to each other specifying their FQDN
That FQDN resolved as the public IP and the vEdge didnāt like it.
As soon as I added the FQDN in the local hosts file specifying the private IP so they can talk to each other internally. BINGO!!!
Once again, many thanks for your help.
Now I feel bad. I saw this thread keep coming through in my email and was going to respond with some of my biggest reasons for failure.
[ol]
[li]Connection to the SuiteCrm instance from Mautic
[ul]
[li]DNS[/li]
[li]SSL[/li]
[li]Server dates/times[/li]
[/ul]
[/li]
[li]OAuth Configuration[/li]
[li]Server Setups on one side or the other[/li]
[/ol]
P.s. It appears that the plugin still seems to have a bunch of issues. At least Iām seeing things itās simply not doing. If you search for āSugarā and āSuiteā in Mauticās issue tracker youāll find a lot of open bug issues.
If youāre doing the very simple of just pulling in a person or pushing a person and never touching them again, it seems to be working fine. However, Iām having issue with subsequent updates to both ways. And also, for me a big one, if you pull a Contact/Lead from SuiteCrm to Mautic, the SuiteCrm field of āMautic Conact Timeline Linkā is never being updated with both Push enabled or disabled.
hello suite-mautic users!
if I use a command like
php ./app/console mautic:integration:fetchleads --integration="Sugarcrm" --fetch-all
and I get a response of
Command to fetch contacts from integration
Fetch contacts command is starting
0 contacts were updated and 0 contacts 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)
No leads have been synced from suitecrm instance
-
does this response mean mautic is connecting to suite instance?
-
are there any helpful mautic log files besides error_log in mautic directory?
thank you for any pointers you can offer.
I see ./app/logs/mautic_prod-2019-08-09.php. It includes no helpful info, just an error due to leaving āāintegration=āSugarcrmāā out of the console command.
I think thatās an old command, you want:
mautic:integration:synccontacts --integration="Sugarcrm" --time-interval="2 hour"
(in your case you may want āfetch-allā once itās done for the first time, switch it to something more reasonable.)
Hello folks,
With the upcoming Mautic 3 release it would be super helpful if any of you would be able to test the SuiteCRM integration - you can download the 3.0-beta-2 installer on github.com/mautic/mautic/releases - please report any issues or bugs either on the Mautic Slack instance (mautic.org/slack for an invite, #mautic-3 is the channel) or directly on GitHub.
Thanks in advance!
Where are you putting this? Is this in crontab under the www-data user?
Iāve seen mention of similar lines of code but I canāt seem to find where to put it or maybe the directories donāt exist.
Iām running:
php7.4
mysql 5.7.4
SuiteCRM Version 7.13.0
Sugar Version 6.5.25 (Build 344)
Iām kind of lost with this Mautic integration. Iāve followed all the instructions I can find. Iāve even tried creating Custom Schedulers but the directories referenced donāt exist in my instance and when I create the directories and repair/rebuild the Schedulers page goes blank until I remove them.
You just need to set up cron jobs. There are about 5 or 6 plus the suitecrm sync. Contact your hosting provider about how to setup cron jobs on your web host.
Thanks for the quick response!
Unfortunately I am self-hosting this but I like to think Iām familiar enough to find my way around common linux directories and files.
I have the cronjob in there and it doesnāt seem to be working. The cron job responsible for the cron.php that runs the scheduler is working great. The following is what I have in my /etc/crontab file.
* * * * * www-data mautic:integration:synccontacts --integration="Sugarcrm" --time-interval="2 hour"
Does that look right?
Once I get it to work I would change it to run every 2 hours rather than every minute.
and what are the other 5 or 6? where can I find more information about those?
Here are all the cron jobs you need. I normally setup my cron jobs with cpanel so not sure what your issue is with your setup, but I think you might need the path the mautic script in there.
https://docs.mautic.org/en/setup/cron-jobs
I think on newer versions of Mautic itās in /app/console rather than /bin/console if memory serves me correctly.