I've set up a notification that goes out to alert me of new Opps that have been added to contacts and it works like a charm.
However, I can only tell that a new Opp has been added and not which Opp was added (our contacts can be tied to dozens).
Is there a way to include in an email or alert which Opp was created by included the Opp name or something?
Solved! Go to Solution.
Thanks Kenny!
I figured it out.
It looks like it's not as simple as putting the token right in? {{$TriggerObject.Type}} returns a "token is not valid" error
Hi Kenny,
I thought I got it working but not quite. I'm now getting the following error:
"Error approving Opp Creation Notification.New Opp Created Alert — {{$TriggerObject.Name}}: Token is not a valid token format"
I've created a program-level token called {{my.Script}} as an Email Script. In the script I have: $!{TriggerObject.Name}
In the email, I've inserted the token {{my.Script}}.
As I understood it, the value from the "Name" attribute should be pulled from the TriggerObject, in this case the Opportunity object and be inserted into the email as a token from {{my.Script}}.
Any idea what the issue is?
Have you checked off the Name field in the Opportunity in the script editor pane? That's a requirement for the variable to be loaded.
Yessir
Can you show us the content of the email you're trying to approve?
Sure! Here it is:
Hi Kenny,
I know you're busy. Any chance you have a moment to help me out with this? I've posted the email above.
Taking another look at this, the error seems to be indicating that this string is somewhere in your email content: "{{$TriggerObject.Name}}"
Could you check your Email HTML and the Text version of your email to see if that's anywhere in the email? That definitely is not a valid token so that might be why it's getting thrown if you put that in wen you were first playing around with the script.