Skip to Content
Technical Articles
Author's profile photo Kris Chau

Cloud Integration OData APIs – Way To Retrieve Persist Messages From Cloud Tenant

SAP CPI provides various ways for message persistence – “Persist” message is one of them. Using this option, developers have control to store a payload at a specific point in the process. Further, this payload can be used as a reference point for any analysis. A simple use case could be – “business process validation” – where business wants some dependent information to meet compliance.

Some facts about Persist step:

  • Shares the same tenant DB as the data store (Details)

  • To access the contents – Use Cloud Integration OData API

  • Message store can be accessed only after execution of the i-flow that writes the entry

  • Life of message is 30 days, after that it will be deleted automatically


API Details:

Scenario for understanding the functionality:

  1. Send an HTTP request (ProductID)
  2. Store the request payload using “Persist Message” (Before Message)
  3. Fetch “Product Review” through OData API based on requested ProductID
  4. Store the “Product Review” response payload using “Persist Message” (After Message)


Integration Flow Design


Integration Flow Design


OData Channel Configuration


Resource Path: CustomerReviews

Query: $select=Comment,FirstName,LastName,ProductId,Rating,CustomerReviewId,CreationDate&$filter=ProductId eq ‘${property.Productid}’


OData Channel Configuration




Sending ProductId through HTTP Request


HTTP Response – POSTMAN 


Receiving Customer Review through HTTP Response


Getting Message ID


Message ID


Cloud Integration OData Call 

Pass copied Message ID to “MessageProcessingLogs” to fetch “MessageStoreEntries”

https://<Cloud Integration host>/api/v1/MessageProcessingLogs(‘<Message ID>’)/MessageStoreEntries‘AGGSC3AkbkVgwR2jiIGqmnbODLgE’)/MessageStoreEntries


Get MessageProcessingLogs based on Message ID


Pass copied Id to “MessageStoreEntries” to fetch the payload

https://<Cloud Integration host>/api/v1/MessageStoreEntries(‘<Message Stored Entries Id>’)/$value‘3463623365326437747269616c2f6d65737361676573746f72652f6d6573736167652f414747534333416b626b56677752326a694947716d6e624f444c67452f50726f647563744265666f72652f33653230636638342d323337652d346332642d623866322d353239363534373839333432’)/$value


Persist payload from 1st MessageStoreId (ProductBefore)‘3463623365326437747269616c2f6d65737361676573746f72652f6d6573736167652f414747534333416b626b56677752326a694947716d6e624f444c67452f52657669657741667465722f64653462663034322d363935322d343761392d386131642d336361396632303032656161’)/$value


Persist payload from 2nd MessageStoreId (ReviewAfter)


Now, it is your turn to design your business use case by implementing message persistence – through “Persist”; access the stored message content through Cloud Integration OData API & feel the power of API Business Hub. Please do share your use case as well 😊

Any question or feedback will be appreciated!



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Naveen Kumar
      Naveen Kumar

      Nice blog! Kris Chau 

      and I have a question, does Persist step store Exchange property and Headers value too?



      Author's profile photo Kris Chau
      Kris Chau
      Blog Post Author

      Hello Naveen

      Try using..

      More details you can get from here -