Zoho Desk custom functions to merge tickets.

Zoho Desk custom functions to merge tickets.

We have a situation where we want to create tickets for alerts received from another PSA.

The tickets are currently creating fine, but the replies received to that ticket is not getting merged. We tried using custom function "Auto Merge Tickets with identical Subject and Contact" however, it appears it's not possible to use that since the ticket contact and the subject is slightly different. See below. 

Initial alert.
Received from: admin"<admin@nXXXXX.com>"
Subject: Alert: Hadeed > Springfield - HQ: HADEED-DC Agent Status Failed

Reply to that ticket:
Received from: it-support@textXXXXX.com
Subject: Re: [T1253] Alert: Hadeed > Springfield - HQ: HADEED-DC Agent Status Failed

I would like to see whether we could modify the custom function "Auto Merge Tickets with identical Subject and Contact" so that the above 2 tickets are merged.

We also see failures such as below in the custom function.

https://monosnap.com/file/v8R8bsF10lQdwGon1oPJIW0AbGEwF4

Any help is greatly appreciated.