Title: Hook/Filter for $conn/api object
Last modified: August 20, 2016

---

# Hook/Filter for $conn/api object

 *  Resolved [Seth Carstens](https://wordpress.org/support/users/sethcarstens/)
 * (@sethcarstens)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/hookfilter-for-connapi-object/)
 * First, thanks for sharing your plugin. The code is very well organized and uses
   great coding standards. Unfortunately I have had to hack your plugin, in order
   to get it to work for us. Why? You have absolutely no hooks or filters! I would
   like to “not hack” your plugin so that I can use any updates you make so I offer
   you the following suggestion, at minimum:
 * In salesforce-api.php around line 665 add the following BEFORE updating the self::
   api:
 * `$conn = apply_filters('gfsf_modify_connection', $conn);`
 * Why? The SOAP calls default the AssignmentRuleHeader to “false”, so none of our
   leads are getting assigned properly. Here is the code in our “custom functions.
   php file” that in conjuction with this filter allows our leads to follow there
   proper lead assignment:
 *     ```
       add_filter('gfsf_modify_connection', 'enable_assignment_rules');
       function enable_assignment_rules($conn){
       						$header = new AssignmentRuleHeader(NULL, true);
       						$conn->setAssignmentRuleHeader($header);
       						return $conn;
       }
       ```
   
 * [http://wordpress.org/extend/plugins/gravity-forms-salesforce/](http://wordpress.org/extend/plugins/gravity-forms-salesforce/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Zack Katz](https://wordpress.org/support/users/katzwebdesign/)
 * (@katzwebdesign)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/hookfilter-for-connapi-object/#post-3528897)
 * This was added in 2.3.2 – thanks for the recommendation (sorry I didn’t see it
   sooner).
 * Please continue submitting pull requests to Github: [http://github.com/katzwebservices/Gravity-Forms-Salesforce](http://github.com/katzwebservices/Gravity-Forms-Salesforce)–
   thanks!
 *  [axiomuser](https://wordpress.org/support/users/axiomuser/)
 * (@axiomuser)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/hookfilter-for-connapi-object/#post-3528902)
 * Zack – Again, you are the best. Start charging for this plugin… Yea, I said it.
   I have installed 2.3.2 and am still having the assignment issue after submission.
   As stated above_ “so none of our leads are getting assigned properly.”_ I am 
   still having a problem with this. Can you help?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hook/Filter for $conn/api object’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-salesforce_fbfdff.svg)
 * [Gravity Forms Salesforce Add-on](https://wordpress.org/plugins/gravity-forms-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-salesforce/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [axiomuser](https://wordpress.org/support/users/axiomuser/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/hookfilter-for-connapi-object/#post-3528902)
 * Status: resolved