Hello! I know the usage of variables like $this->user_id$ in the body of e-Mails very well.
But can i also use SQL / OQL Statements in the body of an e-mail-notification?
e.g. SELECT status from ...
or CASE satus = 'new' (xxxx)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
No there isn't any solution to put OQL query placeholder in Notification, also you can provide URL to that particular OQL Search, you can also create a QueryPhrase.
It would be great if you could use notification placeholders to fill the parameters within the hardcoded url, but I am not sure that this would work also it would be nice. Of course this is assuming that the recipient has access to that class and to the console .
There isn't any possibility to put any CASE nor IF THEN ELSE statement which would modify the content of the notification. The workaround is to have different trigger/action for the different cases.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Pierre, what i like to do is the following: Situation:
- we are using the extension "mail to ticket" to create user-request automatically (cron.php)
- the agent gives his answer in the portal
- the user writes back via e-mail (e.g. Outlook)
- the problem is, that the content of the e-mail gets very very long durch the conversation ...
- ... because each answer contains the whole public log. And this grows with each email being sent.
What i would have liked to realize: IF last entry is from agent -> send the whole publiclog | if last entry is from user(caller) -> send only the head, what is equal to the last entry.
Any idea?
kind regards
ZT
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a simpler way, without writing any extension.
Create a TriggerOnObjectUpdate with context = 'cron', linked to a notification for the agent (last entry)
Create another TriggerOnObjectUpdate with context = 'Portal', linked to a notification for the caller (full caselog)
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello! I know the usage of variables like $this->user_id$ in the body of e-Mails very well.
But can i also use SQL / OQL Statements in the body of an e-mail-notification?
e.g. SELECT status from ...
or CASE satus = 'new' (xxxx)
Hi,
No there isn't any solution to put OQL query placeholder in Notification, also you can provide URL to that particular OQL Search, you can also create a QueryPhrase.
It would be great if you could use notification placeholders to fill the parameters within the hardcoded url, but I am not sure that this would work also it would be nice. Of course this is assuming that the recipient has access to that class and to the console .
There isn't any possibility to put any CASE nor IF THEN ELSE statement which would modify the content of the notification. The workaround is to have different trigger/action for the different cases.
Hello Zwettler, can you describe what you wanted to do functionnaly ? Maybe there are other way we can think of ?
Hi Pierre, what i like to do is the following:
Situation:
- we are using the extension "mail to ticket" to create user-request automatically (cron.php)
- the agent gives his answer in the portal
- the user writes back via e-mail (e.g. Outlook)
- the problem is, that the content of the e-mail gets very very long durch the conversation ...
- ... because each answer contains the whole public log. And this grows with each email being sent.
What i would have liked to realize: IF last entry is from agent -> send the whole publiclog | if last entry is from user(caller) -> send only the head, what is equal to the last entry.
Any idea?
kind regards
ZT
( ignore this, wrong thread )
Last edit: Jeffrey Bostoen 2022-07-06
There is a simpler way, without writing any extension.
Create a TriggerOnObjectUpdate with context = 'cron', linked to a notification for the agent (last entry)
Create another TriggerOnObjectUpdate with context = 'Portal', linked to a notification for the caller (full caselog)
And also you could fine tune the extension to remove the replied message content.
For example
introductory-patterns
... See https://www.itophub.io/wiki/page?id=extensions:ticket-from-email#other_configuration_parameters