Guide to Create Staging Tables
Prerequisite¶
-
ServiceNow app “Hire2retire IGA” in your ServiceNow instance should be installed.
-
The setup activities listed below on your ServiceNow instances require applicable privileges and may need to be done by a ServiceNow admin.
Steps to Create the staging table on ServiceNow instance¶
By installing this app, the pre-packaged table “Hire2Retire Staging Table List” and pre-packaged web service “Hire2Retire Incident” and “Hire2Retire User” will be available in your ServiceNow instance.
The table “Hire2Retire Staging Table List” is used to store to list the web services (or the staging tables) that your ServiceNow admin allows the Hire2Retire IGA to access and operate on. You will, therefore, only see the tables or entities as allowed by your ServiceNow admin in the Hire2Retire IGA. This means that you can only add or update records in these tables or entities.
Note: If you need access to additional ServiceNow tables or entities in Hire2Retire IGA, please contact your ServiceNow admin to add new staging tables to “Hire2Retire Staging Table List”.
The prepackaged web service “Hire2Retire Incident” and “Hire2Retire User” is provided as a convenience so that you can access the Incident and User table/entity without having it added to the “Hire2Retire Staging Table List” table and without having to define a webservice to operate on. Incident and User entity are therefore available by default on Hire2Retire IGA.
Detailed Steps¶
The below instructions will walk you, the ServiceNow admin, through how-to setup a web service for records and trigger workflows that will be used by Hire2Retire IGA to create a record in a ServiceNow target table.
-
Finalize the target table you are going to set up. Make sure the integration user has the proper role to access the target table.
-
Search for “System Web Service” in the ServiceNow navigation bar, and under “Inbound” click on “Create New”.
Figure 1. Create New System Web Service -
Now, define the following items after clicking “Create New” button.
Figure 2. Items in System Web Service
a. Label: It’s the name which will be used to identify this Web Service.
b. Name: This is the actual table name in ServiceNow. The value will be updated automatically once you provide the Label name in the step “a” above.
c. Copy fields from target table: This option will allow you to copy the fields from the selected target table. For example, you can copy the fields from target table “Task” to your webservice.
d. Create Transform Map: Transform Map will map and transform the incoming data to the target table fields.
e. Target Table: The table that new or updated record will be persisted to.
- After step 3 is completed, click the “Create” button.
-
Once step 4 is completed, a new page named “Table Transform Map” will open. In this page, you can set up the mapping between the web service (or the staging table) and the target table.
Figure 3. Table Transform Map Page
a. Click the “Auto Map Matching Fields” and it will automatically create the default transform map. You can review the auto mapping here.
b. You can then click “Update” button, shown above, to exit this setup.
-
With step 5, the setup of a web service is completed. Now we are going to add this record to the “Hire2Retire Staging Table List” table so that Hire2Retire IGA picks it up and shows it to you as an available entity or table on the Hire2Retire. Search “Hire2Retire Staging Table List” in the navigation bar and click the “New” button.
Figure 5. Hire2Retire Staging Table List -
In the new page, fill in the value by following the instruction below. Once you complete the form, click “Submit”.
Figure 6. Details of Hire2Retire Staging Table
a. Number: This is an auto-increment number that represents the record in the table.
b. Target Table Display Name: This is the display name of the target table.
c. Staging Table Name: This is the actual table name in ServiceNow.
d. Target Table Name: This is the actual target table name in ServiceNow.
Note: If you choose to use “Auto Map Matching Fields” in step 5, by default ServiceNow will only create “String” type column in staging table with a default length 40 characters. Please update the staging table field metadata to improve the experience.
-
After Step 7, please create the ACL for the Create operation for the staging table which you have created and attach the pre-packaged Role “x_srbtd_h2r.Hire2Retire_integration_role” to that ACL. Below are the steps to create the ACL and attach role to ACL.
Figure 7. Elevate Role to System AdminFigure 8. Elevate Role Dialog Box
Note: Before creating ACL, make sure you elevate your role to system_admin. Steps:
a. Search for “Access Control” in the ServiceNow navigation bar, and under “System Security” click on “Access Control (ACL)”
b. On top right corner, you’ll find New Button. Click on it. c. A new page named “Access Control New Record” will open. In this page, you will configure ACL. In the new ACL form, fill in the following fields:
Operation: Choose the specific operation (e.g., Create, Write) that the ACL will define access for.
Table (Name field): In the Name field, select the Table to which the ACL will apply. This is where you specify the table for the access control.
Field: If you need to apply the ACL to a specific field in the selected table, specify the field here. If the ACL applies to the entire record, leave this field blank.
Role: Assign a Role to determine which user has the required access for the operation. Only users with this role will be able to perform the specified operation.
d. Click on Submit.
After completing the steps above, the Hire2Retire IGA will use the above-defined Web Service to create or update the record in the target table with the use of the defined field mapping.