Zammad interrogate JTL-Wawi

Hello I’m not the big programmer so I wanted to ask first.
I can use workflows from JTL-Wawi and also run batch files there.

My idea is to send a request to Zammad from JTL to see if there is an existing e-mail address in the Zammad system.

As I said, I’m not the big programmer and I’m already clear that it goes. But the way over Batch is not so clear for me or can I do it about this?

Who can give me some tips and so on, how would the best way be?

I just saw that I can sell web requests.

So I can execute programs or batch and also directly web requests.
These are: GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH, MERGE

Can I work with it if I then reinsetze directly the TOKEN etc?

I don’t know JTL-Wawi, but I’d say in theory, what you want to accomplish should be possible, yes. Zammad has a fully-featured REST API and from what I can tell from JTL-Wawi’s documentation, it should be able to send requests and also do something with the replies.

That could work like this, using cURL as an example:

martin@martin ~ % curl -s -H 'Authorization: Token token=mytoken' 'https://zammad.example.com/api/v1/users/search?query=email:myemail@example.com' | json_pp
[
   {
      "address" : "",
      "preferences" : {
         "tickets_closed" : 5,
         "tickets_open" : 29
      },
      "zip" : "",
      "out_of_office_end_at" : null,
      "last_login" : null,
      "source" : null,
      "lastname" : "von Wittich",
      [...]
      "organization_id" : 2
   },
   {
      "updated_by_id" : 3,
      "note" : "",
      "lastname" : "Agent",
      [...]
      "login_failed" : 0,
      "authorization_ids" : []
   }
]

Zammad responds to this request with a JSON list of all users that match the search term email:myemail@example.com, ie. users with that email address. Unfortunately as you can see, in my case it matches two users because their email addresses are similar, and I wasn’t able to figure out how to tell Zammad to do an exact match here, which is probably what you want here. Maybe someone else has an idea?

The “also do something with the replies” aspect is of course crucial here - if you can only send REST requests from JTL-Wawi, but not interpret the response afterwards, then this probably won’t do you much good. But that depends completely on what exactly JTL-Wawi is capable of.

Thanks Martin

I have ever been able to implement an idea through your post.
A workflow creates me nunmal already with each customer in the Wawi a field with the link to search directly for this email. This already means a simplification of the support regarding search of the customers.

Through your tip, I also saw that you can see the total number of tickets and the active support tickets.

That would also help something. But I have to raussuchen again the old books on the batch files.
So I then use a text box
Active tickets: x
ClosedTickets: Y

could write.

But thank you in advance for the hint