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 service portal change to 'customer' portal

Twan
Tera Contributor

By default the link for a survey is set to the default SP like below, but in our case we have multiple customer portals (CSM) 

https://****.service-now.com/sp?id=public_survey&instance_id=123456789

So in my case i would like to sent a link related to customera or customerb.

https://****.service-now.com/customera?id=public_survey&instance_id=123456789
https://****.service-now.com/customerb?id=public_survey&instance_id=123456789

How should a script look like to get the right link created.

Thanks

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @Twan ,

Open the survey  form   and click on "View Survey Url" in the related links . Thats should display the URL which open the survey in service portal . Also you can refer to "Survey user invite" OOB email notification . 

<mail_script>
var html = new AssessmentUtils().getInstanceLinkHTML(current);
template.print(html);
</mail_script>

 

Or Use something like below:

var link = gs.getProperty('glide.servlet.uri') + 'csm?id=take_survey&instance_id=' + current.sys_id;

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

HI @Twan ,

You can add Survey widget in CSM portal to get the surveys in csm portal.

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Twan
Tera Contributor

Thanks Sandeep,

The widget is already implemented and functional, but i like to send a link to the contacts with the correct url to the right portal.

This part is still missing :).

 

Community Alums
Not applicable

Hi @Twan ,

Open the survey  form   and click on "View Survey Url" in the related links . Thats should display the URL which open the survey in service portal . Also you can refer to "Survey user invite" OOB email notification . 

<mail_script>
var html = new AssessmentUtils().getInstanceLinkHTML(current);
template.print(html);
</mail_script>

 

Or Use something like below:

var link = gs.getProperty('glide.servlet.uri') + 'csm?id=take_survey&instance_id=' + current.sys_id;

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep