Menu

Notification "On create" UserRequest by organization

2023-11-27
2023-11-28
  • Safranek Jaroslav

    Hey. Hey,

    Can anyone advise me how to write a filter in a notification that will send specific notifications for an organization?
    I need a multilingual answer. All our organizations are from Czech Republic but I have one organization which is from USA.
    I need to send notifications in EN US for this org.
    I read the iTOP multilingual notification wizard and there is a recommendation to add an attribute to the organization and build a trigger accordingly.
    For me this is unnecessary and I don't want to interfere with the data model, so I just need to send organization specific responses.

    So I'm concerned with the filter above the trigger.

    Regards,
    Jaroslav

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-11-27

    I have something custom implemented on my own iTop instance for this.

    For each person, I set the language. Then, you can play around a bit with the trigger condition or notification (caller selection).

    For example, I have one trigger which has 2 notifications. One will send an email only if the caller's language is English; the other if the language is Dutch. The OQL looks like this:

    SELECT Person WHERE id = :this->caller_id AND language = 'en'
    

    Now, keep in mind that if extra people are added in the conversation; I just assume they understand the language of the caller. So the OQL for "CC:" looks like this

    SELECT Person AS p
    JOIN lnkContactToTicket AS lnk ON lnk.contact_id = p.id
    WHERE :this->caller_id IN (SELECT Person AS p2 WHERE p2.language = 'en') AND lnk.ticket_id = :this->id AND p.status = 'active'
    

    Mind: "language" is a custom field.

     
    • Safranek Jaroslav

      After two hours of playing I understood how it was meant, it's SELECT directly on the Email action in the TO section. Now it works.

       
      👍
      1
  • Safranek Jaroslav

    Thanks for reply.
    I have question what type of trigger you are using?

    I used trigger on object creation and class UserRequest.
    So when UserRequest is created (email, portal etc...) then this trigger is activated and send email to caller-id with info about new ticket was created.

    Next trigger is for on object update and class UserRequest so when I change agent or another change on ticket, then send email with this.

    And etc.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.