Provide Email Template conditionally
				
					Collapse
				
			
		
	X
- 
	
	
	
	
 Kharg, thank you very much. I will try to explain my case.
 I created a database app from espoCRM to manage a catalogue (raisoneé) for artwork, which I connect with a wordpress website. For the website I send images and data to the website by a special e-mail address in wordpress, where by a plugin posts will be created. This is a very comfortable way to maintain the website without API. I do not even have to touch the website at all, everything happens in the background and I am able to create new posts in seconds. And everybod can, you do not need to know anything about wordpress.
 The posts in Wordpress have a certain structure, which I can provide by an Email Template with placeholders, so that the correct data enters to the correct fields. For every Website I have up to 20 Templates (depending on the individual categories), which I have to choose manually to get the correct data-set regarding the kind of artwork and categories (painting, sculptur and so on).
 This manual process would be much better, if I by clicking the mail function in activities I could be presented right away the list view of these templates, which sit in a folder in templates entity.
 I see in the screenshots, that you trigger the email by a button up in the right corner, what would be even better.
 So, it would be ideal:
 1. click the button
 2. open the email client and a list view of the template folder
 3. choose the right template
 4. send
 Perhaps that is possible.
- 
	
	
	
	
 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.esforim with my extension you could make a template for that specific Vendor and it will grab the "To" address in the template.Leave a comment:
- 
	
	
	
	
 esforim 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:
- 
	
	
	
	
 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 esforim; 03-09-2023, 03:06 AM.Leave a comment:
- 
	
	
	
	
 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
 
 
 Option Menu to select enabled entities
 
 
 Email Button added if the record account and entity matches
 
 
 The modal will show all the related templates found
 
 
 It will then open the email compose window
  Leave a comment:
- 
	
	
	
	
 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:
- 
	
	
	
	
 Provide Email Template conditionallyI 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.Tags: None


Leave a comment: