Hello,
If you haven’t used the new feature Policy and Compliance Integrator, roll your sleeves up – this is a game changer. Forget about transform maps to import Authority Documents, Citations and Control Objectives, this scripted REST api will do everything for you.
In addition to the article Using the GRC: Policy and Compliance integrator to display batch records and import tasks (servicenow.com), I will share the Postman collection with APIs (which SN didn’t share but they mentioned) so you can use and abuse.
Step 1 – Create a batch
- Go to Postman and create a new collection called “CIM API Collection”.
- In the tab “Variables”, create a new variable inside the collection called “instance” with value “https://YOUR_INSTANCE.service-now.com”
- In the tab “Authorization”, set up your REST api user and password. Dont forget in order to create new batches you need to be a compliance admin.
- Go to sn_grc_provider table and create a new provider called “communityProvider”. If you don’t do it, when you create a batch it will create a new Provider import task and you need to complete few more steps in order to get the new provider generated.
- Create a new POST method called “Create batch” with the following URL
{{instance}}/api/sn_grc_cim/content/compliance/batch/create
The body should be something like this:
{
"provider": "communityProvider",
"type": "compliance"
}
Save the batch number because you are going to use it to create staging records or any interaction with the API.
Step 2 – Create the staging records
- Go to Postman and inside your collection “CIM API Collection” create a new method called “Insert stagging records” with the following URL: “{{instance}}/api/sn_grc_cim/content/compliance/insert”
- The body should contain something like this:
{"batch_number":"CIB0001008", "records": [{ "document_id": "123456789", "name": "GRC Authority Document api", "description": "GRC Authority Document API", "citations": [{ "document_id": "123456789", "name": "GRC Citation api", "control_objectives": [ { "document_id": "123456789", "name": "GRC Control Objective api" } ] }] }]}
This code will generate one AD, one citation and one control objective.
3. Update batch to ready
- Go to Postman and inside your collection “CIM API Collection” create a new method called “Update batch status to ready” with the following URL: “{{instance}}/api/sn_grc_cim/content/compliance/batch/ready”
The body should contain something like this:
{
"batch_number": "CIB0001008"
}
The end result should be something like this:
3. Kick process, review task and complete process
- After this moment you need to kick the process by going to the Flow Designer, search for “Compliance staging processor” and run. Check the flow designer how often this process runs. Out of the box this runs weekly basis, every Monday. A new import task will be created after the flow has been executed.
- Go to “Library import task” and review the staging records if necessary. At this stage, you can add an approver, or approver group, etc etc.
- The new authority document with citations and control objectives will be created when the import task is completed.
If you need anything, please let me know and I can share the Postman collection to save you some time.