Automation smart values - Assets
The smart values on this page are for Assets in Jira Service Management only. Learn more about Assets in Jira Service Management.
Object attribute
Used for accessing attributes for an object that triggers an automation rule.
Syntax
{{object.(attribute name)}}Where attribute name refers to the name of the attribute.
Example
Let's say you have a HR object schema with an Assets object type called Employee, used to represent employees at your company. Let's also say you want to send a welcome email to all new employees when they join the company. You could create an automation rule that is triggered whenever a new Employee is created, and with the Send email action, create an email for that person.
In this case, the following input:
Hi {{object.Name}},
Welcome to your first week! We're really excited to have you as our newest {{object.Job title}.
Cheers,
The Team
Would return the following:
Hi Jessie,
Welcome to your first week! We're really excited to have you as our newest Frontend developer.
Cheers,
The TeamAttribute changelog
Used for accessing the original and new values of an object attribute when it changes.
Syntax
{{attributeChangelog.(attribute name).from}}
{{attributeChangelog.(attribute name).to}}
{{object.attributeChange.(attribute name).changeType}}
{{containerObject.(attribute name)}}Where:
attribute nameis the name of the attribute on the object.fromreturns what the attribute value changed from.toreturns what the attribute value changed to.changeTypereturns the type of change in the attribute value: added/updated/deletedcontainerObjectreturn any attribute of the object triggering the rule
Example
Let’s say you have an Employee object type with an Employee Status attribute. You want to run a rule only when the status changes from Onboarding to Active.
You can use conditional logic to run automation when this condition is met:
First {{Smart Value}} Condition:
First Value
{{attributeChangelog.Employee Status.from}}Condition: equals
Second value: Onboarding
Second {{Smart Value}} Condition:
First Value
{{attributeChangelog.Employee Status.to}}Condition: equals
Second value: Active
In this example:
{{attributeChangelog.Employee Status.from}}returns Onboarding{{attributeChangelog.Employee Status.to}}returns Active
The rule only runs when both conditions are true – that is, when the status changes specifically from Onboarding → Active.
Object reference
Used for accessing the attributes of an object's reference.
Syntax
{{object.(reference name).(attribute name)}}Where:
reference namerefers to the attribute that contains the referenceattribute namerefers to the referenced object's attribute
Example
Let's say you have a HR object schema with an Assets object type called Employee, used to represent employees at your company. Let's also say that each Employee object has Manager references.
The following input in an action such as Send email:
Hi {{object.Name}},
Welcome to your first week! Your primary contact for your first day will be {{object.Manager.Name}}. Please contact them if you have any questions.
Cheers,
The Team
Would return the following:
Hi James,
Welcome to your first week! Your primary contact for your first day will be Jessie. Please contact them if you have any questions.
Cheers,
The TeamLookup objects
Used for accessing the list of objects returned by the Lookup objects action.
Syntax
{{lookupObjects}}
{{lookupObjects.(attribute name)}}
{{lookupObjects.(reference name).(attribute name)}}Where:
attribute namerefers to the referenced object's attributereference namerefers to the attribute that contains the reference
This can also be combined with the smart values found in Automation smart values - lists.
Example
Let's say you have a HR object schema with an Assets object type called Employee, used to represent employees at your company. Let's also say you what to send an email, welcoming all new employees who started in the last week. You could use the Lookup objects action to obtain a list of all Employee objects that were created in the last week, and then use the Send email action to send out a list of all new employees.
The following input:
Hey team,
We have {{lookupObjects.size}} new people joining the team today. Please welcome:
{{#lookupObjects}}
* {{Name}}
{{/}}Would return:
Hey team,
We have 3 new people joining the team today. Please welcome:
• Omar Darboe
• Fran Perez
• Jie Yan SongNote that in this example, .size isn’t an attribute name; instead, it’s a list smart value. Learn more about using list smart values.
Was this helpful?