ICS doesn’t allow to put any request parameter while configuring the MS email adapter in the request. However, If we see the Microsoft REST Service documentation, this allows to put request parameters (search, filter, select, order by, top etc..) in the REST APIs.
Let’s do some tweak in the Integration and put the request parameter (filter) by editing the WSDL & JCA files but exporting the Integration
Export the Integration that we created in the previous blog.
Unjar the file using some utility like 7-zip. Once unzipped the Integration, edit two files:
While configuring the MS email adapter, Only Template parameter with the name folder_id got added in the WSDL file. Let’s add QueryParameters also in the WSDL file. Replace the above section with below:
Edit the ReadEmails_REQUEST.jca file and add highlighted property in endpoint-interaction node.
Note: We added _0x646c72_ as a prefix in filter property. The actual parameter name is $filter if you see the MS REST API documentation. Since ICS converts the $ sign with _0x646c72_ when we add request parameter in an adapter as a request parameter. That’s the reason we already replaced $ sign with _0x646c72_
Save both the files. Open the .iar directly file using 7-zip and replace the updated content in both (WSLD & JCA ) files.
Import the updated integration using Import button. After successful import, Open the ReadEmalis mapper and notice one QueryParamter with name _0x646c72_filter got added
In the query parameter _0x646c72_filter we will assign IsRead eq false. This value will fetch all the email which are unread.
Activate the integration and submit it once. See if we have any unread email in the Inbox
Since there is no unread email in the Inbox as yet, that’s the reason there is the blank response.
Let’s send one email to the account and run the integration again
Notice one unread email fetched as per the filter added.
This is how more filter can be added directly by editing the WSDL & JCA files