Forum Discussion

akshays's avatar
2 years ago

Create custom email template and a custom trigger

Can we add and trigger a custom email from Khoros?

We want to create an email > Add custom data/variables related to users > Send it through a custom service /Trigger it through code.

For the existing email templates, I saw that only the content can be modified, not the triggers.

I read some posts that it is not available on Khoros but the posts are pretty old. Do we have any update on the same?

Appreciate any help on this.

2 Replies

  • It's not technically available unless you are comfortable doing some wildly fun hacks. More options supposed to be coming with Aurora though.

    With that said, let's go crazy. You can put multiple templates inside a single Email template.  In this case, let's use badges. Most communities have a single badge template that is sent out for all badges.  We have about a dozen at this point, with more coming.  If user A completes learning path A, they will receive badge A. As such, we have an entire code snippet within the badge email template as it relates to badge A.  OR, User completes learning path B.  OR, User completes learning path C.  Each of these has an entirely different email that goes out with different information on next steps for the user to take.

    If you want to send out an email anytime you want  - Just create a fake 'badge', customize the email, award a custom attribute to the users you want to get said email/badge, and away you go (Hide badge from their badge page).

    You can do similar things with the rank emails, or using roles in a variety of ways probably, etc.

    TLDR; Break stuff to make it work.

  • Well, or you could simply write an endpoint that interfraces with any third party email service, like mailgun or the alike OR have your own email-sender microservice running somewhere on your own infrastructure, has been much easier that way for us than trying to hack the inflexible Khoros emailer.

    You can then call that endpoint with Javascript and supply the necessary data.