Menu

Customising Triggers backed on incoming email

Daniel
2024-02-07
2024-02-15
  • Daniel

    Daniel - 2024-02-07

    Hi all,

    We are running 2.7, and have done so for number of year. We are now wanting to "merge" our servicedesks.

    Problem is, we want to send out customised notifications based on what incoming email is being used. Making this harder is my OQL skills are lacking.

    Desired Results:

    ServiceDesk@ and helpdesk@ gets one set of notifications,

    support@ and support2@ gets another set of notifications.

    Results:

    Currently im unable to link trigger based on what email is being used. I have messed around with a quiry, however this resulted in all Object creation triggers being.... triggered.

    1. Is it possible to accomplition this on 2.7. Or do we have to upgrade, we are wanting to upgrade to 3.2 mid year.

    2. Would you be able to point me in the right direction of what Query i can run?

    Kind regards.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2024-02-07

    I believe so, using an OQL like:

    SELECT Person WHERE p.id = :this->caller_id AND p.email LIKE '%domain1.org'

     
    • Daniel

      Daniel - 2024-02-13

      Thanks for this Jeffrey,

      However i must be honest - Im unable to make this work, I feel . I have also changed it up, however still not getting my desired outcomes. Can I confirm that you can like a Trigger to the incoming email at all. Or do i need to link it to something else?

      I have tried to adding a value so tickets from Email2 a service is auto assigned, then get the trigger to set off based on that. However I found that you can link a trigger to a Service Name at all :( - I have tried using - SELECT Action IF ServiceFamily = '%name', But as im unable to auto assign a Service I have not been able to test this yet.

       
  • Pierre Goiffon

    Pierre Goiffon - 2024-02-13

    Hello,
    The solution proposed by Jeffrey seem fine by me ? Did you tried it ? What is the result ?

    You are talking about linking the Trigger, this is not how the thing work : instead the Trigger uses queries to select appropriate input (what object will launch the trigger), and the associate actions will use queries as well to select outputs (for ActionEmail, the people we will send mails to)
    Take a look at the documentation : https://www.itophub.io/wiki/page?id=latest:admin:notifications

     
    • Daniel

      Daniel - 2024-02-14

      Apologies if i haven't explained my aim properly... or if i ran the query incorrectly.

      The mentioned query seems to look at contacts.
      SELECT Person WHERE id = :this->caller_id AND email ='support2@domain.net'

      However i would like to set it up so only selected triggers are activated based solely on what internal email was used.
      eg.
      Support1@domain.net points at a trigger to notify on new ticket creating
      Support2@domain.net points at a trigger to notify on new tickets created, (this one is set up with personalised company logo)

       
      • Jeffrey Bostoen

        Jeffrey Bostoen - 2024-02-14

        Indeed. So you set up two notifications.

        First notification, you just send it to the people belonging to org 1 (if any are found).
        Second notification with different style, you send to people belonging to org 2 (if any are found).

        Or are you in a scenario where you want to have the same caller (let's say from org C) who can create tickets which are handled by 2 different teams; and you want the notification based on the team that's handling the ticket?

        In that case, you could have 2 separate triggers. On each trigger, you'd filter based on the assigned team (but this would mean, if you are using "on object creation", you'd need to make sure the team is set already!)

         

        Last edit: Jeffrey Bostoen 2024-02-14
        • Daniel

          Daniel - 2024-02-14

          Thanks Jeffrey
          "First notification, you just send it to the people belonging to org 1 (if any are found).
          Second notification with different style, you send to people belonging to org 2 (if any are found)." --- sounds like my situation.

           
          • Jeffrey Bostoen

            Jeffrey Bostoen - 2024-02-15

            In that case - 1 trigger; with 2 e-mail notifications.
            In one of the e-mail notifications, use the OQL query to only select recipients from org 1.
            In the second, only from org 2.

            Downside: you'll always see 2 email notifications in the ticket tab; one will just not have any recipients.

             

Log in to post a comment.