The Jovo $response object is the native JSON response which gets returned to voice and chat platforms.


The $response is generated from the $output array as part of the response step of the RIDR lifecycle.

Since $response isn't fully propagated until the response step, it is recommended to only make changes to the response (for example by using a plugin or a hook) in the before.response.end middleware.


You can check if a session ends with this response by using the following method:

this.$response.hasSessionEnded(); // boolean