Hi, I’ve read the guides but they are a bit lacking in guidance for the email tokens.
I know that %user_name% will display say john.doe67 if generate username from email is checked.
But what if the user then completes their profile with their first name and last name, surely you’d want to address them and that would be %user.first_name%, however if they don’t then i believe it will be blank?
On the same subject, for Vendors, I have a custom attribute called display name which is the vendor name set in the Settings, so if they have updated that, how do I address them as Display name?
Yes, the objects work in a way that in order to use them, you need to add the field name of the object with a dot notation, e.g., %listing.title%, and so on. Also, you can use any custom attribute using this approach, so in your case, with the vendor, you can use %vendor.custom_field_name%.
We will update the guide docs in the future to make it clearer.
Sorry, this isn’t clear enough. What do I need to do to achieve what I’ve described? Because the emails may get sent to a vendor or a non-vendor?
Or do I have to work out that if it is a account related do I use
Hi %user.first_name%, or
Hi %user_name%%user.first_name%
Then for Listings, they are likely a vendor, but if my field is optional they may be
Hi %vendor.custom_field_name% or %user.first_name% or %user_name%
I’d appreciate some guidance as someone knows how this works, and it would save everyone a lot of testing if we had some clear examples.
I see someone asked for a complete list of the emails that Hivepress sends, it would be good to be able to the default text of those to know if we need to customise or not.
Sorry, but at the moment there’s no built-in option to set a fallback for an empty token. This can only be achieved with a custom code snippet. If you’re comfortable with code, we can provide general guidance.
Regarding the %user_name% token, while it can be confusing, it actually displays the setting configured in HivePress > Settings > User > Display Name. For example, if you’ve chosen to display “Full Name” in this field, the system will show the full name when available, with username as the fallback. So if you’ve filled in the first and last name fields, the %user_name% token will be replaced with the full name.