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
- Go to User Administration → Users → New
- Set:
- User ID:
forager_integration - Web service access only: ✅
- User ID:
- Set a strong password and save it — you’ll enter it in Forager
- On the Roles tab, add:
rest_service— allows REST API authenticationitil— allows creating and updating CI records
Step 2 — Create the Scripted REST API
- Go to System Web Services → Scripted REST APIs → New
- Set Name:
Forager Asset Location, API ID:forager_asset_location - Save
Step 3 — Add a Resource
- In the Resources tab, click New
- Set Name:
Receive Attestation, HTTP method:POST, Relative path:/attestation - Paste this script:
- Save the resource
Step 4 — Add custom fields to cmdb_ci
The script writes to five custom fields. Create them oncmdb_ci (or a specific subclass):
- Open any CI record → right-click a column header → Configure → Table
- 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:Forager dashboard setup
- Go to Settings → CMDB Webhooks → Add webhook
- Fill in:
Generating the Basic Auth value
Basic : Basic Zm9yYWdlcl9pbnRlZ3JhdGlvbjpZb3VyUGFzc3dvcmQ=
Testing
u_forager_* fields were updated.