Salesforce.com Integration Using SAP PI: A Case Study



Similar documents
Salesforce Integration Using PI: How to Perform Query and Other DML Operations Using the Enterprise WSDL

A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1

Configuration of Enterprise Services using SICF and SOA Manager

Creating Web Service from Function Modules/BAPIs & Integrating with SAP Interactive Forms

Sending an Image File Through XI in a File-to-Mail Scenario

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

Restricting Search Operators in any Search View

Using PI to Exchange PGP Encrypted Files in a B2B Scenario

Creating Mobile Applications on Top of SAP, Part 1

ABAP Proxy Interfacing

ABAP Debugging Tips and Tricks

Consuming Services in SOA Manager

Step by Step Guide for Language Translation Tool

SAP NetWeaver Developer Studio 7.30 Installation Guide

SAP CRM Campaign Automation

Standard SAP Configuration of SMS through HTTP with Third Party SMS Gateway

Deleting the User Personalization done on Enterprise Portal

Quick Viewer: SAP Report Generating Tool

ALE Settings, for Communication between a BW System and an SAP System

SDN Community Contribution

SAP CRM Middleware Configurations

SAP CRM 7.0 E2C Setup: CRM via Toolset

How to Integrate CRM 2007 WebClient UI with SAP NetWeaver Portal

Step by Step guide of Report-to- Report Interface in BW Reporting

Configuring HTTPs Connection in SAP PI 7.10

Step by Step Procedure to Block and Debug a CIF Queue Flowing from R/3 to APO System

Step by Step Guide How to Copy Flat File from Other Application Server to BI and Load through Info Package

SAP BW - Excel Pivot Chart and Pivot Table report (Excel)

Converting and Exporting Data in XML Format

Creating Content Using SO10 Objects and Text Symbols

XSLT Mapping in SAP PI 7.1

Transfer of GL Master from Source SAP System to a Target SAP System through IDOCS

ABAP How To on SQL Trace Analysis

Table of Contents. Passing Data across Components through Component Controller between Two Value Nodes

Step by Step Guide to Archiving and Deleting of XML Messages in SAP NetWeaver PI

Creating Transaction and Screen Variants

SAP CRM System 6.0/7.0. For more information, visit the Customer Relationship Management homepage

Data Extraction and Retraction in BPC-BI

Setup Guide Central Monitoring of SAP NetWeaver Proces Integration 7.3 with SAP Solution Manager 7.1. Active Global Support February 2011

How to Generate Stack Xml for Ehp4 and Above Upgrade

Forgot or Lock "Administrator or J2EE_ADMIN" Password

How to Assign Transport Request for Language Translation?

Embedding Crystal Reports inside ECC ALV Reports

BW Performance Monitoring

Creation and Configuration of Business Partners in SAP CRM

SAP CRM-BW Adapter an Overview

How to Modify, Create and Delete Table Entries from SE16

Reverse Transport Mechanism in SAP BI

SAP FI - Automatic Payment Program (Configuration and Run)

Process Controlled Workflow SRM 7.0 (Using BRF)

CA Nimsoft Service Desk

Working with the ERP Integration Service of EMC Documentum Process Services for SAP

Create Automatic Mail Notification/ Alert for Process Chain Monitoring

Business Scenario Using GP/Web Dynpro with Back and Forth 3 Level Process and Dynamic Approvers in a Loop

Step By Step Procedure to Create Logical File Path and Logical File Name

StreamServe Persuasion SP5 StreamStudio

Creating and Scheduling Publications for Dynamic Recipients on SAP Business Objects Enterprise

Integration of SAP R/3 with BO Universe Using Data Federator Connector

Posting Messages into XI

Tutorial - Creating Pop Up Window Using New Features in WebDynpro Java CE 7.1 Ehp1

Middleware Configuration and Monitoring for Master Data Transfer from SRM to ECC

SAP Workflow in Plain English

Deploying Crystal Reports on Top of a SAP BI Query

Upgrade made easy: SAP Tools, Accelerators and Best Practices for migrating from SAP NetWeaver PI to SAP NetWeaver Process Orchestration

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration. : SAP Labs India Pvt.Ltd

Implementing TinyMCE JavaScript HTML Editor for Web Page Composer (WPC) within the SAP Portal

SOLGARI CLOUD BUSINESS COMMUNICATION SERVICES CLOUD CONTACT CENTRE MICROSOFT DYNAMICS INTEGRATION

SAP CRM 7.0 for Newbies: (Part 1) Simple BOL Object Creation for CRM Webclient UI

Extractor in R/3 and Delta Queue

Adobe Document Service Configuration and Troubleshooting Guide

Workflow Troubleshooting and Monitoring in SAP ECC 6.0

Security Provider Integration Kerberos Authentication

Creating New Unit of Measure in SAP BW

Phone Manager Application Support JANUARY 2015 DOCUMENT RELEASE 4.2 APPLICATION SUPPORT

Developing Applications for Integration between PI and SAP ERP in Different Network Domains or Landscapes

Scenario... 3 Step-by-Step Solution Virtual Infocube... 4 Function Module (Virtual InfoCube)... 5 Infocube Data Display... 7

Integration Guide. SafeNet Authentication Service. Using SAS as an Identity Provider for Salesforce

Sentinel Cloud V.3.6 Quick Start Guide

Compounding in Infoobject and Analyzing the Infoobject in a Query

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Invoice Collaboration: Self Billing Invoice

Table of Content. SAP Query creation and transport Procedure in ECC6

Integrating Siebel CRM with Microsoft SharePoint Server

Integrating SAP CRM with the SAP R/3 HR module

SAP NetWeaver Process Integration - Demo Example Configuration

Data Flow from LBWQ/SMQ1 to RSA7 in ECC and Delta Extraction in BI

e-filing Secure Web Service User Manual

Web services with WebSphere Studio: Deploy and publish

SPDD & SPAU Adjustments Handbook

Step by Step Procedure to Create Broadcasters, to Schedule and to Enhance of SAP- BI Queries from Query Designer

PHP Language Binding Guide For The Connection Cloud Web Services

PingFederate. Salesforce Connector. Quick Connection Guide. Version 4.1

SAP BW - Generic Datasource Function Module (Multiple Delta Fields)

Understanding BW Non Cumulative Concept as Applicable in Inventory Management Data Model

Integrating SAP with Salesforce to benefit your sales staff. Matthews International Ruth Wepfer and Kaushik Mitra

Document Digital Signature

Transcription:

Salesforce.com Integration Using SAP PI: A Case Study Applies to: SAP NetWeaver Process Integration 7.1. For more information, visit the Service Bus-based Integration homepage. Summary This article explains step by step procedure to integrate SAP PI with Salesforce.com (SFDC) using the enterprise WSDL. Author: Prasanna Vittal Company: Wipro Technologies Created on: 23 June 2010 Author Bio Prasanna Vittal is currently working for Wipro Technologies as an SAP XI/PI Consultant. He has over 3.5 years of experience in SAP Integration Technologies viz. SAP XI/PI and SAP MII. 2010 SAP AG 1

Table of Contents Introduction... 3 Overview... 3 Step by Step Execution... 4 Create developer account in SFDC... 4 Download the Enterprise WSDL... 4 Testing the WSDL using SOAPUI... 4 Implementation Using SAP PI 7.1... 6 Design Steps... 6 Configuration Steps... 12 Testing the Interface... 16 Related Content... 17 Disclaimer and Liability Notice... 18 2010 SAP AG 2

Introduction In our current project, the client has decided to replace SAP CRM with Salesforce.com (SFDC Online CRM). We are doing a POC to integrate SFDC with SAP ECC using SAP XI. I would like to thank Bhavesh Kantilal, Saravana Kuppusamy, Harsh, Santhosh, Unnamalai and Pragya for helping me out during the implementation of this Proof of Concept. Overview Salesforce.com (SFDC) is a Software as a Service (SaaS) company that distributes business software on a subscription basis. It is best known for its Customer Relationship management (CRM) products. This article explains various steps involved in the integration of SFDC with SAP ECC using SAP PI 7.1. SFDC exposes a web services interface that can be accessed using an Enterprise WSDL. Some of the web services are Create Account, Update/Upsert/Delete Account, Query Account Details etc., In the article, I will show how to call a simple SFDC web service - getservertimestamp, which when called, gives the server timestamp as response. Once we achieve this, we can implement any of the web service that SFDC offers, with some modifications to the WSDL file. 2010 SAP AG 3

Step by Step Execution Create developer account in SFDC Register yourself at http://developer.force.com. You will get the username and password by email. You need to login to SFDC and get the security token, which should be appended with the password, while calling the login web service of SFDC. To get this, login to http://developer.force.com and then go to Setup->Personal Setup->My Personal Information->Reset My Security Token. You will receive the security token by email. Download the Enterprise WSDL Login to http://developer.force.com and go to Setup->App Setup->Develop->API. Under Enterprise WSDL, click on Generate Enterprise WSDL and save it as a.wsdl file on your local machine. Testing the WSDL using SOAPUI We did this optional step to see the WSDL structure and to test the various web services exposed in the Enterprise WSDL. Below steps will help you understand what we did. a. To implement any business scenario(e.g. Create an Account in SFDC database, query Account details from SFDC or to Update Account details in SFDC, etc) using the WSDL approach, SFDC will want you to call the corresponding web service(query, Create, Update, Upsert etc). b. But, to call these web services, we will need an additional sessionid/serverurl attributes to be set in the SOAP Header of the web service request. To get this, we have to first call the login web service, which returns the sessionid & the serverurl. To call the login web service, we will need the username/ (password+security token) (got during the registration process). Below is the screenshot of the login web service request. 2010 SAP AG 4

Once we receive the Session ID and Server URL, we have to set them in the header of getservertimestamp web service and get the Server s timestamp as response. Below is the screenshot for the same. 2010 SAP AG 5

Implementation Using SAP PI 7.1 Now, we will implement the same using SAP PI 7.1. Design Steps Below are the design steps that we need to perform in the Enterprise Service Repository: Create the namespace and import the Enterprise WSDL as an external definition. 2010 SAP AG 6

Create an Outbound Synchronous Service Interface. Assign the External Definition s loginrequest as the Output message. 2010 SAP AG 7

Similarly, assign getservertimestampresponse from the external definition, as the input message. Create an Inbound Synchronous Service Interface. Assign the External Definition s getservertimestamprequest as the Output message and getservertimestampresponse as the input message, as shown in the above screenshot. 2010 SAP AG 8

Create a message mapping. Load the loginrequest at the Source side and getservertimestamprequest at the target side. 2010 SAP AG 9

Create a UDF (SampleUDF1) and use Dynamic Configuration to set the parameter TServerLocation with the Server URL that we received in the response message of the login web service. We found out that this Server URL is always constant, so we have manually set this in the UDF. We can assign this UDF to any node in the target. We will create a Java Mapping Program to obtain session ID and server URL by doing a SOAP lookup, and set these fields in the SOAP Envelope. Create a new Java Mapping Class using SAP NetWeaver Developer Studio. We will use the DOM parser to parse the SOAP response. In the execute() method, we will call two functions. In the first one, we will pass the username and password (password+security token, without + ) to the SOAP lookup API to login to the SFDC and get the Session ID. For details regarding SOAP Lookup, refer to Bhavesh s Blog in the Related Articles section. In the second function, we will add the SOAP Envelope to the incoming payload and set the sessionid field in the SOAP Header. For the complete Code, refer to uaruna s wiki page. You can also find this link under Related Contents section, at the end of this article. Export the Java Class as a.jar file and import it into the ESR under Imported Archives. 2010 SAP AG 10

Create an Operation Mapping and use the Message mapping and Java mapping in sequence. 2010 SAP AG 11

Configuration Steps Below are the configuration steps that we need to perform in the Integration Directory: Create Business Components for the Sender ECC system and SFDC Receiver. Create a Receiver SOAP Communication Channel (Channel1). Since this channel will be used in the SOAP lookup, it should not be associated with any Receiver Agreement. In this channel, we provide the Target URL (https://www.salesforce.com/services/soap/c/18.0) and SOAP Action (login). 2010 SAP AG 12

Create another Receiver SOAP Communication Channel (Channel2). Settings will be as follows: o o Provide Target URL (it will be over written by the Dynamic Configuration). Check Use Adapter-Specific Message Attributes and Variable Transport Binding, since we are setting the TServerLocation attribute using Dynamic Configuration within the UDF. 2010 SAP AG 13

o o Under Conversion Parameters, check Do Not Use SOAP Envelope, as we are manually building the SOAP Envelope, to set the fields in the SOAP Header. Provide the SOAP Action (getservertimestamp). 2010 SAP AG 14

o Since we are using the SOAP Adapter with option Do Not Use SOAP Envelope, the content type of the incoming message will be application/xml. We need to change it to text/xml. To achieve this, we need to use the adapter module MessageTransformBean before the XISOAPAdapterBean and set the parameter Transform.ContentType to text/xml. Create Receiver Determination and Interface Determination with ECC System as the sender and Business Component for SFDC as the receiver. In the Interface Determination, use the Operation Mapping and Inbound Interface that we created in ESR. Create a Receiver Agreement and provide the Communication Channel (Channel2). 2010 SAP AG 15

Testing the Interface Steps to be followed for testing this interface are as follows: 1. We can trigger this interface from the sender ECC system in two ways. a. ABAP Proxy b. RFC Call. (For testing purpose, we can even use Runtime Workbench s test tool or an HTTP Client) 2. We don t have to pass any values in the source message, as we are directly passing the credentials in the java Mapping. Below is a screenshot of RWB s test tool. 3. The screenshot of the request message is below: 2010 SAP AG 16

4. After the SOAP lookup, this is how the message looks like: 5. Screenshot of the response message Related Content 1) Java Mapping Program Wiki by uaruna http://wiki.sdn.sap.com/wiki/display/xi/sfdc+integration+using+pi+7.1+- +How+to+add+SOAP+Envelope+in+Java+Mapping 2) SOAP Lookup Bhavesh s Blog http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5001 2010 SAP AG 17

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 2010 SAP AG 18