Closed (fixed)
Project:
Salesforce Suite
Version:
8.x-3.x-dev
Component:
salesforce_push.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2011 at 20:46 UTC
Updated:
24 Feb 2017 at 14:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kostajh commentedI think this is fine. What do others think?
Comment #2
aaronbaumanthis is a prime use case for hook_watchdog()
Comment #3
dpearcefl commentedGood idea. Closing the issue.
Comment #4
stella commentedSorry to reopen this issue, but it is very similar to something I need to do. For me, hook_watchdog() isn't enough. For all failure to submit data to Salesforce, I not only need to send an email with the error, but also need to record the entity type, entity id, error message and mapping params so an administrator can access report later and see exactly which submissions failed and why, and hopefully be able to fix them or manually create the Leads in Salesforce.
The attached patch invokes a hook on all REST push events, which allows other modules to react to a push failure. I haven't implemented it for SOAP as I'm not set up to test with that yet and wanted to see what you think of this approach first anyway.
Comment #5
aaronbaumanComment #6
aaronbaumanOK, stella, your concern makes sense.
However, this patch adds quite a bit of additional duplication.
I've refactored this to implement salesforce_push_salesforce_push_failure(), which I think consolidates some of this nicely.
Also added documentation for this hook
Comment #7
tauno commentedThis duplicates (or almost duplicates) the hook_salesforce_push_fail hook you committed a little while back - except it's implemented for SOAP and not REST. Shouldn't be too hard make the two success/failure hooks work for REST requests as well as SOAP. Revised patch welcome!
Comment #8
kenorb commentedComment #9
aaronbaumanre-rolled @ dev per #7
Comment #11
mariacha1 commentedComment #12
mariacha1 commentedNot !00% sure about porting this one.
Comment #13
aaronbaumanThis is into 8.x
see SalesforceEvents