SFDC is an on-demand CRM tool, based on Cloud Computing Concept. Cloud computing, is used to describe a variety of different types of computing concepts that involve a large number of computers connected through Internet. SFDC CRM is preferred as it is less expensive, supports easy upgrades, better Service Delivery and it is easier to customize. Integration of ECC and SFDC CRM required because it offers high reliability, high performance,
high security.

In our project requirement client has decided to use SFDC CRM solution. SAP PI is used as a Middleware to perform the ECC and SFDC integration. Multiple data integration was implemented:Product Master, Invoices, Vendor Master, Customer Master, Vendor Contract etc.

SFDC Inbound integration: In case of data needs to send from SFDC to ECC, the integration is similar to any other SOAP to ECC interface.

SFDC Outbound integration: In case of data is to be posted to SFDC from ECC, the integration is based on two way communication using Java Mapping, soap look up.

In this blog, the focus is on SFDC outbound integration.Let us first see how this entire process works using SOAP UI :

First step is to have 2 wsdl files, login wsdl and other data wsdl. Here we will see Product Master Data post. WSDL files can either be downloaded from SFDC site with valid credentials or client should provide you.

  1. First Create a project in SOAP UI, Call the login request, Set Login Credentials, Check target URL and execute it.

Login Request.jpg

   2. Response received from SFDC contains, server URL and session ID, which is required to embed in SOAP envelope while making the product master data call to SFDC.

Login Response.jpg

     3.Product Master Call: create a project in SOAP UI, call the Product Master Upsert request,set the Session ID, check target URL and execute.

Product Master Request.jpg

     4. If the data is posted successfully to SFDC CRM, the response received is true. Otherwise, there can be other response messages depending upon the error encountered like false or INVALID_SESSION_ID.

Response.jpg

Implementation Details (using PI 7.31) 

PI as middleware to send login request to SFDC, receive session ID and the preform required data update/insert call to SFDC system. Steps involved are:

ESR:

Import IDoc definition

Import Product Master WSDL provided by Salesforce as External Definition

Create Message Mapping with IDoc and Product Master external definition

Develop Java Mapping for

Login request Call using SOAP Look Up feature

Receive Session ID in Login response

Build SOAP Envelope around target message with the session id

Import the java mapping as Imported Archive

Create Operation Mapping – Use JAVA mapping subsequent to the IDoc to Product message mapping  as shown below:

OM.jpg

Operation mapping test can be performed to see how the SOAP envelope is added:

Step 1 Graphical mapping result:

MM1.jpg

Step 1 to 2 result :

MM2.jpg

For the SOAP Look up, one SOAP Receiver Login Channel is required.Here set the target url as that of login request url and set the SOAP Action as login. The Login SOAP receiver channel should be linked with a receiver agreement to make a call to SFDC system. Dummy Iflow should be created with
Login SOAP receiver channel and dummy interface.

CC1.jpg

Second SOAP Receiver channel is required to perform Product Master Data post call. Set the Target URL and SOAP Action, Check ‘Do not Use SOAP Envelope’ as we are building it dynamically using JAVA mapping and set the module MessageTransformBean with parameter Content Type : text/xml.

CC2.jpg

The runtime monitoring for SFDC interfaces is performed exactly similar to other interfaces, using channel and message monitoring.

Important Points while developing the SFDC interface:

PI development and quality server connects to Sandbox URL of Salesforce.com, whereas production server connects to different SFDC URL. Make sure to change the URL in Communication Channel post production transport.

For the Sandbox and production SFDC systems, the login credentials would differ. Make sure to update the user id and password in java mapping before transporting the objects to Production.

The SOAP action parameter defined in adapters is case sensitive. Make sure to specify the actions correctly.

If the Data is not successfully getting posted to SFDC, in such cases SOAP receiver adapter returns a generic 500 HTTP_EXCEPTION error.To debug the issue, copy the payload and trigger the data from SOAP UI to see the exact error description.

Here are some frequent issues which encounters error:

Invalid Session ID, Incorrect target address URL , Incorrect Login credentials ,Incorrect module configuration (sequence, parameter) in channel, Missing dummy Iflow for login request, Date format or data formants mismatch between PI and SFDC.

Java Mapping Reference llink : http://wiki.scn.sap.com/wiki/display/XI/SFDC+Integration+using+PI+7.1+-+How+to+add+SOAP+Envelope+in+Java+Mapping?original_fqdn=wiki.sdn.sap.com

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Dingjun Jia

    To reduce the number of SOAP requests, keep server URL and session ID in directory value mapping is good in practice. And we need to update server URL and session ID in a interval and validate them.

    (0) 
    1. Ruchi Agarwal Post author

      Hi Dingjun,

      Could you please elaborate how we can achieve this? Is it that we have to
      create a separate interface, which will run at a frequency and fetch session ID
      and update it in value mapping table? And while making actual data post call,
      it will fetch the session id from value mapping table.

      Thanks,

      Ruchi

      (0) 
      1. Kiran das

        Hi,     Is it possible to create and SFDC Outbound integration without any middle ware.  

                  What all are the basic steps to start working on the integration.  

                  Please share if you have any documents for the same.

        Thanks,

        Kiran

        (0) 
    2. Kiran das

      Hi,     Is it possible to create and SFDC Outbound integration without any middle ware.  

                What all are the basic steps to start working on the integration.  

                Please share if you have any documents for the same.

      Thanks,

      Kiran

      (0) 

Leave a Reply