Need to modify Survey URL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2017 02:31 PM
We have a self-hosted instance that has our own URL https://servicenow.company.com vs the normal https://company.service-now.com. When viewing the Survey URL inside the survey definition we see https://company.service-now.com/xxx. This is also true for the link in emails when we assign a survey to someone. We have already changed the glide.email.override.url property and that fixed the link to incidents but did not change the survey feature. Thanks in advance for any assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2017 04:42 PM
The UI page survey_publish_url publish the URL for survey . Can you please provide the steps that you want to achieve ? You can refer to Re: The format for the URL is: [Instance URL]/survey_take.do?sysparm_survey=[Survey Name] What cha... .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2017 07:58 AM
Sumanta, thank you for the reply. We are trying to send surveys out by doing the following:
Survey > View Surveys opening a survey and click Assign Survey, then select a user. This sends an email to the selected user with a link to the survey. However, the email contains an invalid URL of https://company.service-now.com/xxx and we need it changed to point to our self-hosted URL of https://servicenow.company.com.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2017 12:12 PM
Navigate to "Email" - >"Notification " . Search for name "Survey User Invite" and open it . Under the section "what it will contain " you can see the code as below
<mail_script>
var link = new AssessmentUtils().getAssessmentInstanceURL(current.sys_id);
var url = '<a href="' + link + '">' + link + '</a>';
template.print(url);
</mail_script>
You can modified the URL as per your requirement . Just make sure by testing one URL ,that should take the user to complete the survey.
Or
Navigate to "Script include" then search for "AssessmentUtils" . Under the script you can see the URL formation under "getAssessmentInstanceURL " . Here you can override the URL formation with required host .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2017 05:59 PM
As Sumanta explain's Survey URL should be in the format [Instance URL]/survey_take.do?sysparm_survey=[Survey Name].
You can modify your survey instance url by navigating to Survey Management > Survey Instances.
ServiceNow wiki has more info on this Sharing Surveys - ServiceNow Wiki , please see if this might be helpful to you. Please let me know if you have any other concerns.