Trying to get feed error notifications for the Salesforce addon

Hi!

I’m testing out the Salesforce addon. We’re looking to get an email notification when an entry fails to get sent to Salesforce. Support told me to try the gform_{$SHORT_SLUG}_error action but I can’t seem to get it working. Nothing happens when submitting a form with an issue that causes an error with sending to Salesforce.

I can’t tell if I’m supposed to create an email notification manually for each form I have. (I hope not since.)

Here’s my code so far (mostly copied from the documentation):

add_action( ‘gform_salesforce_error’, ‘send_salesforce_error_email’, 10, 4 );
function send_salesforce_error_email( $feed, $entry, $form, $error_message ) {
GFAPI::send_notifications( $form, $entry, ‘salesforce_api_issue’ );
}

add_filter( ‘gform_notification_events’, function ( $events ) {
$events[‘salesforce_api_issue’] = ‘Salesforce API Issue’;
return $events;
} );

There’s also an event in the notification dropdown for Salesforce Feed Failure, this seems to be unrelated to my code, should I be taking that approach instead?

Does anyone know what I need to do here?

Thanks!