@zoominfo/gtm-ai-cli 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +72 -8
  2. package/dist/index.js +90 -92
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  A command-line interface for searching [ZoomInfo](https://www.zoominfo.com/) go-to-market (GTM) data.
4
4
  Search and enrich companies and contacts, surface intent / news / scoop signals, browse engagement history,
5
- manage GTM context, and pipe results through your shell as JSON, JSONL, CSV, YAML, or a table.
5
+ manage GTM context, clean and score your own records, send records to connected systems, and pipe
6
+ results through your shell as JSON, JSONL, CSV, YAML, or a table.
6
7
 
7
8
  ## Installation
8
9
 
@@ -87,20 +88,20 @@ gtm auth login
87
88
 
88
89
  ## Output formats
89
90
 
90
- Every subcommand accepts `-f, --format`. The `table` and `csv` formats auto-flatten JSON:API envelopes (`data: [...]`) and one-level-nested objects (`company.id`, `company.name`); `json`, `jsonl`, and `yaml` preserve the exact response shape.
91
+ Every subcommand accepts `-f, --format`. The `table` and `csv` formats auto-flatten JSON:API envelopes (`data: [...]`) and one-level-nested objects (`company.id`, `company.name`); `jsonl` emits each record of a list response on its own line; `json` and `yaml` preserve the exact response shape.
91
92
 
92
93
  | Format | When to use |
93
94
  |---|---|
94
95
  | `json` (default) | Pretty-printed JSON. Pipe to `jq` for field extraction. |
95
96
  | `jsonl` | One JSON object per line. Stream into log/data pipelines. |
96
- | `csv` | Flat CSV with headers; nested objects are dot-flattened, arrays are stringified. |
97
+ | `csv` | Flat CSV with headers; nested objects are dot-flattened, arrays are stringified. Text cells that a spreadsheet would run as a formula (leading `=`, `+`, `-`, `@`) are prefixed with `'`. |
97
98
  | `yaml` | Human-readable diffs of deeply nested responses. |
98
99
  | `table` | ASCII bordered table. Best for terminal browsing of small responses. |
99
100
 
100
101
  ```shell
101
102
  gtm companies search --industry software -f table
102
103
  gtm contacts search --management-level "C Level Exec" -f jsonl > c-level-contacts.jsonl
103
- gtm-context get -f yaml
104
+ gtm gtm-context get -f yaml
104
105
  ```
105
106
 
106
107
  ### Projecting fields with `--select`
@@ -346,16 +347,16 @@ This is the context that shapes how every other ZoomInfo tool interprets your qu
346
347
 
347
348
  ```shell
348
349
  # Compressed view (~1k tokens)
349
- gtm-context get
350
+ gtm gtm-context get
350
351
 
351
352
  # Full expanded profiles
352
- gtm-context get --detailed -f yaml
353
+ gtm gtm-context get --detailed -f yaml
353
354
 
354
355
  # Update — synthesizes unstructured content into structured records (admin only)
355
- gtm-context update --query "Update competitive intelligence" --source "Our main competitors are X, Y, Z. X is strong in …"
356
+ gtm gtm-context update --query "Update competitive intelligence" --source "Our main competitors are X, Y, Z. X is strong in …"
356
357
 
357
358
  # From a file (large inputs)
358
- gtm-context update --query "Create buyer personas from these interviews" --source-file ./interview-notes.txt
359
+ gtm gtm-context update --query "Create buyer personas from these interviews" --source-file ./interview-notes.txt
359
360
  ```
360
361
 
361
362
  ---
@@ -470,6 +471,69 @@ call). Column and row IDs come from `gtm audiences get`.
470
471
 
471
472
  ---
472
473
 
474
+ ### `gtm data-quality` (alias `dq`) — prepare, segment, and score your own records
475
+
476
+ Data Quality (beta) cleans and classifies records you bring and returns the results inline;
477
+ nothing is stored or written to another system. The default prepare steps (parse, validate,
478
+ normalize) are free. `--line-type`, `--verify`, custom normalization (`--config-id`, `--rules`),
479
+ `score`, and `segment` use credits.
480
+
481
+ ```shell
482
+ # Clean emails, phones, addresses, job titles, or person names (up to 30 per call)
483
+ gtm dq prepare email " Jane.Doe@Example.COM " "jane@" --select input.email,value.fullEmail,isValid -f table
484
+ gtm dq prepare phone "(617) 555-0123" --line-type
485
+ gtm dq prepare address --file ./addresses.json --verify
486
+
487
+ # Custom normalization: a saved config, or inline rules grouped by rule group
488
+ gtm dq prepare phone "+1 617 555 0123" --config-id <configId>
489
+ gtm dq prepare phone "+1 617 555 0123" --rules ./phone-rules.json # { "phone": [{ "type": "INT_FORMAT", "value": "E164" }] }
490
+
491
+ # Segment or score up to 25 records against saved configs
492
+ gtm dq segment --config-ids <configId> --file ./leads.json
493
+ gtm dq score --config-ids <configId> <configId> --file ./leads.json
494
+
495
+ # Results are in input order; e.g. each lead's email and first score as CSV
496
+ gtm dq score --config-ids <configId> --file ./leads.json \
497
+ | jq -r '.data.attributes.records[] | [.input.email, .outputs[0].value] | @csv'
498
+
499
+ # Manage configs (kinds: normalize, score, segment)
500
+ gtm dq configs list score
501
+ gtm dq configs get score --id <configId>
502
+ gtm dq configs create score --file ./icp-score.json
503
+ gtm dq configs update score --id <configId> --file ./icp-score.json
504
+ gtm dq configs delete score --id <configId>
505
+ ```
506
+
507
+ `prepare --file` takes a JSON array of raw strings, or of objects holding pre-parsed components
508
+ (e.g. `{ "number": "6175550123", "countryCode": "US" }` for a phone) to skip parsing. Results are
509
+ positional: `data[i]` is the result for value `i`, and a value that can't be processed returns a
510
+ `PrepareError` in its slot. `score` / `segment --file` takes a JSON array of records keyed by the
511
+ field names the configs use. Config files hold the config's attributes (for `update`, send the
512
+ complete config for score and segment configs); see the
513
+ [Data Quality API reference](https://docs.gtm.ai/reference/preparecontroller_prepare) for each
514
+ kind's schema.
515
+
516
+ ---
517
+
518
+ ### `gtm exports` — send records to connected systems
519
+
520
+ Exports (beta) send ZoomInfo companies or contacts to the systems your organization has connected,
521
+ such as a CRM. Running an export writes to that system; runs are asynchronous.
522
+
523
+ ```shell
524
+ gtm exports list -f table
525
+ gtm exports get --id <exportId>
526
+
527
+ # Send up to 50 records as one run, then check on it
528
+ gtm exports run --id <exportId> --company-ids 344589814 239305146
529
+ gtm exports status --id <runId>
530
+
531
+ # Or wait for the run to finish (exits non-zero if it fails or is stopped)
532
+ gtm exports run --id <exportId> --contact-ids 1260398587 --wait
533
+ ```
534
+
535
+ ---
536
+
473
537
  ### `gtm raw` — universal escape hatch
474
538
 
475
539
  Use this when you need a tool that doesn't have a curated wrapper yet.