The New York release of ServiceNow is finally here and includes a number of useful features, enhancements, and bug fixes to the Service Portal. In this article, we will review some of the new features and larger changes. New Features Agent Chat Your users can initiate and maintain an Agent Chat conversation in any portal page. You can now also create a script to pass portal-specific data to Agent Chat. For example, pass the name of your knowledge base to a Virtual Agent conversation. To enable, simply install the "Agent Chat" plugin, and create a configuration through the "Service Portal > Agent Chat" module. Official documentation Search Analytics & Suggestions Generate relevant search suggestions for your users and monitor search analytics to understand what your users are searching for. When you enable Search Suggestions, suggestions appear automatically when users enter text into search fields in the Service Portal. Official documentation Text index groups Configure a text index group to make Service Portal search results more relevant to your end-users. The base system text index group includes the Catalog items, Knowledge, and Social Q&A Questions tables. Official documentation Antivirus Scanning support for attachments View the health status of file attachments in Service Portal. Antivirus Scanning scans files in the Attachments [sys_attachments] table by default. When viewed from a Service Portal page, attachments may not be available for download depending on their health status. Official documentation Reset Password Although not much of a feature, you can now enable your users to reset their password from the Login widget using the Password Reset application. When the user clicks "Forgot Password?", the system redirects the user to the page value specified in the "glide.security.password_reset.uri" system property. Official documentation Service Catalog Related Catalog Items & Knowledge Articles Configure related items and articles for a catalog item to provide additional information or alternatives. These articles and items are displayed in the catalog item page in Service Portal. Official documentation Knowledge Management Route Map The "kb_article" page now routes to the "kb_article_view" page which is part of the Knowledge Management Service Portal which includes a number of features such as feedback and versioning. Multi Knowledge Bases Configure which knowledge bases to display on the Knowledge Management Service Portal Article Comments User can now reply and like comments as well as add links, attachments, or images to comments. Official documentation Automated Test Framework Open Service Portal Page Open a portal page in the Automated Test Framework. When building automated tests, test designers must first open a page in a portal before testing UI components on the page. Official documentation The New York release seems to be very promising with a nice mixture of features, enhancements, and much-needed bug fixes (over 150+ that I've counted). I am definitely looking forward to this release and all it entails. Check out all the New York release notes here. If you know of some additional features in Service Portal not mentioned here, please let me know in the comments below.
Widgets and Demo Portal from our K18 Service Portal Sessions
Due to popular demand, here is a quick video highlighting the portal and some of the widgets we showed during our CreatorCon sessions at Knowledge18. We've made the following widgets and applications available for download: Gamification for Service Portal https://serviceportal.io/gamification-in-service-portal/ Unlocking Service Portal Widgets https://serviceportal.io/downloads/k18-creatorcon-example-widgets/ If you've found this content useful or if you have any special requests for upcoming posts, please let me know in the comments below.
Free Widgets for Service Portal
We are excited to announce the launch of the free widget download page on ServicePortal.io. Since day 1, ServicePortal.io has existed to be a resources and source of inspiration for the ServiceNow Community. With the launch of the new widgets page, we can now share some of the most frequently requested widgets with all of our followers. Not all of them will be complex, many of the most frequently used widgets are pretty simple. Our goal is to develop and give away at least one new widget per month. We believe that collaboration is key to success for all of us in the ServiceNow Community. If you have any suggestions or comments about our widgets, please let us know. View Free Widgets Page
Using Events to Communicate Between Widgets
Following the principle of “separation of concerns”, it is good practice for your portal or application to be made up of self contained functional components, also known as widgets in Service Portal. However sometimes these widgets need to communicate with one another. Thanks to Angular.js this can be accomplished through the use of $broadcast, $emit, and $on methods. $broadcast and $emit allow you to raise an event in your widget. The difference between $broadcast and $emit is that the former sends the event downwards from parent to child controllers, while $emit sends an event upwards from the current controller to all of its parent controllers. Both methods are available on $scope and $rootScope. You can subscribe to an event using the “$on” event handler. In this example we will create two widgets that interact using $broadcast and $on. Widget #1: Create two buttons that upon click, will $broadcast an event called "customEvent" and pass an object. HTML: [crayon-69cc893288d58484955128/] Client Script: [crayon-69cc893288d5e384653045/] Widget #2: Listen for the "customEvent" event, and when triggered, the callback function will update the text. HTML: [crayon-69cc893288d5f494650768/] Client Script: [crayon-69cc893288d60923288537/] The final results should look like this:
Embedding widgets in Service Catalog
In Service Catalog you have the ability to embed a UI Macro as a variable in your catalog items or record producers. UI Macros are based on Jelly and as such they will not render in Service Portal. To work around this, you can now embed a widget for your UI Macro variables when displaying your catalog in Service Portal. In this example, we're going to create three variables, and make the third variable a widget that will display the sum of the other variables. Create a catalog item with the following variables: Single Line Text: "value1" Single Line Text: "value2" Macro: "results" On the "results" variable record, you will see a "Default Value" tab, with a reference to the Widget. Create and select a new widget called "Embedded Results", and use the following values: HTML: [crayon-69cc893289696689308898/] Client Script: [crayon-69cc89328969a908590145/] Now when you view this catalog item in the portal, the embedded widget will display the results of the two variables: Note, that the "field.change" event fires when the field loses focus, so you will have to tab or click out of the field to see the results.
Service Portal in Geneva Overview
Service Portal was released as an opt-in technology preview in Geneva, but up until now not much has been posted about it. Over the next few weeks and leading up to Helsinki, I will be doing a series of posts with some basic information on the Service Portal in Geneva to help prepare you guys for the full release. NOTE: A lot is changing between Geneva and Helsinki. Any information provided will likely change by the time Helsinki is released. Service Portal is built with Angular.js and Bootstrap, but the real power is in the fact that it sits on top of ServiceNow's powerful server side scripting and GlideRecord. This makes for a very powerful combination that can integrate with any application or data across the platform. The 4 primary components of Service Portal is Portals, Themes, Pages, and Widgets. In this post I will provide a quick overview of each. Portals The portal record is what ties it all together. The portal is very similar to "sites" of CMS in that it has a URL suffix and a reference to theme. Themes Unlike themes in CMS, themes in Service Portal are not just limited to stylesheets. A theme is comprised of a header and footer (which are really just widgets), CSS variables (similar to LESS or SASS but with a slightly different syntax), CSS Includes, and JS Includes. Pages A page is made up of a layout which is comprised of containers, rows, and columns (based on the Bootstrap grid) which then reference widgets. The reference from a column to the widget is through a M2M table called "rectangle". Containers can be either fixed or fluid width and contain rows Rows only function is to contain columns Columns is where the responsiveness of the grid is defined. A column sets the size (out of 12) that it will occupy at various resolutions (mobile, tablet, desktop, large desktop). Rectangle has two functions: associate a widget with a column and also store the meta data for the instance of the widget. For example a "Carousel" widget could store "slides" on the rectangle record. Because the meta data for each widget might be different, the rectangle table can also be extended by additional tables. To see an example of how this all ties together, see the following diagram: Widgets Widgets is where the HTML and server & client side logic lives. All content on a page lives inside a widget. The properties of a widget are: HTML - the template for the widget JSON Data Producer - server side JavaScript evaluated through Rhino Client Script - the controller for the widget Data Table - the rectangle table the widget uses for storing meta data Fields - the fields on the rectangle table the widget uses Widgets use Angular.js for handling data bindings between the controller (client script) and view (HTML). Also any output from the server side JavaScript (JSON Data Producer) is also automatically available on scope. One of the most impressive features of a widget is how a controller can communicate with the server side. To see a good example of this, consider the following example widget, the Data Table. The important part to note is how the view has ng-click="go()" which is a call to a method on the controller, which then makes a call to the server side, fetches and returns the content to the controller which then updates the scope in view. This is amazing, it's a mini application all inside a widget with both server side fetching of data and client side logic. That's all I'm going to cover in this post, but hopefully that gives you guys a quick taste for what was in Geneva and the even more exciting full release of Service Portal that is coming in Helsinki. If you have any questions, please post them in the comments below.
Founder & CEO of