Filtering entitlements out during Webservice aggregation

I am trying to filter the incoming aggregation from a Webservice app to only allow 10 entitlements through to the IIQ Entitlement catalog. Has anyone done this before or have any suggestions as to what the best method for filtering aggregation of entitlements would be?

I have tried an AfterOperation type rule on the aggregation operation, and a customization rule on the application config itself. Both run without errors and aggregation is successful but the unneeded entitlements are not being filtered out.

If your webservice endpoint does not support any filtering parameters in the URL or in the payload, then the WebServiceAfterOperation is the next best place to do the filtering. Make sure your Rule is returning the filtered list of ResourceObjects as detailed in this article: https://community.sailpoint.com/t5/Shared-Documents/Web-Services-Before-After-Operation-Rule/ta-p/157903#toc-hId-2093541