SoluCX Indicators
This is a TypeScript library for calculating various customer satisfaction indicators. It includes support for NPS, CES, CSAT, CSAT10, NSS, LD, and NONE indicators.
To install this package, use the following command:
``sh`
npm install @solucx/indicators
> This is a private repository. You should be logged in into a allowed npm account or keep this authorized .npmrc credentials file at project or usr root folder.
Here's how you can use the indicators in your TypeScript code:
`ts
import Indicators, { Type } from '@solucx/indicators';
// Create an instance of a specific indicator
const npsIndicator = Indicators.getIndicator(Type.NPS);
// Calculate the score
const score = npsIndicator.getScore(positives, negatives, neutrals);
// Calculate the sampling error
const error = npsIndicator.getSamplingError(total, positives, negatives, neutrals);
`
You can replace Type.NPS with any other indicator type like Type.CSAT, Type.CES, etc. the available indicators are:
- CSAT
- CSAT10
- CES (depreciado)
- CES2
- LD
- NONE
- NSS
- NPS
the indicators shall follow the following rules:
- https://solucx.atlassian.net/wiki/spaces/SCX/pages/2053931009/Indicators
To run the test suite use npm run test
To publish a new version of the SDK follow this steps:
1. npm version (major|minor|patch)npm publish
- major -> breaking changes
- minor -> non-breaking changes
- patch -> bugfixes
2. npm login
- you have to logged in npm ()https://www.npmjs.com/package/@solucx/indicators
- you should have access to the npm package ()git push --tags`
3.