we have a requirement to restrict to send if the activity in a ticket is internal in notifications.
id there any way to put if condition in message templates
Anjaneya Raju E
The condition cannot be put in the message template, but you can use it in a Notification Rule - it should accomplish what you need.
thank you for the reply but our requirement was to not send activity logs in in email notifications if the log is mentioned as internal.
Are you referring to the 'Internal' checkbox available on the default activity types (update/log comment/etc.) or you have defined a new 'Internal' field on the ticket ?
yes the default internal check box.
We had a similar requirement and were unable to use the Internal check box as we would have liked. The problem was the value of Internal was not available to use in an notification rule. The primary purpose of Internal is to prevent an Activity Log entry from being displayed in the Employee interface when the AEU views their ticket. To meet this requirement we use the Log Comment Activity and notification rules. If an Analyst uses Activities->Log Comment to log a comment in the ticket, then we do not send a notification. If they want that comment to be hidden from the AEU in the Employee interface, then they must check Internal. If the AEU logs a comment in the Employee interface, then we send a notification to the assigned analyst or group. If an analyst wants to correspond with the AEU, then they must use Activities->Update Status. As you would expect we rely on education to make sure this process is followed.
our requirement is different..currently we are sending recent 5 activity logs in email notification. we wanted not send the activities which are mentioned as internal.
is there any way to do that?
Hi, you may try to use condition macro like this:
send_wait(0,top_object(),"call_attr","alg","sync_fetch","MLIST_STATIC", format("call_req_id = '%s' AND type = 'LOG'", persistent_id),-1,0);
logf(ERROR,"Error in sync_fetch '%s'", msg);
send_wait(0, msg, "dob_by_index", "DEFAULT", msg-1, msg-1);
logf(ERROR,"Error in dob_by_index '%s'", msg);
pointer = msg;
logf(TRACE,"Evaluated log entry id is %d description: '%s'", pointer.id, pointer.description);
if (pointer.internal == 1)
logf(TRACE,"Evaluated to True");
logf(TRACE,"Evaluated to False");
I have one question is it possible and if it is what will be the syntax for putting more than one type of activity in macro.
Something like AND type = 'LOG' ; 'TR' ;'CL' etc............ if this is possible?
Thanks in advance
You can change the search for activity log to:
send_wait(0,top_object(),"call_attr","alg","sync_fetch","MLIST_STATIC", format("call_req_id = '%s' AND type in ( 'LOG', 'TR', 'CL') ", persistent_id),-1,0);
Retrieving data ...