by Fanatical Labs

Save Your Team Countless Hours. SugarChimp syncs your lists in both directions so you can work in your preferred app. Segment and group your Mailchimp subscribers based on Sugar data so you can market to the right people at the right time. Compatible with all versions and editions of Sugar and SuiteCRM. Created by Fanatical Labs, 2023 SugarCRM Partner Award Winner.

Free Trial

By clicking you consent to share your profile with the developer

#1772 - SugarCRM to Mailchimp target list sync problem

Closed Bug? created by aeq 8 years ago

Hi,

We run SugarCRM 7.6.0 Professional. I downloaded and installed SugarChimp 7.5.8, specified trial license key, followed instructions to connect it to MailChimp (SugarChimp health status shows everything is OK).

I tried to sync a SugarCRM target list to a MailChimp mailing list (I created both) using instructions from the Documentation section of your website but it worked half-way.

SugarCRM target list has two accounts, SugarChimp health panel shows sync ran once. MailChimp shows one of the two accounts in the MailChimp list and source is 'API'. However, the second account did not sync, and re-queueing list for re-sync in SugarCRM does not do anything. The only visible side effect is the number of pending items to sync in the SugarCRM health panel goes up by 2 (size of the list) on every attempt.

SugarCRM log shows only errors from the first sync attempt (see below).

It seems that after that error, SugarChimp went into some terminal state.

Does the SugarCRM to MailChimp sync require SMTP configuration?

sugarcrm.log ----------------------------------------------

Fri Nov 27 22:39:54 2015 [11459][1][FATAL] SMTP -> ERROR: Failed to connect to server. Code: 0 Reply: php_network_getaddresses: getaddrinfo failed: Name or service not known Fri Nov 27 22:39:54 2015 [11459][1][FATAL] MailerException - @(SmtpMailer.php:166 [6]) - Failed to connect to outbound SMTP Mail Server Fri Nov 27 22:39:54 2015 [11459][1][FATAL] SugarChimp:fatal:1448663994: SugarChimp error. Something pretty major is going on and we are trying to email help@sugarchimp.com about something pretty major. Please forward this message along: Subject: [production:error] SugarChimp sync failure Body: Site: http://***********/sugarcrm Admin Email: paul.levin@aequin.com|Paul Levin SugarCRM Version: 7.6.0.0 SugarCRM Edition: PRO SugarChimp Version: 7.5.8i

Error: A SugarChimp webhook could not be added to a Mailchimp List af3ccf7f2d Remaining data: Array ( [af3ccf7f2d] => Array ( [status] => error [code] => [name] => Exception [error] => We received an unexpected error: null )

)

. General email error: Failed to connect to outbound SMTP Mail Server


Thanks,

Paul

  1. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hello Paul,

    Your Sugar does not need an SMTP to run correctly. We would use your SMTP to email help@sugarchimp.com to alert us of some specific errors. This is not causing the problem. The error that you are receiving is due to SugarChimp's inability to contact MailChimp and add the webhooks. Webhooks are important for SugarChimp to receive updates from MailChimp when certain actions occur.

    Depending on your scheduler setup, the SugarChimp scheduler should run every 5 minutes. The only worry would be if you are receiving that error every time that your scheduler runs. If this only happens once, or periodically, then it can be ignored. At this point, your scheduler will add the webhooks and clear the queue (add the 2nd account) as soon as it can connect MailChimp. If that is not happening in the next couple runs, then we need to figure out why it is unable to reach MailChimp.

    Let me know if things get cleared up or if we need to explore why your network is unable to reach MailChimp!

    • fanaticallabs member avatar

      Fanatical Labs Provider Affiliate

      8 years ago

      Hey Paul,

      I need to clarify some parts of that response! It is MailChimp that cannot reach your Sugar instance, not the other way around. MailChimp attempts to add the webhook url and fails, which throws the error in your log and exits the scheduler run. So once MailChimp can access Sugar, then it will add the webhook and your job queue will get cleared.

      Normally when we see this, your Sugar network is not publicly accessible which causes the webhooks not to be added. Does that make more sense in your case?

    • paullevin member avatar

      aeq

      8 years ago

      Hi,

      Thank you for the prompt response. The MailChimp is not able to reach SugarCRM because SugarCRM runs in an internal security zone behind the firewall.

      Can SugarChimp sync work without MailChimp webhooks, i.e., only through SugarCRM to MailChimp communication (and not other way around)?

      Thanks,

      Paul

  2. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hello Paul,

    SugarChimp will lose significant functionality if the MailChimp cannot communicate with Sugar. Activities such as subscribes, bounces, and unsubscribes will not be updated in Sugar, along with any profile updates. Is there any way we can allow Sugar to be accessed or is that a requirement on your end? If not, we do have some other options we can try.

    In reference to your original issue, we add the webhook job to the SugarChimp scheduler each time your health status page is accessed. When this job is unsuccessful, the scheduler exits. This is why your other jobs are currently not running correctly. I believe if you leave it for an extended period of time, your job queue should clear up and you should see the other account in MailChimp.

    Let me know what your situation is, and we will get you set up in the best way possible. Thanks.

  3. paullevin member avatar

    aeq

    8 years ago

    Hi,

    Thank you again for quick clarifications.

    It seems that the sync never occurs after that failure. Scheduler is configured to run every 5 minutes and it did not run since last Friday (November 27th - when fatal error occurred per log snippet).

    Also, trying to force the sync today (using two methods: 1. following instructions in documentation, and 2. changing field mapping and then requesting to re-queue for re-sync) has no effect - scheduler is properly dead like you described.

    I will ask the infrastructure team on our side if opening SugarCRM to MailChimp is possible, but it might be difficult to get that through.

    What other options do we have?

    Sincerely,

    Paul

  4. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hey Paul,

    Can you ensure that your cron is setup for this Sugar instance? It is rare that your Sugar data is still not moved over to MailChimp, so I'm thinking something else might be going on. If your Sugar data has been synced to MailChimp then you can disregard all of that!

    One way to handle the security/access issue is to use a proxy script. If your infrastructure team opens up access to this single script, it would allow you to receive the updates from MailChimp while keeping everything else locked down. Here’s more details about this: https://www.sugaroutfitters.com/docs/SugarChimp/setting-up-a-proxy

    Let me know where you stand, and how you choose to proceed!

  5. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hey Paul,

    Were you able to find a solution that works for you? Let us know if you ended up using a proxy script and how that went!

  6. paullevin member avatar

    aeq

    8 years ago

    Hi,

    Opening up our SugarCRM instance to the outside world will definitely not work.

    Running a proxy script really amounts to opening SugarCRM to outside world, just not directly, so I don't think that will work for us either.

    We'll likely implement our own sync process that just pushes SugarCRM account records into MailChimp list(s).

    Thanks,

    Paul

  7. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hey Paul,

    Thanks for letting me know. Opening up just that script is as secure a way to do it as possible. Data being passed to it will only do anything on the Sugar side if it’s in the format provided by MailChimp. Even if it tried to be spoofed, there isn’t anything that SugarChimp could do to hurt your system.

    Writing your own sync process with MailChimp is quite involved, but you can still use SugarChimp and turn off the MailChimp to Sugar functionality. If you do not want to allow any updated data from the MailChimp side so that Sugar stays locked down, you can turn off the SugarChimp webhooks. Let me know if you would like any more details on how you can turn off the MailChimp to Sugar functionality and what that would entail.

  8. paullevin member avatar

    aeq

    8 years ago

    Hi,

    Yes, we'd like to get the instructions for disabling MailChimp to SugarChimp communication as it currently seems to cause a crash in SugarChimp scheduled task, which in turn prevents SugarChimp from successfully pushing account list to MailChimp.

  9. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hey,

    We will get a new package to you tomorrow with instructions on how to install it and make sure that the MailChimp to Sugar sync will no longer crash your scheduler. Let me know if you need anything before then!

  10. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hello, we uploaded the latest package that will be able to handle your scenario.

    The first thing you need to do is install the new SugarChimp package. To do this, download the latest package from SugarOutfitters https://www.sugaroutfitters.com/orders then go to Sugar > Admin > Module Loader, upload and install the zip file. There is no need to uninstall your current version of SugarChimp. This will not affect any of your current settings. Once you reach the License Validation page, click Validate and you are done.

    After that, you need to tell SugarChimp to disable the Add Webhook job. You can do this by running the following query on your Sugar database:

    UPDATE config SET value='0' WHERE category='sugarchimp' AND name='job_addwebhook_enabled'

    Once you do this, you should be all set. The AddWebhook job will no longer throw errors and will allow your other syncing to continue. Remember, without having webhooks enabled and your system available to MailChimp, anything that happens in MailChimp will not be reported back to Sugar.

    Give this a try and let us know how it goes. Thanks!

  11. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    Hey Paul, I was wanting to know if you were able to get everything setup correctly? Let us know if you have any questions on throughout the process!

  12. fanaticallabs member avatar

    Fanatical Labs Provider Affiliate

    8 years ago

    I'm going to go ahead and close this case out for now. You can always start a new thread for any new issues you've run into! Thanks.

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
Rating
  • "The new version does this much better and is actually much more feature rich than the old version 3 plugin. https://www.infosectrain.com/" - Infosec Train

    Read More Reviews