Send app when conversation closed

Is there a way to trigger the app to be sent when an agent closes a conversation?

Essentially, what I am trying to achieve is sending surveys once a conversation has run its course.

The reason I am not using the OOB survey from Intercom is because, I want to use a rating system going from 1 to 10.