Skip to main content

Cloud

Near Real Time Integration Pattern for Salesforce and SAP

Architecture

Systems Used:

DataPower – XML Gateway Appliance to Authenticate and Validate the requests.
MQ – Queuing Mechanism used for Guaranteed Delivery.
Cast Iron – To develop integration’s using the In-built connectors available for Salesforce and SAP.

1.   Salesforce places transaction on Outbound Message Queue.  This transaction contains only the following:

  • The ID of the record
  • The Integration Operation (e.g. “Insert”)
  • The Integration Status (always “Submit”)

       The Outbound Message queue performs retries at a specified time interval until the message is delivered.

2.  Salesforce Outbound Message Queue invokes service on the External DataPower XML gateway.

  •     External DataPower gateway verifies the Salesforce generic SSL certificate and passes service request to the       Internal DataPower XML gateway

3.  Internal DataPower XML gateway places the transaction on MQ processing queue for that
transaction. The processing queue is identified by a generic web service proxy which will use the unique Object            name and Integration Operation field value combination from the incoming SFDC Outbound Message Request.

  •     Each transaction type has its own Processing and Error queues in MQ.
  •     All queues are First In – First Out (FIFO)

4.  Internal DataPower acknowledges request to Salesforce. Salesforce clears request from the Outbound Message            Queue.

5.  Cast Iron polls messages from MQ processing queue.

6.  Cast Iron initiates new synchronous call back to Salesforce with Transaction Record ID specified in Outbound               Message request.  This service call obtains the transaction payload from Salesforce to be provided to the back end       system.  This call back can be either SOAP for standard Salesforce services or REST for custom Salesforce                     Services.

7.  Cast Iron initiates a new synchronous transaction to DataPower Internal Web Service Proxy which will                          authenticate and validate the transaction request and routes it to the corresponding SAP Service.

8.  SAP executes the transaction and returns status and any return data.

9.  Cast Iron initiates new synchronous transaction to Salesforce to provide updated status message and any return           data and any application error message.

10.  Salesforce posts any data from the return message.

  •   Salesforce provides the return acknowledgement to Cast Iron.
  •   Cast Iron closes the session with Salesforce and closes the transaction.

When an error happens at anytime during the transaction, the Salesforce Outbound message is placed onto the corresponding error queue. Once the error is fixed, the message is transferred from the error queue to the processing queue. Cast Iron picks up the message again and completes the transaction successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Raja Nagarathinam

More from this Author

Follow Us