Skip to content
Skillv1.0.0

clari-hello-world

Export your first Clari forecast and pipeline snapshot. Use when testing Clari API connectivity, pulling forecast data, or learning the export API structure. Trigger with phrases like "clari hello wor

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/clari-hello-world/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill clari-hello-world. Copyright stays with the author (MIT).

Clari Hello World

Overview

First API calls against Clari: list available forecasts, export a forecast snapshot, and check export job status. The Clari Export API is the primary integration point for getting forecast, quota, and CRM data out of Clari.

Prerequisites

  • Completed clari-install-auth setup
  • CLARI_API_KEY environment variable set
  • At least one forecast configured in Clari

Instructions

Step 1: List Available Forecasts

curl -s -H "apikey: ${CLARI_API_KEY}" \
  https://api.clari.com/v4/export/forecast/list \
  | jq '.forecasts[] | {forecastName, forecastId, timePeriods}'

Step 2: Export a Forecast

import requests
import json
import os
import time

api_key = os.environ["CLARI_API_KEY"]
headers = {"apikey": api_key, "Content-Type": "text/plain"}

# Replace with your forecast name from Step 1
forecast_name = "company_forecast"

payload = json.dumps({
    "timePeriod": "2026_Q1",
    "typesToExport": [
        "forecast",
        "quota",
        "forecast_updated",
        "adjustment",
        "crm_total",
        "crm_closed"
    ],
    "currency": "USD",
    "schedule": "NONE",
    "includeHistorical": False,
    "exportFormat": "JSON"
})

response = requests.post(
    f"https://api.clari.com/v4/export/forecast/{forecast_name}",
    headers=headers,
    data=payload,
)
response.raise_for_status()

job = response.json()
print(f"Export job started: {job['jobId']}")
print(f"Status: {job['status']}")

Step 3: Check Export Job Status

# Poll for job completion
job_id = job["jobId"]

while True:
    status_resp = requests.get(
        f"https://api.clari.com/v4/export/jobs/{job_id}",
        headers={"apikey": api_key},
    )
    status = status_resp.json()

    if status["status"] == "COMPLETED":
        print(f"Export ready: {status['downloadUrl']}")
        break
    elif status["status"] == "FAILED":
        print(f"Export failed: {status.get('error', 'Unknown')}")
        break

    print(f"Status: {status['status']}... waiting 5s")
    time.sleep(5)

Step 4: Download and Parse Results

if status["status"] == "COMPLETED":
    download = requests.get(status["downloadUrl"])
    forecast_data = download.json()

    # Print summary
    for entry in forecast_data.get("entries", [])[:5]:
        print(f"  Rep: {entry.get('ownerName')}")
        print(f"  Forecast: ${entry.get('forecastAmount', 0):,.0f}")
        print(f"  Quota: ${entry.get('quotaAmount', 0):,.0f}")
        print()

Output

The first run returns the authorized forecast list, job status, and a bounded summary needed to confirm connectivity. Treat the downloaded payload as sensitive revenue data: do not print or persist rep-level calls, quota, adjustments, or CRM totals outside an approved storage boundary.

Examples

Use a staging token to list forecast names, submit one read-only export for an approved test period, and log only the job ID, terminal status, and aggregate entry count. If the job does not complete or the period is not expected, stop the walkthrough and investigate through the bounded rate-limit or diagnostic workflow rather than downloading more data.

Error Handling

Error Cause Solution
401 Unauthorized Bad API key Regenerate token in Clari settings
No forecasts listed Wrong org or no forecasts configured Contact Clari admin
Job stays PENDING Large export Wait longer, check job status endpoint
404 on forecast name Name mismatch Use exact name from list endpoint

Resources

Next Steps

Proceed to clari-local-dev-loop for development workflow setup.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-clari-hello-world/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-clari-hello-world.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-clari-hello-world",
  "kind": "skill",
  "name": "clari-hello-world",
  "description": "Export your first Clari forecast and pipeline snapshot. Use when testing Clari API connectivity, pulling forecast data, or learning the export API structure. Trigger with phrases like \"clari hello world\", \"clari first export\", \"clari test api\", \"clari forecast export\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "general_chat"
    ],
    "tags": [
      "skill-md",
      "saas",
      "revenue-intelligence",
      "forecasting",
      "clari",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Export your first Clari forecast and pipeline snapshot. Use when testing Clari API connectivity, pulling forecast data, or learning the export API structure. Trigger with phrases like \"clari hello world\", \"clari first export\", \"clari test api\", \"clari forecast export\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/clari-hello-world/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/clari-hello-world/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/clari-hello-world/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(curl:*),",
      "Bash(python3:*)"
    ],
    "license": "MIT"
  },
  "instructions": "# Clari Hello World\n\n## Overview\n\nFirst API calls against Clari: list available forecasts, export a forecast snapshot, and check export job status. The Clari Export API is the primary integration point for getting forecast, quota, and CRM data out of Clari.\n\n## Prerequisites\n\n- Completed `clari-install-auth` setup\n- `CLARI_API_KEY` environment variable set\n- At least one forecast configured in Clari\n\n## Instructions\n\n### Step 1: List Available Forecasts\n\n```bash\ncurl -s -H \"apikey: ${CLARI_API_KEY}\" \\\n  https://api.clari.com/v4/export/forecast/list \\\n  | jq '.forecasts[] | {forecastName, forec",
  "cost": {
    "context_tokens": 967
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-clari-hello-world/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.