npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openpets/sprinklr

v1.0.0

Published

Sprinklr plugin for OpenPets - Manage customer cases, social listening, content publishing, and campaign operations through the Sprinklr API. Supports case management, outbound posts, listening queries, and more.

Readme

Sprinklr Plugin for OpenPets

A plugin for integrating with the Sprinklr Unified Customer Experience Management (CXM) platform through OpenCode.

Overview

This plugin provides access to Sprinklr's comprehensive API, enabling you to:

  • Case Management: Create, update, search, and manage customer support cases
  • Social Listening: Monitor social media mentions, keywords, and brand conversations
  • Outbound Publishing: Schedule and manage social media posts
  • Conversations: Search and analyze customer interactions across channels

Features

Core Tools (Manually Implemented)

  • sprinklr-test-connection - Verify API connectivity
  • sprinklr-search-cases - Search and filter cases
  • sprinklr-get-case - Get case details by ID
  • sprinklr-create-case - Create new support cases
  • sprinklr-update-case - Update existing cases
  • sprinklr-list-listening-topics - List monitoring topics
  • sprinklr-search-conversations - Search social conversations
  • sprinklr-list-outbound-posts - View scheduled/draft posts

Auto-Generated Tools (from OpenAPI Spec)

After running pets generate-openapi, additional tools will be available for:

  • Campaign management
  • Custom fields
  • Content briefs
  • Extensions
  • Macros
  • And 200+ more endpoints

Setup

1. Get Sprinklr API Access

  1. Visit https://dev.sprinklr.com
  2. Register as a developer (requires Sprinklr account)
  3. Create a new application
  4. Generate API credentials
  5. Exchange API key/secret for a Bearer token via the authorization endpoint

2. Configure Environment Variables

Copy .env.example to .env and add your credentials:

cp .env.example .env

Edit .env:

SPRINKLR_API_TOKEN=your_bearer_token_here
SPRINKLR_ENV=prod

3. Install Dependencies

cd pets/sprinklr
bun install

4. Generate OpenAPI Tools (Optional)

To generate additional tools from the OpenAPI spec:

pets generate-openapi --verbose

Usage

Testing Connection

opencode run "test sprinklr connection"

Common Queries

# Search for cases
opencode run "search for cases assigned to me"

# Get case details
opencode run "get details for case 12345"

# Create a new case
opencode run "create a new support case for customer inquiry about billing"

# List listening topics
opencode run "list all listening topics"

# Search conversations
opencode run "search conversations mentioning our brand in the last week"

# List outbound posts
opencode run "list scheduled outbound posts"

API Details

  • Base URL: https://api3.sprinklr.com
  • Authentication: Bearer Token (JWT)
  • API Version: 2.0
  • OpenAPI Spec: Available at Sprinklr Developer Portal
  • Endpoints: 264+ available operations

Authentication

Sprinklr uses Bearer Token authentication. Pass your token in the Authorization header:

Authorization: Bearer <your_jwt_token>

Environments

Sprinklr supports multiple environments:

  • prod - Production (default)
  • prod0, prod2, prod3, etc. - Other production instances

Set via SPRINKLR_ENV environment variable.

Development

Project Structure

pets/sprinklr/
├── index.ts          # Main plugin with core tools
├── package.json      # Plugin configuration with OpenAPI spec
├── opencode.json     # OpenCode configuration
├── .env.example      # Environment template
├── openapi-client.ts # Generated client (after generate-openapi)
├── openapi-tools.ts  # Generated tools (after generate-openapi)
└── README.md         # This file

Adding Custom Tools

Edit index.ts to add custom tools. Follow the existing pattern:

{
  name: "sprinklr-my-custom-tool",
  description: "Description of what this tool does",
  schema: z.object({
    param: z.string().describe("Parameter description")
  }),
  async execute(args) {
    // Implementation
  }
}

Testing

Run test scenarios defined in package.json:

# Test connection
bun run test:connection

# Test case search
bun run test:search-cases

# Test listening topics
bun run test:list-topics

Troubleshooting

"Not Configured" Error

Ensure SPRINKLR_API_TOKEN is set in your .env file or environment.

Connection Failed

  1. Verify your API token is valid and not expired
  2. Check you're using the correct environment (prod vs others)
  3. Ensure your Sprinklr account has API access enabled

Rate Limiting

Sprinklr APIs may have rate limits. Check response headers for:

  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

Resources

License

MIT - See repository for details