CortexDB Docs
Docs for CortexDB 0.12.8, the version running on CortexDB Cloud (api.cortexdb.ai).
Connectors

ServiceNow Connector

Ingest ServiceNow incidents, problems, and their work notes into CortexDB.

Tails ServiceNow records (incidents, problems, changes) and their comments / work notes, and writes them to CortexDB as experiences.

Two ways to run this connector

Self-hosted — pip install 'cortexdb-connectors[servicenow]' then cortexdb-sync sync servicenow. Managed — CortexDB runs the connector as a worker. See the Connectors overview.

1. Prepare credentials

Self-host and dashboard use different auth

The managed dashboard uses OAuth (client id/secret). The self-hosted connector uses basic auth — a ServiceNow instance name plus a username and password (a dedicated integration user with read access to the tables you want is recommended).

What gets written

Each record and work note becomes a POST /v1/experience on the resolved scope (default org:<org>/source:servicenow), with an entity reference to the record and metadata (table, sys_id, state, a source_url).

Record keys and threads

  • The idempotency_key is snow:{table}:{sys_id}.
  • A problem's linked incidents are carried via a thread=… label, not context.preceded_by.

The key on the wire is derived

The key format above is this connector's internal record identity: it decides which source record an event belongs to. The idempotency_key actually sent to CortexDB is a derived cxsrc:<56 hex> value that also hashes the content, labels, observed time and actor, so an unchanged redelivery converges on the same event while any edit lands as a new one, even where the key format itself is not content-versioned. Every event also carries a source descriptor with the record's fingerprint. See Source identity and keys.

Run it yourself

pip install 'cortexdb-connectors[servicenow]'
pip install cortexdb-cli && cortexdb init

export SNOW_INSTANCE=acme                 # required (e.g. acme for acme.service-now.com)
export SNOW_USERNAME=integration.user     # required
export SNOW_PASSWORD=...                  # required

cortexdb-sync --api-url http://localhost:3141 sync servicenow
cortexdb-sync --api-url http://localhost:3141 watch servicenow --interval 300

Optional settings

Set these as environment variables (or the matching keys in the cortexdb-sync YAML config). Lists are comma-separated. For on/off settings, 1, true, yes or on turns the setting on and any other value turns it off.

SettingWhat it doesDefault
SNOW_TABLESTables to syncincident, change_request, problem, kb_knowledge, sc_task

See also

On this page