On transaction, replace ticket's subject with transaction's subject

I’m wondering if this is something I should be capable of doing, however
right now it eludes me.

For standard requests which have common subjects, for example, Subject:
CUSTOMER NAME - PHONE NUMBER

I’m attempting to write a scrip which then enables us to replace
ticket’s subject with the transaction’s subject line, so if say we’re
doing an order for a customer, and in this case the order is rejected,
the person who rejected it would add “REJECTED” to the subject: CUSTOMER
NAME - PHONE NUMBER REJECTED.

I’m wondering if there is a way as the subject here says, to extract the
correspondence subject (changed subject from the email reply) and change
the ticket title accordingly…

Has anyone had any success with this?
Kris