Forum Discussion

gstelang's avatar
gstelang
Mentor
9 years ago

How to get badge icon into the email template?

Hi,

 

I want to send the badge that a user earned in an email. It would be something like "Hey - Congrats on your first badge" with the actual badge icon image in the email.

 

Is there a way to do that? The notification object has title but no icon_url. I tried doing notification.badge.icon_url based on http://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=badges but I guess that and velocity templates are 2 different things.

 

I was looking at velocity objects available here and I could not find anything: http://community.lithium.com/t5/Developers-Knowledge-Base/Email-template-context-objects/ta-p/75924

 

However, I noticed I get badge I earned emails from Lithium. It should be possible, correct? I can't do a REST call, can I? 

 

Thanks for the help.

 

 

  • gstelang - You need to use this ${notification.badge.iconUrl} in the email template. No need for any API call, this is OOTB. Hope this helps.

  • gstelang - You need to use this ${notification.badge.iconUrl} in the email template. No need for any API call, this is OOTB. Hope this helps.