Download & Install Sample

Already running RSSBus Connect? This sample will setup RSSBus Connect with the data and port configurations referenced in this article:

  Download Sample
  Sample Installation Info

Automate Salesforce Email Follow-up

RSSBus Connect links your cloud-based CRM and email accounts together seamlessly, making it easy to automate manual tasks like sending an email whenever a new Lead is created in Salesforce. The following sample project demonstrates how different ports in RSSBus Connect are used to automatically take information about Salesforce Leads and send a templated email.

Drop in the Sample Project

To get started with the sample, download and install RSSBus Connect (free 30-day trial). Then download the sample project and extract and copy the contents to the "data" folder in the installation location for RSSBus Connect. For Windows installations, this is likely C:\Program Files\RSSBus\RSSBus Connect. Please consult the documentation for the Java build of RSSBus Connect for Linux/Unix/Mac installations.

Poll Salesforce for New Leads

The Salesforce port (SF_LEADS) pulls Salesforce entities into RSSBus Connect.

Connect to Salesforce

Configure the username, password, and security token fields in the Salesforce port Settings tab.

Configure the Query

The Salesforce port is configured with a default output template for the Salesforce Lead table. This template is configured to poll Salesforce for new Leads that have been added to Salesforce since a pre-determined date and time. The application generates a single XML file for all of the Leads in Salesforce processed (set the BatchResults advanced setting for the port to 'true'). Open the template file to view the logic controlling the query. Set the skipProcessedRows attribute to 'true' to prevent the application from pulling in data that has been previously retrieved. And add a WHERE clause to the selectQuery attribute to limit the query to retrieve data modified since the specified date.

Run the Query

Click the run symbol next to an individual template to run that specific query, or click the run symbol in the Output Templates window to run all of them in succession. The port has already been configured to poll the Salesforce account on a scheduled interval, which is seen in the Settings tab under the Automation Settings section.

Once the port has retrieved the Lead data, the results are sent to the EmailSend port.

Send Emails Based on Lead Data

The EmailSend port (EMAIL_LEADS) sends emails (raw or using templates based on received data) via SMTP.

Connect to the Email Account

Enter the email server, port, username, and password and click Test Connection.

Configure the Email

You can customize emails sent based on the data found in the files added to the Send folder. Consider the following XML document (an abbreviated sample Salesforce Lead):

  <Company>ABC, Inc.</Company>
  <ProductInterest__c>Blue Widget</ProductInterest__c>

You can access the elements in the XML using XPath notation. For example, to use the value of the Company element in the email template, write [document.Lead:Company]. For this sample, we use the following template:

Hi [document.Lead:FirstName],

I see that you are interested in [document.Lead:ProductInterest__c]. Would you like to set up a demo to learn more about how [document.Lead:ProductInterest_c] can help you with your work at [document.Lead:Company]?

RSSBus Connect User

The template dynamically reads the FirstName, ProductInterest__c, and Company fields and populate the email body. You can also reference the Email element for use in the To setting in the SMTP Message. The EmailSend port sends an email to each Lead in the Send folder (retrieved using the Salesforce Leads folder).

Just like with the Salesforce port, this port has already been configured to automatically process new files added to the Send folder. View these options in the Settings tab under the Automation Settings section. You can also send files manually: On the Send tab, select unsent files and click the Send button to process the file.

More Information & Next Steps

As you can see, with RSSBus Connect, it is possible to automate your CRM and email accounts, automatically sending emails based on new Salesforce leads. For more information on RSSBus Connect, visit our home page. Download your free, 30-day trial and start controlling your business document exchange today!