Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install products.salesforcebaseconnector

How to install Products.salesforcebaseconnector

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install products.salesforcebaseconnector
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.4 Available View build log
Windows (64-bit)
1.4 Available View build log
Mac OS X (10.5+)
1.4 Available View build log
Linux (32-bit)
1.4 Available View build log
Linux (64-bit)
1.4 Available View build log
 
License
GPL
Lastest release
version 1.4 on Jan 5th, 2011

Overview

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 Salesforce.com instance.

Rationale For This Product

Salesforce.com 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 Salesforce.com 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;

System Message: WARNING/2 (<string>, line 28)

Bullet list ends without a blank line; unexpected unindent.

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.

Dependencies

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

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

To download and install beatbox, please visit:

System Message: WARNING/2 (<string>, line 50)

Literal block expected; none found.

http://code.google.com/p/salesforce-beatbox/

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

Installation and Configuration

Buildout
  • Add Products.salesforcebaseconnector to the eggs section of your buildout

System Message: WARNING/2 (<string>, line 63)

Bullet list ends without a blank line; unexpected unindent.

configuration and run buildout.

  • Restart Zope.
  • In ZMI, add Salesforce Base Connector to root of site, then set username and

System Message: WARNING/2 (<string>, line 68)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 76)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 81)

Bullet list ends without a blank line; unexpected unindent.

and password. The credentials will be tested for validity before being stored.

Additional Documentation and Support

Product home is http://plone.org/products/salesforcebaseconnector. A documentation area and issue tracker are available at the linked locations.

For examples of the various Salesforce.com API calls that are available, see interfaces/salesforcebaseconnector.py

A Google Group, called Plone Salesforce Integration exists with the sole aim of discussing and developing tools to make Plone integrate well with Salesforce.com. 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.

Credits

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 Salesforce.com API

Salesforce.com Foundation and Enfold Systems for their gift and work on beatbox (see: http://gokubi.com/archives/onenorthwest-gets-grant-from-salesforcecom-to-integrate-with-plone)

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

License

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 sfconfig.py.in sfconfig.py

System Message: ERROR/3 (<string>, line 151)

Inconsistent literal block quoting.

Then edit sfconfig.py with your Salesforce.com USERNAME and PASSWORD $ cd $INSTANCE $ ./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:

System Message: WARNING/2 (<string>, line 162)

Literal block expected; none found.

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 Salesforce.com. 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 Salesforce.com instance
  2. Click Setup
  3. My Personal information
  4. Reset My Security Token
  5. edit sfconfig.py 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 Salesforce.com 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 http://www.salesforce.com/security/

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

System Message: WARNING/2 (<string>, line 203)

Bullet list ends without a blank line; unexpected unindent.

attribute. [davisagli]

1.3 (2010-06-17)

  • Add a validateCredentials method that can be used from a remote monitor to

System Message: WARNING/2 (<string>, line 209)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 213)

Bullet list ends without a blank line; unexpected unindent.

Python. [davisagli]

  • Make sure that QueryRecordSets can be accessed from Restricted Python.

System Message: WARNING/2 (<string>, line 217)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

1.2 (2009-11-12)

  • Make sure that QueryRecords can be accessed from Restricted Python.

System Message: WARNING/2 (<string>, line 222)

Bullet list ends without a blank line; unexpected unindent.

This fixes http://plone.org/products/salesforcebaseconnector/issues/6 [davisagli]

  • Avoid deprecated import from Globals in Zope 2.12.

System Message: WARNING/2 (<string>, line 226)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

  • Confirmed compatibility with Plone 4.

System Message: WARNING/2 (<string>, line 229)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

1.2b2 (2009-09-11)

  • Enabled the beatbox type descriptions cache. If you edit the schema of

System Message: WARNING/2 (<string>, line 234)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 244)

Bullet list ends without a blank line; unexpected unindent.

Salesforce.com 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

System Message: WARNING/2 (<string>, line 250)

Bullet list ends without a blank line; unexpected unindent.

'recover_from_session_timeout' decorator to avoid code repetition. [davisagli]

  • Replaced the _getClient method with a property called client.

System Message: WARNING/2 (<string>, line 254)

Bullet list ends without a blank line; unexpected unindent.

_getClient is now deprecated. [davisagli]

  • Added button in ZMI to flush the beatbox type description cache.

System Message: WARNING/2 (<string>, line 258)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

  • beatbox 16.0dev or greater is now required.

System Message: WARNING/2 (<string>, line 261)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

  • Call describeSObjects in batches of 100 object types (Salesforce.com

System Message: WARNING/2 (<string>, line 264)

Bullet list ends without a blank line; unexpected unindent.

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.

System Message: WARNING/2 (<string>, line 270)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

1.1 (2009-05-13)

  • Fixed configuration form so if the form validation fails it doesn't wipe

System Message: WARNING/2 (<string>, line 275)

Bullet list ends without a blank line; unexpected unindent.

out your form values. [davisagli]

  • Added option to configure the Salesforce API SOAP endpoint (server URL).

System Message: WARNING/2 (<string>, line 279)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

  • Remove deprecated parameter product_name from ToolInit call, this has been

System Message: WARNING/2 (<string>, line 282)

Bullet list ends without a blank line; unexpected unindent.

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 sfconfig.py in released version 1.0 final

System Message: WARNING/2 (<string>, line 289)

Bullet list ends without a blank line; unexpected unindent.

[andrewb]

1.0 final (2009-01-13)

  • Updated beatbox dependency to version 0.9.1.1

System Message: WARNING/2 (<string>, line 294)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

  • Don't use trademarked Salesforce.com icon.

System Message: WARNING/2 (<string>, line 297)

Bullet list ends without a blank line; unexpected unindent.

[davisagli]

1.0c1 (2008-12-22)

  • Protect the base connector's query, queryMore, retrieve, getDeleted, and

System Message: WARNING/2 (<string>, line 302)

Bullet list ends without a blank line; unexpected unindent.

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

System Message: WARNING/2 (<string>, line 311)

Bullet list ends without a blank line; unexpected unindent.

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,

System Message: WARNING/2 (<string>, line 314)

Bullet list ends without a blank line; unexpected unindent.

rather than PloneTestCase and Plone site for performance reasons [andrewb]

1.0-alpha3

  • Added new publicly supported API "listFieldsRequiredForCreation" which

System Message: WARNING/2 (<string>, line 319)

Bullet list ends without a blank line; unexpected unindent.

encapsulates some of the rules for which fields are required upon object creation via the SOAP API for Salesforce.com. 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)

1.0-alpha2

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

1.0-alpha1

  • Initial import and creation of standalone product

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:7

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.