Workflow /Assignment Rules for Instant Messaging

Workflow /Assignment Rules for Instant Messaging

Hi, is there a way to configure Workflows /Assignment Rules for Instant Messaging?
For example when click on "End Chat" botton in IM then mark asignee as unassigned?
Or when click on "End Chat" it will close the related ticket?
Thanks