Salesforce Base Connector

7 likes, 0 dislikes
Log in to rate.
by Jesse Snyder — last modified Feb 16, 2011 02:09 AM

Provides access to the Salesforce API within Zope 2, based on the beatbox library

Project Description



The Salesforce Base Connector product provides a Zope-aware tool for interacting with the Python-based Beatbox Salesforce client and for storing username and password information for connecting to a instance.

Rationale For This Product provides an extensible, powerful platform from which to do Customer Relationship Management (CRM) tasks ranging from sales, marketing, nonprofit constituent organizing, and customer service.

Beatbox is a Python wrapper to the API (version 16.0), and provides the underpinnings for this product, but suffers from several limitations from within the Zope/Plone integrator space.

Salesforce Base Connector aims to augment Beatbox for Zope/Plone developers, providing a convenient and cleanly integrated set of features:

  • Managing Salesforce credentials
  • Managing HTTP connections to Salesforce
  • Managing Zope permissions over view and edit actions against Salesforce
  • Providing an interface to the Salesforce API from within restricted Python; for example, in Python Script objects and Zope Page Templates

Additionally, Salesforce Base Connector is intended to decouple Zope/Plone development projects from the specific Python toolkit used as the interface to Salesforce. If a more current alternative to Beatbox comes onto the scene, Salesforce Base Connector can be updated to use this code base as its underlying framework.

Salesforce Base Connector is intended to be used as the foundational piece for your own Plone/Salesforce applications.


Compatible with Zope 2.9, 2.10, 2.11, and 2.12.

Depends upon the Beatbox library, which is a Python wrapper to the API (version 16.0). Beatbox 16.0 or greater is required.

To download and install beatbox, please visit:

If installing salesforcebaseconnector via setuptools or zc.buildout, beatbox should be automatically installed as a dependency.

Installation and Configuration


  • Add Products.salesforcebaseconnector to the eggs section of your buildout configuration and run buildout.
  • Restart Zope.
  • In ZMI, add Salesforce Base Connector to root of site, then set username and password. The credentials will be tested for validity before being stored.

Traditional Zope Product

  • Install dependencies (see beatbox/README.txt for install instructions)
  • Unpack the salesforcebaseconnector product package into the Products folder of the Zope/Plone instance. Check your ownership and permissions.
  • Restart Zope.
  • In ZMI, add Salesforce Base Connector to root of site, then set username and password. The credentials will be tested for validity before being stored.

Additional Documentation and Support

Product home is A documentation area and issue tracker are available at the linked locations.

For examples of the various API calls that are available, see interfaces/

A Google Group, called Plone Salesforce Integration exists with the sole aim of discussing and developing tools to make Plone integrate well with If you have a question, joining this group and posting to the mailing list is the likely best way to get support.

Failing that, please try using the Plone users' mailing list or the #plone irc channel for support requests. If you are unable to get your questions answered there, or are interested in helping develop the product, see the credits below for individuals you might contact.


The Plone & Salesforce crew in Seattle and Portland:

  • Jon Baldivieso <jonb --AT-- groundwire --DOT-- org>
  • Andrew Burkhalter <andrewburkhalter --AT-- gmail --DOT-- com>
  • Brian Gershon <briang --AT-- webcollective --DOT-- coop>
  • David Glick <davidglick --AT-- groundwire --DOT-- org>
  • Jesse Snyder <jesses --AT-- npowerseattle --DOT-- org>

Jesse Snyder and NPower Seattle for the foundation of code that has become Salesforce Base Connector

Simon Fell for providing the beatbox Python wrapper to the API Foundation and Enfold Systems for their gift and work on beatbox (see:

See the CHANGES.txt file for the growing list of people who helped with particular features or bugs.


Distributed under the GPL.

See LICENSE.txt and LICENSE.GPL for details.

Running Tests

To run tests in a unix-like environment, do the following:

$ cd $INSTANCE/Products/salesforcebaseconnector/tests
$ cp
Then edit with your USERNAME and PASSWORD
$ ./bin/zopectl test -s Products.salesforcebaseconnector

FAQ about running tests

If you see an error message like the following and you're certain your login/password combination IS valid:

SoapFaultError: 'INVALID_LOGIN' 'INVALID_LOGIN: Invalid username or password or locked out.'

You're likely running into one of several security measures in effect at You can do one of the following.

Setup your security token within your Salesforce instance and append it to your password To do so, following these instructions:

  1. Log into your instance
  2. Click Setup
  3. My Personal information
  4. Reset My Security Token
  5. edit to have "mypassword[token]" (where [token] is your security token)

Whitelist your IP address

This can be done at the following:

  1. Log into your instance
  2. Click Setup
  3. Security Controls
  4. Network Access

The latter option may be preferable in a production environment, since the security token is more likely to change over time with password updates. For testing, either is fine.

You can find the needed background at

Often tests can fail if one has aborted the running of the tests midstream, thus bypassing the cleanup (i.e. removing fake contacts) that happens after each individual test is run. If you encounter incorrect assertions about the numbers of contacts in your Salesforce instance, try searching for and cleaning up dummy John and Jane Doe contacts.

Change history

1.4 (2010-08-23)

  • Store clients on the ZODB connection object rather than in a volatile attribute. [davisagli]

1.3 (2010-06-17)

  • Add a validateCredentials method that can be used from a remote monitor to confirm that the base connector is still able to connect to Salesforce. [davisagli]
  • Make sure that item access to QueryRecord objects is allowed from Restricted Python. [davisagli]
  • Make sure that QueryRecordSets can be accessed from Restricted Python. [davisagli]

1.2 (2009-11-12)

  • Make sure that QueryRecords can be accessed from Restricted Python. This fixes [davisagli]
  • Avoid deprecated import from Globals in Zope 2.12. [davisagli]
  • Confirmed compatibility with Plone 4. [davisagli]

1.2b2 (2009-09-11)

  • Enabled the beatbox type descriptions cache. If you edit the schema of an object in Salesforce, you'll need to either go to portal_salesforcebaseconnector and press the 'Purge cache' button, or restart Zope. [davisagli]

1.2b1 (2009-09-08)

  • Added the search method from beatbox 16.0.
  • Modified the method signature of the query method to match beatbox and the API. Now a single full SOQL statement is expected, rather than the old 3-part field list, sObject type, and optional where clause. The old method signature is deprecated but should still work for now. [davisagli]
  • Refactored the session timeout handling to use a 'recover_from_session_timeout' decorator to avoid code repetition. [davisagli]
  • Replaced the _getClient method with a property called client. _getClient is now deprecated. [davisagli]
  • Added button in ZMI to flush the beatbox type description cache. [davisagli]
  • beatbox 16.0dev or greater is now required. [davisagli]
  • Call describeSObjects in batches of 100 object types ( limit in recent versions of the API). [davisagli]

1.1.1 (2009-05-13)

  • Don't persist the serverUrl unless it differs from beatbox's default. [davisagli]

1.1 (2009-05-13)

  • Fixed configuration form so if the form validation fails it doesn't wipe out your form values. [davisagli]
  • Added option to configure the Salesforce API SOAP endpoint (server URL). [davisagli]
  • Remove deprecated parameter product_name from ToolInit call, this has been gone since before 2.5.5 which is our earliest Salesforce Base Connector version. [andrewb]

1.0.1 final (2009-01-20)

  • Fixed packaging issue and contain in released version 1.0 final [andrewb]

1.0 final (2009-01-13)

  • Updated beatbox dependency to version [davisagli]
  • Don't use trademarked icon. [davisagli]

1.0c1 (2008-12-22)

  • Protect the base connector's query, queryMore, retrieve, getDeleted, and getUpdated methods with the 'Manage portal' permission instead of making them publicly traversable. Note that this means any restricted Python calling these methods (e.g. page templates or Python scripts) will need to use a proxy role that has this permission in order to continue functioning. [davisagli]
  • Don't display a configured password in the configuration form. [davisagli]
  • Refactored credentials check so that invalid credentials will result in a warning shown to the user, rather than failing silently. This closes issue #2. [andrewb, davisagli]
  • Integration test suites all based on CMFTestCase and creation of CMF Site, rather than PloneTestCase and Plone site for performance reasons [andrewb]


  • Added new publicly supported API "listFieldsRequiredForCreation" which encapsulates some of the rules for which fields are required upon object creation via the SOAP API for The benefit being that additional packages need not reproduce the following, which may evolve anyway:

    not fieldData.nillable and

    not fieldData.defaultedOnCreate and fieldData.createable

    listFieldsRequiredForCreation accepts a Salesforce Object type as its lone required argument (Jesse Snyder)

  • Removing unneeded portal_skins FSDV (Jesse Snyder)

  • Improved docstrings for interfaces (Jesse Snyder)


  • Updating CMFCore permission imports to work with CMF-2.1.0 (Emyr Thomas)
  • Tested with Plone 3.0 final (Andrew Burkhalter)


  • Initial import and creation of standalone product

Current Release
Products.salesforcebaseconnector 1.4

Released Aug 23, 2010 — tested with Plone 4, Plone 3, Plone 2.5

Changed the way that open connections are stored, to avoid the possibility of them falling out of the ZODB cache.
More about this release…

spacer Get Salesforce Base Connector for all platforms
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
14.0 This planned version will introduce compatibility with version 14 of the API. From this point forward the salesforcebaseconnector version numbers will match the API versioning. More about this release… GPL pre-release
1.4 Aug 23, 2010 Changed the way that open connections are stored, to avoid the possibility of them falling out of the ZODB cache. More about this release…
Plone 4
Plone 3
Plone 2.5
GPL final
1.3 Jun 17, 2010 Fixes access to results from restricted Python, and adds a method for a remote monitor to confirm that the connector has valid credentials. More about this release…
Plone 4
Plone 3
Plone 2.5
GPL final
1.2b2 More about this release… GPL beta
1.2b1 More about this release… GPL beta
1.2 Nov 12, 2009 Updates to support version 16 of the Salesforce Partner API, code cleanup, and Zope 2.12 compatibility. More about this release…
Plone 4
Plone 3
Plone 2.5
GPL final
1.1.1 May 14, 2009 More about this release… GPL final
1.1 May 14, 2009 More about this release… GPL final
1.0c1 Dec 23, 2008 Adds Salesforce-specific permissions for more granular access control. More about this release…
Plone 3
Plone 2.5
GPL release-candidate
1.0alpha3 Adds listFieldsRequiredForCreation() method, more tests and documentation More about this release…
Plone 2.5
Plone 3
GPL alpha
1.0alpha2 Adding support for Plone 3.0 More about this release…
Plone 2.5
Plone 3
GPL alpha
1.0alpha1 Initial product release More about this release…
Plone 2.5
GPL alpha
1.0.1 Jan 20, 2009 Fixes packaging issues on the Python Package Index and More about this release…
Plone 3
Plone 2.5
GPL final
1.0 Jan 13, 2009 This final release makes no significant changes from the previous release candidate. More about this release…
Plone 3
Plone 2.5
GPL final is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.