Several hooks are available to extend the functionality of the Salesforce Suite. These hooks are a recent addition so if they don't work for you, please update your copy of the Salesforce Suite.

  • hook_fieldmap_objects() - Implemented in salesforce_api.module
    This hook defines the mappable objects in Drupal and Salesforce.
  • hook_sf_find_match() - Implemented in salesforce_api.module and sf_prematch.module
    This hook allows the modification of the "find_match" process, currently only used by Salesforce Match.
  • hook_salesforce_api_export_connect_fail() - Implemented in salesforce_api.module, sf_node.module and sf_user.module (sf_entity.module in Drupal 7.)
    This hook provides a way to respond to a Salesforce connection failure on export.
  • hook_salesforce_api_delete() - Implemented in sf_node.module and sf_user.module (sf_entity.module in Drupal 7)
    This hook allows the veto of a proposed delete.
  • hook_fieldmap_objects_alter() - Implemented in salesforce_api.module (and in various contributed modules, not part of the Suite, such as Ubercart/Salesforce Integration)
    This hook allows the modification of the fieldmap objects array, such as to add additional mappable fields, or additional mappable Drupal or Salesforce objects.
  • hook_salesforce_api_pre_import() - Implemented in sf_node.module and sf_user.module (sf_entity.module in Drupal 7)
    This hook provides the ability to reject the import of a Salesforce object, or to alter the imported data prior to its being saved in Drupal.
  • hook_salesforce_api_post_import() - Implemented in sf_node.module and sf_user.module (sf_entity.module in Drupal 7)
    This hook can do something post import
  • hook_salesforce_api_pre_export() - Implemented in sf_node.module and sf_user.module (sf_entity.module in Drupal 7)
    This hook provides the ability to reject the export of a Drupal entity to a Salesforce object
  • hook_salesforce_api_post_export() - Implemented in sf_node.module and sf_user.module
    This hook can do something after an export to Salesforce.

Sample code is available in this issue: #1098902: Demo code for Salesforce Suite hooks