Table of Contents
Welcome to our JAVASCRIPT PAGE Section V
Version Control Repositories * / Source Control
GitHub and GitLab Comparison
- More important for larger teams.
- A GIT repository is a central place where developers store, share, test, and collaborate on web projects.
- GitHub
- Besides the basic code repository, GitHub can be used for issue tracking or documentation.
Email: GeoffBishop@GMail.com
Username: CSerpent
Password: M
From Developer Studio…
Network Protocol: https
URL: https://gitlab.com/CSerpent/loaner_req.git (Includes Username and Application Name)
Branch: sn_instances/[YourInstanceName]
User name: CSerpent
Password: M
- GitLab
- Supports role-based access, beyond just Read and Write to the repository.
Videos
Community Video Listing by Category - Watched all of these by 12/01/2019 ServiceNow Support Videos - ServiceNow Support - Excellent, professional videos. Watch as many as you can. (430 total as of 05/04/2019) Overview Videos - (~27) - Around 5 minutes in length on average. All less than 12 minutes.
Helpful ServiceNow Videos for others: ServiceNow TV Commercial Amusing TV commercial. :) ServiceNow_PlatformArchitecture This is a good high-level overview of what ServiceNow actually is. Getting Started with Lists This gives a good idea of how packed with power the ServiceNow interface is. Creating ServiceNow Workflows This gives a basic understanding of Workflows, which are at the heart of most ServiceNow functions. ServiceNow Foundations Videos 31 Additional Videos if you want.
View Rules
- Modules:
System UI - View Rules
https://docs.servicenow.com/bundle/orlando-platform-user-interface/page/administer/navigation-and-ui/task/t_CreateAViewRule.html - View rules can be used to force the user to see a particular view. They also, behind the scenes, hide the View menu in the context menu of the form, presumably because the user would not be able to switch views even if he wanted to. - Developer Note: View Rules cause URL parameters to get added to the URL. If you then turn off a View Rule, but you copy paste the URL, or you simply Refresh the page (which also keeps the URL and parameters), you will get the same behavior that the View Rule already applied when it was active! - View rules do not apply to users who have no role. View rules do not always apply if there are existing user preference entries on the instance. Delete the user preference entry and clear the system cache to make sure the respective view rule applies. You can clear the system cache by appending cache.do to the instance URL. For example, instance_name.service-now.com/cache.do.
UI Views * / Form Views
- Tables
sys_db_object sys_ui_form Specifies which Views are tied to which Tables.
sys_ui_view sys_ui_section Defines a Form Section (Has caption “Form Sections”) sys_ui_form_section Controls the ORDERING (only?) of a Form Section, via the “Position” field (Also has caption “Form Sections”!!)
sys_ui_element
- It is important to understand this Hierarchy: Table (sys_db_object)
Form (sys_ui_form) View (sys_ui_view) Section (sys_ui_section AND sys_ui_form_section) Element
- UI Views are different form layouts for the same record. - When you create a new UI View, a record is created in the table sys_ui_view. - Views have one or more “Form Sections” - The most important field of a “Form Section” is the “Caption”. It tells you what the section is all about. - “Form Sections” are composed of “Section Elements” - “Section Elements” (table sys_ui_element) just specify a table field and a position. - So the “Section Elements” are placed on Sections in a particular order. - From any table definition (sys_db_object), if you click the related link “Design Form”, you will see the different “Form Sections” appear, for each view, as Gray Bars, each of which will have a dropdown specifying “1 Column” or “2 Column”. - When you create a brand new field, by default, it goes onto the “UI Section” with no Caption (empty caption). - Quirks
- Both sys_ui_section and sys_ui_form_section have the same “Label” when you go to those tables. They are both called “Form Sections”. : (
- If you are trying to locate the definition of where a field placement on a section on a view on a form is coming from, remember that it may be coming from a Parent table.
Virtual Agent - VA
- Takeaway Virtual Agent (VA) is a subscription-based conversation robot available around the clock. It helps users find information, make decisions, and perform common tasks. It comes with its own low-code design tool. Can be used to provide answers to frequent questions, query or update records, or simply gather data before connecting a user to a Live Agent. VA can be accessed from a Service Portal Widget, or from an iFrame on an externally-facing web page. A Topic defines objects called Intents, Entities, and Utterances. VA includes pre-build Topics for Customer Service, HR, and ITSM. Topic discovery is based on Keyword, or on NLU. A Topic Flow is like a workflow that describes the different paths a topic can take. A Conversation is an Instance of a Topic. It is created when a user initiates a conversation with Virtual Agent. The VA Designer supports branching, looping, CRUD operations, and REST calls. VA can redirect the user to a table record. - Plugins
com.glide.cs.chatbot Glide Virtual Agent Plugin. com.sn_communities Communities - Allows the VA to return a list of previously answered Community questions. com.glide.interaction.awa Agent Chat - Allows live agent transfer. com.snc.itsm.virtualagent ITSM Virtual Agent Conversation - Create Requests, Check Status, Process Approvals, Update Tasks, Search KB com.sn_csm.virtualagent CSM Virtual Agent Conversation - Create Cases, Check Status. com.sn_hr_virtual_agent HR Scoped App Virtual Agent Conversation - Request HR Services.
- Modules
Collaboration - Branding Setup Collaboration - Chat Setup Collaboration - Messaging Apps - Integration Collaboration - Virtual Agent - Categories Collaboration - Virtual Agent - Designer Connect - Support Administration - Queues Service Portal - Agent Chat System Definitions - Plugins System Localization - Messages
- Personas
Requester Access information, log issues, make requests, perform tasks. System Administrator Manage application settings. Topic Administrator virtual_agent_admin - Create and manage topics.
- Roles
external_app_install_admin External App Install Admin - Install external apps such as Slack, Teams, and Workplace by Facebook. virtual_agent_admin Virtual Agent Admin - Create/Manage Topics using the Virtual Agent Designer.
- Tables
sys_cb_topic Topic Table. sys_cs_topic Topic - Stores an instance of a topic from the topic table at run time. Records purged every 12 hours. sys_cs_message Conversation Message - Stores a record for each message within a conversation instance. sys_cs_conversation_task Conversation Task - Stores a record for each conversation task. sys_cs_conversation Conversation - Stores a record for each conversation between the user and the chatbot on the instance.
- Definition - VA is a conversation (instant messaging) robot available around the clock. It helps users find information, make decisions, and perform common tasks. - VA is a platform capability that falls under ServiceNow's Intelligence Automation category. It incorporates a low-code designer that allows you to build “Conversations” to help users complete tasks or requests. - Business Case - Companies often setup online support material, but often this is difficult for customers (users) to navigate, so they ignore it. - Customers often get re-routed between agents many times, which can be irritating. - Chat Bots are available 24/7. - Use Cases
- Answering Frequently Asked Questions (FAQs)
- Providing tutorial information
- Querying or even Updating records
- Gathering data before connecting the user with a Live Agent
- Performing diagnostics
- Resolving multi-step problems
- Any admin can activate the VA plugin. Additional Plugins for Virtual Agent - NLU - With the optional addition of Natural Language Understanding (NLU) (a supervised machine learning capability), your Virtual Agent can better understand what your users type and predict what they want to do. - VA may integrate to external systems using scripted API calls, or via NLU. - VA Requires a subscription to install on Prod instances. Can be activated on Dev and Test instances to build and test conversations without a subscription. - VA can be contacted via a messaging interface, such as one of the following: Third-party chat apps (Slack, Microsoft Teams, Facebook Workplace, Facebook Messenger) NOT Skype Email Embedded web client on an externally-facing web page. (Uses an inline frame element (iFrame)). Phone ??? Service Portal Widgets - VA supports “Level 1” domain separation, meaning that data can be domain separated. - Tip: Keep the Virtual Agent's “tone” and “personality” consistent, from topic to topic. - Artificial Intelligence (AI) - A general concept of machines acting in a way that simulates or mimics human intelligence. - Branding: - The Chat Interface can be customized to fit the branding of your company; Logo, colors, fonts, etc. You cannot brand third-party messaging apps. - Conversations
- Define the Intents, Entities, and Utterances used for a “Topic”.
- A Conversation is an Instance of a Topic. It is created when a user initiates a conversation with Virtual Agent.
- Generally a Conversation is constructed by a system administrator, developer, or implementer who is familiar with JavaScript; the business process owner would also be involved.
- Prebuilt Conversations
- VA includes several predefined topic conversations designed to help your users complete common tasks.
Customer Service Virtual Agent Conversations (Requires Customer Service Management licensing)
HR Virtual Agent Conversations (Requires Human Resources Management licensing) ITSM Virtual Agent Conversations
- Dashboard: - The Virtual Agent Overview Dashboard provides visualizations of usage information collected daily and weekly. This is a part of Performance Analytics. - Designer / Virtual Agent Designer *
- Virtual Agent Designer is a graphical, low-code, authoring tool for building the dialog flows of conversations, called Topics.
- Administrators create Topics - Has an intuitive Flow Design.
- Supports Branching, Looping, REST calls, and CRUD operations.
- Virtual Agent Designer opens in the same Application Scope as the Platform UI used to launch it. A topic can only be edited if it is in the same Application Scope as the Virtual Agent Designer. Otherwise all fields will appear as read-only. New topics are created in the same application scope as the Virtual Agent Designer window. - Use the “Preview Active Topics” button to open a VA web client in a new window. This is helpful for testing purposes.
- Each Topic you design should solve a common use case.
- The only two methods for “Topic Discovery are”:
1) Based on Keywords.
2) Based on Natural Language Processing models. - There are 4 steps to creating a Topic and Conversation:
- Plan
Determine what the topic covers, who the audience is, what should be accomplished, and what information is needed from the users. Consider the following: - What terms should initiate a conversation on the topic? - What category should the topic go in? - What information will VA need to meet the goal of the topic? - How should VA prompt the user for required information? - What should VA do if it finds multiple records matching the information the user provided? - What confirmation is needed from the user before action is taken? - When should VA redirect the user to a table record?
- Build
- Topic Properties Page - Identifies a Topic and how it's used. Can configure conditions on when it runs.
- Condition - Controls who sees a topic in the VA client.
- Roles
- Determine which users can run a topic. - If no roles are specified, then all users can start a conversation on the topic. - If multiple roles are specified, the user must have at least one such role.
- Keywords
- Words or phrases that users enter to trigger the conversation with the virtual agent. - VA uses keywords in a conversation to know which topics to use when interacting with a user. - VA presents “Matching Requests” based on keywords typed by the user. - If multiple Topics have keywords that match what the user types, VA asks which the users wants. - Visible when NLU is disabled.
- NLU Topics
- When NLU is enabled, the NLU Model and Associated Intent fields become visible.
- Virtual Designer Page
- From Studio, with a Topic open, click “Edit Topic Flow” to open the designer component of Virtual Agent Designer.
- Use the designer to configure how the topic gets information from a user and responds to the user.
- Every topic flow begins with a Start node and finishes with an End node.
- The Preview button may be used for Testing.
- The 3 main sets of controls that perform functions within the conversations are:
- User Input
- Virtual Agent Designer - User Input Controls
- Text
- Image Output
- Reference Choice - Used to List records for a user. The user selects a record from the list. Virtual Agent can then perform an action on the selected record.
- Boolean
- Date Time
- Image Picker
- Carousel
- Common Properties:
- All controls have these:
Name - The name of the control's node in the topic flow.
Variable Name - Stores the user response. Prompt - The initial question or statement provided to the user.
Acknowledge Message - Shown when only a single response is found and the VA is proceeding to the next node in the topic flow.
Confirmation Message - Tip. Do not use this. VA's default confirmation message is better. - Bot Response - Virtual Agent - Bot Responses - Card - VA does not display empty fields or labels for empty fields. - Text - Static Choice - Link - HTML - Multi-flow Output - Script Output - Allows you to return the results of a Script. - Utilities - Lookup - Script Action Use Cases: - Personalize a conversation. - Transform Data - Perform Database Operations - Create Complex Conditions - Support Localization - In Scripts the valInputs object is automatically created, and stores input variables. - Dot walking may be used.
- On the left hand side of the VA Designer there is a Script Variables section. Script Variables are accessible in script using the vaVars object. - Tip: Script variables only support string, number, and Boolean values. But you can use the toString() method to store values of other data types as strings.
- Action
- Used to create or update records without scripting.
- The Target Table, under Application Access, must allow Updating from the application Scope that the
Conversation was defined in.
- Decision
- To create a simple branch based on a user question, you: 1) add a User Input - Boolean node, then 2) add a Utilities Decision node, then, 3) add an additional branch. - You change the Label of each branch coming off of the Decision node (to “yes” or “no”, for example), and you use the Condition property to specify when each branch is activated.
- Variables
- Used to customize the behavior of Virtual Agent topics.
- Input Variables
Examples: - vainputs.inc_description
- vainputs.user.first_name
- Script Variables
- Live Agent Variables - Used to pass information from the conversation to the live agent.
- Test
- Conversation Preview Logs allow you to view errors and messages logged while previewing a Topic.
- Use gs.log, gs.print, and gs.warn statements in your scripts to output information to the log.
- Publish
- Publishing a Topic makes it active and available for use by Virtual Agent.
- Live Agent Chat
- Enables a user to speak to a real person at any point during a conversation.
- If a user seems stuck in a conversation or makes a request which should be handled by a human, the conversation can be transferred to a live agent.
- To transfer to a live agent, use the vaSystem.connectToAgent() method.
- Use the vaSystem.isLiveAgentAvailable() method to verify that Live Chat is enabled.
- VA can hand off a case to a live agent based on criteria that you define. It provides the live agent with the entire virtual agent conversation. - Uses are transferred to a live agent in one of 3 ways:
- If an error occurs in the conversation.
- If a certain, predefined point in the conversation is reached.
- If the user goes into the Support Options menu and chooses Contact Live Agent.
- The only Two Interfaces for Support Agents are:
Connect Support - A real-time messaging tool that enables agents to keep track of their support Cases, and quickly find solutions.
- Built on the messaging platform provided with Connect.
- Support agents can monitor Queues to provide instant support.
- Links, files, and records may be shared using drag-and-drop.
- There can be escalation queues, and assignment groups may be assigned to each queue.
Agent Workspace - A configurable service desk application that provides agents with an integrated and graphically intuitive user experience. - Requires the Agent Workspace (com.agent_workspace) plugin.
- Advanced Work Assignment (AWA):
Advanced Work Assignment Overview
- AWA automatically assigns work items to agents based on their availability, capacity, and skills.
- AWA pushes work to qualified agents using work item queues, routing conditions, and assignment criteria that you define.
- Modules
Advanced Work Assignment - Service Channels
Advanced Work Assignment - Queues Advanced Work Assignment - Groups - Roles awa_agent - Agents see their assignments in their Agent Workspace inboxes.
- To configure live agent transfer for Agent Workspace, you need to install the Agent Chat Plugin, configure the Chat Setup record, Advanced Work Assignment, and add the awa_agent role to queue groups. - A Service Channel is a way of defining what type of work you want to route. - You can configure the amount of work that can be handled by the agents supporting the channel. - You can also configure capacity overrides, the inbox layout, and queues supporting the channel.
- A Work Item Queue defines where to route the work.
- Localization
- Allows users for the same instance, from a variety of countries, using different languages and currencies.
- Requirements
- The com.glide.i18 plugin provides the elements necessary for translating an instance.
- Language Plugins.
- Use “Localization Methods” in your Virtual Agent scripts. These show the original text when no translation is found, or show the translated text when a translation IS found. - The Message sys_ui_message table stores translations for informational messages, and is used to store translations for elements in your topics. - You must provide translations for any content you create for your instance. - Machine Learning (ML) - Process: - In order to create end-to-end solutions using VA, you need to:
- Configure the client interface.
- Create Topics and Conversations through the VA Designer
- Configure Live Agent Support
- Surveys: - VA surveys must be applied to all Topics or to none. - Topics
- A Virtual Agent “Topic” defines the dialog between the Virtual Agent and a User, to accomplish a goal.
- A Topic Flow is like a workflow that describes the different paths a topic can take.
- A Conversation is an Instance of a Topic. It is created when a user initiates a conversation with Virtual Agent.
- To know what Topics to create, you can search for common keywords in your Tickets. Target low-complexity, repeatable, tasks. - Create Topics in Studio or in Virtual Agent Designer. - Since not all companies use VA, if you are selling an Application, you may want to create topics in a separate Application. - Topic Mapping - Configure the VA to consume NLU models to understand user statements better. Map each topic to an NLU model and intent. Within each Topic, “nodes” in the conversation can extract Entities to help provide context to user statements. - To use NLU, the NLU setting must be enabled under Virtual Agent - General Settings - Train / Training - Virtual Agent only “Learns” when you “Train” it; that is, when you activate the “Training” command. It does not learn continuously.
Visual Task Board * (VTB)
Visual Task Boards - A Kanban-like Task board with an intuitive, graphical interface for working with any ServiceNow app. - Allows you to manage your tasks through a visual, drag-and-drop interface. - VTBs are displayed graphically as lanes and cards. - Cards are the actual records that can be dragged between lanes. Types
Freeform Allow you to create your own lanes and tasks. Flexible Allow you to load tasks from a task table such as Incident. Lane changes to NOT update underlying task data. Select "None" for the vertical lane field. Guided Lane changes DO change the underlying record values. Lanes correspond to field values and can't typically be edited. The lane field must be a Choice field or a Reference field.
- Just click on a lane to rename it. - Add team members with the person icon at the top right. - Swimlanes
Horizontal lanes that help to group cards.
- Attachments may be added to cards. - Checklists - A very useful feature of any Card. - The number of items checked (completion percentage) appears on the card. - May be saved as a template and added to other Cards. - You can hide lanes. - You can filter cards.
Vulnerability Response
- Scanner Applications check the network and flag vulnerabilities. Common scanners include: Qualys, Tenable, and Rapid7. - Hosts are computers that the scan finds on the network.
- Vulnerabilities include Software Flaws and Misconfigurations. These may be downloaded from the National Institute of Standards (NIST) or 3rd parties.
- Detections are vulnerable items or hosts with a vulnerability.
- Scanners often provide a data dump of information, much of which is not relevant.
- The ServiceNow Vulnerability Response app uses the Raw data from scanners to make smarter decisions.
- An “Investigation” is started, and a Change Request is created to remediate vulnerable items.