Inform Threema contacts about ticket events

Robert Ullrich17. May 2018 | ConsultingCyber SecurityMiscellaneousUse cases

From time to time I missed the possibility to inform agents via Threema about ticket events. Last week I had a customer from the cybersecurity sector, who needs the possibility to inform agents via Threema. Because I really like this use case, I want to show you how you can build such a “ThreemaConnector”.

The first step is to create an account for the Threema Gateway (https://gateway.threema.ch/en).

ThreemaConnector Register Account

Afterward you must request a new Threema ID. Pay attention because there are two types of Threema IDs:

ThreemaConnector Request ThreemaID

  • Basic
    • The private key will be generated and stored by Threema
    • Messages can be sent
    • Messages cannot be received
  • End-to-End
    • The private key will be generated and stored by the customer
    • Messages can be sent and received, including delivery reports (delivered, read, acknowledged).

 

In this blog article, I’m using the Basic Threema ID.  Later I’ll also show you how to receive Threema messages in OTRS. :-)

After you registered your Threema ID and received your confirmation email, we can start with our ThreemaConnector in OTRS. As usual, there are some requirements:

OTRS Requirements for this HowTo

OTRS Framework

  • at least OTRS 6.0.x

OTRS Packages

You need the following OTRS Feature Add-On:

  • OTRSTicketInvoker
(Adds new invoker for TicketCreate and TicketUpdate in the GenericInterface.)

Third Party Software

You need this third-party software:

  • XML::Simple
  • XML::LibXML
  • XML::LibXSLT

Configure the ThreemaConnector in OTRS

Now we can start to configure our ThreemaConnector. The first task is to create a new web service in OTRS.

ThreemaConnector Webservice config

Now we can continue with our invoker(s). I’m saying invokers because we need one invoker per recipient.

Let’s start with the configuration for the invoker “NotifyViaThreema”:

ThreemaConnector Invoker config 1

The most important part is the XSLT mapping and the event trigger for this invoker. You can use my XSLT mapping:

ThreemaConnector Invoker XSLT

Because I don’t want to send a message every time when a ticket is created, I define a condition for this invoker:

ThreemaConnector Invoker Trigger_config

The last step is the configuration of the network transport. The Threema API is expecting everything as parameters. Because of this, we have to work with variables:

ThreemaConnector Transport config

That’s all! Now we’re ready to start with our tests. At first we need a new ticket with a priority = 5 very high (my condition for the invoker).

ThreemaConnector Testticket

After ticket creation, we should receive a Threema message. As an alternative we can also check the debug logs of our web service:

ThreemaConnector Debug log

And on the recipient’s cell phone:

ThreemaConnector Message

Your email address will not be published. Required fields are marked *

This site uses cookies. By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close