Announcement

Collapse
No announcement yet.

Provide Email Template conditionally

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • espcrm
    replied
    Originally posted by Kharg View Post
    espcrm with my extension you could make a template for that specific Vendor and it will grab the "To" address in the template.
    Sound good! Without playing with it, it hard to tell... my visual capability is quite bad so not sure but: in my imagination it is good at the moment. Sometime I forgot to delete the "To:" and "CC:" and it too late, can only hope for the best they can ignore the email.

    Leave a comment:


  • Kharg
    replied
    espcrm with my extension you could make a template for that specific Vendor and it will grab the "To" address in the template.

    of course it could also be adapted to cases like, it could take the Case primary contact email, but that's something I am not planning on doing for this extension.

    What can be done is adding a Contact filter to the template search so it will show templates for just the linked record contact/account/entity


    Maybe I could add filter settings in the Extension Settings menu, where you can select which fields to consider for the filter. I will think about it.
    Last edited by Kharg; 03-09-2023, 03:17 AM.

    Leave a comment:


  • espcrm
    replied
    You are not doing this automatic right?

    If it manual then one way (poor man workaround) I would achieve this is using "if" and giant text, DO NOT SEND, DO SOMETHING ELSE when certain status condition are not met.

    Otherwise Kharg seem to have some neat looking screenshot. I wonder if it can do relationship; for example if I a "Vendor" Contact in Case Entity, it will grab that person email instead of "All Contact" which is what Case is doing at the moment.
    Last edited by espcrm; 03-09-2023, 03:06 AM.

    Leave a comment:


  • Kharg
    replied
    This is what I made up until now:
    Template where you have to define Entity and Account, you can also prefill from/to/cc/bcc for the template
    Click image for larger version

Name:	image.png
Views:	291
Size:	44.9 KB
ID:	89033

    ​Option Menu to select enabled entities
    Click image for larger version

Name:	image.png
Views:	227
Size:	21.4 KB
ID:	89034

    Email Button added if the record account and entity matches
    Click image for larger version

Name:	image.png
Views:	161
Size:	35.4 KB
ID:	89035

    The modal will show all the related templates found
    Click image for larger version

Name:	image.png
Views:	222
Size:	26.6 KB
ID:	89036

    It will then open the email compose window
    Click image for larger version

Name:	image.png
Views:	238
Size:	37.1 KB
ID:	89037​​​​

    Leave a comment:


  • Kharg
    commented on 's reply
    Let me check if I can make my extension work globally without issues

  • shalmaxb
    commented on 's reply
    some hint, on how to achieve that?

  • Kharg
    replied
    I think it's definitely possible.
    I have my custom template extensions that opens up a modal and based on the account it shows just related templates, and after you select the template it will open the email compose windows.

    Leave a comment:


  • shalmaxb
    started a topic Provide Email Template conditionally

    Provide Email Template conditionally

    I have email templates, which have to be applied by purpose. For example, I want to send an invitation out of a certain entity and the user should be able only to use an email template, that was created for that purpose. The entity from which it will be sent has an enum field, to choose the purpose.

    So I look for a solution that works as: If the purpose choosen in the entity is A, only offer Templates marked with purpose A as well.

    Is there such a possibility? I do not look for any if condition inside the template, that would not work for my case.
Working...
X