Pass modal & trigger mail to email template

Former Member
Former Member

Hi Team,

I created email template and mail also triggering when I click "Send Preview Email" button from template.

I am  below two issues,

1. I want to pass my modal to template and I will show in the model related properties in Insert token pop up like below,

2. I want to trigger the email when click a button from my page, I want to call my particular email template and for more understanding check the below code and template

Code reference

Kindly help me to pass my modal and trigger email from button in my page, Thanks!

Regards,

Kiran Cherukuri.



moreunderstanding
[edited by: kiran at 1:16 PM (GMT 0) on Fri, Aug 6 2021]
Parents
  • Former Member
    0 Former Member

    Hi kiran,

    Take a look at the related Developer Training for Templates  Template-based Email and Tokens  Registering Tokens for Templates to see if they can help answer your questions.

    1. We don't expose a way to extend the functionality of existing token types beyond the list found in the token Developer Training article. Investigate ITokenizedTemplateDataTypeContainerToken implementation to see if that fulfills your requirement.

    2. To trigger an email manually with a button, you would need to expose a method on your plugin type that performs the actions that might typically be performed when handling a platform event. Then it's just a matter of calling that method directly when the button is clicked.

  • Former Member
    0 Former Member in reply to Former Member

    Hi  ,

    Thanks for reply,

    I implemented the token based registration code but I didn't see any connection between my template based email code & registration code below,

    You can check the above code and help me how to include my template code here and trigger this particular email template, thanks!

  • Former Member
    0 Former Member in reply to Former Member

    In order for the token(s) to appear available to a template, you need to include the token's DataTypeId in the template's ContextualDataTypeIds list.

  • Former Member
    0 Former Member in reply to Former Member

    After passing my DataTypeId  to ContextualDataTypeIds  list, Now I can see my values in tokens' dropdown.Thanks  

    And I have two major issues for me 

    1.I want to trigger newly created email template from custom api and api code given below.

    2. How can I pass data to my model? Because data will be change for every time.

    Please help me to resolve these two issues. Thanks!

  • Former Member
    0 Former Member in reply to Former Member

    The Developer Training on templated email has more detail on this:  Template-based Email 

    Specifically, the syntax for rendering and sending an email using templates. Below I've copied the example from that page using Blog posts:

  • Former Member
    0 Former Member in reply to Former Member

    I tried like above blogs example but _controller(ITemplatablePluginController _controller) will be null and when I am checking RenderTokenString() method, I got below exception

    Can you check the above code sample why _controller will be null and Can I miss any code to full _controller. Full sample code below for creating template.

    Please check the above samples and help me If I miss any interface or code, thanks!

  • Former Member
    0 Former Member in reply to Former Member

    SetController has the assignment backward, you need to assign your local _controller = controller, the passed in controller reference.

  • Former Member
    0 Former Member in reply to Former Member

    Thanks  , Its working and I can trigger mail with email template. Once again Thanks a lot....

  • Former Member
    0 Former Member in reply to Former Member

    Happy to help!

Reply Children
  • Hi Steven Heffner (sheffner),
    I am currently working on integrating Pendo analytics to calculate the Email Click-Through Rate for our Email Campaigns. I have developed a custom Email Template plugin for our Daily and Weekly Email Digests by following the guidelines provided at Telligent Community Developer Training(community.telligent.com/.../template-based-email).
    I have made progress with the custom template, but I've hit a roadblock with the event registration in the Initialize() method of the IPlugin interface. I'm uncertain about which specific event should be used to trigger the analytics and add the tracking parameters for the Daily and Weekly Digest emails.
    Could you please advise on the appropriate event to register for capturing the click-through data? Your guidance on this matter would be greatly appreciated.
    Thank you for your support.
    Best regards,
    Kavitha Rekkala