Skip to main content
This guide sets up a ServiceNow endpoint that receives Forager attestations and updates the matching CI record in real time. Choose this approach if your team wants immediate CI visibility and full control over which fields get updated.
If your organization requires change-controlled or staged CMDB writes, see ServiceNow — Import Sets instead.

What happens

ServiceNow setup

Step 1 — Create a dedicated integration user

  1. Go to User Administration → Users → New
  2. Set:
    • User ID: forager_integration
    • Web service access only:
  3. Set a strong password and save it — you’ll enter it in Forager
  4. On the Roles tab, add:
    • rest_service — allows REST API authentication
    • itil — allows creating and updating CI records
Do not grant the admin role. Use the minimum roles required.

Step 2 — Create the Scripted REST API

  1. Go to System Web Services → Scripted REST APIs → New
  2. Set Name: Forager Asset Location, API ID: forager_asset_location
  3. Save

Step 3 — Add a Resource

  1. In the Resources tab, click New
  2. Set Name: Receive Attestation, HTTP method: POST, Relative path: /attestation
  3. Paste this script:
  1. Save the resource

Step 4 — Add custom fields to cmdb_ci

The script writes to five custom fields. Create them on cmdb_ci (or a specific subclass):
  1. Open any CI record → right-click a column header → Configure → Table
  2. Open Columns and add:
These are string fields rather than the native ServiceNow location reference field. The native field requires a sys_id from the cmn_location table. Forager sends a human-readable breadcrumb (Building A / Floor 2 / IT Office), which maps cleanly to a string field. A Transform Map can bridge these if needed later.

Step 5 — Get your endpoint URL

Your endpoint URL follows this pattern:
Find your namespace on the Scripted REST API record or via Explore REST API. Copy the full URL.

Forager dashboard setup

  1. Go to Settings → CMDB Webhooks → Add webhook
  2. Fill in:

Generating the Basic Auth value

Prefix the output with Basic : Basic Zm9yYWdlcl9pbnRlZ3JhdGlvbjpZb3VyUGFzc3dvcmQ=

Testing

Expected response:
Then open the CI record in ServiceNow and verify the u_forager_* fields were updated.

Troubleshooting