Generic Agent subject handling?

Moderator: crythias

Post Reply
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Generic Agent subject handling?

Post by hkais »

Hello,

I tried to use the Generic agent. As soon as I get to the subject my Generic Agent is failing and not fetching any ticket anymore.

E.g. I would like to fetch all Tickets starting with:
"Ihre Bestellung bei Amazon.de"
As soon as I add one of the following to the subject, my GA is not returning any ticket:
Ihre%Amazon.de%Bestellung%von*
*Ihre%Amazon.de%Bestellung%von*
Ihre*Amazon.de*Bestellung*von*
*Ihre*Amazon.de*Bestellung*von*
None is working!

My second question, if my first query will work fine, how can I add multiple search expressions?
Under Postmaster-Filter it is possible to use RegEx-or-condition "|"
In my terms as a example:
*Ihre*Amazon.de*Bestellung*von* OR *Your*Amazon.de*order*of*

Can you help me?
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

bump...

:( really no help? :(
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Generic Agent subject handling?

Post by alexus »

Alexey Yusov

Production: OTRS CE ITSM 6.0.28 on CentOS 7 + Apache 2.4 + MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Generic Agent subject handling?

Post by alexus »

hkais wrote: 30 May 2018, 18:01 My second question, if my first query will work fine, how can I add multiple search expressions?
Under Postmaster-Filter it is possible to use RegEx-or-condition "|"
In my terms as a example:
*Ihre*Amazon.de*Bestellung*von* OR *Your*Amazon.de*order*of*
You can create 2 GA jobs for both of cases.
Alexey Yusov

Production: OTRS CE ITSM 6.0.28 on CentOS 7 + Apache 2.4 + MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

alexus wrote: 02 Jun 2018, 23:07 http://joxi.ru/4AkzLlYHyoQ0n2 - GA filter

http://joxi.ru/Dr83aPkC4oNJ9A - GA run taks result

http://joxi.ru/KAgY5BzU4EoNBm - ticket exsample
Thank you for the clear description.
I did the setup exactly like you described
If I prepend any char before the expected subject

Code: Select all

Ihre Bestellung bei Amazon.de

e.g.

Code: Select all

ABCIhre Bestellung bei Amazon.de
my search for

Code: Select all

*Ihre*Bestellung*Amazon.de*
is working fine. But if my subject is starting exactly with

Code: Select all

Ihre Bestellung bei Amazon.de
the search of the GA is NOT working anymore!

Any advice?
Last edited by hkais on 10 Jun 2018, 12:20, edited 1 time in total.
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

bump...
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Generic Agent subject handling?

Post by jojo »

It seems that you expect comercial grade support here which you will not get as it is a forum with community members answering on a voluntary base.

If you need comercial consulting or services please contact the vendor or 3rd party providers.

Also it seems that Generic Agenty might not be the best solution for your issue as it seems that you want to run it on email based articles.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

jojo wrote: 06 Jun 2018, 18:36 It seems that you expect comercial grade support here which you will not get as it is a forum with community members answering on a voluntary base.

If you need comercial consulting or services please contact the vendor or 3rd party providers.
I have no issue to pay for support, the thing is, that if the basics are not provided, why should I call someone for support if they cannot either help me?

So my question is:
- is OTRS GA able to handle multiple OR-conditions in one Generic agent?
- is OTRS able to support simple regEx or wildcard conditions - means a wildcard could be any char (including also no char, see my example above)?

and the most important question:
- is my named requirement solveable with OTRS on-bord functions, or is a code customization needed?

If this is the case, we can easily hire someone, but neither from documentation nor from the forum it is visible if the requirement is solvable with OTRS on-bord functions. So the question is far more to my decisions, is OTRS the right tool at all for our ticketing load.

Would appreciate to stay at OTRS, but ... to many open questions about basics which afaik shall a database based system support pretty easy (since the database supports it pretty well)
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Generic Agent subject handling?

Post by jojo »

The main issue I see here is that the Generic Agent (which only would allow the filters available in the TicketSearch) API might be the wrong tool within OTRS to solve your needs.

The feeling that you need to go with commercial services came up because of your impatient bumping. I suggest to have a proper evaluation of your needs witrh an expert before implementing anything
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Generic Agent subject handling?

Post by zzz »

Hello,

you should be able to find all tickets containing 'Ihre Bestellung bei Amazon.de' with these examples:
'%Ihre%Bestellung%bei%Amazon.de%' or '*Ihre*Bestellung*bei*Amazon.de*'
The generic agent automatically converts '*' to the SQL wildcard '%'.
Unfortunately, the single character symbol '_' gets escaped.

I very much have to agree that this is not the type of behaviour an user would expect as every whitespace in the free text field adds an AND clause to the database query.

Nevertheless, that allows us to do this search:
'%Ihre% %Bestellung% %Amazon.de%', which will find 'Ihre Bestellung bei Amazon.de' and 'Ihre Amazon.de Bestellung von'.

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

zzz wrote: 08 Jun 2018, 11:49 you should be able to find all tickets containing 'Ihre Bestellung bei Amazon.de' with these examples:
'%Ihre%Bestellung%bei%Amazon.de%' or '*Ihre*Bestellung*bei*Amazon.de*'
The generic agent automatically converts '*' to the SQL wildcard '%'.
Unfortunately, the single character symbol '_' gets escaped.

I very much have to agree that this is not the type of behaviour an user would expect as every whitespace in the free text field adds an AND clause to the database query.

Nevertheless, that allows us to do this search:
'%Ihre% %Bestellung% %Amazon.de%', which will find 'Ihre Bestellung bei Amazon.de' and 'Ihre Amazon.de Bestellung von'.
Hi Emin,

thank you for your very helpful support!

I am working since the mid of 90s in databases software systems. This is the oddest SQL mapping I have seen so far!
Is it intentionally odd to sell the Advance GA? :lol:

So I used in GA

Code: Select all

%Ihr% %Amazon% %Bestellung%
Finally after knowing the odd mapping mysql helped me with

Code: Select all

SHOW FULL PROCESSLIST;
to see the resulting SQL which is this one

Code: Select all

Copying to tmp table | SELECT DISTINCT st.id, st.tn, st.create_time_unix FROM ticket st  INNER JOIN article_search art ON st.id = art.ticket_id  WHERE 1=1 AND (((art.a_subject LIKE '%ihr%amazon%bestellung%' ) ) AND ((art.a_to = 'amazon@example.de') )) ORDER BY st.create_time_unix DESC LIMIT 30
What is really strange, why the hack are the developers adding 1=1 in the where?
And why is my search string lower cased?

Now I can debug me through the mysql and sql syntax.
Also found that my centos setup for the shortes search char in the like was too long. I need to change also the full text search minimum word length to 3

Code: Select all

ft_min_word_len=3
@jojo, can you share me the references to the documentation which I have missed to understand the mapping of strings to SQL? I research again the OTRS documentation and did not find it.

Hope my debugging is helping other OTRS generic agent users.
From my perspective I have to check for a different Ticket-Tooling, since OTRS seems to be intentionally on hold on user experience improvements. Maybe zammad is a good alternative, even knowing a lot of our processes are not handled - right now - well. But the implementation seems to be much clearer... Also I can find some developers who can program the language...
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Generic Agent subject handling?

Post by jojo »

Hallo,

ich habe immer noch das Gefühl das Du einfach den falschen Part im OTRS nutzt. Hier wäre der Postmasterfilter besser, da die Tickets sicher (so lässt es das Subject vermuten) per E-Mail erstellt werden.

Du findest die API Beschreibung des Ticketsuche hier: http://doc.otrs.com/doc/api/otrs/stable ... ch.pm.html diese wird durch den Generic Agent genutzt.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

Hello jojo,

thank you for your reply and the doc reference.

I am also using the Postmaster-Filter, but like in other forum posts it was recommended to use the GA. By the way I think the idea of GA is great.

I could use regex in Postmaster-Filter, which is great. But sadly the Postmaster-Filter is pretty much ignoring User Experience. You have the only option to write the filter, wait for a e-mail, and hope you have done everything right. (Assume how often a not so well experienced persons is right ;-) )

With GA you can define rules, and test these rules (by running it). This feature is completly missing in the postmaster-filter.
Also from design perspective, why should for the same problem (user wants to handle incomming e-mails for a specific change or automation) the user use two different solutions? Makes in my eyes not much sense, even if I understand that the postmaster filter is probably attached to the mail-processing and the GA to the database.
You could have easily both, by persisting mails - as is - in the database and afterwards process them. So you could do both with a extended GA.

best wishes.
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Generic Agent subject handling?

Post by jojo »

GA is a search so has to search through a huge amount of data or is triggered by an event and always have to go trough database. The postmaster filter has to analyze only 1 mail before it enters the database. So from performance point of view postmaster filters are much better.

For sure they can be tested (without sending mails) via CLI
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Generic Agent subject handling?

Post by hkais »

jojo wrote: 11 Jun 2018, 09:26 GA is a search so has to search through a huge amount of data or is triggered by an event and always have to go trough database. The postmaster filter has to analyze only 1 mail before it enters the database. So from performance point of view postmaster filters are much better.

For sure they can be tested (without sending mails) via CLI
getting both view points, did you consider this?

- power users can handle easily a timelimit on a GA, so not all Messages (in our case about 500.000) will be searched, it will only handle lets say about 20 in the past minutes.
- if you do a event based matching in the GA, why the hack do I need to search all messages? The event - e.g. ticket created, or ticket changed - is getting triggered by exactly ONE ticket... So I do not see any performance difference between postmaster or GA - IF and only if - the GA is able to handle it accordingly. Of course there would be a academic runtime difference because the GA has to process first the message into the database and afterwards you can handle it. But it is a less than 10 row update to the database in the case of a new ticket arrives.
- also here, it is a matter of UX - if you design the UI in that manner, that a power user will be warned about the massive impact - the power user will be able to process it accordingly
- also keeping UX in mind your GA could fetch the execution time for the search and if it takes longer as lets say 10 seconds => warn the user via email that this GA could massively impact the OTRS performance. Also here it is a matter of UX...

regarding CLI, did not know this, do you have some doc references to it?
My question which pops up, will be a power user able to handle a CLI? surely not, also here what is the UX behind it? To ask the typically overloaded admins to do the rules setup?

In my experiences mostly a system will be used properly if some power users can handle the system. And they will after some time do not need the admin anymore - except for updates, upgrades and technical issues - for what the admin is hired in the organisation...
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Generic Agent subject handling?

Post by jojo »

we offer trainings and expert trainings, also check out the build in help of the otrs.Console command
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Generic Agent subject handling?

Post by alexus »

hkais wrote: 05 Jun 2018, 20:59 But if my subject is starting exactly with
CODE: SELECT ALL
Ihre Bestellung bei Amazon.de
the search of the GA is NOT working anymore!
Try to create an additional GA-job with

Code: Select all

Ihre*Bestellung*Amazon.de
Alexey Yusov

Production: OTRS CE ITSM 6.0.28 on CentOS 7 + Apache 2.4 + MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
Post Reply