Hello,
I am trying to create a rule for assets:
As a rule, there is an expiration date for licenses or certificates, for example. If this expiration date is three weeks in the future, a reminder email should be sent to several people or even a mailing list. The asset has a user attribute. I have already tried using a text field and separating the emails with commas or semicolons, but this did not work because no emails were recognized.
When I use the user field, a user is recognized with a user ID, but of course not the email. This is because the email of this user is in a different object type. So how do I link this user attribute to the other mail attribute? So the email is not recognized as an email because it only contains a user and no email in this attribute. The log would only contain the user ID.
Hi @Antonia
From what i can see, the reason your rule isn’t picking up emails is because {{object:"E-Mail"}} only works if that attribute is an Email type and the value is stored directly on the same object. In your case, the email seems to live in a related object (like a Person or User object), so the smart value needs to follow the reference path.
If your asset has a reference attribute called User pointing to the person object, and that object has an Email attribute, you can use:
{{object.User.Email}}
If you’re sending to multiple users, you can do this in the Recipient(s) field:
{{#lookupObjects}}{{User.Email}}{{^last}}, {{/}}{{/}}
This loops through all the objects returned by your AQL and grabs the email from the linked user object.
Quick setup for your rule:
objectType = "License" AND "Expiration date" > now() AND "Expiration date" <= startOfDay(21d)
{{#lookupObjects}}{{User.Email}}{{^last}}, {{/}}{{/}}
Subject and body can also use smart values like {{object.Name}} or {{object.Expiration date}}.
Links that might help:
Hope this helps!
@Antonia
Use the attributes.value property while referencing it in the email action
{{object.E-Mail.value}}
Thanks
Jayesh R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.