LogiUpSkill

Playbook 

Playbook What is a Playbook?  A playbook helps you interact with a business workflow in real time from within the workspace.   Agents can use a playbook to update records, upload attachments, and complete tasks across different workflow activities.   A playbook gives users clear visibility of workflows across the business and shows the tasks needed to complete them.    Plugin Required to be installed  Playbook Experience (sn_playbook_experience)    Step-by-step instructions to create a Playbook in ServiceNow  Step 1: Navigate to Playbook Experience  In the Application Navigator, search for: Playbook Experience   Click on: Playbooks  Step 2: Create New Playbook  Click on New   Fill basic details:  a.Name – Give playbook name (e.g., Incident Management Process)   Table – Select table (e.g., Incident)   Build Playbook  Step 3: Diagram View  Step 4: Define Conditions (When Playbook should appear)  Add Conditions   Example:   State = New   Priority = High    Step 5: Add Playbook Activities  Open the created playbook   Click New and add activities like:   Label – Details Intake  Step 5: Configure Each Activity  For each activity:  Add Title & Instructions   Configure fields to update   Define mandatory steps if required  Step 6: Define Activity Order  Arrange activities – Details Intake  This defines how agent will execute steps  Instruction (Label – Start Activity)  Record Form (User Form) – Confirm Details      Step 7: Define Activity Order  Arrange activities – Troubleshoot  This defines how agent will execute steps  Record Form (User Form) – Determine Priority a. Record Form (User Form)– update incident assignment is required  b. Record Form (User Form) – Update incident   c. Record Form (User Form) – Update Incident assignment if Required  Step 8: Define Activity Order  Arrange activities – Resolve  This defines how agent will execute steps  Record Form (User Form) – Incident Resolution  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus Step 9: Define Activity Order  Arrange activities – Resolve  This defines how agent will execute steps  Record Form (User Form) – Closure Notes    leo. Step 7: Publish the Playbook  Set playbook to Active = true   Save the record  Step 8: Test in Workspace  Open Agent Workspace / Service Operations Workspace   Open a record (e.g., Incident)   Check Playbook panel on right side   Your playbook should appear based on conditions

Subflow in servicenow 

Subflow in servicenow 1.Introduction  In ServiceNow, a Subflow is a reusable automation component created using Flow Designer. It is designed to perform a specific set of actions that can be invoked by one or more flows. Subflows help in breaking down complex business processes into smaller, manageable, and reusable units.  A Subflow does not have its own trigger. Instead, it is called from a parent flow or another subflow whenever its functionality is required. This makes subflows ideal for handling common logic such as approvals, notifications, record updates, validations, or integrations.  By using subflows, organizations can reduce duplicate logic, improve consistency, and simplify maintenance. Any change made to a subflow is automatically reflected wherever it is used, ensuring standardized behaviour across processes.  Overall, subflows play a key role in building scalable, modular, and efficient automation solutions in ServiceNow using Flow Designer.    2.Components of subflow 2.1 SubFlow Inputs  Subflow inputs are the data values that are passed into a subflow when it is called by another flow.  They act as parameters that provide the subflow with the information it needs to execute its tasks.  Without inputs, a subflow wouldn’t know what specific data to work on.  2.2 SubFlow Actions   Actions are the tasks or steps that the subflow performs.  They are the “doing” part of the subflow.  Actions can be pre-built ServiceNow actions (like creating a record, sending an email, updating a field) or custom actions built specifically for your use case.  2.3. SubFlow Outputs  Outputs are the data or results that the subflow sends back to the flow that called it.  Think of it as the subflow returning a result after it finishes its tasks.  3.How to create and call a SubFlow  3.1. Add Input/Output Variables  Purpose: Define the data that your subflow will receive (inputs) and return (outputs).  Details: Input variables allow you to pass information from the calling flow to the subflow.  Output variables allow the subflow to send results back to the parent flow.  Example: Input could be a User ID, Output could be Approval Status.  3.2. Publish  Purpose: Make the subflow available for use in other flows.  Details: Publishing a subflow saves it and allows it to be called by other flows.  Until published, the subflow is only in draft mode and cannot be executed externally.  3.3. Call Subflow from Flow  Purpose: Use the subflow in a parent flow.  Details: In your main flow, you can add a “Subflow” action step and select the subflow you created.  This helps modularize your processes, so repetitive tasks are maintained in one place.  3.4. Send Required Inputs  Purpose: Provide the data needed for the subflow to execute.  Details: Map the input variables of the subflow to the variables or values from the parent flow.  Example: Pass Current User ID from the main flow to the subflow.  3.5. Activate and Test  Purpose: Run the subflow to ensure it works as expected.  Details: Activate the flow after testing in a safe environment (like a development or test instance).  Monitor logs or output variables to verify the subflow behaves correctly.  Adjust any actions or inputs as needed.  4.Scenario  SubFlow-Remove the specified user from all the assigned groups.  Flow-When the user is not active   Step 1-Click on SubFlow under new   Step 2-Add subflow inputs   Step 3-Add action  Look up records   Step 4-add    For each item   Step 5- delete record   Save this flow and publish the subflow   Step 6- create flow   Trigger-  Step 7- actions-add the subflow  Test the flow and subflow   Create user and give them groups   Here when user is inactive all groups of that user is removed   5.Conclusion  Subflows allow you to reuse the same automation logic in multiple flows.  They reduce duplicate work and save development time.  Subflows make workflows more organized and easier to read.  Changes can be done in one place without updating every flow.  They improve consistency and reduce errors in automation.  Subflows help build scalable and maintainable workflows in ServiceNow. 

Flow Designer Using Catalog Item 

Flow Designer Using Catalog Item Use Case:  Create a catalog item with requested for(auto populate),Group(reference),Group Manager(reference-sys_user)=Read only and (auto populate).We need to add the current logged in user in the group before adding in the group it should ask for approval if it is approved then that user should be added in the group.  If approval is rejected, then a catalog task should be created. If the catalog task is closed complete, then work notes, state and stage should be updated of the RITM. If it is rejected, then work notes and state should be updated on the RITM.  Solution: To solve this use case first we must create Catalog Item, with given variables, for that search catalog and in catalog definitions there is Maintain Item present go to it and click new. Then fill the details like:  Name – Group Approval  Which category – Service Catalog; using this we can show our catalog on the Service Portal  Category – Security and Access  And save the form  After saving the form some section gets visible, in that go to variable section and click on new and create 4 variables  Requested For – Reference   Group – Reference  Group Manager – Reference but need to auto populate;   For that while creating go to auto – populate section and fill the fields as given in snapshot  Reason – Multiline text  And they save the form. Then next step is to create Flow designer   So, for that flow to flow and create new then add trigger condition – Service Catalog  Then use Action Get Catalog Variables and perform following steps given in snapshot  a Action – Get catalog variables  b Submit request – Requested Item record  Then Use action and perform following step  a Action – Ask for Approval  b Record – Requested Item Record table will be populated automatically  c Then give rules – Approve or Rejects when Anyone approves or reject  Then for condition use flow logic “if”  Then automatically you will see “then” click on + sign of it and create record action and fill details in highlighted part  Then go to next step and use update record action  And then use flow logic End Flow  Now use flow action “Else if” and fill the below details  Then use “then +” and Action   a Action – Create Catalog Task  b Table Name – Catalog Task  c Requested Item – our table  d Give short description  e And add assignment group  xi. Now use if condition and perform step  Now use then and follow below steps  End the flow  Next step is use else if and follow next step  At last use update record action and follow steps and end flow  Now let’s see how it works, go to Service Portal and search our created catalog item and click enter or Magnifying glass  Then you see our item   Fill the details and click on Order now button  Then copy the REQ number and search in globle search  Then go to that form and click to generated RITM on another tab  Then see in below Related Links the approval is generated  Now the next step is going to Network group and see the requested user is added in that group 

Advanced Work Assignment

Advanced Work Assignment AWA (Advance Work Assignment) helps distribute work automatically to available agents instead of assigning tasks manually  This document explains the complete setup of Advanced Work Assignment (AWA) in ServiceNow. The use case is to automatically assign incidents to agents based on incident priority and queue configuration.  Step 1: Create Service Channel  Go to the navigation pane and search for Advanced Work Assignment, then open Service Channel. The service channel defines which table of records will be routed to agents using AWA. It acts as the main connection between incidents and assignment queues.    Step 2: Click on New  Click on the New button to create a new service channel configuration. This allows you to define how incidents should be routed and assigned automatically. Ensure you provide all mandatory details correctly before saving.    Step 3: Configure Service Channel  Provide the name as Incident and select the Incident table. Set the Assigned To field so the system can automatically assign incidents to users. Configure default work team size, capacity, and utilization conditions according to business requirements.    Step 4: Create Queue  After creating the service channel, the next step is to create queues. Queues help categorize work items based on conditions such as incident priority. Navigate to Queue from the navigation pane and create a new queue.    Step 5: Configure High Priority Queue  Create a queue named Incident – High Priority and link it to the Incident service channel. Set the routing condition to include Critical and High priority incidents only. This ensures urgent incidents are routed quickly to available agents.    Step 6: Create Remaining Priority Queue  Create another queue for Medium, Low, and Planning priorities. This helps separate high-priority work from regular incidents. Using multiple queues improves workload management and assignment efficiency. 

Transform Map Scripts

Transform Map Scripts Go to Transform Map – Click on New.  We can write script in the transform map by checking the run Script checkbox.  And another way to write a script is in the Field Map to Check the Use Source Script  Or another way is Click on Transform Script- new  These are the Three ways in Transform mapping where we can write the Script  n Load Data Transfer seven types of scripting is present they are as follows: 1.onStart:- Executes at the beginning of the transformation process. Or It Runs only once, before any row is processed.  It is used for File validation, initialize variables, Stop entire transform Use Case: – Abort transform if the wrong source table is used.  2.onAfter:-Executes after each record is inserted or updated. or it runs for every row  After mappings are complete.  It is Used for Update target record, add work notes, Create related records.  Use case: – Add work note after incident creation.  3.onBefore:-Executes before each record is inserted or updated.  or it will run for every row and Before field mappings.  It is Used for Modify source data, set default values, Skip individual rows.  Use Case: – Set default priority if empty.  onChoiceCreate:-Executes when a choice value needs to be created during the transformation. or it runs When a new choice value is created during transform.  It is used for Modify choice labels, Control Dynamic Choice Creation.  Use Case: – Convert imported priority value into proper label.  onComplete:- Executes at the end of the transformation process. Or it runs Once and After all rows are processed.  It is used for Logging, Notifications, Cleanup.  Use Case: – Log transform completion.  onForeignInsert:- Executes when a related record is inserted. Or it runs when a new reference (foreign) record is created.  It is used for Modify referenced records, Set default values for reference tables.  Use Case: – Create new caller in sys_user during Incident import 7.onReject: – Executes when a record is rejected during the transformation.  or It runs When a record is rejected and ignore = true or transform error occurs  It is used for Error handling, Logging rejected records.  Use Case: – Log skipped records. 

Application Menu and Module in Service-now

Application Menu and Module in Service-now Tables in ServiceNow, Create Users : sys_user (Table ) Create Roles : sys_user_role (Table ) Assign a role to user : sys_user_has_role (Mapping Table (User – Role) ) Create Group : sys_user_group (Table ) Add user in a Group : sys_user_grmember ( Mapping Table) Assign a Role to Group : sys_group_has_role (Mapping Table) Add one Role into another Role : sys_user_role_contains (Mapping Table) In ServiceNow, Survey – User Groups User Administration – User Roles Table having mapping of user and role You can find Group Role by writing Group Role in Navigation Panel as below, Get a list of group members by writing sys_user_grmember.list in navigation panel as below, If you write sys_user.list in Navigation filter , and Enter, You will find a list of all users. List Of Users : We can find a table name by 2 ways Configure table 2. Table name can find in URL , What is context menu? Application Menu : To Create Application Menu , Go To Application Menu in Navigation panel as shown in the picture below. To Create new application, Click on New Button ,as shown in below picture      While creating an Application,if Role is not assigned it means everyone can access this application. (Refer above figure) Application can be said as a container of modules. Every application contains Modules. Module : Modules are used to access the functionality of ServiceNow,these functionalities are dependent on tables. To create Modules ,search Module in Navigation Panel. Click on New Button to create new Module, as shown in above picture Write Module Name and Application Name under which we want to add Module, as shown in below picture,. E.g Module Name as Contains Role Module,       Application Name : LTI Training Instead of writing Application Name directly,You can select it from the list by clicking on the search button in Application Menu option. Visibility Tab : Override application menu roles : Allows users to access this module even if they do not have permission to view the containing application menu. Users must still meet the role requirements for this module. Link Type : Link type field specifies what type of link the module opens. We can find a lot of link types,as shown in the picture below. Table : Number of table can be seen under Table, For now, Take table name as sys_user_role_contains  and click on Submit,as shown in the picture below. So now,if you search LTI Training in a navigator filter, you can see it with the module which we have added previously. (See Below Picture ) If you click on that module you will see all the contained role list. We can Edit Application by clicking on Pencil near Application name as shown in below picture. we can find related modules at the bottom of the form. (See the picture below) In above Picture, If you click on New Button near Modules,a new form will be generated for new module and Application Name will be automatically displayed. Write Module Name,Link Type and Table name and Click on Submit button,as shown in above picture. Link Type URL example : See below picture for URL link type example.(_blank is used to open that link in new window) Note : If you assign any role to user then that user need to logout and login again to get that access. You can give an order to a module ,Double click below Order for the required module.( as shown in above picture,) Link Types Explanation : Link type field on the Module form specifies what type of link the module opens. Assessment Links to the assessment-based survey you select in the Assessment reference field. Content Page Displays the content page you select in the Content page reference field. Documentation Link Links to a documentation page and opens in a new tab or window. This link type is used with embedded metadata in documentation topics. To open an internal document from a module, use the URL (from Arguments) module link type. Homepage Displays the homepage you select in the Homepage reference field. HTML (from Arguments) Places HTML in the application navigator. This link type is used for more complicated links, where a flat URL is not customizable enough. Note: The HTML (from Arguments) link type is supported in UI15 and UI11 only. In UI16, use the URL (from Arguments) link type instead. Enter a value for the Arguments field. List Filter Displays an unpopulated list view for the table you select in the Table field. Allows users to specify a filter without loading the list first. Use the Filter field to define the default filter for the list. Use the View name field to specify a  List of Records Displays the list view for the table you select in the Table field. Use the Filter field to define the default filter for the list. Use the View name field to specify a view. Map Page Displays the map page you select in the Map page reference field. New Record Displays a form for creating a record in the table you select in the Table field. Use the View name field to specify a view. Use the Arguments field to apply a template. Run a Report Runs the saved report you select in the Report field. Script (from Arguments) Runs a script, as defined in the Arguments field. Note: Enter a value for the Arguments field. Search Screen Link that displays a blank form for searching records in the table. Use the View name field to specify a view. Note: Use the parameter &sysparm_result_view=view_name to define the view the results are rendered in. Note: All searches use a [starts with] query to search for matching text. Other query types are not supported in search screens. Separator Creates a division between modules. Enter a name in the Title field to add a section name that users can collapse or expand. Single Record Displays a form for a single record on the table. Use the

Dictionary Entry in Service-now

Dictionary Entry in Service-now Dictionary Entry : Types Of Fields : String Reference Choice field (Dependent field)         True/false field List Journal     To find the table name of a field ,Right click on that field,Click on Configure Dictionary as shown in below picture,     Details of that field will be displayed as shown in below picture,     To add new column to a Table ,Right click on the required form, click on Configure -> Dictionary as below,     Click on New to create new field on the following form,   Clicking on New Button ,Following form will be displayed where we can create fields of different types.     e.g  create a State field of Type String as shown in below picture,   The new field can be seen in the table as below,       Choice Type Example : Lets convert the State field to Choice Type. Right click on that field, Click on Configure Dictionary, as below       State field in Dictionary Entry will be displayed. In below Section, Choice List Specification, Select Dropdown with None as a Choice ,as shown below,     Save the changes as below,     To add values in that dropdown , Click on Choices Tab in below Section, Click on New Button, as shown in below picture,     The following form will be displayed after clicking on New Button.   The List can be seen in the Dropdown as below,     Dependent Field : This field is dependent on another field in a table. e.g  City depends on State     In Dictionary Entry for City , assign Dependent field as below,     We need to set Dependent Value also, as shown below,       Now, If we select Maharashtra state, Cities from Maharashtra only displayed in City dropdown., as shown below   Similarly for other state,another cities are displayed.   You can use existing Choice table also to display the List.     Reference Field : Field refers to another field.     The Reference field User will be added to the form as below,     You can select any user from a list of users from sys_user table by clicking on magnifying glass next to User as below,     After selecting a record, Display Value of that table (Reference table) will be displayed as below,         Display Value : This Value is a representation of that record in a reference field that is for whole table.Therefore there will be only one Display Value for a table. If there are more than one display value for a table then the updated value will be set as Display value.       Clicking on Open Record button , the entire record can be seen as below,  

Automated Test Framework(ATF) in Service-now

Automated Test Framework (ATF)     With the Automated Test Framework (ATF), we can create and run automated tests on our Service Now instance.              Whenever we upgrade to any instance, we can run these tests to confirm that the instance still works as designed.              To enable test execution –>select Properties of ATF application–>select the yes option to enable test/test suite execution.                createnew test case, search for test module in left navigation -> Click on  New                New form will be open as follows-                To add test step – >Click on Add Test step                Step 1 – Select create a user option                Specify user details like first name, last name, roleetc and impersonate this user, so test case will be run as newly created user.                  Step 2- To check the mandatory fields, need to open an existing record first-                Select table name and record                Step 3 – Select field state validation option                Select table name, Visible, Read only, mandatory etc options-àSave                Now run the test case                Test result-                If every step works as per expectation then you can see following successful test status.                Test case evidence are also collected, we can see them from test result, open latest record                See the attachments; at every step one test evidence is getting captured.

GlideDate in Servicenow

GlideDate in Servicenow gs.print(new GlideDateTime(“2011-08-01 12:00:00”).getDate()); var tt=new GlideDateTime().getDate();gs.print(tt); var ss=new GlideDateTime(“2017-11-04 12:00:00”).getDate();gs.print(ss); gs.print(Date()); …………………………………………………………………………. var g = new GlideDate();g.setValue(‘2015-01-01’);gs.info(g); var gDT = new GlideDateTime(g);gs.info(gDT); ……………………………………………………………………………………………………………. var gdt1 = new GlideDateTime(“2016-05-15”);var gdt2 = new GlideDateTime(gs.now());var dur = new GlideDuration(); var dur = GlideDateTime.subtract(gdt1, gdt2); //the difference between gdt1 and gdt2var temp = dur.getDisplayValue()gs.print(temp); var r= parseInt(temp);if(r==30 || r==60 || r==90){gs.print(“trigger”);}else{gs.print(“no”);} ……………………………………………………………………………………………………………………………………..   var gr = new GlideRecord(‘incident’);gr.get(‘784b900d4f4533001a0f45dba310c713’);var open= gr.opened_at;var gdt = new GlideDateTime(open);gdt.addDays(14);var due_date = gdt; gs.print(“Due Date After 14 days”+due_date); gs.print(“Numaric value for Open date”+gr.opened_at.dateNumericValue());   gs.print(“Open Date”+gr.opened_at); var tempp=gr.opened_at.dateNumericValue()+ 60000; gs.print(“final numaric value”+tempp); gr.opened_at.setDateNumericValue(tempp); gs.print(“Addding 60000 to Open date”+gr.opened_at.getValue());   ……………………………………………………………………………………………………………… var gdt1 = new GlideDateTime(“2019-04-24”); gs.print(gdt1); var gtime1 = new GlideTime();gtime1.setValue(“00:00:20”);gdt1.add(gtime1); gs.print(gdt1);   ………………………………………………………………………………………………………………………….. Javascript will not able give you the result without using time function var a = new Date(‘2013-11-05’);var b = new Date(‘2013-11-05’); if(a == b) {console.info(“a equals b”);}else {console.log(“a NOT equals b”);} if(a.getTime() == b.getTime()) {console.info(“a equals b”);}else {console.log(“a NOT equals b”);}

Dictionary Override  

Dictionary Override Dictionary Override will come into a picture when we have a parent-child relationship between tables. By default, all fields and their attributes are inherited from parent table to child tables. Suppose you want to make a difference in one of the child tables for inherited fields then we will go for Dictionary override.   We can override following properties     Override Reference Qualifiers: A Reference Qualifier in Dictionary Override allows you to change or customize the filtering condition of a reference field only for a specific child table, without affecting the original parent table field.  Override Dependent:-Makes the field dependent on some other field, only in the child table.  Override Default Value: Changes the default value of the field for the child table.   Override Read Only: – Make the field read-only for this child table only.  Override Calculations: – Overrides the calculation formula used by calculated fields.  Override Mandatory: – Makes the field mandatory or not mandatory only for this child table.  Override Attributes: Allows you to override field attributes only for the child table.  Override Display Values: – Allows overriding how the field’s display value is shown for this table.  Making Dictionary Override  Search Tables in Navigation Bar to Make Tables & Click on New.  After Clicking New Page will appear in that Add Table Name à New Menu Name   for Making Child Table We Have Click on Extensible. à Controls à Extensible Click on Box & Submit it, Your Table will be made which is Parent Table.  Now go to table for Making Child Tables in that Add Table Name, In Extends Table Give Name of parent Table to Make this table a child table & submit it.  Search tables for Parent & Child Tables in Navigation Bar, Perform Dictionary Override.  Users must Make Field from Form Layout in Parent Table & That field will automatically Inherit to Child tables.  Child Table All Fields Inherit from Parent Table.  Now Add Records in Parent Tables  Note: If User adds Records to Parent Table, then that record will not be visible in Child Tables. But when we insert records in Child tables then child table records will visible Parent tables.  If we have to do Perform operation on Parent table field   Go to Parent table fields à Configure Dictionary à In Right side, their option for doing Read only, Mandatory, Display.  If we have to Perform operation on child table field   Go to child table fields à Configure Dictionary à Dictionary override-> New-> There will be all operations.  Base Table: – is the parent table  Table: – The table where we can change override property.  These are the above properties by using, we can perform dictionary override.  Ex: – If User wants to do Override the name field by Read-only then user can do with the below steps.  Go to child Table->Right click on Name->Configure Dictionary->  Click On Dictionary Override-> Click on New.  Click on -> Override Read Only-> Sumit the Record.   After submitting the record check in the child table. If filed get read-only or not.  And here the field is read only.  Note: When we Apply Override in Child table, it does not Apply to Parent table. Summary:   Dictionary Override in ServiceNow is used when you have a parent–child table relationship and want a child table to behave differently from the parent. Normally, all fields and their properties are inherited from the parent table, but with a dictionary override you can change things like default values, read‑only settings, mandatory status, reference qualifiers, calculations, attributes, and display values only for the child table. To use it, you first create a parent table (by making it extensible) and then create a child table that extends it. Any field added to the parent automatically appears in the child, but records added in the parent do not show in the child, while child records appear in the parent. To override a field, open the child table, right‑click the inherited field, go to Configure Dictionary, and create a new Dictionary Override where you select the property you want to change. The override affects only the child’s table and never the parent.