Getting Started =============== Although it may someday become a product that can be used through the web, ``collective.salesforce.content`` is currently an integrator tool, which requires creating a Plone add-on package. 1. `Install Dexterity `_. 2. `Create a new Plone add-on using ZopeSkel `_. 3. Add ``collective.salesforce.content`` as a dependency of your add-on. Add it to ``install_requires`` in setup.py:: install_requires=[ 'collective.salesforce.content', ... ], And add its GenericSetup profile as a dependency of your own in profiles/default/metadata.xml:: 1 profile-collective.salesforce.content:default 4. Add a new Dexterity content type to the package. For example, to add a "Contact" content type, do the following: a. Add ``profiles/default/types/Contact.xml``:: Contact A Salesforce Contact. string:${portal_url}/user.png view False True False view False plone.dexterity.content.Item mypackage:models/Contact.xml Notice that we enabled the ``ISalesforceObject`` behavior. .. note:: Be sure to replace ``mypackage`` with the name of your add-on package. b. Add the type to ``profiles/default/types.xml``:: c. Add ``models/Contact.xml`` with the type's schema:: Name This is a very basic schema including some ``collective.salesforce.content`` annotations to state that: * This content type corresponds to the Contact object type in Salesforce (sf:object). * During a sync, Contacts should be added within the "/contacts" folder. (sf:container) * The `title` field should be populated from the `Name` field in Salesforce. .. note:: See the Dexterity documentation for more information on writing schemas Dexterity schemas can also be specified in the form of a Zope schema in Python. However, the schema directives provided by ``collective.salesforce.content`` are currently only available for XML schemas. 4. Start up Plone, go to ``portal_salesforcebaseconnector`` in the ZMI, and configure your Salesforce credentials. 5. Go to the Add-ons control panel in Site Setup, and install your add-on. 6. Go to the Salesforce Content control panel, select your content type, and click the ``Synchronise now`` button. .. note:: This may take some time if your Salesforce instance has a lot of objects. When finished, the content should now exist in its container in Plone. In our example, the /contacts folder should be filled with Contacts.