Sync handles deleted tickets.
ticket_number matching clauses were not working earlier because of ticket_number being an int in the db and the matching variable being a string. Corrected this.
Event template shows relevant information now.