cancel
Showing results for 
Search instead for 
Did you mean: 

SalesForce integration using REST.

Former Member
0 Kudos

Hi Experts,

I would like to gte some tips/blogs regarding the config of REST adapter in PI 7.1 for mesage flow to SalesForce.

Currently I have a couple of interfaces which need to integrate ECC with SalesForce via PI.

We have Advanco REST adapter available in PI box.

I hope Salesforce integration is such a way that first we need to establish session and then send the actual message.

The following links/blogs talks about PI connection with SalesForce through SOAP protocol.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50a76cfa-4966-2d10-aba7-da496d9b5...

http://scn.sap.com/message/13229835#13229835

I would like to know whether I need to have SOAP Lookup to create session and then send the message through REST.

ECC--> PI [with SOAP Lookup] --> SalesForce[REST]

Much appreciated if anyone can share some docs or links around it.

Thanks

Ray.

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

I think you need SOAP lookup , i woulkd prefer using JAVA mapping for this.

check elow document about rest web service call

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/11/calling-synchronous-restful-web-s...

Regards,

Raj

Former Member
0 Kudos

Thanks Raj for sharing the document.

If a JVAVA mapping is used then, you mean to say we dont have to go with REST?

the receiver channel needs to be SOAP?

Please let me know....

Thanks

Ray.

Former Member
0 Kudos

Hi Experts,

If anyone has done the REST sender/receiver adapter config in PI please share me the links/blogs or tips to do so.This is to connect PI with Salesforce and other tablet applications..

I think in order to connect salesforce...i may have to go with soap lookup for getting the sessionid.

Once the sessionid is awailable, i would like to know how we can dynamically configure header data in REST adapter. Custom request headers may need to configure dynamically with OAuth for the sessionID from the soap lookup setup.

Pointers in this line will be very helpful. 

Thanks

Ray..

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Ray,

I have done SFDC integration with SOAP adapter but not with REST, is there any specific reason opting for REST?

But i think you can add header details also..

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Advantco REST adapter was identified more from architecture standpoint.

SalesForce was identified for CRM and other master data management.

Since the communications are totally stateless operation CRUD, REST was identified.

Also we have the option of JSON to XML conversion in REST adapter.

In Soap, we may have to use a java mapping to parse the response message from SFDC and convert the JSON type message to standard XML message which PI can process.

Moreover SOAP could have used if I have limited asynchronous calls. We have more than 60 to 70 connections with salesforce having simle synchronous messages.

Any pointers regarding the dynamic REST parameter setting will be helpful.

Thanks

Ray.

Former Member
0 Kudos

Following steps done to achieve integration with slaesforce through REST adapter in PI.

a) Value mapping to pass on username and password of salesforce credentials.

b) I have added a SOAP lookup through UDF to get the sessionID inside PI mapping.

c) In order to create dynamic url in the REST adapter, variable substitution using xmlpayload fields l     like sObject type and SFDC urn ID is used .

d) The custom request headers were configured using variable substitution.  

e) By enabling the request body format conversion check box in REST adapter, source XML format       to target XML format is done along with removal of header specific fields in the payload like           sessionID, sObject type and SFDC urn ID.

f) In the REST adapter module section we have to use xmlAnonymizerBean to remove 'ns0' and      accept namespace as urn.sobject.enterprise.soap.sforce.com.

Also using OAuth authentication method, we can connect to SFDC by configuring the token url and REST adapter call back url. Conversion of payload from XML to JASON format may be required to achieve the results.

Thanks

Ray..

Answers (0)