Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hiveriselabs.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide sets up a ServiceNow Import Set that receives Forager attestations into a staging table. A Transform Map then applies the data to the CMDB on your schedule or automatically on insert. Choose this approach if your organization requires staged, validated, or change-controlled CMDB updates before data lands on CI records.
For direct, real-time CI updates without a staging step, see ServiceNow — Scripted REST API instead.

What happens

Field tech scans asset (Forager app)
  → Attestation recorded in Forager
  → Forager POSTs row to your Import Set table
  → Transform Map maps fields to CI records
  → CI records updated on transform run

ServiceNow setup

Step 1 — Create a dedicated integration user

Same as the Scripted REST API guide — create a forager_integration user with:
  • rest_service role
  • import_transformer role (instead of itil)

Step 2 — Create the Import Set table

  1. Go to System Import Sets → Administration → Tables → Create table
  2. Set:
    • Label: Forager Attestation Import
    • Name: u_forager_attestation_import (auto-populated)
    • Import set table:
  3. Add columns:
Column labelColumn nameType
Asset Tagu_asset_tagString (100)
Location Pathu_location_pathString (500)
Anchor Nameu_anchor_nameString (200)
Updated Byu_updated_byString (200)
Event Typeu_event_typeString (50)
Timestampu_timestampString (50)
  1. Save

Step 3 — Create a Transform Map

  1. Go to System Import Sets → Administration → Transform Maps → New
  2. Set:
    • Name: Forager to CMDB CI
    • Source table: u_forager_attestation_import
    • Target table: cmdb_ci (or your specific CI subclass)
  3. On the Field Maps tab, map:
Source fieldTarget fieldCoalesce
u_asset_tagasset_tag✅ (used to find the existing CI)
u_location_pathu_forager_location
u_anchor_nameu_forager_anchor
u_updated_byu_forager_confirmed_by
u_event_typeu_forager_event_type
u_timestampu_forager_confirmed_at
The u_forager_* target fields need to be created on cmdb_ci first. See Step 4 of the Scripted REST API guide for instructions.
  1. Set Coalesce on u_asset_tag → asset_tag so the transform updates the existing CI rather than creating a new one
  2. Save

Step 4 — Configure auto-transform (optional)

To transform automatically on every import (real-time behavior):
  1. On the Transform Map, check Run business rules
  2. Create a Business Rule on the import table:
    • When: after insert
    • Script:
      var transformer = new GlideImportSetTransformer();
      transformer.transformAllMaps(current);
      
Without auto-transform, rows accumulate in the staging table and can be transformed on a schedule via a scheduled job.

Forager dashboard setup

  1. Go to Settings → CMDB Webhooks → Add webhook
  2. The endpoint URL is the ServiceNow Table API pointing at your import table:
    https://[instance].service-now.com/api/now/table/u_forager_attestation_import
    
  3. Auth Header: Authorization / Basic [base64(username:password)]
  4. Replace the payload template with a flat field map matching your import table columns:
{
  "u_asset_tag": "{{asset_tag}}",
  "u_location_path": "{{location_path}}",
  "u_anchor_name": "{{anchor_name}}",
  "u_updated_by": "{{updated_by}}",
  "u_event_type": "{{type}}",
  "u_timestamp": "{{timestamp}}"
}

Testing

curl -X POST "https://[instance].service-now.com/api/now/table/u_forager_attestation_import" \
  -H "Authorization: Basic [your-base64-value]" \
  -H "Content-Type: application/json" \
  -d '{
    "u_asset_tag": "LAPTOP-00412",
    "u_location_path": "Main Building / Floor 2 / IT Office",
    "u_anchor_name": "IT Office",
    "u_updated_by": "Test User",
    "u_event_type": "match",
    "u_timestamp": "2026-05-12T19:00:00Z"
  }'
Verify a new row appears in your u_forager_attestation_import table, then run the Transform Map manually to confirm it maps to the correct CI.