Tuesday, May 5, 2015

Integration Series 1 Use Case 2 - Mobile to SalesForce to SAP


In the Integration Series 1 Overview, Luis Cortes (@licortes_redhat) described the integration series and the 4 use cases that we will be showing. As you can see in the diagram to the right the integration series shows how to use Fuse as the integration platform to bridge Salesforce-SAP-Feedhenry.

Overview

A common need in enterprise customers is that records of potential customers (aka prospects) are not a part of the customer database used by other applications (such as ERPs) until they become customers.

The second Use Case that we will explore in this Integration series is FeedHenry (Mobile) to Salesforce to SAP.  We'll have a phone application developed with FeedHenry mobile development platform, which will use to interact with customer data in SFDC.


The following is the flow of the Use Case:

1. The Feedhenry app shows a list of sales opportunities that reside in Salesforce. We click on “Acme Consulting”
2. Enter “Acme” on a search field, a search result “Acme Consulting” appears, click on “Acme Consulting”
3. A Feedhenry form shows opportunity data in edit mode (Company Name=Acme Consulting, City=New York, Country=USA, Product=Consulting project, Price=$100,000, Status=Negotiation, Good standing=Yes
4. Show web browser with Salesforce page with info on the same opportunity.
5. Show GUI Console with SAP customers screen. We search for “Acme consulting”, it does not appear there.
6. Back to the Feedhenry app.
7. Click on the dropdown “Status” and change it to “Closed win”
8. Submit
9. Show web browser with SalesForce page with info on the same opportunity. Upon refresh, it appears as “Closed Win”
10.  Web browser with SAP customers screen appears, we search for “Acme consulting”, it appears there with the info from SalesForce

Requirements

In order to use the test code to run the use case you must have completed the simple demos with the components in order to have the accounts and server side setup correctly.  The Salesforce Component and SAP JCo Components will be used with Use Case 2.  We will also use a Sample Feedhenry Application.

The Project for Use Case 2




Let's verify the list of opportunities in the Mobile Application by making a call to our camel route in Fuse through Node.js.

This displays the list of Opportunities from Salesforce.  We select the specific opportunity and click Closed Win and submit.   This calls the camel route to update salesforce which also updates SAP.



The Camel Route monitors the change on the Stage for an opportunity and sends the data to SAP for a customer to be created.  An additional camel route allows the update of the stage in the opportunity in Salesforce.





Running the Use Case Code

Step 1 - Download the Project from JBoss Demo Central - https://github.com/jbossdemocentral/fh-fuse-sap-sf-integration-demo

Step 2 - Import into JBDS

Step 3 - Right click on the Camel Context in the uc1 Project and run as Camel Context without tests

Step 4 - Follow the steps in the use case above

References

Series References

Integration Series 1 - Overview from Luis Cortes
Integration Series 1 Use Case 1 - SalesForce to SAP
Integration Series 1 Use Case 2 - Mobile to SalesForce to SAP
Integration Series 1 Use Case 3 - SAP to SalesForce
Integration Series 1 Use Case 4 - SAP to Mobile to SalesForce