Some error messages from Salesforce API require immediate attention from an admin, such as if credentials are wrong, since otherwise a bunch of exports could be failing and sticking in the queue. The salesforce_api_log() function should fire a trigger so that an action could happen if the error was above a user-specified threshold. This would allow an email to be sent to a user, or something else to happen.

CommentFileSizeAuthor
#2 sf_action-1218318-3.patch1.82 KBEvanDonovan

Comments

longwave’s picture

For what it's worth I've implemented something similar in a custom module using hook_watchdog() and checking for $log_entry['type'] == 'salesforce'

EvanDonovan’s picture

Status: Active » Needs work
StatusFileSize
new1.82 KB

Here's a preliminary patch for this. I am still learning the actions system in Drupal 7, though. It appears that I still need to figure out how tokens work, and how to integrate this with the Rules module, rather than simply the core Actions/Triggers system. Any suggestions would be welcomed.

nicodv’s picture

Hi there, in case one of you reads this, I´m a little bit desperate trying to understand salesforce and maybe you can help me find the right path in order to understand the basics for stuff like:
* if I delete an opportunity in salesforce, the account linked in drupal doesn´t get deleted...
* ...or, how can I trigger an action in drupal when a user is imported. This last doubt is a little bit answered with the patch above, (I´m not a good coder) so I would like to find examples or someone to point me in the right direction.

Any guidance would be seriously appreciated.

Thanks in advance.

nico

kostajh’s picture

Status: Needs work » Closed (won't fix)