Forum Discussion
In the Coveo Atomic framework, while we may not have the same event handling methods available in JSUI, we do have alternative routes for managing requests and responses. Based on the following provided document, the PreProcessRequestMiddleware and preprocessSearchResponseMiddleware allow direct access to requests and responses, enabling manipulation as needed.
The PreProcessRequestMiddleware is particularly valuable as it provides access to the request before the response is received and the page is loaded. This allows for various manipulations, such as modifying the request parameters or intercepting certain actions before they are executed.
Conversely, the preprocessSearchResponseMiddleware operates after the page has loaded, providing access to the search response. Here, we can manipulate aspects such as the total count and other relevant data to suit our requirements.
Furthermore, if there is a need to manipulate the results obtained from the response, we can access the response state directly.
Coveo Reference Link, where it explain with the example and the code snippet: https://docs.coveo.com/en/atomic/latest/usage/atomic-modify-requests-responses/#modify-responses
Hope this helps to resolve your use case.