Jump to content

Hook for pre-ticket open


yswery

Recommended Posts

Hi people

I know there is a hook that ticketopen (https://developers.whmcs.com/hooks-reference/ticket/#ticketopen) but it is only triggered AFTER a new ticket is created

Is there way for me to have my own code BEFORE a ticket is created, my objective is to do spam detection on my side (code wise) and if it passes only then have the ticket opened 

I know i can do the detection and then automatically "close" or "delete" a spammy email but I also really want to NOT send an email out when there is a new spam ticket created

 

Any help would be greatly appreciated 

 

 

Link to comment
Share on other sites

The closest hooks might be https://developers.whmcs.com/hooks-reference/everything-else/#preemailsendreducerecipients  and  https://developers.whmcs.com/hooks-reference/everything-else/#emailpresend  but not sure if they fire on ticket sending and if the relid would be the ticket or like a template.  My thinking was if it does fire on tickets and the relid is a ticket Id, then you could return the abort response if the ticket is the filtered one. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated