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

Netsuite-Salesforce Automation: Aggregate Opportunities into a CSV File

RSSBus Connect links your cloud-based CRM and ERP accounts together seamlessly, making it easy to automate manual tasks, like aggregating data from different accounts. The following sample project demonstrates how different ports in RSSBus Connect are used to automatically aggregate Salesforce and NetSuite data and store it as a CSV file. The sample port configuration polls Salesforce and NetSuite for opportunities and aggregates them to a single CSV file.

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 Opportunities

The Salesforce port 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 limited output template that queries the Salesforce Opportunity table. The application generates a single XML file for each opportunity processed.

To view the logic controlling the query, open the template file: Click the edit button next to the Opportunity entry in the Output Templates table. Set the skipProcessedRows attribute to 'true' to prevent the application from pulling in data that has been previously retrieved.

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. These settings can be found under the Automation Settings section.

Once the port has retrieved the data and generated an XML file, the result is sent to the MAP_SF_to_Opp port.

Map the Salesforce Opportunities to a Generic Opportunity

The mapping port MAP_SF_to_Opp is used to convert the XML file containing the Salesforce opportunity to a generic XML object representing any opportunity, which can be sent to other ports for further processing.

Configure the Mapping

This mapping port comes preconfigured, but you can configure the mapping on the Settings tab: Select source and destination files to define the available fields and use the interface to define the mappings. In this sample, use the following files:

Source
/data/Salesforce/Templates/Output/Opportunity.xml: the output template from the Opportunity table
Destination
/data/MAP_Opp_to_CSV/Samples/GenericOpportunity.xml: an included generic opportunity sample file

Translate Salesforce Opportunities to XML

Files placed in the Send folder for the MAP_SF_to_Opp port are processed automatically. You can also send files manually: On the Send tab, click More -> Upload. Click the Send button to process the file.

After converting the opportunity to a generic one, the file is automatically sent to the MAP_Opp_to_CSV port to await further processing.

Poll NetSuite for Opportunities

The NetSuite port pulls NetSuite opportunities into RSSBus Connect.

Connect to NetSuite

Configure the username, password, and account ID fields in the NetSuite port Settings tab.

Configure the Query

The NetSuite port is configured with a limited output template that queries the NetSuite Opportunity table. The application generates a single XML file for each opportunity processed.

To view the logic controlling the query, open the template file: On the Settings tab, click the edit button next to the Opportunity entry in the Output Templates table. Set the skipProcessedRows attribute to 'true' to prevent the application from pulling in data that has been previously retrieved.

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 NetSuite account on a scheduled interval. These settings can be found under the Automation Settings section.

Once the port has retrieved the data and generated an XML file, the result is sent to the MAP_NS_to_Opp port.

Map the NetSuite Opportunities to a Generic Opportunity

The mapping port MAP_NS_to_Opp is used to convert the XML file containing the NetSuite opportunity to a generic XML object representing any opportunity.

Configure the Mapping

This mapping port comes preconfigured, but to configure the mapping, select source and destination files to define the available fields and use the interface to define the mappings. In this sample, use the following files:

Source
/data/NetSuite/Templates/Output/Opportunity.xml: the output template from the Opportunity table
Destination
/data/MAP_Opp_to_CSV/Samples/GenericOpportunity.xml: the included generic opportunity sample file

Translate NetSuite Opportunities to XML

Files placed in the Send folder for the NetSuite port are processed automatically. You can also send files manually: On the Send tab, click More -> Upload. Click the Send button to process the file.

After converting the opportunity to a generic one, the file is automatically sent to the MAP_Opp_to_CSV port to await further processing.

Aggregate the Opportunities to a CSV File

The mapping port MAP_Opp_to_CSV is used to convert the XML files containing the Salesforce and NetSuite opportunities to a single CSV file (set the Batch Results advanced setting to 'true').

Configure the Mapping

This mapping port comes preconfigured, but to configure the mapping, select source and destination files to define the available fields and use the interface to define the mappings.

In this sample, use the following files:
Source
/data/MAP_Opp_to_CSV/Samples/GenericOpportunity.xml: the generic opportunity sample XML
Destination
/data/MAP_Opp_to_CSV/Samples/GenericOpportunity.csv: the generic opportunity sample CSV

Translate the Opportunities to CSV

Files placed in the Send folder for the MAP_Opp_to_CSV port are processed automatically. You can also send files manually: On the Send tab, click More -> Upload and then click the Send button to process the inbound opportunities and aggregate them to a single CSV file.

More Information & Next Steps

As you can see, with RSSBus Connect, it is possible to automate your cloud data accounts, easily aggregating similar entities from different sources. For more information on RSSBus Connect, visit our home page. Download your free, 30-day trial and start controlling your business document exchange today!

Downloads