Your SlideShare is downloading. ×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

WSO2Con US 2013 - Using WSO2 ESB to integrate Salesforce.com and SAP ERP

1,025

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,025
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
58
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Using WSO2 ESB to Integrate Salesforce.com and SAP ERP Igor Mameshin Accenture igor.mameshin@accenture.com
  • 2. What, Where, Why and How? • What? Hybrid Cloud Integration. Most organizations will use hybrid cloud approach, which is a combination of private computing resources and public services, with integration touch points between these environments. – Where? Cloud Based Integration Backbone. Cloud-based infrastructure with a rich portfolio of application adapters that simplify connectivity to external systems such as ERP applications (SAP, Seibel), social platforms (Twitter, Facebook), SaaS (Salesforce.com, NetSuite, PayPal), and other integration endpoints. – Why? Allows to implement interoperability between the cloud and on-premise environments. Better than on-premise integration tools. – How? Developed a proof of concept: SFDC to SAP Integration using WSO2 technologies.
  • 3. Service integration and governance are critical to creating an agile cloud IT ecosystem – If governance was a challenge in the past, cloud introduces new and more complex risks – Changing role of IT and the business – risk of IT losing alignment to the business, who are driving cloud services within the enterprise – Service integration and interoperability
  • 4. Hybrid Cloud Management via Broker
  • 5. Accenture Cloud Platform accelerates cloud adoption with the integration and orchestration of cloud services • Aggregate. Comprehensive catalog of services offered through a centralized, online storefront • Integrate. Cloud provider and value-added services are pre-integrated and available via self-service to users • Automate. Services are automated and orchestrated for on-demand request and fulfillment • Manage. Services are monitored and managed with online dashboards, and metered and charged-back centrally
  • 6. Infrastructure Architecture
  • 7. Integration Use Cases Use Case Description SFDC Account to SAP Customer Master Create When an Account Type is updated from Prospect to Customer in Salesforce.com, create a new Customer in SAP SFDC Account to SAP Customer Master – Update When a Customer Account is updated in Salesforce, update the corresponding Customer record in SAP Update SFDC Chatter window When a Customer is created or updated in SAP, Salesforce chatter is updated: “Updated customer record in SAP, customer ID ##" Account Account Chatter iPaaS iPaaS iPaaS Customer Customer Transaction Status
  • 8. Integration Approach WSO2 ESB is used as a cloud based integration backbone to pass messages from system to system: – – – Provides agility and flexibility to adopt to future change and growth Location transparency, transformation, routing, protocol conversion Reliable messaging, security, monitoring/management Application-level integration uses the native application's integration frameworks and APIs: – – – It preserves the application's data integrity Allows real-time Integration between Salesforce and SAP Provides application level security and audit trail Salesforce SOAP API, REST API, and WSO2 Salesforce Connector: – – Outbound messaging is part of the workflow rule functionality in Salesforce Workflow Rules send SOAP messages over HTTPS to a designated ESB endpoint SAP JCO API and WSO2 SAP Connector: – – – SAP adapter implements two types of connections: BAPI/RFC and IDoc transport We used IDoc transport due to scalability and performance advantages SAP JCO middleware library establishes connections on TCP port 3300
  • 9. Salesforce.com Connector • Download Salesforce connector: salesforce-cloud-connector-1.0-SNAPSHOT.zip • Add Salesforce Cloud connector mediation library in WSO2 ESB ESB Console: Manage > Mediation Libraries > Add Click import link. Click yes to confirm.
  • 10. Salesforce.com Connector • New: Salesforce cloud connector in Developer Studio Click on 'Import Cloud Connector' from the project context menu.
  • 11. Salesforce Mediation Library • The WSO2 SFDC mediation library contains a set of ESB templates and it supports following operations. • Log in • Logout • Create • Update • Query and QueryMore • You can invoke any of these operations inside the ESB configuration by using Call Template Mediator.
  • 12. Usage of ESB Templates • Query <call-template target="org.wso2.carbon.mediators.salesforce.query"> <with-param name="salesforce.query.queryString" value="select name from account”/> </call-template>
  • 13. Usage of ESB Templates • Login <call-template target="org.wso2.carbon.mediators.salesforce.login"> <with-param name="salesforce.password" value=“XXXXcP55iu429U343vUEDVQnug6wd"/> <with-param name="salesforce.username" value=“demo@accenture.com"/> </call-template> • Create <urn:create xmlns:urn = "urn:partner.soap.sforce.com" xmlns:urn1 = "urn:sobject.partner.soap.sforce.com"> <!--Zero or more repetitions:--> <urn:sObjects> <urn1:type>?</urn1:type> <!--Zero or more repetitions:--> <urn1:fieldsToNull>?</urn1:fieldsToNull> <urn1:Id>?</urn1:Id> <!--You may enter ANY elements at this point--> </urn:sObjects> </urn:create> <call-template target="org.wso2.carbon.mediators.salesforce.create"/>
  • 14. Configure SAP Connector on WSO2 ESB • Install SAPJCO library org.wso2.carbon.transport.sap-VERSION.jar • Configure SAP Endpoint Properties JCOCLIENT.dest JCOSERVER01.server • Configure new ESB Transport <transportSender name=”idoc” class="org.wso2.carbon.transports.sap.SAPTransportSend r"/>
  • 15. Configure Salesforce Outbound Messages • Login to Salesforce.Com • Click User name | Setup | Create | Workflow & Approvals | Workflow Rules and create a new workflow rule that fires when a candidate is created or when a candidate is edited and did not previousl meet the rule's criteria.
  • 16. Salesforce Workflow Rules
  • 17. Define Salesforce Outbound Messages
  • 18. ESB Proxy to receive Salesforce message
  • 19. Map Salesforce and SAP IDoc schemas
  • 20. XSLT transform & send IDoc in ESB Proxy <proxy xmlns="http://ws.apache.org/ns/synaps e" name="SFToSAP"> <target> <inSequence> <xslt key=”Account.xsl”/> <property name="OUT_ONLY" value="true"/> <send> <endpoint> <address uri="idoc:/JCOCLIENT"/> </endpoint> </send> </inSequence> </target> </proxy>
  • 21. Receive an IDOC from SAP System <proxy xmlns="http://ws.apache.org/ns/synapse" name="SAP2SF" transports="idoc" statistics="enable" trace="enable" startOnLoad="true"> <target> <inSequence> <header name="Action" value="urn:customHeader"/> <property name="OUT_ONLY" value="true" scope="default" type="STRING"/> <property name="messageType" value="text/xml" scope="axis2" type="STRING"/> <!-- Do the transformation of the incoming IDOC XML-> Salesforce Request. --> </inSequence> </target> <parameter name="transport.sap.enableTIDHandler">enabled</parameter> <parameter name="transport.sap.serverName">JCOSERVER01</param eter> <parameter name="transport.sap.enableErrorListener">enabled</parameter > <description></description>
  • 22. ESB Proxy to update Salesforce Chatter • Prior to this call obtain a new OAuth access token by sending a POST request to the token request endpoint <sequence xmlns="http://ws.apache.org/ns/synapse" name="chatterFeedSeq"> <property xmlns:ns="http://org.apache.synapse/xsd" name="access_token" expression="//access_token"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="Authorization“ expression="fn:concat('Bearer ', $ctx:access_token)" scope="transport"/> <property xmlns:ns="http://org.apache.synapse/xsd" name="REST_URL_POSTFIX" expression="$ctx:msg_param" scope="axis2"/> <property name="HTTP_METHOD" value="POST" scope="axis2"/> <endpoint> <address uri="https://na15.salesforce.com/services/data/v27.0/chatter/feeds/news/me/feed-items " format="rest"/> </endpoint> </send> </sequence>
  • 23. SAP Configuration • Login to SAP GUI • Create logical system and RFC destination • Create Port to associate with RFC Destination and Partner profile. • Partner Profile will have Inbound and Outbound IDOC Parameters that includes IDOC type Message type and Function Module. • Data in the format of IDOC can flow from SAP to any other system and vice versa through ALE (Application Link Enabling). • Former is usually called Outbound IDOC and latter is Inbound IDOC.
  • 24. SAP Configuration: Partner Profile • Transaction WE20 for Maintenance of the Partner Profile. In the logical system that is chosen as a partner add the message type based on the direction of the interface.
  • 25. What is an IDOC? • IDoc is a SAP supported data document format to transfer data in a hierarchical structure. • IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. • IDocs are used for asynchronous transactions, provide scalability and performance advantages • Data gets stored intermediately in temporary tables and can be used for recovery or reprocessing to avoid data loss.
  • 26. IDoc Examples Business type IDOC type Material MATMAS Bill Of Material BOMMAT HR User HRMD_A Customer DEBMAS Supplier CREMAS Invoice INVOIC
  • 27. WEDI – Manage IDOC implementation
  • 28. Transaction WE60 to get IDoc XML schema
  • 29. Integration in Action
  • 30. Salesforce.com Account Update
  • 31. SAP Customer Master Synch
  • 32. SAP Inbound IDoc Messages • Run transaction WE02 to check the status of the inbound IDoc
  • 33. SAP Inbound IDoc Message Details •• Status 53 means IDoc has been processed Status 53 means IDoc has been processed successfully. successfully.
  • 34. Salesforce Chatter Update
  • 35. Lessons Learned • WSO2 ESB is a powerful and stable product • For your first integration flow, consider engaging a WSO2 consultant or work with an experienced WSO2 partner • WSO2 documentation for Salesforce and SAP connectors is immature • SAP Documentation for IDOCs is not complete/confusing • To avoid project delays, make sure you have the following roles on your team: – – – – – SAP Admin SAP DBA SAP ABAP Developer with ALE/IDoc experience Network Admin OS Admin
  • 36. References WSO2 Connectors Guide: http ://docs.wso2.org/display/ESB480/Working+with+Conne rs WSO2 SAP Integration Guide: http://docs.wso2.org/display/ESB470/SAP+Integration Salesforce REST API Developer’s Guide: http:// www.salesforce.com/us/developer/docs/api_rest/api_re df Salesforce SOAP API Developer’s Guide: http:// www.salesforce.com/us/developer/docs/api/apex_api.p
  • 37. Thank You

×