Result:
(After emailing the coded mail to my old Gmail account):
That’s a total failure.
It did not draw the CRM users name and email and printed it into the template when it was sent. I just sent it as is with the short codes to read openly in the received email…
There’s no way that’s going to work. Where would the email get the employee_firstname from?
When you use contact_firstname the email can get it if (and only if) the email is related to a contact. So how would it get the employee first name when you are sending to another record? It can’t, unless you were sending the email to an employee and then maybe (I haven’t tested it).
Maybe you might be able to use the assigned user’s first name and it might be able to pull the assigned user of whomever you’re sending the email to. Not sure if there is anything like $current_user_firstname or something like that.
The key with using these things is they only work if the email is directly related to the record you are trying to send it from.
Which shortcode is the correct ones for your own employees (e.g. your own users in the system)?
I wanted to print in their name and their email into the emails they send.
Well my point here / idea was not be able to do one generic template instead of having to do one personalized email template for each employee which is both time consuming and also will bloat the list of loadable templates in the system…
When I mean e-mail templates I mean this of course:
It is / would be way easier/faster and less cumbersome to print their email addresses and their full names into the email which they are sending than having personalized templates.
I know exactly what you want, you can try the options I provided and see if they work for you. I personally wouldn’t trust it even if you got it to work because it really depends on the record you’re sending the email to and it may not work in all cases, even if it works in one case. The first example I gave you will probably only work if sent to a lead and the second one will probably only work if sent to a contact.
I think @pgr has a ready made solution for this with his add on that would solve your problem.
I just don’t include the signature in the template. It gets inserted automatically when you create an email if you have your personal signature set up.
Well the personal signature has been quite unreliable for me. Sometimes it doesn’t load other times it loads as pure text and you need to refresh it to load properly.
To be honest when I think about it @pstevens …
I never seen the personal signature be loaded after the (custom) e-mail templates so it is the first time I ever heard about it. So I’m quite surprised to read that…
When I pick email template from the list it is sent with only that. can confirm it of course because I seen many times when customer replies back. The email signature should then have been listed twice.
In your example above, that would only work if you were sending the email to an employee.
The field must be in the record your sending the email to, otherwise it won’t work.
I have used the assigned to in the past and that is a workable solution because your sending to a contact, typically you are the sales rep assigned to that contact and “assigned to” is in the contact record.
So what is your company´s employees (E.g. registered CRM users), defined as?
Obviously what I want to accomplish is to be able to use a generic shortcode for our employee/CRM user’s @username@mail to be printed automatically when they send a email to a prospect in leads or opportunties. That way its enough with one template each each type…
The code doing the replacements is really basic, it’s generic for all modules and does not really understand anything about the context of where you’re at. All you get are the fields of the record that you are currently on.
I did a full rewrite of all that for my add-ons, not just some minor adaptations or fixes, because it just is not a good starting point. Way too basic for what people require from a CRM. That’s why there are all these threads here of people complaining that they aren’t able to reach some “obvious” piece of information required for their purposes.
So the rule here is: try it, if it works, cool, if it doesn’t, don’t waste your time wondering why.
Often, a good workaround is to have workflows “pull” related information into the record (into some unused field) with what you need; and then that information is available to the code that does the replacements.