You are here

README.txt in Salesforce Suite 7.2

SALESFORCE MODULE
-----------------
  Contents of this README:
    ABOUT
    REQUIREMENTS
    INSTALLATION AND CONFIGURATION
    UPDATING / REINSTALLING / ENABLING / DISABLING
    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) You will need to download your organization's generated Enterprise WSDL file. This must be 
     uploaded to the site prior to entering the connection information.
     (see WORKING WITH WSDL FILES)

  3) PHP to have been compiled with SOAP web services and OpenSSL support, as per:
  
  http://php.net/soap
  http://php.net/openssl

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

  5) Recommended modules
     AES encryption - http://drupal.org/project/aes
     (see SOME NOTES ABOUT SECURITY)


INSTALLATION AND CONFIGURATION
------------------------------
  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

     Place the toolkit in a directory called "toolkit" under your Libraries path for "salesforce".

     The only part of the toolkit needed is the soapclient. The rest may be deleted.

     If you have installed the soapclient successfully, it will be found at a path like:

     sites/all/libraries/salesforce/toolkit/soapclient

  3) If you desire to use the recommend AES Encryption to store your login credentials,
     download and enable that module. Then set it up to use a file for storing the encryption key.

  4) Enable the module on admin/build/modules along with at least Salesforce Entity, so that
     nodes, users, taxonomy terms, and other Drupal entities may be exported.

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

  6) Enter the username, password, and security token with which you want the module to connect
     to Salesforce on the module's main settings page (admin/config/salesforce). 

     It is recommended to use an "API user", distinct from any of the regular users of your 
     Salesforce installation, so that the actions taking by your Drupal integration with Salesforce
     can be distinguished from those of your regular Salesforce users.

  7) While still on admin/config/salesforce, click on the "Fieldmaps" tab, and create a fieldmap 
     between Drupal entities and Salesforce objects. Default fieldmaps for users and nodes have been
     created for an example.

  8) If you check the "Create" tab under Sync with Salesforce, the next time a Drupal entity is
     created, it will create a corresponding object record in Salesforce.
     Alternatively, you can click the Salesforce tab on any entity for which you've
     established a mapping for and manually create a Salesforce object record for it.

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"

  ### Upgrading from 6.x or older
  
  Currently there is no upgrade path from the 6.x-2.x to 7.x-2.x branch of the module.
  You would have to recreate all fieldmaps and linkages manually.
  If you would like to help create an upgrade path, see http://drupal.org/node/1199022.

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 
  fail-safe 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
----------
  In addition to out of the box support for various FieldAPI fields (in sf_entity), 
  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 a sandbox to a live Salesforce instance, 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 username, password, and security token.
    * Try another Salesforce user's credentials.

  In Salesforce:
    * Regenerate the WSDL.
    * If you're switching from a sandbox to a live Salesforce instance, make sure you're in the
      right account.
    * Make sure the IP of the Drupal site's host is not blocked.
    * Go to: [Your Name] > Setup > Users. Check login attempts of the user you are using to connect.
      See if there are any API attempts listed.
    * 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:
    * execute PHP (devel/php):
        $somevariable = salesforce_api_connect();
        dpm($somevariable);
      This will show whether the SOAP toolkit was able to connect to your instance, using the
      credentials currently in the variables table.

  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 the openssl extension is enabled. It must be compiled into your PHP build.

  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.

  Note that the Drupal 7.x-2.x version is still unstable and not yet ready for production use.
  There are known issues with it, and both bug reports and patches are welcome.

  Before creating a new issue, please:
    * Review existing issues for 7.x-2.x at http://drupal.org/project/issues/salesforce
      and see if your issue already has been reported. If so, comment on the existing issue.
    * Include the PHP error message, if there is any.

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