KPI Formulas
KPI Formulas allow to use KPIs inside a formula and get the result.
Please read our help article to understand what are and how to use KPI Formulas : KPI Formulas Documentation
POST/v3/kpi/evaluate
Evaluate a KPI Formula
This endpoint allows you to get the result of a KPI formula.
Required attributes
- Name
formula
- Type
- string
- Description
The KPI formula to evaluate.
Optional attributes
- Name
fql
- Type
- string
- Description
Narrow your search by using our Feedback Query Language (optional). More information in our FQL documentation.
Request
POST
/v3/kpi/evaluatecurl -X POST https://api.bx.feedier.com/v3/kpi/evaluate \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"formula": "feedback()/feedback("question.type","=","select")*100"}'
Request with FQL
POST
/v3/kpi/evaluatecurl -X POST "https://api.bx.feedier.com/v3/kpi/evaluate" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"formula": "feedback()/feedback(\"question.type\",\"=\",\"select\")*100",
"fql": "[{\"TimePeriod\":{\"$eq\":\"date_last_year\",\"$type\":\"and\"}}]"
}'
Response
{
"status":"success",
"formula":"feedback()\/feedback(\"question.type\",\"=\",\"select\")*100",
"result":"147.2972972973"
}