#3425 - SugarChimp sync launches webhooks
Hello,
We deployed the module for one of our clients that has webhooks enabled. On sync of the contacts between Sugar and MailChimp the webhooks are triggered and are saturating the job queue for no reason. Is this a known issue? Do you have any fixes?
Kind regards, Synolia Support
7 years ago
Hello there,
The sync from Sugar to MailChimp will trigger the webhooks from MailChimp back to Sugar, but should not process. There should be no action taken when the webhook from MailChimp is received from one of our updates.
Maybe I am not understanding the issue completely and missed the mark. Can you explain what the process is that is saturating the job_queue from webhooks?
Cheers! Jon
7 years ago
Hi,
When the sync is made the Contacts are saved in Sugar (from what i understood the date of the last sync is updated). This triggers Sugar native web logic hooks as they dont have any blocking condition. This creates 2 issues: 1. The web logic hooks are not processed immediately, but added to the job queue of Sugar, saturating it (at least in the case of initial sync) as only a limited number of jobs can be processed at a time 2. The web logic hooks are sent without any need as the only thing changed is (to my knowledge) the date of the last sync
The question is, should there be a block in SugarChimp to stop the processing of Sugar web logic hooks when this is not needed?
Kind regards, Synolia Support
7 years ago
Hello,
Thank you for that detailed explanation. I understand now that you are using the Sugar Web Logic Hooks. We do not have very many customers using the web logic hooks, and thus have not addressed the issue you've described.
In understand the problem, we will be able to make some adjustments that should help alleviate the load caused by our scheduler runs. We will check all updates from MailChimp to ensure that data changes before saving the update. This will remove any unnecessary bean saves which should keep your web logic hooks from firing too often.
I should be able to have the fix ready in the next couple weeks. Once available, I will reach back out and ensure you get on the updated version. Does that solution sound like it will work for you?
Thanks, Jon
7 years ago
Hello Jon,
Thank you very much for your help. I will inform the client about this and let you know about their response.
Kind regards, Synolia Support
7 years ago
Hello,
We notified the client that currently SugarChimp is not compatible with the use of web logic hooks. As a result the client has deactivated the module via the module loader, breaking the production instance in the process. We managed to get it working again by copying the "copy" folder back in the Sugar root (the errors seemed to be linked to missing files).
There are 2 questions that we would need help with : 1. We deactivated the 2 scheduled tasks linked with SugarChimp (SugarChimp and SmartList). Will this be enough to stop the syncs and the issue with the web logic hooks (aka disabeling the module)? 2. How can we remove/repair the module from the current state to a functionning one, once the issue is fixed?
NOTE: The client is using the version 7.7.3a of the SugarChimp module.
Kind regards, Synolia Support
7 years ago
Hello there,
Sorry for the issues with the disabling of the module. I will answer the questions individually:
After setting the schedulers to "Inactive", go to any synced lists in MailChimp > Settings > Webhooks. Delete any webhooks back to SugarCRM. That will keep any mass updates coming back to Sugar from there as well.
To Update the module once we have the new package, you will simply need to install it over the previous version, without uninstalling or disabling. However, I want to note that we expect the uninstall to work as expected, not break the instance. So we can certainly look further into that if the time comes.
Let me know if that answers your questions completely.
Thanks, Jon
7 years ago
Thank you very much for your help. We will assist our client with this issue.
Kind regards, Synolia Support
6 years ago
Hello again,
I just wanted to let you know we're finalizing testing the package for this update now. I should have something ready for you by the end of the week.
Cheers! Jon
6 years ago
Hello,
Excellent news. Thank you for the quick assistance.
Kind regards, Synolia Support
6 years ago
Hello,
I've got a package ready for you to download at this link: https://www.dropbox.com/s/r0cng0o9rwszbfq/SugarChimp-7.9.7-for-Sugar7.zip?dl=0
Once you get that installed, let me know how the fix works for you.
Best Regards, Jon
6 years ago
Hello again Synolia,
I hope you've had a nice holiday season. Were you able to download the update? Have you seen the logic hook issue fixed?
Thanks, Jon
6 years ago
Hello,
Thank you for the file, but unfortunatelly the client has not be available for the deploiment and test. We will let you know as soon as the fix is tested.
Kind regards, Synolia Support
6 years ago
Hello Jon,
We have tested the fix but unfortunatelly it does not correct the issue. I will explain the steps we took to validate the fix:
The issue is that the client has a lot of contacts and the lists are evolving all the time. Is it possible to ignore the WebHooks on the sync calls from Sugar to MailChimp? This should avoid a lot of unnecessary jobs that would clog up the job queue.
Kind regards, Synolia Support
6 years ago
Hello,
Thank you for the feedback and explanation. I would really like to explore this issue with you in more depth. I'm not able to replicate your double webhooks here. Are both webhooks being fired for the same Contact? Are they setup to fire when a bean is saved?
We have optimized the integration so that only updates when beans actually change are fired, as opposed to anytime we receive an update. i.e. If you update a field in MailChimp that is not syncing with Sugar, you should receive the webhook from MailChimp, but SugarCRM should not fire any webhooks of their own.
Let me know if that is the case.
Thanks, Jon
6 years ago
Hello,
After checking the client's setup, there are multiple webhooks defined:
The problem still remains, but I think is more with the fact that the 2 systems (SugarChimp & webhooks) are not compatible. A mass update in Sugar would have the same effect and the client has to find a different solution.
Kind regards, Synolia Support
6 years ago
I understand the problem, but just am not sure that our integration should be causing major issues, except in expected situations where we update Sugar from MailChimp. Can we try to get on a call to be sure that we are on the same page with what to expect with SugarChimp and Sugar's web logichooks? If so, you can schedule a call with me here: https://calendly.com/fanaticallabs/sugarchimp-support
I look forward to hearing back from you. We may or may not be able to fix your issue, I would really like the chance to look at it closer with your technicians before say that we are incompatible.
Best Regards, Jon
6 years ago
I wanted to add to the response, to clarify that I believe your second situation should not be firing from the sync. As the record that was added to MailChimp should not have updated back in Sugar, so therefor should not have saved the bean, and not fired any Sugar webhooks.
Additionally, we can turn off your MailChimp to Sugar profile updates, which, depending on how you are using MailChimp, could be an acceptable way to minimize webhooks as well. You would only get 'new' subscriber webhooks back into Sugar.
I look forward to hearing back from you.
Thanks, Jon
6 years ago
Hello everyone,
I wanted to close this case out, and thank Vlad for taking time to explain your workflow and how SugarChimp fits in with the Sugar WebHooks. We agree that the Webhooks are difficult to implement in Sugar as they fire on every desired logic hook, without the ability to filter out specific changes that need to fire the webhooks. The best solution would be to add custom logic hooks that check against certain filters before firing your own webhooks.
Thanks again for your time on this, let us know if we can help with anything else.
Kind Regards, Jon
6 years ago
Hi,
We could not sync our list to mailchimp for unknown reason. No error in sugarlogs. Can you help us please. Thanks.
Regards, Leonell
6 years ago
Hello Leonell,
I noticed that you've started a new support case, so I will keep our conversation going there.
Thanks, Jon