You are here

README.txt in Salesforce Suite 6.2

SALESFORCE MODULE
-----------------
  Contents of this README:
    ABOUT
    REQIREMENTS
    INSTALLATION
    UPDATING / REINSTALLING / ENABLING / DISABLING
    QUICKSTART
    PREMATCHING
    EXPORT QUEUE
    WORKING WITH WSDL FILES
    NOTIFICATIONS
    EXTENDING
    TROUBLESHOOTING
    REPORTING BUGS


ABOUT
-----
  This module suite implements a mapping functionality between Salesforce
  Objects and Drupal entities. In other words, for each of your supported Drupal
  entities (e.g. node, user, or entities supported by extensions), you can 
  assign Salesforce objects that will be created / updated when the entity is
  saved. For each such assignment, you choose which Drupal and Salesforce fields
  should be mapped to one another.

  This suite also includes an API architecture which allows for additional
  modules to be easily plugged in (e.g. for webforms, contact form submits,
  etc).
  
  For a more detailed description of each component module, see MODULES.txt


REQUIREMENTS
------------
  1) You need a salesforce account. Developers can register here:
  
  http://www.developerforce.com/events/regular/registration.php
  
  You will need to know your login data and your security token.

  2) PHP needs the SOAP web services kit installed, as per:
  
  http://php.net/soap

  3) Required modules
     Chaos Tool Suite - http://drupal.org/project/ctools

  4) Recommended modules
     Libraries API - http://drupal.org/project/libraries


RECOMMENDED
-----------

  1) Download and install your organization's generated Enterprise WSDL file.
     (see WORKING WITH WSDL FILES)

  2) AES encryption
     http://drupal.org/project/aes
     (see SOME NOTES ABOUT SECURITY)


INSTALLATION
------------
  1) Download, uncompress and situate the module as per usual.

  2) Download the Salesforce PHP Toolkit

     The official Force.com PHP toolkit is available from github.
     The recommended method of installing is using git.
     $ git clone git://github.com/developerforce/Force.com-Toolkit-for-PHP.git

     You can also use drush make:
     $ drush make salesforce.make.example
     
     Project homepage:
     https://github.com/developerforce/Force.com-Toolkit-for-PHP

     If "libraries" module is installed, place the "soapclient" directory in
     "salesforce/soapclient" in your libraries path.
     You should end up with:

     sites/all/libraries/salesforce/soapclient

     Otherwise, if "libraries" modules is not installed, place the "soapclient"
     directory within the "toolkit" directory in "salesforce_api".
     You should end up with:

     sites/all/modules/salesforce/salesforce_api/toolkit/soapclient

  3) Enable the module on admin/build/modules along with at least one of the
     object modules (sf_node, sf_user, sf_contrib). sf_node is the usual place
     to start.

  4) Assign a WSDL directory and upload your organization's WSDL file
     (admin/settings/salesforce and admin/settings/salesforce/wsdl).


UPDATING / REINSTALLING / ENABLING / DISABLING
----------------------------------------------
  If you have previously installed this module on your Drupal site and are 
  upgrading, you need to do the following to update the module.

  0) ALWAYS backup your site's code and your database.

  1) Download the latest version of Salesforce Suite and then run update.php,
     or use the following drush command: "drush up salesforce"

  ### Older versions

  If you are using an older version of the Salesforce 2.x module (2009 or 
  earlier), follow these directions:
  
  0) Backup your site's code and database. Download your WSDL, which would be
     in sites/all/modules/salesforce_api/wsdl/enterprise.wsdl

  1) Download the latest version of Salesforce Suite and then run update.php,
     or use the following drush command: "drush up salesforce"
  
  2) You will have to update your WSDL directory. It is recommended that your 
     WSDL file be stored outside your webroot. After enabling the new version 
     of Salesforce, visit admin/settings/salesforce and set the WSDL directory 
     and click "Save configuration". You will then be prompted to upload a new 
     WSDL file (admin/settings/salesforce/wsdl).
     
  Note that your fieldmaps may need adjustment after upgrading.

QUICKSTART
----------
  0) Minimal: enable salesforce_api and sf_node or sf_user.
     Kitchen sink: enable salesforce_api, sf_node, sf_user, sf_prematch, and 
     sf_queue
  
  1) Visit admin/settings/salesforce and enter your login information in the
     "Salesforce API Settings" fieldset and "WSDL directory".
     Save that configuration.

  2) Upload your organization's generated WSDL file.

  3) Click on the "Fieldmaps" local task, and create a fieldmap between Drupal
     and Salesforce objects.

  3) If you left the "automatic" box checked, the next time a Drupal object is
     created, it will create a corresponding object in Salesforce.
     Alternatively, you can click the "salesforce" tab on any node which you've
     established a mapping for and manually create a Salesforce object for it.


PREMATCHING
-----------
  The module sf_prematch provides administrators the ability to set up duplicate
  prevention criteria on each fieldmap. When sf_permatch is enabled, 
  administrators will be directed to set up matching criteria after creating a 
  fieldmap. Each time a Salesforce export is triggered, this criteria will be 
  used to identify any pre-existing records. If any matching record is found, 
  the matched record will be updated instead of a new record being created. The 
  impetus for this is to reduce the database management workload for 
  Salesforce.com administrators.


EXPORT QUEUE
------------
  The module sf_queue implements a queueing system for exports. Since Salesforce 
  API's create and update functions can modify up to 200 records at a time, this 
  module offers significant efficiencies for users trying to minimize their API 
  usage. Further, if an account's API limit is exceeded, the queue provides a 
  failsafe so that data is not lost. Failed API transactions will be queued for 
  future reprocessing. In addition, sf_queue is highly configurable to allow 
  administrators maximum flexibility in setting up the queue.


SOME NOTES ABOUT SECURITY
--------------------------
  By default all SalesForce credentials are stored in the variables table,
  unencrypted. If this is a problem for you, this module supports encryption via
  aes module http://drupal.org/project/aes. You will need to create a directory
  outside your webroot (you can use the same one you used for your WSDL) wherein
  your encryption key will be stored. Your credentials will thus forth be
  encrypted as securely as AES allows. PLEASE NOTE: your data is still only as
  secure as your network. It may be possible for a savvy attacker to access your
  data at any of various points between your Drupal site and SalesForce.com. As
  this always, you should educate yourself about the risks involved before storing
  and transferring sensitive data across the internet.


WORKING WITH WSDL FILES
-----------------------
  If you do not upload a WSDL file, Salesforce module will use a default .wsdl
  file (soapclient/enterprise.wsdl.xml), which may not be compatible with your
  organization's Salesforce installation or the current Salesforce API. It is
  highly recommended that you supply your own enterprise wsdl file via WSDL
  administration at admin/settings/salesforce/wsdl.

  Every time your Salesforce schema changes, you will need to regenreate your
  WSDL and upload it to your Drupal site if the changes affect mapped Salesforce
  objects. Changing Salesforce schema may result in breaking your fieldmaps, so
  please do so with extreme caution.

  When switching between wsdl files, keep in mind that PHP's SoapClient is
  caching wsdl information. Though PHP's SOAP WSDL cache should be cleaned when
  you upload a new WSDL file, you can permenantly disable caching of wsdl
  information by adding this line to your settings.php:

  ini_set('soap.wsdl_cache_enabled',  '0');

  You can control the life time of your cache by adding this line to your
  settings.php:

  ini_set('soap.wsdl_cache_ttl',      '0');

  For more information on SoapClient refer to
  http://php.net/manual/en/book.soap.php


NOTIFICATIONS
-------------
  Salesforce Outbound Messages (referred to as Notifications) are XML messages
  from Salesforce that can be sent based on Salesforce Workflow actions to any
  web endpoint. The included module sf_notifications handles processing of any
  such Notifications.

  To allow Drupal to respond to Notifications, enable the sf_notifications
  module as you would any other module, and point your Outbound Message(s) to
  the notification endpoint:

    http://example.com/sf_notifications/endpoint
    
  Configuring Salesforce Outbound Messages and Workflow is outside the scope of
  this documentation.
  
  SF_notifications will expose your existing fieldmaps to function as
  handlers for notifications. You can configure which of your fieldmaps should
  be active, and set conditions upon which the Notifications will be used to
  create Drupal objects. One application of Notifications is to implement full
  two-way synchronization between Salesforce and Drupal.  


EXTENDING
----------
  Support for mapping fields from commonly used modules like location and cck is 
  provided by sf_contrib module. If you use node_location, user_location, 
  cck_location, or any cck other fields and you'd like them to be available for 
  export, you need to enable this module.
  
  In addition to out of the box support for various cck fields, an extensible 
  framework is available for developers to build or alter support for contrib 
  modules. See sf_contrib for examples and best practices, as well as hooks.php 
  for documentation of the available integration points.


TROUBLESHOOTING
---------------
  Troubleshooting connection errors:
    * Are you using the right WSDL? Generate a new one.
    * Disable SOAP WSDL cache.
    * If you’re switching from sandbox to enterprise make sure that you switched
      accounts when generating the wsdl
    * Can you connect to the sandbox?
    * Are you logging everything? Have you checked watchdog?
    * Re-enter the token, user name and pass
    * Try another user

  In Salesforce:
    * Regnerate the WSDL
    * If you’re switching from sandbox to enterprise, make sure you're in the
      right account
    * Make sure the ip of server is not blocked
    * Go to: setup > users. Check login attempts of the user you are trying to
      connect with
    * Reset the credentials associated with the user

  In the Salesforce API module:
    * Replace WSDL file with the one you want to use
      (admin/settings/salesforce/wsdl)

  Install Devel:
    * excecute php:
      $somevariable = salesforce_api_connect();
      dpm($somevariable);

  In the file salesforce.module:
    * In salesforce_api_login(), find the line
      $sf->client->createConnection($wsdl)
    * Before that line put dpm($wsdl);
    * Make sure that your WSDL file is named "enterprise.wsdl.xml"

  PHPinfo():
    * Check that SOAP is enabled
    * Check that soap.wsdl_cache_enabled is FALSE
    * Check that openssl is enabled.

  If you have shell access:
    * curl https://login.salesforce.com to make sure your machine can connect.


REPORTING BUGS
--------------
  Bug reports should adhere to Drupal standards.

  Before creating a new issue, please:
    * Review existing issues at http://drupal.org/project/issues/salesforce
    * Use latest code from CVS on a *new* Drupal install
    * Include the PHP error message
    * Turn on "log all salesforce activity" and include any relevant watchdog
      errors
    * Install a generated WSDL file and Clear your WSDL cache
      (see WORKING WITH WSDL FILES)
    * Confirm php's SOAP support
    * Confirm whether you were able to successfully:
      - Connect to Salesforce
      - Save credentials
      - Login to https://login.salesforce.com/ with those credentials
      - Load the test/demo page
      - Create a fieldmap
    * Go through the Troubleshooting steps above and include any relevant info
    * Include all the information from the list above, and system information,
      including operating system, php version, apache version

File

README.txt
View source
  1. SALESFORCE MODULE
  2. -----------------
  3. Contents of this README:
  4. ABOUT
  5. REQIREMENTS
  6. INSTALLATION
  7. UPDATING / REINSTALLING / ENABLING / DISABLING
  8. QUICKSTART
  9. PREMATCHING
  10. EXPORT QUEUE
  11. WORKING WITH WSDL FILES
  12. NOTIFICATIONS
  13. EXTENDING
  14. TROUBLESHOOTING
  15. REPORTING BUGS
  16. ABOUT
  17. -----
  18. This module suite implements a mapping functionality between Salesforce
  19. Objects and Drupal entities. In other words, for each of your supported Drupal
  20. entities (e.g. node, user, or entities supported by extensions), you can
  21. assign Salesforce objects that will be created / updated when the entity is
  22. saved. For each such assignment, you choose which Drupal and Salesforce fields
  23. should be mapped to one another.
  24. This suite also includes an API architecture which allows for additional
  25. modules to be easily plugged in (e.g. for webforms, contact form submits,
  26. etc).
  27. For a more detailed description of each component module, see MODULES.txt
  28. REQUIREMENTS
  29. ------------
  30. 1) You need a salesforce account. Developers can register here:
  31. http://www.developerforce.com/events/regular/registration.php
  32. You will need to know your login data and your security token.
  33. 2) PHP needs the SOAP web services kit installed, as per:
  34. http://php.net/soap
  35. 3) Required modules
  36. Chaos Tool Suite - http://drupal.org/project/ctools
  37. 4) Recommended modules
  38. Libraries API - http://drupal.org/project/libraries
  39. RECOMMENDED
  40. -----------
  41. 1) Download and install your organization's generated Enterprise WSDL file.
  42. (see WORKING WITH WSDL FILES)
  43. 2) AES encryption
  44. http://drupal.org/project/aes
  45. (see SOME NOTES ABOUT SECURITY)
  46. INSTALLATION
  47. ------------
  48. 1) Download, uncompress and situate the module as per usual.
  49. 2) Download the Salesforce PHP Toolkit
  50. The official Force.com PHP toolkit is available from github.
  51. The recommended method of installing is using git.
  52. $ git clone git://github.com/developerforce/Force.com-Toolkit-for-PHP.git
  53. You can also use drush make:
  54. $ drush make salesforce.make.example
  55. Project homepage:
  56. https://github.com/developerforce/Force.com-Toolkit-for-PHP
  57. If "libraries" module is installed, place the "soapclient" directory in
  58. "salesforce/soapclient" in your libraries path.
  59. You should end up with:
  60. sites/all/libraries/salesforce/soapclient
  61. Otherwise, if "libraries" modules is not installed, place the "soapclient"
  62. directory within the "toolkit" directory in "salesforce_api".
  63. You should end up with:
  64. sites/all/modules/salesforce/salesforce_api/toolkit/soapclient
  65. 3) Enable the module on admin/build/modules along with at least one of the
  66. object modules (sf_node, sf_user, sf_contrib). sf_node is the usual place
  67. to start.
  68. 4) Assign a WSDL directory and upload your organization's WSDL file
  69. (admin/settings/salesforce and admin/settings/salesforce/wsdl).
  70. UPDATING / REINSTALLING / ENABLING / DISABLING
  71. ----------------------------------------------
  72. If you have previously installed this module on your Drupal site and are
  73. upgrading, you need to do the following to update the module.
  74. 0) ALWAYS backup your site's code and your database.
  75. 1) Download the latest version of Salesforce Suite and then run update.php,
  76. or use the following drush command: "drush up salesforce"
  77. ### Older versions
  78. If you are using an older version of the Salesforce 2.x module (2009 or
  79. earlier), follow these directions:
  80. 0) Backup your site's code and database. Download your WSDL, which would be
  81. in sites/all/modules/salesforce_api/wsdl/enterprise.wsdl
  82. 1) Download the latest version of Salesforce Suite and then run update.php,
  83. or use the following drush command: "drush up salesforce"
  84. 2) You will have to update your WSDL directory. It is recommended that your
  85. WSDL file be stored outside your webroot. After enabling the new version
  86. of Salesforce, visit admin/settings/salesforce and set the WSDL directory
  87. and click "Save configuration". You will then be prompted to upload a new
  88. WSDL file (admin/settings/salesforce/wsdl).
  89. Note that your fieldmaps may need adjustment after upgrading.
  90. QUICKSTART
  91. ----------
  92. 0) Minimal: enable salesforce_api and sf_node or sf_user.
  93. Kitchen sink: enable salesforce_api, sf_node, sf_user, sf_prematch, and
  94. sf_queue
  95. 1) Visit admin/settings/salesforce and enter your login information in the
  96. "Salesforce API Settings" fieldset and "WSDL directory".
  97. Save that configuration.
  98. 2) Upload your organization's generated WSDL file.
  99. 3) Click on the "Fieldmaps" local task, and create a fieldmap between Drupal
  100. and Salesforce objects.
  101. 3) If you left the "automatic" box checked, the next time a Drupal object is
  102. created, it will create a corresponding object in Salesforce.
  103. Alternatively, you can click the "salesforce" tab on any node which you've
  104. established a mapping for and manually create a Salesforce object for it.
  105. PREMATCHING
  106. -----------
  107. The module sf_prematch provides administrators the ability to set up duplicate
  108. prevention criteria on each fieldmap. When sf_permatch is enabled,
  109. administrators will be directed to set up matching criteria after creating a
  110. fieldmap. Each time a Salesforce export is triggered, this criteria will be
  111. used to identify any pre-existing records. If any matching record is found,
  112. the matched record will be updated instead of a new record being created. The
  113. impetus for this is to reduce the database management workload for
  114. Salesforce.com administrators.
  115. EXPORT QUEUE
  116. ------------
  117. The module sf_queue implements a queueing system for exports. Since Salesforce
  118. API's create and update functions can modify up to 200 records at a time, this
  119. module offers significant efficiencies for users trying to minimize their API
  120. usage. Further, if an account's API limit is exceeded, the queue provides a
  121. failsafe so that data is not lost. Failed API transactions will be queued for
  122. future reprocessing. In addition, sf_queue is highly configurable to allow
  123. administrators maximum flexibility in setting up the queue.
  124. SOME NOTES ABOUT SECURITY
  125. --------------------------
  126. By default all SalesForce credentials are stored in the variables table,
  127. unencrypted. If this is a problem for you, this module supports encryption via
  128. aes module http://drupal.org/project/aes. You will need to create a directory
  129. outside your webroot (you can use the same one you used for your WSDL) wherein
  130. your encryption key will be stored. Your credentials will thus forth be
  131. encrypted as securely as AES allows. PLEASE NOTE: your data is still only as
  132. secure as your network. It may be possible for a savvy attacker to access your
  133. data at any of various points between your Drupal site and SalesForce.com. As
  134. this always, you should educate yourself about the risks involved before storing
  135. and transferring sensitive data across the internet.
  136. WORKING WITH WSDL FILES
  137. -----------------------
  138. If you do not upload a WSDL file, Salesforce module will use a default .wsdl
  139. file (soapclient/enterprise.wsdl.xml), which may not be compatible with your
  140. organization's Salesforce installation or the current Salesforce API. It is
  141. highly recommended that you supply your own enterprise wsdl file via WSDL
  142. administration at admin/settings/salesforce/wsdl.
  143. Every time your Salesforce schema changes, you will need to regenreate your
  144. WSDL and upload it to your Drupal site if the changes affect mapped Salesforce
  145. objects. Changing Salesforce schema may result in breaking your fieldmaps, so
  146. please do so with extreme caution.
  147. When switching between wsdl files, keep in mind that PHP's SoapClient is
  148. caching wsdl information. Though PHP's SOAP WSDL cache should be cleaned when
  149. you upload a new WSDL file, you can permenantly disable caching of wsdl
  150. information by adding this line to your settings.php:
  151. ini_set('soap.wsdl_cache_enabled', '0');
  152. You can control the life time of your cache by adding this line to your
  153. settings.php:
  154. ini_set('soap.wsdl_cache_ttl', '0');
  155. For more information on SoapClient refer to
  156. http://php.net/manual/en/book.soap.php
  157. NOTIFICATIONS
  158. -------------
  159. Salesforce Outbound Messages (referred to as Notifications) are XML messages
  160. from Salesforce that can be sent based on Salesforce Workflow actions to any
  161. web endpoint. The included module sf_notifications handles processing of any
  162. such Notifications.
  163. To allow Drupal to respond to Notifications, enable the sf_notifications
  164. module as you would any other module, and point your Outbound Message(s) to
  165. the notification endpoint:
  166. http://example.com/sf_notifications/endpoint
  167. Configuring Salesforce Outbound Messages and Workflow is outside the scope of
  168. this documentation.
  169. SF_notifications will expose your existing fieldmaps to function as
  170. handlers for notifications. You can configure which of your fieldmaps should
  171. be active, and set conditions upon which the Notifications will be used to
  172. create Drupal objects. One application of Notifications is to implement full
  173. two-way synchronization between Salesforce and Drupal.
  174. EXTENDING
  175. ----------
  176. Support for mapping fields from commonly used modules like location and cck is
  177. provided by sf_contrib module. If you use node_location, user_location,
  178. cck_location, or any cck other fields and you'd like them to be available for
  179. export, you need to enable this module.
  180. In addition to out of the box support for various cck fields, an extensible
  181. framework is available for developers to build or alter support for contrib
  182. modules. See sf_contrib for examples and best practices, as well as hooks.php
  183. for documentation of the available integration points.
  184. TROUBLESHOOTING
  185. ---------------
  186. Troubleshooting connection errors:
  187. * Are you using the right WSDL? Generate a new one.
  188. * Disable SOAP WSDL cache.
  189. * If you’re switching from sandbox to enterprise make sure that you switched
  190. accounts when generating the wsdl
  191. * Can you connect to the sandbox?
  192. * Are you logging everything? Have you checked watchdog?
  193. * Re-enter the token, user name and pass
  194. * Try another user
  195. In Salesforce:
  196. * Regnerate the WSDL
  197. * If you’re switching from sandbox to enterprise, make sure you're in the
  198. right account
  199. * Make sure the ip of server is not blocked
  200. * Go to: setup > users. Check login attempts of the user you are trying to
  201. connect with
  202. * Reset the credentials associated with the user
  203. In the Salesforce API module:
  204. * Replace WSDL file with the one you want to use
  205. (admin/settings/salesforce/wsdl)
  206. Install Devel:
  207. * excecute php:
  208. $somevariable = salesforce_api_connect();
  209. dpm($somevariable);
  210. In the file salesforce.module:
  211. * In salesforce_api_login(), find the line
  212. $sf->client->createConnection($wsdl)
  213. * Before that line put dpm($wsdl);
  214. * Make sure that your WSDL file is named "enterprise.wsdl.xml"
  215. PHPinfo():
  216. * Check that SOAP is enabled
  217. * Check that soap.wsdl_cache_enabled is FALSE
  218. * Check that openssl is enabled.
  219. If you have shell access:
  220. * curl https://login.salesforce.com to make sure your machine can connect.
  221. REPORTING BUGS
  222. --------------
  223. Bug reports should adhere to Drupal standards.
  224. Before creating a new issue, please:
  225. * Review existing issues at http://drupal.org/project/issues/salesforce
  226. * Use latest code from CVS on a *new* Drupal install
  227. * Include the PHP error message
  228. * Turn on "log all salesforce activity" and include any relevant watchdog
  229. errors
  230. * Install a generated WSDL file and Clear your WSDL cache
  231. (see WORKING WITH WSDL FILES)
  232. * Confirm php's SOAP support
  233. * Confirm whether you were able to successfully:
  234. - Connect to Salesforce
  235. - Save credentials
  236. - Login to https://login.salesforce.com/ with those credentials
  237. - Load the test/demo page
  238. - Create a fieldmap
  239. * Go through the Troubleshooting steps above and include any relevant info
  240. * Include all the information from the list above, and system information,
  241. including operating system, php version, apache version