Skip to Content


Whenever a customer master is created or changed, a message is sent to Salesforce to create new account or to update an existing account. This simple scenario possesses three important challenges that cannot be easily addressed with the standard SAP PI adapters.

This blog describes how these challenges can be handled by the Advantco REST adapter with minimal or zero development effort.

SAP PI - integration with REST API.jpg

Challenge 1: XML <-> JSON conversion.


The Salesforce REST API exchanges data in JSON (JavaScript Object Notation) format. This means that we need to convert the internal SAP PI XML data presentation to JSON before sending it to Salesforce.  This can be done by developing a custom adapter module or using java mapping. This is cumbersome as there are many use cases that need to be covered by the custom development. The Advantco REST adapter supports XML <-> JSON out of the box by simple declarative conversion rules.

Converting XML to JSON in the request to


   Converting JSON to XML in the response from


Challenge 2: Dynamic URL construction.

In the scenario above, in case of an update, the Salesforce URL must be constructed dynamically based on the Salesforce’s accountID. The accountID is part of the DEBMAS idoc data and must be retrieved and added to the URL. The Advantco REST adapter handles this by using the Variable Substitution
feature to retrieve the data and use that in the URL field.  The Advantco REST adapter supports also URL parameters and custom header fields.

Constructing the account object URL dynamically



Challenge 3: Authentication with Open Authorization (OAuth).

Salesforce uses OAuth for user authentication and authorization. This can be done in standard SAP PI with help of BPM to make a call to retrieve access code and to make a call to access a particular object. The Advantco REST adapter handles OAuth with very simple configuration in the channel itself. This removes the need to create complex constructs just to log into the Salesforce server.

OAuth authentication configuration



REST API integration with cloud applications can be complex due to the specific requirements like message conversion, dynamic URL construction and OAuth authorization. These requirements can be handled by custom developments or by using the Advantco REST adapter.

To report this post you need to login first.


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

  1. Sunil Mavachee

    Hello Peter,

    Seems to be make bigger impact on integration with web service based protocols. Traditional way of using SOAP will be replaced with REST, at least in integration with light weight devices.

    Also it will be interesting to see the Advantco’s PI Monitoring Tool utilization in integration projects.

    Keep good work and keep updated.!



    1. Peter Ha Post author

      Hi Sunil,

      yes, we see lots of movements on REST/PI, both in consumption and provision of REST servcies with SAP PI.


      Peter Ha


Leave a Reply