Assessment Notification Script

snowuser111
Kilo Guru

Hi,

I have notification for Assessment metrics (Survey) which triggers and survey is received in email. But I do not want to display the URL instead want to show Click here. On clicking "CLICK HERE" it should redirect the survey link.

______________________________________________________________________________

You have been invited to take the survey: ${metric_type}.  

Click here to take your survey:

<mail_script>

var link = new AssessmentUtils().getAssessmentInstanceURL(current.sys_id);

var url =   '<a href="' + link + '">' + link + '</a>';

template.print(url);

</mail_script>

To view your survey queue at any time, sign in and navigate to Self-Service > My Assessments & Surveys.

______________________________________________________________________________________________________________

Thanks

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Change this to include 'click here'



var url =   '<a href="' + link + '">' + 'Click Here' + '</a>';


View solution in original post

6 REPLIES 6

You can reference the originating record in the survey notification by using the ${trigger_id}.   For the link to the ticket it's ${trigger_id.URI_REF} or Item Requested For is ${trigger_id.u_requested_for}.



Good luck!


yana6
Kilo Explorer

Hi,


I currently try to rework the Survey User Invite notification, as described by snowuser11.


I followed your guidance and the what will it contain part is as described:



You have been invited to take the survey: ${metric_type}.  




Click here to take your survey:


<mail_script>


var link = new AssessmentUtils().getAssessmentInstanceURL(current.sys_id);


var url =   '<a href="' + link + '">' + Click here + '</a>';


template.print(url);


</mail_script>




To view your survey queue at any time, sign in and navigate to Self-Service > My Assessments & Surveys.



The email template received by the users doesn't contain a link at all - see below



You have been invited to take the survey: Instance - test survey 1.



Click here to take your survey:




To view your survey queue at any time, sign in and navigate to Self-Service > My Assessments & Surveys.



Where do i do things wrong?



I found it, so please, ignore my question.



Kind regards,


Yana