Survey URL issue

GMoon
Tera Guru

Hi all,

 

We have begun testing our surveys and have run into a snag. The snag being that when a user clicks the survey url within the email, it does not route to that specific ticket survey. It is going to a survey but not the one pertinent to their ticket. Our config is as follows:

Ticket is resolved, email notification is sent. Within the email notification we have a mail script containing the url to the survey, obtained from the 'View survey URL' related list. 

 

Does anyone know where the issue lies? Thanks!

1 ACCEPTED SOLUTION

Hi @GMoon in that case create a new email script with below code and call this script in your notification. I assume your notification is on assessment_instance table.

Script:

  //esc = portal URL

var url = 'esc?id=take_survey&instance_id=';
var link = '<a href="'+ gs.getProperty('glide.servlet.uri') + url + current.sys_id + '">' + 'Click here to start the survey' +  '</a>';
template.print(link);
Regards
Harish

View solution in original post

12 REPLIES 12

Hi @GMoon you could call this notification email script inside your survey notification which will provide you the survey link

Regards
Harish

Hi @GMoon the below is the syntax. Place the below code in your notification

 
${mail_script:survey_url_script}
Regards
Harish

Thanks for your continued support.
I have a slight issue calling the OOB script as we have images of multi coloured thumbs in the existing script, which don't pass into the notification if I use the OOB (see below for comparison)

OOB.PNG

------------------------------------------------------------------------------------------------------------------

Thumbs config.PNG

Hi @GMoon in that case create a new email script with below code and call this script in your notification. I assume your notification is on assessment_instance table.

Script:

  //esc = portal URL

var url = 'esc?id=take_survey&instance_id=';
var link = '<a href="'+ gs.getProperty('glide.servlet.uri') + url + current.sys_id + '">' + 'Click here to start the survey' +  '</a>';
template.print(link);
Regards
Harish

Thank you for the script. Our notifications can go from two tables, incident and sc_req_item.

 

Can you script above be converted to work against those two tables?