Templates for email/sms-alerts are found in ../etc/alertmsg. Where can I find an overview over which variables are available for me to use in messages?
The case I am trying to solve is to include organization in some alerts.
--Ingeborg
Hello Ingeborg!
On 06. okt. 2016 10:49, Ingeborg Hellemo wrote:
Templates for email/sms-alerts are found in ../etc/alertmsg. Where can I find an overview over which variables are available for me to use in messages?
No such overview exist as it depends on the alert. However, there are some common variables such as the netbox and the event.
We have developer tools (in the tools directory if you look at the source) and modifying for instance the event generators to be able to display the alert-variables is possible.
The case I am trying to solve is to include organization in some alerts.
To access the organization you use the netbox object. I hope the following will display properly in email-clients:
{{ netbox.organization.<field> }}
You can see which fields you can access in the netbox endpoint in the api - look for the "organization" key. You can also refer to only the {{ netbox.organization }} which will print whatever we (the NAV devs) think is an appropriate description of the organization.
mvh