Skip navigation
1 2 3 Previous Next

Community Blogs

1,210 posts

You can update incident number as well as other incident information on your survey page.

Note: This is not only related to incident, you can even update your custom table information over the survey page.

 

Few things you need to change

  • You need to write jelly code in "assessment_take2" UI Page.
  • Add UI page client script variable in your survey introduction field.

 

Here you go..

 

UI Page: 

 

System UI >> UI Page >> search for "assessment_take2"

 

UI Page.png

 

  • Add Jelly script in html section.

Kindly add the script before the starting of <g2:evaluate> tag. refer the screenshot below.

 

ui page code.png

 

 

<!-- update incident Number on survey page -->

 

<g:evaluate var="jvar_task_record_sys_id">

var gr = new GlideRecord("asmt_assessment_instance");

gr.get(instance);

var task_record = "";

var task_table = "";

if(gr.trigger_table){

var tr = new GlideRecord(gr.trigger_table);

if(tr.get(gr.trigger_id)){

task_table = tr.getClassDisplayValue();

task_record = tr.getDisplayValue();

}

}

task_record;

</g:evaluate>

 

<!-- update incident category on survey page -->

 

<g:evaluate var="jvar_task_record_sys_id1">

var gr = new GlideRecord("asmt_assessment_instance");

gr.get(instance);

var inc_cat = "";

if(gr.trigger_table){

var tr = new GlideRecord(gr.trigger_table);

if(tr.get(gr.trigger_id)){

inc_cat = tr.category.getDisplayValue();

}

}

inc_cat;

</g:evaluate>

 

  • Adding html hidden field to save the <g:evaluate> variable value. here we need to add the html field in <g:ui_form> tag

Note:  The <g:evaluate> tag is used to evaluate an expression written in Rhino JavaScript and sometimes to set a variable to the value of the expression.The last statement in the expression is the value the variable will contain.

 

                 <!-- added one hidden html field -->

<input type="hidden" id="task_record_sys_id" name="task_record_sys_id" value="${jvar_task_record_sys_id}" />

<input type="hidden" id="task_record_sys_id1" name="task_record_sys_id1" value="${jvar_task_record_sys_id1}" />

 

html field.png

 

  • In UI Page there is one section called client script ,there you need to mention the client script. the value we had saved in html field need to get into client script then we will use that variable in survey page.

 

gel('task_record_sys_id123').innerHTML += gel('task_record_sys_id').value;

gel('task_record_sys_id1234').innerHTML += gel('task_record_sys_id1').value;

 

client script.png

 

  • Open your survey that you have build. just for the testing i am going to make the changes in OOTB survey "Change Request Satisfaction Survey". there is one field called Introduction, here we will save the variable that had mentioned in your ui page client script.

Note: The introduction field is html type of field so kindly click on "source code" (icon will be "<>")  button. and paste the code below there.

 

<p> </p>

<table>

<tbody>

<tr>

<td>Number :</td>

<td id="task_record_sys_id123" style="color: red;"> </td>

</tr>

<tr>

<td>Category :</td>

<td id="task_record_sys_id1234" style="color: green;"> </td>

</tr>

</tbody>

</table>

<p></p>

<p> </p>

 

 

 

survey page field.png

 

html code.png

 

Final result:

 

Final result.png

 

Please let me know if anyone need some help related to survey.

Thanks,
Harshvardhan

Hit correct/helpful based on impact.

As a system administrator have you ever needed to know your current SessionID? Sure, you can find it using a number of different ways, but what about a quick way?

As admin user go to System Definition -> Scripts Background and run:

gs.print(new GlideSession().get().getSessionID());

 

or:

 

gs.print(gs.getSession().getSessionID());

 

The output would be something like below:

 

[0:00:00.000] Script completed in scope global: script
*** Script: 9718BE3F3763830095E39C4683990EC1

 

And, if you also needed to know the application node where you're logged in (of course you can find that from stats.do) you could do:

 

var gr = new GlideRecord('syslog_transaction');
gr.addEncodedQuery('sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()');
gr.addQuery('session', new GlideSession().get().getSessionID());
gr.orderByDesc('sys_created_on');
gr.setLimit(1);
gr.query();
if (gr.next())
  gs.print('SessionID: ' + gr.session.toString() + ' on application node: ' + gr.system_id.toString().split(':')[1]);

 

The output would be something like below:

 

[0:00:00.024] Script completed in scope global: script
*** Script: SessionID: 41CB932F37E7430095E39C4683990EEF on node: empspanaite006

Best Regards,
Sergiu

Visit my community blog:
https://community.servicenow.com/people/sergiu.panaite/content

or personal blog:
http://bitsofcode.io

Have a performance issue? Challenge me!

This post covers few basic use cases related to dates mostly used in Service Catalog or Change Management.

I have seen a lot of questions in community, where we want to validate a date or we want to default a date field to a future date.

I have gathered few such scenarios and tried to provide solutions with the help of community answers and my experience.

 

Most of them are using GlideAjax and onChange Client Script.

If you want to perform validation while record submission as well, you should use them in an onSubmit Script.

Note: While using them in an onSubmit script, use getXMLWait() instead of a callback function. Because an onSubmit will not wait for a callback since callbacks are asynchronous.

If you don't want to write another onSubmit script, you can set the field value blank when validation fails by using g_form.setValue('start_date',''), so that user must enter a another date.

 

All the client scripts are doing a GlideAjax call to a script include 'DateTimeFunc'.  Make sure you set the UI Type to All in client script to make it work in Service Portal.

Following are the functions defined in the script include.

 

1. addTime: If you want to add time to your end date based on start date selection

 

2. addTimeSchedule: If you want to add time to your end date, but the end date shouldn't fall during weekends or off hours. The schedule must be there is cmn_schedule table.

 

3. ValidateLeadTime: If you want to validate a lead time. For example, most of the organizations wants a lead time of 2 weeks for a comprehensive change. So while submitting a change, requester should choose a planned start date which is after 2 weeks from today.

 

4. CompareDates: When you want to compare any two dates and find out which is greater

 

5. ValidateBlackOuts: When you want your request or change implementation date doesn't fall in a blackout window.

 

I will keep improving the script based on your feedback and suggestions and add any other use cases related to dates which are used frequently.

 

Use Case 1: I want to set a default date

 

Set default value of the variable (Catalog Item) or field (Table) to below.

 

Add 14 days to current date

javascript:var cdt = new GlideDateTime();cdt.addDays(14);cdt.getDisplayValue();

 

Set date to current date with time '12:00:00'

javascript:var cdt = new GlideDateTime();cdt.getDisplayValue().split(' ')[0] + ' 12:00:00';

 

Use Case 2: I want to set end date based on start date

 

Script Type: Client Script

Type: OnChange

Variable/Field Name: start_date

UI Type: All

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

var ga = new GlideAjax('DateTimeFunc');
ga.addParam('sysparm_name', 'addTime');
ga.addParam('start_date', newValue);
ga.addParam('time_to_add', '86400'); // Add 24 hours
ga.getXML(getEndDate);
}

function getEndDate(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
g_form.setValue('end_date',answer);
}

 

 

Use Case 2.1: I want to set end date based on a Schedule

 

Script Type: Client Script

Type: OnChange

Variable/Field Name: start_date

UI Type: All

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}


var ga = new GlideAjax('DateTimeFunc');
ga.addParam('sysparm_name', 'addTimeSchedule');
ga.addParam('start_date', newValue);
ga.addParam('time_to_add', '86400'); // Add 24 hours. If it is a 9*5 schedule (8 hrs per day), it will add 3 business days to start date
ga.addParam('schedule','8-5 weekdays'); // You must have a record of the schedule in cmn_schedule table
ga.getXML(getEndDate);
}


function getEndDate(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
g_form.setValue('end_date',answer);
}

 

Use Case 3: I want a Lead Time validation for date entered by requestor

 

Script Type: Client Script

Type: OnChange

Variable/Field Name: start_date

UI Type: All

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.hideFieldMsg('start_date');
var start_date = g_form.getValue('start_date'); 
var ajax = new GlideAjax('DateTimeFunc');
ajax.addParam('sysparm_name', 'ValidateLeadTime');
ajax.addParam('start_date', start_date);
ajax.getXML(validateDate);

}


function validateDate(response){
var answer = response.responseXML.documentElement.getAttribute("answer");

if (answer==1)
g_form.showFieldMsg('start_date',"The start date can't be in past",'error');
else if (answer==2)
g_form.showFieldMsg('start_date',"Please consider at least 2 weeks of lead time",'error');
}





 

 

Use Case 4: I want to Validate Start Date < End Date

 

Script Type: Client Script

Type: OnChange

Variable/Field Name: end_date

UI Type: All

 

function onChange(control, oldValue, newValue, isLoading) {

if (isLoading || newValue == '') {
return;
}
g_form.hideFieldMsg('end_date');
var ga = new GlideAjax('DateTimeFunc');
ga.addParam('sysparm_name', 'compareDates');
ga.addParam('start_date', g_form.getValue('start_date'));
ga.addParam('end_date', g_form.getValue('end_date'));
ga.getXML(getEndDate);
}


function getEndDate(response) {

var answer = response.responseXML.documentElement.getAttribute("answer");

if (answer=='true')
g_form.showFieldMsg('end_date','End date should be after start date','error');
}

 

Use Case 5: Date requested shouldn't fall in Blackout Windows

 

Script Type: Client Script

Type: OnChange

Variable/Field Name: start_date

UI Type: All

 

function onChange(control, oldValue, newValue, isLoading) {

if (isLoading || newValue == '') {
return;
}
g_form.hideFieldMsg('start_date');
var ga = new GlideAjax('DateTimeFunc');
ga.addParam('sysparm_name', 'ValidateBlackOuts');
ga.addParam('start_date', newValue); //Pass the date you want to validate
ga.getXML(isBlackout);

}


function isBlackout(response) {

var answer = response.responseXML.documentElement.getAttribute("answer");
if (answer=='true')
g_form.showFieldMsg('start_date','Please select a date outside blackout window','error');

}

 

 

 

Script Include

Name : DateTimeFunc

Client Callable: true

Application: Global

 

var DateTimeFunc = Class.create();
DateTimeFunc.prototype = Object.extendsObject(AbstractAjaxProcessor, {


addTime: function() {
// Get the Start Date
var start = this.getParameter('start_date');
var timeToAdd = this.getParameter('time_to_add');
var gdt = new GlideDateTime();
gdt.setDisplayValue(start);


//add time to Start Date
gdt.addSeconds(timeToAdd); 

//Return the End Date to Client Script
return gdt.getDisplayValue();
},


addTimeSchedule: function() {


var start = this.getParameter('start_date');
var timeToAdd = this.getParameter('time_to_add');
var sch = this.getParameter('schedule');
var gdt = new GlideDateTime();
gdt.setDisplayValue(start);


//Get a schedule by name to calculate duration
var schedRec = new GlideRecord('cmn_schedule');
schedRec.get('name', sch);
if (typeof GlideSchedule != 'undefined')
    var sched = new GlideSchedule(schedRec.sys_id);
else
    var sched = new Packages.com.glide.schedules.Schedule(schedRec.sys_id);


//Set the amount of time to add (in seconds)
durToAdd = new GlideDuration(timeToAdd*1000);
var newDateTime = sched.add(gdt, durToAdd, '');

//Return the new date
return newDateTime.getDisplayValue();
},


ValidateLeadTime: function() {
var se_start_date = this.getParameter('start_date');


var opened_date = gs.nowDateTime();

var currentDateTime = new GlideDateTime();
currentDateTime.setDisplayValue(opened_date);

var start_date = new GlideDateTime();
start_date.setDisplayValue(se_start_date);

if (se_start_date!='' && start_date<currentDateTime)
{
return 1; // Start Date Entered is in past
}
else if (se_start_date!='')
{
var dc = new DurationCalculator();

dc.setStartDateTime(currentDateTime);

if (!dc.calcDuration(14*24*3600))            // Add 2 weeks
gs.log("*** Error calculating duration");

var newDateTime = dc.getEndDateTime();
if (start_date < newDateTime)
{
return 2; // Date entered is within the 2 weeks of lead time
}
}
},


compareDates: function() {
var chg_start_date = this.getParameter('start_date');
var chg_end_date = this.getParameter('end_date');

if (chg_start_date > chg_end_date)
{
return true;
}
return false;
},

ValidateBlackOuts: function() {


var ch_start_date = this.getParameter('start_date');
var start_date = new GlideDateTime();
start_date.setDisplayValue(ch_start_date);


var g = new GlideRecord('cmn_schedule');


var q = g.addQuery('name', 'Year-End Freeze');
q.addOrCondition('name','IT Infrastructure Blackouts');
g.query();


while (g.next()) {
var sched = new GlideSchedule(g.sys_id);
if (sched.isInSchedule(start_date)){
return true;
}
}
return false;
},
});

While the community is a great resource for customer testimonials and unconventional solutions around the platform, the Knowledge Base is home for ServiceNow-created content. In the Knowledge Base you can count on the information coming straight from the source. That being said, you may not always get the news you want to hear from us in the KB, as opposed to a "workaround" shared on the community. Of course, always approach with caution when venturing into your own customizations.

kb solutions 2017.jpg

 

10 most popular Knowledge articles of 2017

    1. Contextual search on record producers does not work in Service Portal

      Service Portal is a fan favorite. Many users this year were baffled by their contextual search not working on record producers. But not a lot of you knew that UI Macros don't work on Service Portal.  In ServiceNow KB: Contextual search on record producers does not work in Service Portal (KB0610534)  you received a XML file with for a contextual search widget.

    2. Known Error Portal

      The Known Error portal is THE place to get the top known issues that may be effecting your ServiceNow instance. It's no surprise that the portal was one of your top go-tos in the Knowledge Base during 2017. See ServiceNow KB: Known Error Portal (KB0597477) for all of the higher impact known issues that could effect you when moving from one release to the next.

    3. Document ID field types are showing sys_id instead of display field when marked read-only

      When a document id field is set to read only via ACL or dictionary, sever side methods, the field shows the sys_id instead of the display value when viewed in a form. In ServiceNow KB: Document ID field types are showing sys_id instead of display field when marked read-only. (KB0636102) you are advised from using the dictionary and to use a workaround instead.

    4. Two-column layout of variables in the Service Portal does not match the layout in the instance

      Several of you were running into the "Two column alternate Instance" showing a header field followed by four fields in a two-column, alternating-side layout with two fields per column. Yet, in the Service Portal, it shows one field in the first column and three fields in the second column. The ServiceNow team gave some insight and advice as to what you can expect from Service Portal functionality vs. Platform in ServiceNow KB: Two-column layout of variables in the Service Portal does not match the layout in the instance (KB0610332…

    5. Unable to add or import groups to a domain separated instance after upgrading

      This issue is specific to those with Domain Support enabled. During the upgrade, group data might be unavailable to users in non-global domains. This is due to the group table being  temporarily used as the domain table. Customer Support will need to be contacted to help with this, but shouldn't be an issue in our latest release. See ServiceNow KB: Unable to add or import groups to a domain separated instance after upgrading (KB0623425) for more info.

    6. Service Portal: Variable set not hidden with g_form.setDisplay() function in a Catalog Client Script

      In Service Portal, variable set is not hidden when using g_form.setDisplay(, false) in a Catalog Client Script. The ServiceNow team gave some insight and advice as to what you can expect from Service Portal functionality vs. Platform in ServiceNow KB: Service Portal: Variable set not hidden with g_form.setDisplay() function in a Catalog Client Script (KB0…  but the update set in Service Catalog on Service Portal  may help you get close.

    7. action.setRedirectURL and producer.redirect do not work on Service Portal

      This issue is currently under review, but in the short term it's good to note that Service Portal does not currently maintain a navigation stack and so action.redirect and producer.redirect are not relevant to it. However, it is fixed in Jakarta ServiceNow KB: action.setRedirectURL and producer.redirect do not work on Service Portal (KB0621041).

    8. All pa_snapshots for an indicator are deleted

      On a new or upgraded Istanbul instance, unlinking a breakdown from an indicator deletes all pa_snapshots for that indicator. In ServiceNow KB: All pa_snapshots for an indicator are deleted (KB0621762) it walks you through how to reprocess those deleted images.

    9. Connect conversation (in full view) can cause requests to flood the default semaphore queue and cause other requests to be rejected on the affected node (429 errors)

      You know what's worst thank shaky hands? Flooding the default semaphore queue! Restart the affected node, and follow the steps in ServiceNow KB: Connect conversation (in full view) can cause requests to flood the default semaphore queue and cause oth… to prevent this from happening in the future.

    10. Icons are wrong after upgrading, as the server always sends a ‘304 Not Modified’ response even when the icon font has actually changed

      For font file resources such as SourceSansPro and retina_icons, the server ALWAYS responds with a '304 Not Modified' response, even if the file actually has changed. This means that after upgrading from Geneva to Helsinki (where the icon fonts have changed) users will continue using the old Geneva icon font and that all icons throughout the interface are wrong. Depending on the number of users affected, you can leverage the workarounds in ServiceNow KB: Icons are wrong after upgrading, as the server always sends a '304 Not Modified' response even when the i…

 

That being said, I think 2018 is going to have a wealth of solutions! Check out Best of 2016: 10 most popular Knowledge article solutions and workarounds for last year's most popular solutions.

A new ServiceNow release – Kingston - is now available, delivering exciting new capabilities that drive:

 

Kingston-Value-Prop-969x545-v1.png

 

 

Check out the details for the Now Platform™ and new capabilities by product.

 

 

Now Platform

 

  • Agent Intelligence:  Delivers a supervised machine learning capability to accurately categorize, prioritize, and assign incidents and cases reducing resolution times, minimizing human error, and improving customer satisfaction. It uses an organization’s own data to create predictive models. The accuracy of models increases over time, with more data to train with.

  • Flow Designer: Enables no code development by allowing any process analyst, IT generalist, or non-traditional developer to create and manage reusable codeless business process flows like approval automation, ServiceNow data manipulation, and schema-based data abstraction on the Now Platform.

  • IntegrationHub: Our next generation Orchestration capability facilitates connection of ServiceNow flows to external services by creating a link between Flow Designer and 3rd party systems to allow anyone to author natural language based codeless flows. Includes packaged integrations for Slack, Microsoft Teams, and HipChat.

  • MetricBase Enhancements: Include twenty-five new functions - such as minimum, maximum, aggregate – to analyze time series data; ability to define static thresholds to trigger events; enhanced reporting, including new Performance Analytics reports.

  • Edge Encryption enhancements: New dashboard provides better proxy insight and support for journal fields when adding attachments.

  • Guided Tour Designer Enhancements: Include tour auto-start and tour usage reporting for better insights.

 

IT Service Management

 

  • Agent Intelligence for IT Service Management: Supervised machine learning capability speeds time to resolution by automating IT incident categorization and routing, resulting in faster response time, lower error rates and enhanced satisfaction for employees and agents. Administrators can automate incident categorization and routing in less than a day, using historical data.

  • Major Incident Management: Provides an end-to-end process workflow for rapid resolution of high-impact incidents via better integration of Incident, Incident Alert and Outage capabilities. Includes a new workbench that consolidates critical information to simplify communication and collaboration for business and technical stakeholders. This feature is a part of the Incident Management application.

  • Benchmarks - Recommendations: Improves service performance with personalized, actionable recommendations based on Benchmarks data. Recommendations can be implemented using Guided Setup for step-by-step assistance.

  • Service Catalog - End-user Experience Updates: Single-click access to wish lists and order status, multi-product packaging, easy mobile ordering, and a search-first capability simplify ordering.

  • Integration with IBM Watson Conversation Service: Provides those already using IBM Watson a text and natural language-based virtual agent capability for requesting IT services through ServiceNow Connect Chat. This proof of concept is available on ServiceNow Share.

 

IT Operations Management

 

  • Service Mapping - Traffic-based Discovery:  Speeds service mapping adoption and accuracy by first automatically identifying service mapping candidates through traffic-based discovery and later generating and refining the initial service maps with network information and machine-learning algorithms.

  • Service Mapping - Guided User Experience:  Delivers faster time to service visibility by guiding users through the process of simultaneously mapping multiple services and refining service maps in a simple, new user interface.

  • Event Management - Performance Analytics KPIs: New KPIs, such as average open alerts, average time for alerts, and percentage of new critical alerts, offer greater insight into alert activity and response effectiveness. Requires a Performance Analytics license.

  • Application Content Import: Allows adding application content from the ServiceNow Store, such as Service Mapping patterns and Cloud Management integrations, independent of ServiceNow releases and as the content becomes available.This feature is a part of the Service Mapping and Cloud Management applications.  

 

IT Business Management

 

  • Project Portfolio Management - Project Workspace: Simplifies the process of understanding and managing the entire project workload using a single-pane home page that aggregates functions and is fully customizable.

  • Agile Development - Sprint and Backlog Management:  Supports agile environments with easy sprint planning and drag-and-drop backlog management without need for 3rd party tools. Includes story filters, epic filters, and drag-and-drop rankings.

  • Application Portfolio Management - Capability Based Planning:  Provides new insights and improves communication and planning by mapping applications to the strategic business capabilities that they support.

  • Application Portfolio Management - Technology Portfolio Management: Calculates risks and ongoing technology cost implications for business applications to improve planning and optimize spend. Leverages Software Asset Management data to track the technology lifecycles from general availability through end-of-life.

  • Financial Planning - Budgeting and Forecasting enhancements: Enables analyzing budget and forecast data by multiple elements and time periods; simplifies ease of use with spreadsheet-like grid interface and drag-and-drop selection.

 

Software Asset Management

 

  • New Publisher Packs:  IBM and VMware publisher packs add to existing Microsoft and Oracle publisher packs introduced in Jakarta to bring more software licenses under management and help reduce the risk and cost of managing software assets.

  • Office 365 Subscription Management: Provides the ability to manage license costs and consumption for Microsoft Office365 alongside Microsoft on-premise software licenses.

  • Blacklisted Software Discovery: Facilitates ability to enforce employee compliance by removing unwanted software that hinders employee productivity or introduces known security vulnerabilities.

  • Reconciliation Grouping Dimensions: Provides ability to organize software assets by business unit, cost center and geography for cost allocation and usage-based chargebacks.

  • Custom License Metrics: Offers flexibility to track unconventional consumption measures like index volume and number of facilities for any industry-unique or custom-built software.

  • Content Library Improvements: Includes 140,000 additional normalization rules, for higher visibility and control of the environment, and out-of-box content to identify software publisher licensing bundles. 

 

Performance Analytics

 

  • Text Analytics: Provides insight into unstructured data in user-entered text fields via word cloud visualizations that surface frequently used words. Drill down on specific words to identify trends and associations and take action by clicking into related records.

  • Increased Access to 3rd-party Data Sources: Offers expanded insight by importing data from MySQL, Oracle, and SQL Server databases to use in combination with ServiceNow indicators and breakdowns.

  • Analytics Administrator Console: Tiled interface streamlines the analytics admin user experience with easy access to create and manage content across the Now Platform.

 

Security Operations

 

  • Configuration Compliance: New application enables identification and remediation of vulnerable misconfigured software for improved security posture.  Correlates assessment data from Qualys with the ServiceNow CMDB, prioritizes non-compliant items with risk score calculator, and allows for remediation using workflows, automation, and orchestration. Configuration assessment data can also be sent to ServiceNow Governance, Risk, and Compliance for continuous monitoring.

  • Security Incident Response - End-to-End Phishing Response: Remediate user-reported email attacks quickly by pulling security observables from an email file to perform enrichment activities such as threat intelligence correlation and internal sightings search.  Allows corrective actions like search-and-delete of other message copies on the mail server from within ServiceNow.

 

Governance, Risk and Compliance

 

  • Continuous Monitoring: This feature is part of the Compliance Management and Risk Management applications. Prevents “compliance drift” and maintains an optimal security posture by leveraging the capabilities of Configuration Compliance (the new Security Operations application).  Enables continuous detection of technical control changes, and the ability to respond to, review, and monitor automatically generated issues in the Policy and Compliance dashboard and the associated risks in the Risk Management dashboard.

  • Out-of-box Content for Sarbanes Oxley (SOX):  Streamlines SOX compliance, assessments, and audit with new templates, indicators, and SOX-specific reporting.

  • Enhancements for both Policy and Compliance Management and Risk Management:  New heat map provides better visualization and prioritization of risks; improved risk acceptance capabilities and new policy exception workflows speed identification of critical risks.

 

Customer Service Management

 

  • Agent Intelligence for Customer Service Management:  Speeds time to case resolution by automating case categorization, prioritization, and assignment with supervised machine learning resulting in faster response time, lower error rates, and enhanced agent and customer satisfaction.

  • Flow Designer for Customer Service Management and Field Service Management: Simplifies the automation of common tasks like timing-driven task creation, SLA-driven escalation, and technician arrival work note creation to increase efficiency by using a codeless, user-friendly approach suitable for both coders and non-coders.

  • Customer Service Management - Escalation Management: Puts focus on problematic cases and accounts to reduce customer frustration. Using a customizable workflow, enables the complete management of the entire lifecycle of critical issue – from escalation to de-escalation and closure.

  • Customer Service Management - Role-based Dashboards:  Provides executives, managers, and agents out-of-box, job-specific KPIs to help them address service issues promptly. KPIs include: at-risk accounts, costs, average time-to-resolve, open case backlog, agent analysis, cases with problems, new cases, and more. Requires a Performance Analytics license.

  • Field Service Management - Appointment Booking:  Saves time with self-scheduling of appointments by customers. Uses the existing dynamic scheduling feature that allows for tasks with appointments to be prioritized.

  • Communities Enhancements:  Resolve issues faster with increased community engagement. Includes gamification with points and badges; forum self-registration; forum membership; support for documents and events as content types; harvesting solved problems for Knowledge Management articles; and creating cases from unanswered questions.

  • Knowledge Management Enhancements:  Drives knowledge usage and improve article quality, organization, and discoverability. Includes article types for structuring and organizing knowledge content; searching external content sources simultaneously with internal knowledge bases, with results in a unified results list; in-context knowledge capture for creating knowledge during work processes; an Article Quality Index; and SEO support for knowledge articles to be indexed by popular search engines.

 

HR Service Delivery

 

  • Case and Knowledge Management - Response Templates: Enables HR admin to create personalized email templates for quick, accurate, and consistent responses to employees.

  • Mass Email Communication: Allows HR to more efficiently provide information to targeted sets of employees using easy-to-build rich-text emails and to manage all employee communications from a single place.  This feature is included with the Case and Knowledge Management and Employee Service Center applications.

  • Embedded Connect: This capability is included with the Case and Knowledge Management and Employee Service Center applications. Enables real-time responses to in-task employee inquiries by instant collaboration with subject matter experts in HR or other departments. HR team maintains control over available chat hours, types of supported tasks, and users authorized to respond.

 


Going Live - The Kingston Release Webinar

Thursday, February 8, 2018
8:00am – 9:30am PST | 11:00am – 12:30pm EST 

Unveiling the Latest Innovations from ServiceNow

Register-button-webinar.jpg

######

Kingston is here!  Kingston delivers exciting new capabilities that drive machine learning for everyday work, no code process automation, and user experience innovations. These capabilities allow you to:

 

  • Reduce IT incident triage time and customer service response times with Agent Intelligence
  • Identify and resolve critical IT service outages faster with Major Incident Management
  • Use traffic-based discovery to accelerate the creation of service maps with IT Operations Management
  • Manage key project portfolio management tasks in one place with Project Workspace
  • Uncover deep insights on unstructured data with Text Analytics
  • Remediate user-reported email attacks quickly with End-to-End Phishing Response
  • Focus on problematic cases and accounts with Escalation Management
  • Resolve HR cases faster with Response Templates
  • Empower non-developers to automate business processes with Flow Designer
  • Connect process flows to external services easily with IntegrationHub

 

And much more.

 

Kingston-Value-Prop-969x545-v1.png

 

Explore all that’s new and embark on your journey to Kingston!

 

And of course, don’t forget to request your upgrade to Kingston in HI.

The Performance Analytics release for Kingston continues to focus on user experience - from end-user to admin - to help customers get started quickly with powerful visualizations and analytics, easier access to external data, out-of-the-box content, and more.

 

Below is a brief overview of three key features in the Kingston release:

 

Text Analytics

 

The new text analytics capability gives users the ability to uncover insights from the text entered in unstructured entry fields that may not be surfaced by forms. Presented as a word cloud visualization, text analytics lets users zero in on specific words, view trending over time, pinpoint associations between keywords, and then take action by drilling down into records. For example, the word cloud in the screenshot shows “account” as showing up frequently in the description field in a high number of open incidents.  A user drilling down on the word “account” to the underlying records might discover that there are a high number of users who are having account log in issues – thus easily identifying a trending issue.

 

 

Analytics Admin Console

 

As our customers continue to expand their investment in the Now Platform with additional solutions (ITSM, ITOM, ITBM, SAM, HR, Customer Service Management, Security Operations, and even custom apps), Performance Analytics administrators need a single entry point with easy access to all of the relevant content and information under their domain. The new Analytics Admin Console is a single page entry point to bring all administrative content together in a single interface for creating and managing content, as well as information on existing setup and health checks. Tiles such as Get Started, Manage, Troubleshoot, Usage, Advanced Configurations, and Get Help provide users with a clear path to accomplish all of their administrative analytics tasks on the Now Platform.

 

Increased Access to Third Party Data Sources

 

In order to take advantage of the Performance Analytics capabilities in the Now Platform, users often need to import data from third party sources. In Jakarta, we added .xlsx import. Now in Kingston customers can collect data from MySQL, Oracle and SQL Server databases via the Java Database Connectivity (JDBC) API and take advantage of Performance Analytics functionality by using proprietary data in combination with ServiceNow indicators and breakdowns to create widgets in dashboards, set targets, and more.

 

Out-of-the-box Content

 

In addition to the features above, the Performance Analytics team has been focused on providing customers with the content they need to get up and running quickly with analytics regardless of which ServiceNow solution they are using. Kingston continues to add to the out-of-the-box KPIs and dashboards introduced in Helsinki with content packs provided (for no additional charge) based on a customer’s entitlement. For example, organizations with Performance Analytics for HR would get all HR KPIs and dashboards. Of course, Enterprise customers would have access to Performance Analytics content and capabilities across all solutions on the Now Platform.

 

Visit the Kingston Fact Sheet to learn more about this exciting release!

 

 

 


Going Live - The Kingston Release Webinar

Thursday, February 8, 2018
8:00am – 9:30am PST | 11:00am – 12:30pm EST 

Unveiling the Latest Innovations from ServiceNow

Register-button-webinar.jpg

pastedImage_0.png

 

HR-Conversation-2017.png
In the Kingston release for HR Service Delivery, it's all about further improving the employee service experience and increasing HR agent efficiency across the enterprise. We have introduced new
features like Message Templates, Mass Email Communication, and Embedded Connect which are specifically designed to help streamline the HR service experience for both the employee and HR.

 

 

 

Message Templates

 

HR now has the ability to create email message templates in order to respond to similar employee questions or inquiries faster and more accurately. This allows HR to greatly improve efficiency by eliminating the need to manually create the same type of response over and over. The new feature allows HR to select an appropriate template, easily personalize it to the employee, and provide employees with a fast and consistent response. 

Message Templates.jpg

 

 

Mass Email Communication

 

When it comes to improving the overall employee experience it starts by not inundating employees with information that doesn't apply to them. We recognize that HR typically needs to communicate all types of important information to their employees ranging from benefits, perks, upcoming events and other important announcements. But, how do you ensure the right employees are getting the right information? Our new Mass Email Communication feature now allows HR to build rich text emails that can be targeted to relevant employee populations, all from one place! For example, HR can easily send targeted information to employees in certain country or even just a simple email to all new hires. This ensures the right employees get the right information and other employees are not spammed with information that isn't applicable to them.

 

Mass Email Communication.jpg


Embedded Connect

 

When it comes to responding to employee questions or inquiries regarding a task this can be a time consuming back and forth game of email tag between the employee and HR. This is why we have introduced the Embedded Connect real-time chat functionality to help streamline the employee service experience and provide faster time to resolution to employee questions. The real-time chat capability allows employees to ask in-task questions during set interaction hours and have the right people respond instantly. This eliminates any lengthy communication delays between HR and the employee. HR also has the ability to configure which users are responsible for answering employee questions regarding that task, so everything is automatically routed to the right individuals seamlessly.

 

 

Embedded Connect.jpg

 

 

Learn More

 

These are just a few of the major feature enhancements and highlights of the Kingston release for our HR Service Delivery product. If you’re interested in learning more about this release, please contact your account team and they can schedule a demo to show you all the latest and greatest features of the Kingston release for HR Service Delivery. Additional information can be found on the Product Documentation page.

 

 

 


Going Live - The Kingston Release Webinar

Thursday, February 8, 2018
8:00am – 9:30am PST | 11:00am – 12:30pm EST 

Unveiling the Latest Innovations from ServiceNow

Register-button-webinar.jpg

Problem description

Retailers of electrical goods often have to provide aftercare to their customers. This can be problematic for both the retailer and customer. Customers are frustrated by having to phone and wait to register their issue and retailers have to support these costly call centres. Other traditional omni channels such as web and mobile apps can also be time consuming so an alternative would be to use the increasingly popular voice assistants from Amazon, Apple and Google to facilitate the logging of service issues.

These voice assistants can also open up upsell opportunities for extended warranties and additional purchases.

Features

For the purposes of this exercise I will define a list of features that the voice integration should support.

  • The ability to report a fault with an appliance. “Alexa, tell <retailer> my fridge is broken”
  • The ability to request information on new products. “Alexa, tell <retailer> I would like to buy a new television”
  • The ability to query warranty information. “Alexa, when does the warranty on my kettle expire”

 

Description

At purchase time a customer's details and purchases are entered. This is normal practice for most appliance and electronics retailers. If it is a first time purchase an account is set up, otherwise the purchases are just added to the existing account.

 

Standard information is gathered.

Customer Details

Name

Address

...

Email address

 

Product Details

Manufacturer

Product (refrigerator, TV, kettle etc.)

Serial number

Warranty Information

...

Product Nickname (Bedroom TV, Man Cave Fridge) – this is used to identify the item in the case of multiple appliances of the same type

 

The retailer now has a comprehensive list of the appliances that the customer has purchased as well as the customers details. This is all that is needed to perform the required activities.

 

blog_process_diagram.jpeg

 

 

Fault Registration

To register a fault the customer just needs to tell the voice appliance that there is a fault. A sample dialog could be:

 

Customer: “Alexa, my fridge is broken”

VA: “Which fridge, the Kitchen Fridge or the Beer Fridge”

Customer: “The Kitchen Fridge”

VA: “This appliance is still under warranty, logging a service request”

 

Using some of the advanced ServiceNow CSM features like 'Agent Intelligence' ServiceNow has automatically logged the case, categorised it and automatically assigned a work order to the nearest available agent with the correct skills - instantly. The customer can then receive an SMS and/or and email with the Service Case details. If the product requires triaging, say in the case of a computer, a service desk agent can call the customer.

 

Request Product Information

Rather than forcing a customer to browse online it is often better to target a customer with exactly what they want. This could also be done via the Voice Appliance. A sample dialog could be:

 

Customer: “Alexa, I would like view a selection of new televisions”

VA: “Would you like to view small, medium and large screen televisions” (rather than add the complexity of specifying exact sizes)

Customer: “Large”

VA: “Emailing you a selection of large screen televisions”

Some time later...

Customer: “Alexa, I would like to buy a new television”

VA: “Arranging for someone to call you soon so you can purchase”

 

The customer receives an email tailored to their request and/or a call from a sales agent. ServiceNow initiates these two separate workflows. The first to query the products database for large televisions and package that query into a brochure style email for the customer. The second workflow will create a task for a sales agent to contact the customer by telephone at or by a certain time.

 

Request Warranty Information

The customer should be able to check the warranty information for their purchases. If a warranty has expired the customer can be presented with the option of purchasing extended warranty.

 

Customer: “Alexa, what is the warranty on my Beer Fridge”

VA: “The warranty is for 12 months and expires on <future date>”

Customer: “Alexa, what is the warranty on my Bedroom Television”

VA: “The warranty is for 12 months and expires on <past date>. Would you like information on extended warranty”

Customer: “Yes”

VA: “I have sent you an email with warranty details. Would you like someone to call you to set up an extended warranty”

Customer: “Yes”

 

In this case the customer can request a call to immediately purchase the extended warranty providing the retailer with instant upsell opportunity. ServiceNow will initiate a workflow to have an automated email with advanced warranty information sent to the customer. Another workflow will be started to create a task for the notify a sales agent to contact the customer by telephone to place the order for the warranty extension.

 

Conclusion

In many cases it is difficult to generate upsell from an aftercare system but with the variety of tasks a voice integration can be extended to revenue can be generated through warranty and new sales among other areas. In addition, users are spared from long and irritating phone queueing systems normally used to log technical issues. All of this leads to much greater customer satisfaction and loyalty while lowering the costs of customer aftercare. This is a great example of a solution providing a win-win for the supplier and the customer.

Probably the most common snippet of code in ServiceNow can be seen below:

var gr = new GlideRecord('some_table');
var gc = gr.addQuery('field_a','value');
gc.addOrCondition('field_b',;'Complex Query')
gr.addQuery('another_ field', 'more complexity');
gr.addQuery('field_x','furthermore complex');
gr.query();
while (gr.next()) {
 //Why am I not getting the record result I want!!!
//Someone please help me!
}

 

If you have written code like this before and have not got the results you wanted, you have come to the right place!

 

Let's take querying Catalog Item variables as an example. You've identified the table Variable Ownerships [sc_item_option_mtom] and your code looks something like this

 

var grVariableOwnerships = new GlideRecord('sc_item_option_mtom'); // Name your variable after the table name. Make it obvious what records you are dealing with
grVariableOwnerships.addQuery('field_a',value);
//Complex query here
grVariableOwnerships.query();
while( grVariableOwnerships.next() {
processVariableOwnerships(grVariableOwnerships); //Made up function Separate your processing into a separate function for unit testing
}

 

Today I will show you how to write Glide Record Queries that work the first time, every time! All you need to do is follow these 4 simple steps!

 

4 Simple Steps To Write GlideRecord Queries Like A Pro

  1. Check the Dictionary Entry to confirm Field Names and Labels

    This will ensure you don't make typos in your field names, and will be useful in step 2.

     

  2. Build the Filter in a List

    From Step 1, you will be able to align the Field Labels with the Column Labels.

    Modify the query until you get the result list you want.

     

  3. Copy the Query from the Bread Crumb

    Your query will look something like this:

    sc_item_option.valueISNOTEMPTY^sc_item_option.value!=false^sc_item_option.value!=undefined^request_item.cat_item=0241d1b2db4e4700821a3e5c7c9619b8

  4. Paste it into your code

    var encQry = 'sc_item_option.valueISNOTEMPTY^sc_item_option.value!=false^sc_item_option.value!=undefined^request_item.cat_item=0241d1b2db4e4700821a3e5c7c9619b8';
    var grVariableOwnerships = new GlideRecord('sc_item_option_mtom'); // Name your variable after the table name. Make it obvious what records you are dealing with
    grVariableOwnerships.addEncodedQuery(encQry);
    grVariableOwnerships.query();
    while( grVariableOwnerships.next() {
    processVariableOwnerships(grVariableOwnerships); //Made up function Separate your processing into a separate function for unit testing
    }
    

     

    Using the addEncodedQuery API, you can paste your query that you already know works straight into your code!

    Sometimes, your query values will be based off existing variables. This is an easy to integrate into your copied encoded query:

    var value0 = 'some_value';
    var value1 = 'another_value';
    var value2 = '1234567890';
    var encQry = gs.getMessage(
      'sc_item_option.valueISNOTEMPTY^sc_item_option.value!={0}^sc_item_option.value!={1}^request_item.cat_item={2}',
      [value0, value1, value2]
    );
    

     

    sc_item_option.valueISNOTEMPTY^sc_item_option.value!=some_value^sc_item_option.value!=another_value^request_item.cat_item=1234567890

    Using to getMessage API you can easily incorporate values into your queries and still use the query you know that works.
    Feel free to refactor your code back into addQuery if you feel it makes your code more maintainable and readable. You can always use getEncodedQuery to confirm that your refactored query matches the original. Best of all, you can apply this approach to any GlideRecord query problem you have

     

Encoded Queries Explained

But what do all these encoded query strings mean? How do they relate to my list filter?

Please see the color coded diagram below.

2016-02-12_10-27-24.png

active=true^short_descriptionLIKEbla^ORshort_descriptionLIKEhello^NQactive=false^short_descriptionLIKEkit

 

^ = AND

^OR = OR

^NQ = OR

 

See Encoded query strings for more documentation on the operators.

 

As far as I know, the only way to reproduce the "OR all of these conditions must be met" is by using Encoded Queries.

 

API Used

No animals were harmed in the making of this blog post.

However, the following API was used/abused:

 

ClassMethod
GlideRecordaddEncodedQuery
GlideRecordgetEncodedQuery
GlideRecordquery
GlideSystemgetMessage

 

I hope this blog post was useful!

 

Please bookmark, like or provide feedback

------------
Please mark response with a Like, Helpful or Correct :)

Back in November Darrin wrote a blog post about how we are transforming the ServiceNow Information Experience. One of the major changes we are making is around the way the content on our Product Documentation site is structured.

 

Tell me if this sounds familiar. You do a search on the Product Documentation site. You think you’ve found the right search result only to get to an article with a small bit of text and a laundry list of links to pick from. You start to long for the days where all that information was on one page so you could scroll to find the information you are looking for. Sound familiar?

 

This has been a major area of frustration for our customers and that is why we have taken this first step to improve the overall quality of our documentation.

 

We tackle the problem in two different ways:

  1. Re-architecting the topics to be more comprehensive.
  2. On page navigation.

 

Re-architecting topics

First, we realized that a lot of the content is split up and organized in ways that does not make a whole lot of sense to our customers. To address this our writers re-architected many of our topics to make them more comprehensive, often combining a bunch of small topics into one.

 

The Discovery basics topic is a perfect example of what this looks now, compared to the same topic in Helsinki.

 

 

On Page Navigation

After re-architecting, these more comprehensive pages can be long and contain many separate topics.  To help you go directly to the information you need we have added a mini-TOC on the right side of the article.  This on page navigation also helps you to browse the content and then quickly jump back up to an interesting part of the article.

 

There are several examples of this on our site including this “installed with” HR topic. Compare it to the version we published in Helsinki to see the big difference both the re-architecture and the mini-TOC make.

The scope of this project was huge. In Kingston alone we have over 13,000 topics. Multiply that by all the releases we support and the number grows to 65,000+ topics. We knew we couldn’t get to all of these topics so we decided to work on the topics that get the most use focusing on the Istanbul through Kingston releases. As you navigate the Product Documentation site and you find areas you think we missed, please use the Send Feedback option to let us know.

feedback.jpg

 

How can we improve your information experience?

Banner.png

 

Last year, I found a few ServiceNow online trainings on Udemy. Some are are on sale for the first time since I spotted them.

Those courses are usually priced 100$ each, but until the 11th of January they are heavily discounted at 11$ each for the New Year Sale.

I will probably review some them in much more details, but in the meantime, you may want to grab a copy for you, or recommend them to someone else, while they are on such discount.

 

 

About Udemy and video trainings

 

The Udemy eLearning platform contains troves of amazing and very useful video training material. I’m very fond of this platform. In 2017 alone, I completed 14 courses on the platform, for a total of 66 hours of video training.

 

Most of the following courses could replace onsite formal training, but they also have the following additional advantages: 30-day money-back guarantee, full lifetime access to the course, including offline access on mobile. Personally, I enjoy watching educational video while doing other chores at the same time: train commuting, cleaning, cooking or doing the dishes.

 

On the downside, the absence of classroom requires a different kind of discipline, as you’re alone to motivate yourself. To ensure success, you’ll have to find the learning approaches that work best for yourself. Personally, I take my own notes (pen and paper) and test my knowledge on a personal developer instance to ensure commitment of my long-term memory. Some uses flashcards, repetition or doing their session with another student.

 

ServiceNow 101: Administration

 

This one could be used as a very economical way to replace the traditional 3 days official ServiceNow Fundamentals course designed for system admins who are new to ServiceNow. If you want to start your career as an ServiceNow professional, this is the point to start.

 

It’s also a nice preparation for the Certified System Administrator (CSA) exam.

ServiceNow 101 - Administration.png

Strengths

  • Experimented teacher, uses ServiceNow since 2014
  • Great explanations of the platform
  • The author answers questions in the Udemy platform
  • Steady narration voice (Clean, native US pronunciation)

Weaknesses

  • Slightly out of date: Course made on a Geneva instance from 2015, using the now deprecated UI (UI15). This should only have a minor impact on your certification, as the current exams don’t really focus on very recent features.
  • Only 21 questions are included. If you want to test your knowledge or prepare for the exam, this could be not enough.
  • Many courses on Udemy are heavily discounted most the time. This is not the case with this one.

Link: https://www.udemy.com/servicenow-101-administration

 

ServiceNow 201: Development

 

The same author, Mark Miller, did another course, but targeted as a preparation for the ServiceNow Certified Application Developer (CAD) exam.

 

The course focus on how to use JavaScript in ServiceNow and the use of the dedicated APIs. It cover everything included in the Scripting in ServiceNow Fundamentals tree days class. This is an intermediate level course that requires a basic understanding of JavaScript and some ServiceNow experience.

ServiceNow 201 - Development.png

Strengths

  • Experimented teacher, uses ServiceNow since 2014
  • Clear explanations
  • The author answers questions in the Udemy platform
  • Steady narration voice (Clean, native US pronunciation)

Weaknesses

  • Only 27 questions are included. If you want to test your knowledge or prepare for the exam, this could be not enough.
  • Many courses on Udemy are heavily discounted most the time. This is not the case with this one.

Link: https://www.udemy.com/servicenow-201-development

 

ServiceNow Administration (Latest Version – Nov 17)

 

Another preparation for the Certified System Administrator (CSA) exam and alternative for the ServiceNow Fundamentals course designed for system admins who are new to ServiceNow.

It’s more recent, but not there is currently not enough student ratings to compare with the “ServiceNow 101: Administration” course.

ServiceNow Administration (Latest Version - Nov 17).png

Strengths

  • 100% current
  • 2 exercises included as interactive assignments

Weaknesses

  • English is not the teacher native tongue. Indian accent is quite pronounced.
  • Only 15 questions are included. If you want to test your knowledge or prepare for the exam, is not enough.

Link: https://www.udemy.com/servicenow-administration

 

Service Portal in ServiceNow – Kingston

 

The first course dedicated to the Service Portal and its development. It’s from the same author, Revanth Sodavaram Muni, than the “ServiceNow Administration (Latest Version – Nov 17)” course.

It’s brand new, so there is currently no student ratings to get a quick idea of its quality. This tree hours and half course focus heavily on scripting with AngularJS, JavaScript and HTML.

Service Portal in ServiceNow - Kingston.png

Strengths

  • 100% current

Weaknesses

  • 3.5 hours is probably a bit short to cover all aspects of the Service Portal.
  • English is not the teacher native tongue. Indian accent is quite pronounced;
  • No quiz included

Link: https://www.udemy.com/servicenow-serviceportal

 

ServiceNow IT Operations Management

 

This is the video version of the 266 page ebook “ServiceNow IT Operations Management“. The video is also available from Pack Publishing.

 

It’s been added very recently to Udemy, so there is currently no student ratings to get a quick idea of its the quality of this course. This two hours introduction course is aimed at system administrators, IT operations, and IT managers who plan to implement ServiceNow IT Operations Management for their organisation. It focus on Discovery, Orchestration, MID server and cloud management.

ServiceNow IT Operations Management.png

Strengths

  • Only available course covering non ITSM aspect of ServiceNow
  • Steady narration voice (Clean, native US pronunciation)

Weaknesses

  • Probably outdated, as there have been several major features added to the ITOM solution since the Geneva release
  • The voice is reading the slides very robotically
  • Only a broad introduction
  • No quiz included

Link: https://www.udemy.com/servicenow-it-operations-management

 

Originally published in servicenow.implementation.blog by Shiva Thomas. Previous articles you might enjoy:

Note: Requires a subscription to IntegrationHub for production use.

In this Blog I am going to demostrate how to use Flow Designer to setup EBonding between two servicenow instances (Create Remote Incident)

Flow Designer provides following options for EBonding

1. Create Remote Incident.

2. Lookup Remote Incident.

3. Update Remote Incident.

In order to facilitate Ebonding Http Connection has to be setup pointing to the target instance.

Step1: Navigate to http_connection.LIST

Click on New

Select Http(s) Connection

In the new record populate Name - Target Dev Instance

Credential - Select the credentials to be used to access the target instance. The credentials should have required roles to allow incident create, incident read and incident update operations. So a user with itil role would be sufficient.

If a credential is not already available, create a credential record by following below steps

Click on the new button as shown in below screenshot

 

Select credential type as Basic Auth Credentials

 

Click on Submit, once you click on submit it adds the credential to the HTTP(s) Connection record.

 

 

Populate Connection Alias as sn_ebonding_ah.ServiceNow ( This connection alias comes OOB)

Populate Connection url as https://<instancename>.service-now.com/

And click on update

 

Create new Flow via the flow designer.

 

Click add a Trigger and select Trigger = Created and Table = Incident

Add any conditions as needed

 

 

Add an action

Servicenow eBonding Example -> Create Remote Incident

Select the Incident = Trigger+ incident Record

Save and Activate the Flow

 

Testing

 

  1. Create a test incident in source instance and see if it reaches target instance.

Screenshot from source instance

Screenshot from target instance

Correlation ID is same as the incident number from source instance.

 

Thanks

Anil

Hello All,

 

This post covers the simpler way to show  records stored in ServiceNow database table in paginated way on Service Portal Widget.

It leverages the OOB "chooseWindow" GlideRecord - Scoped  method of GlideRecord API.

 

HTML Template Code :

 

<div>

<!-- your widget template -->

  <table>

    <tr>

      <th>

        Number

      </th>

      <th>

        Short Description

      </th>

    </tr>

    <tr ng-repeat="r in c.data.records | limitTo:c.data.page_size">

    <td>{{c.data.records[$index].number}}</td>

    <td>{{c.data.records[$index].short_description}}</td>

    </tr>

    </table>

  <button ng-show="c.data.current_page != 0" ng-click="getPrevious()">

    Previous

  </button>

  <button ng-show="c.data.count >= c.data.page_size" ng-click="getNextSet()">

    Next

  </button>

</div>

 

<

                                         
        Number              Short Description      
{{c.data.records[$index].number}}{{c.data.records[$index].short_description}}
   

 

 

CSS for table formatting:

table {

    font-family: arial, sans-serif;

    border-collapse: collapse;

    width: 100%;

}

 

 

td, th {

    border: 1px solid #dddddd;

    text-align: left;

    padding: 8px;

}

 

 

tr:nth-child(even) {

    background-color: #dddddd;

}

 

Client Controller :

function($scope) {
  /* widget controller */
  var c = this;

$scope.getNextSet = function() {
c.data.current_page = parseInt(c.data.current_page) + 1;
c.data.action = "nextRecord"
c.server.update().then(function(r){
c.data.action = undefined;
console.log("Response " + JSON.stringify(r));
console.log("Data objet " + JSON.stringify(c.data));


//c.data.records = r.records;
});
}

$scope.getPrevious = function() {
c.data.current_page = parseInt(c.data.current_page) - 1;
c.data.action = "nextRecord"
c.server.update().then(function(r){
c.data.action = undefined;
console.log("Response " + JSON.stringify(r));
console.log("Data objet " + JSON.stringify(c.data));


//c.data.records = r.records;
});
}
}

 

Server Script :

 

(function() {
  /* populate the 'data' object */
  /* e.g., data.table = $sp.getValue('table'); */
if (!input) {
data.records = [];
data.page_size = 5;
data.count = 5;
data.current_page = 0;




var gr = new GlideRecord("incident");
gr.orderBy("number");
gr.chooseWindow(data.current_page, data.page_size);
gr.query();


while (gr.next()) {
var obj = {};
//gs.addInfoMessage("Hello");
obj.number = gr.getValue("number");
obj.short_description = gr.getValue("short_description");
data.records.push(obj);
}


}
if (input && input.action == "nextRecord") {



data.records = [];
data.count = 0;
var startPage = input.current_page * input.page_size;
var endPage = (input.current_page * input.page_size) + input.page_size
// gs.addInfoMessage("start " + startPage + " endPage " + endPage);
var gr1 = new GlideRecord("incident");
gr1.orderBy("number");
gr1.chooseWindow(startPage, endPage);
gr1.query();


while (gr1.next()) {
data.count++
var obj1 = {};
//gs.addInfoMessage("Hello");
obj1.number = gr1.getValue("number");
obj1.short_description = gr1.getValue("short_description");
data.records.push(obj1);
}

return data;
}
})();

 

 

Some screen captures

 

 

 

I am going to show you how to send a message from servicenow chat to slack channel.

 

Steps:

 

1. Create a servicenow user which will act as the connect chat user who will receive messages from slack.

2. Create a slack channel and configure inbound webhook.

     go to Incoming Webhooks | Slack and click on incoming webhook integration

     Select the slack channel to which the messages should be sent.

 

and click on Add incoming WebHooks Integration.

 

Make note of the webhook URL.

3. Create a flow to send chat message to slack channel.

We need following information to setup the flow

     webhook url : webhook url captured in above step

     channel : #channelname

     icon : ":ghost:"  or any other emoji of your choice.

Some background based on which the functionality is developed.

When ever a chat conversation happens, servicenow creates a record in live_message table with details like the chat message, chat participants. We are going to make use of that information to apply in the flow trigger condition.

Watch the video to see how to create flow designer and how the functionality looks like.

https://youtu.be/DwXclWXH6ik

SlackConnector - YouTube

Filter Blog

By date: By tag: