by rssbus | November 21, 2017

Synchronize Leads from Salesforce to MongoDB


Download Package

Synchronize Leads from Salesforce to MongoDB

The sample project featured in this article has built-in templates for retrieving Salesforce leads and inserting them into your MongoDB database. A mapping port can transform the XML structure of a Salesforce Lead to a valid MongoDB document, ready to be sent to MongoDB.

The ports are configured to automatically move files from one port to the next until the Leads from Salesforce are added as records into MongoDB. If there is already an existing record in MongoDB with a matching email address, the application will instead update that existing record with the new data. You can also query your MongoDB database to check retrieve the Leads that have been added.

The map port and MongoDB port are preconfigured to operate automatically. You can schedule the application to poll Salesforce for new records whenever you want the job to run from the Salesforce port settings page, or manually process files using the Receive button from the Receive tab of the Salesforce port.

In order to configure the example, please follow these steps:

  1. Go to the Ports tab and click the Import Settings button. In the dialog that appears, choose the file SfdcMongoSync.zip to import the project's settings and port configurations.
  2. After you have imported the sample, start by selecting the Salesforce port and navigating to the Settings tab. If you have not already installed the Salesforce port, the application will prompt you to install it.
  3. From Settings, to connect to your Salesforce account, the Username, Password and Security Token of your account need to be set to their respective fields. The Username and Password are the same credentials you use to login to your Salesforce account, while the Security Token is a code assigned by Salesforce that is changed whenever you reset your password. If you do not know it, you can send a request to Salesforce from your account to have the token reset.
    After setting these credentials, click the Test Connection button to verify that you can connect to your Salesforce Account from RSSBus Connect.
  4. Next open the MongoDB port and navigate to the Settings tab. If you have not installed the MongoDB port, the application will prompt you to install it.
  5. To connect to your MongoDB database, set the Server, User and Password of the database. The User and Password are the same values used to connect to the MongoDB database. The MongoDB port has also been set up to use a database titled SampleDatabase as the default connection.
    After setting these properties, click the Test Connection button to verify that you can connect to your MongoDB database.
  6. To execute the sample, navigate to the Receive tab of the Salesforce port. Click the Receive button to begin retrieving Leads from Salesforce.
Downloads