Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Survey URL issue

GMoon
Kilo Sage

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

Harish KM
Kilo Patron
Kilo Patron

Hi @GMoon I think the issues lies with Survey URL, In URL you need to pass the sysid of the survey record which is failing at current testing.

Regards
Harish

Hi @Harish KM , thanks for your response.

I believe your are correct. Do you have the knowledge on how I may configure it correctly?

 

Hi @GMoon there is OOB email scripts which gives the survey url check this

Email script name: survey_url_script

Regards
Harish

Yes, I have located that. What should I do with it?