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.
Challenge 1: XML <-> JSON conversion.
Converting XML to JSON in the request to Salesforce.com
Converting JSON to XML in the response from Salesforce.com
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.