Skip to main content
Closed for Voting

Use signature per product

Related products:Freshdesk
  • April 24, 2014
  • 13 replies
  • 40 views

Is it possible to use a picture or header to customize emails?


We use product to service projects of different clients. Therefore we use rules (dispatch)

to send out mails as confirmation of new tickets. These are not HTML text. Is there a way to implement a logo/header in this per product?


In the signature of answers in mails we would like to add a logo. Is this possible to automatically do this *per project*?


With regards,

Femke

13 replies

  • Community Debut
  • May 22, 2014

You can use a Freshplug to create unique signatures for the group that the ticket is assigned to. This is the standard code that I was provided by Freshdesk, which I then modified to fit our needs. Just replace the bolded parts with the name of your groups and then make any customizations to the signature that you want. A little explanation: Line 4 creates the signature for Group 1 and Line 5 creates the signature for Group 2. If you have more than 2 groups, just put another line below the lines for Group 1 and Group 2 and make the customizations you need. You will have to do a little coding (CSS) to get the formatting just right, but you are able to change fonts, colors, sizes, and insert images.


<div id="signature_change_widget"></div>

<script type="text/javascript">

var group_signature = {

"Group Name 1" : '<div class="custom_signature">Thank you.<br /><br />{{ticket.agent.name}} - Group Name 1<br /><br /><br /></div>',

"Group Name 2" : '<div class="custom_signature">Thank you.<br /><br />{{ticket.agent.name}} - Group Name 2<br /><br /><br /></div>'

};

jQuery(document).ready(function(){

if(jQuery('body').hasClass('ticket_details')){

chooseAndInsert();

jQuery('#signature_change_widget').parent().parent().hide();

}

jQuery('[data-note-type="reply"], [data-note-type="fwd"]').on('click', function(){

var note_type = jQuery(this).attr("data-note-type");

setTimeout(function(){

insertSignature(note_type);

},10);

});

 

jQuery('body').on("change.signature_change", '#helpdesk_ticket_group_id', chooseAndInsert);

 

});

function chooseAndInsert(){

setTimeout(function(){

if(jQuery('#cnt-reply-body').data('redactor'));

insertSignature('reply');

if(jQuery('#cnt-fwd-body').data('redactor'));

insertSignature('fwd');

},1);

}

 

function insertSignature(note_type){

var reply_editor = jQuery('#cnt-'+note_type+'-body').data('redactor');

var reply_html = jQuery('<div>' + reply_editor.$editor.html() + '</div>');

var selected_val = jQuery('#helpdesk_ticket_group_id').val();

if(selected_val){

var selected_group = jQuery('#helpdesk_ticket_group_id')

.find('option[value="'+selected_val+'"]').text();

var signature_html = group_signature[selected_group];

var custom_signature = reply_html.find('div.custom_signature');

if(custom_signature.length){

jQuery(custom_signature).replaceWith(signature_html);

}

else{

if(note_type == 'fwd'){

jQuery(signature_html).insertBefore(reply_html.find('div.freshdesk_quote'));

}

else if(note_type == 'reply'){

jQuery(signature_html).insertAfter(reply_html.find('div:last'));

}

}

reply_editor.setCode(reply_html.html());

}

}

</script>


  • Community Debut
  • August 6, 2014

I created a FreshPlug with your description, but it doesn't work. The tickets are assigned to the groups. What have I overseen?

  

<div id="signature_change_widget"></div>
<script type="text/javascript">
var group_signature = {
"German" : '<div class="custom_signature">Beste Grüße,<br /><br />{{ticket.agent.name}} - German<br /><br /><br /></div>',
"English" : '<div class="custom_signature">Kind regards,<br /><br />{{ticket.agent.name}} - English<br /><br /><br /></div>'
"French" : '<div class="custom_signature">Meilleures salutations,<br /><br />{{ticket.agent.name}} - French<br /><br /><br /></div>'
"Spanish" : '<div class="custom_signature">Cordialmente,<br /><br />{{ticket.agent.name}} - Spanish<br /><br /><br /></div>'
};
jQuery(document).ready(function(){
if(jQuery('body').hasClass('ticket_details')){
chooseAndInsert();
jQuery('#signature_change_widget').parent().parent().hide();
}
jQuery('[data-note-type="reply"], [data-note-type="fwd"]').on('click', function(){
var note_type = jQuery(this).attr("data-note-type");
setTimeout(function(){
insertSignature(note_type);
},10); 
});
 
jQuery('body').on("change.signature_change", '#helpdesk_ticket_group_id', chooseAndInsert);
 
});
function chooseAndInsert(){
setTimeout(function(){
if(jQuery('#cnt-reply-body').data('redactor'));
insertSignature('reply');
if(jQuery('#cnt-fwd-body').data('redactor'));
insertSignature('fwd');
},1);
}
 
function insertSignature(note_type){
var reply_editor = jQuery('#cnt-'+note_type+'-body').data('redactor');
var reply_html = jQuery('<div>' + reply_editor.$editor.html() + '</div>');
var selected_val = jQuery('#helpdesk_ticket_group_id').val();
if(selected_val){
var selected_group = jQuery('#helpdesk_ticket_group_id')
.find('option[value="'+selected_val+'"]').text();
var signature_html = group_signature[selected_group];
var custom_signature = reply_html.find('div.custom_signature');
if(custom_signature.length){
jQuery(custom_signature).replaceWith(signature_html);
}
else{
if(note_type == 'fwd'){
jQuery(signature_html).insertBefore(reply_html.find('div.freshdesk_quote'));
}
else if(note_type == 'reply'){
jQuery(signature_html).insertAfter(reply_html.find('div:last'));
}
}
reply_editor.setCode(reply_html.html());
}
}
</script>

 


  • Contributor
  • September 1, 2014

The code above works very well for us as a Freshplug.


But Freshdesk, can you please implement this feature in the application itself so that it easier to edit the group signatures?


  • Community Debut
  • September 1, 2014

Yes, now it works. Before there was an internal bug that affected the code. It's really great and saves us a lot of time. 


  • Community Debut
  • January 5, 2015

This works but it does not work for the iPhone app. This should be native in freshdesk.


  • Community Debut
  • September 26, 2015

I am not too sure I understand how this works.


So I create a freshplug with the script provided above and edit the group names at the top.

Then after the end of the script tag ( </script> ) I can start with my html/css code (<style type="text/css"> ....) to create the actual html signature.


What I did not understand is how to make sure that the freshplug just created will be assciated as a signature to each email sent from that specific group.


In fact it is not working if i respond to a ticket associated to that group.


am i missing something?


please help.




  • Community Debut
  • August 29, 2016

very useful plugin indeed, but this plugin does not apply to outgoing emails. can this feature please be added too?


Hello all,


I'm adding this feature request to our product backlog, will respond back on implementation timeline later.


Thanks,

Sudha


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12
Please follow the ongoing discussion threadhere.

Is there an updated solution for the new "Mint" interface?  I used this on the old and it was fantastic!  I love the idea of custom signatures based on each product.  I'd hate to lose this hack feature. :o)


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

Hello Kyle,


Please have a look at the Signature management app. This allows you to manage multiple signatures and make them available for a specific group/product.


Cheers!


Thanks Aravind!  That looks to be exactly what I need.  Appreciate the time and help.


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

Happy to be of some help, @Kyle:)


Cheers!