Skip to Content
Technical Articles

SAP CPI : Retrieve persisted messages through iFlow by consuming API(Neo)

Persist in CPI helps you to store Message permanently. Information such as message GUID, time stamp, and payload are stored at runtime for the messages at the persistence process steps.

There is no UI from SAP to monitor persisted message . You may go through this link where you can monitor persisted messages.

WHINT MessageStore Viewer for SAP CPI

The other way to fetch persisted data which I found is to consume API to call Message store details. Lets get started with the design and see the result.

1st iFlow : Persists the data

Sender Adapter – Normal HTTPS

1st Persist – Stores the triggered input data[in my case its XML data]

Mapping – Concatenates FirstName and LastName and the result will be FullName

2nd Persist – Stores Mapping output

Deploy the flow and make a note of Message ID


2nd iFlow : Retrieves persisted data from MessageStore

Content Modifier[MessageID] – Set Basic Auth credentials of your tenant in header and Message ID of the previous iFlow in property

Request-Reply : Call OData API- /MessageProcessingLogs(‘{MessageGuid}’)/MessageStoreEntries to fetch MessageStore details which will return response in XML format.

XML response :

   Next , I’ve used XML to JSON Converter, Groovy Script, Iterating Splitter and one more Groovy Script only to extract MessageStoreID captured in the above snip to pass on to another API call to fetch persisted data. You may design your convenient way to extract only the MessageStoreID from API call response.

Request-Reply : Call OData API /MessageStoreEntries(‘{MessageStoreEntryId}’)/$value to fetch persisted data.

Finally, I am sending fetched data to my E-mai for reference.

Output : Persist-BeforeMapping



Likewise, you can try out other API operations and enjoy persisting the messages 🙂


Was it helpful?Please do let me know your thoughts.


!!!!!HaPpY LeArNiNg!!!!!



You must be Logged on to comment or reply to a post.
  • Nice blog!!!!!

    I am facing an issue after deploying the second IFlow. Error says "404 not found" when it is trying to reach API1 receiver.

    Could you please tell me from where to take "Tenant Host". Looks like something wrong i am putting there


    Nikhil Save

    • Thanks Nikhil for trying out this approach!!

      <Tenant Host> value is taken from the Cloud integration URL

      Please do let me know if you could execute it without any issues



  • Hi Sathyabhama,


    I was trying to execute 2nd flow , but am getting statusCode: 401

    https://<tenanthost>/api/v1/MessageProcessingLogs(%E2%80%98IDAGBLdkAhz5OZNbGfrPnHLkel5VHg%E2%80%99)/MessageStoreEntries with statusCode: 401


    Could you please confirm the  http Authorization header created as per this below note:

    Thanks & Regards