The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How do I change the survey link in my email script?

velvet
Mega Guru

For my email notification for surveys their is an email script shown below.  I need to change or add a survey link to it but don't know where(new to scripting).  Can someone show me where I should put my survey link at so that when the Take Survey button is selected it goes to the correct survey.

 

(function runMailScript(current, template, email, email_action, event) {
 template.print('<p><font size="4" color="#999999" face="helvetica">');
 template.print(gs.getMessage('We value your input. Please help us by taking the time to fill out this short survey') + ':');
 template.print('</font></p>');
 template.print('<p><font face="helvetica">');
 template.print('<a style="font-size: 16px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; background-color: #278efc; border: 1px solid #0368d4; display: inline-block; padding: 5px" href="${event.parm2}">' + gs.getMessage('Click here to take the survey') + '</a>');
 template.print('</font></p>');
})(current, template, email, email_action, event);

find_real_file.png

1 ACCEPTED SOLUTION

Hi,

 

Yes that can be done via the email script and the template. But this requires a lot of coding part in the inbound action to capture the responses. Also user should not change any question that was sent via email.

 

There was another issue with the characters limit in the email which are sending via the template. Till outlook 2010 there is a character limitation of approximately 1350 if the character limit exceeds then the link won't work.

 

Regards,

Ram M

 

View solution in original post

4 REPLIES 4

rammohanraomadd
Kilo Guru

HI,

 

Survey link is updated in the Event Parameter 2. Below is one that is marked on bold:

 

 template.print('<a style="font-size: 16px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; background-color: #278efc; border: 1px solid #0368d4; display: inline-block; padding: 5px" href="${event.parm2}">' + gs.getMessage('Click here to take the survey') + '</a>'); 

 

For parameter check it in business rule from where the event is getting triggered.

 

Regards,

Ram M

Ok thanks.. Next part is, In SN can we put the survey questions in the email so that the only thing the end user has to do is open the email and the questions are there in the email instead of clicking, Take Survey.. They want to have less clicks.... And if this can be done can the responses be tracked?

Hi,

 

Yes that can be done via the email script and the template. But this requires a lot of coding part in the inbound action to capture the responses. Also user should not change any question that was sent via email.

 

There was another issue with the characters limit in the email which are sending via the template. Till outlook 2010 there is a character limitation of approximately 1350 if the character limit exceeds then the link won't work.

 

Regards,

Ram M

 

I have the same issue . When I checked the business rule for the event and its param it has gs.eventQueue('task.send_survey', task, recipient, surveyURL); in BR.Not sure if it is the same you are referring to. But I'm stuck at the same point and not sure where to edit the Survey URL for the email script since "Click here to take the survey " button just loops in the same page and don't display survey questionnaire. Can you help me?