Skip to main content

KPI formulas (custom KPIs)

Create your own KPIs: functions, parameters, operators, ready-to-use formulas (response rate, detractors, CSAT, resolution time) and troubleshooting.

F
Written by François Forest

Menu → Settings → KPI formulas

In short: a custom KPI is a formula written once and reused wherever you choose a KPI: reports, charts, score tables, benchmarks. It's recalculated live based on the page's filters, period and team, and can rely on the topics and sentiment calculated by AI.

Create a KPI

  1. Go to Settings → KPI formulas and click Add a formula.

  2. Enter the Name, a Description and the Formula.

  3. Choose a Suffix (%, /5, h, a currency…) and a Format (0, 0.0, 0.00…).

  4. Turn on Lower is better if a decrease is good news (detractors, delays, effort).

  5. Set the Visibility for your teams, then save.

The formula is tested when you save. If it can't be calculated, the message "This formula is invalid." appears. See Troubleshooting.

Best practices: a name everyone understands, a description whenever the scope isn't obvious, always a suffix, and one simple KPI per question rather than a formula that does everything.

Syntax

A formula combines functions. Each function can be restricted by conditions, always written in groups of three:

function("parameter.property", "operator", "value")

Rule

Example

One condition

feedback("import.type", "=", "trustpilot")

Several conditions = AND

feedback("survey.id", "=", "1526", "nps.profile", "=", "promoter")

Several values (array) = OR

feedback("team.id", "=", ["1234", "323"])

No condition = the whole scope

feedback()

Combine with + - * / ^ % and parentheses

feedback("nps.profile", "=", "detractor") / feedback() * 100

Straight quotes are required around the parameter, the operator and the value (except numbers and booleans in an array). The number of arguments in a function is always a multiple of three.

A division by zero returns 0. A formula never returns data that a user isn't allowed to see.

Functions

Function

Returns

Unit

Accepted parameters

feedback()

Number of feedback

Count

All standard parameters*

response()

Number of feedback with at least one matching response

Count

Standard*

push()

Number of invitations sent (email and SMS)

Count

push, survey; = operator only

nps()

Net Promoter Score

−100 to 100

Standard*

satisfaction()

Satisfaction ratio (includes the sentiment of text responses)

0 to 100

Standard*

sentiment()

Average sentiment, calculated by AI

0 to 100

Standard*

ces()

Customer Effort Score

The question's scale

Standard*

ratings() / ratingsTable()

Average of ratings / rating grids

The question's scale

Standard*

time()

Average time to complete a survey

Minutes

feedback, import, nps, question, segment, survey

resolutionTime()

Average resolution time (assigned feedback only)

Seconds

Same as time()

financial()

Financial impact: (opportunities − risks) × average customer value

Currency

financial only

attribute_avg/sum/min/max/qty()

Aggregation of a numeric attribute

The attribute's unit

aggregate_attribute (required) + standard* except question

url()

A value read from an external API

Free

link only

* Standard parameters: attribute, feedback, import, nps, question, response, segment, survey, team, topic.

push() only counts invitations from Feedier surveys: it returns 0 without a Feedier Survey connection or without a survey source in the scope. financial() uses the average customer value set in Settings → Teams → Advanced; without it, it returns 0.

KPIs that rely on AI

Building block

Calculated by AI

KPI example

sentiment()

The sentiment of each passage

Sentiment of Google reviews about delivery: sentiment("import.type", "=", "google_review", "topic.name", "==", "Delivery")

topic.name

The classification of each verbatim into your topics

Share of feedback that mentions waiting: feedback("topic.name", "=", "Waiting") / feedback() * 100

satisfaction()

The qualitative half of the ratio (text sentiment)

Parameters

Parameter

Values

Good to know

attribute.id / attribute.name

"city" or "city:Berlin"

With :value, keeps only that value

aggregate_attribute.id / .name

The attribute to aggregate

For attribute_*() functions; it's not a filter

feedback.id

An ID

—

feedback.type

completed, incomplete

Feedier surveys only: imported feedback is excluded

financial.type

risk, opportunity

For financial()

import.type

feedier_survey, csv, trustpilot, google_review, google_reviews_competitor, google_play_reviews, apple_app_store_reviews, amazon_reviews, avis_verifies, glassdoor, indeed, homeviews, facebook, instagram, hubspot, salesforce, zendesk, easiware, bigquery…

No "all" value: call the function without a condition

nps.profile

promoter, passive, detractor

passive, not "neutral"

push.canal

email, sms

For push()

push.status

scheduled, requested, processed, delivered, opened, clicked, bounce, dropped, deferred, spamreport, unsubscribe

bounce, not "bounced"

push.includeFollowUps

true, false

Includes reminders

question.id / question.name

An ID or the exact label

Including accents and punctuation

question.type

nps, textarea, ratings, ratingsTable, ces, choices, order, smiley

No slider type

question.option_id / .option_name

A choice or a grid row

—

response.value

"5" or [4, 5]

Combine with a question.* condition

segment.id, survey.id, team.id

An ID

Visible in the URL of the corresponding page

topic.name

The exact name of a topic

A topic from your taxonomy, assigned by AI

link.link

A URL

For url()

Values are checked against your workspace: an unknown ID, topic or label makes the whole formula invalid.

Operators

Operator

Scope

Effect

=

Whole feedback

Keeps the feedback that meets the condition

!=

Whole feedback

Excludes that feedback

==

Element (response, verbatim, topic)

The condition must be met by the same element

!==

Element

Removes those elements from the calculation, keeps the rest of the feedback

The strict operators == and !== can only be used with question, response and topic. Example with a topic's sentiment:

Formula

What is measured

sentiment("topic.name", "=", "Packaging")

Entire feedback that mentions packaging, including everything else it says

sentiment("topic.name", "==", "Packaging")

Only the passages about packaging

sentiment("topic.name", "!=", "Packaging")

Feedback that never mentions packaging

sentiment("topic.name", "!==", "Packaging")

All feedback, minus what it says about packaging

Ready-to-use formulas

KPI

Formula

Settings

Response rate

feedback("import.type", "=", "feedier_survey") / push() * 100

%

Detractor rate

feedback("nps.profile", "=", "detractor") / (feedback("nps.profile", "=", "promoter") + feedback("nps.profile", "=", "passive") + feedback("nps.profile", "=", "detractor")) * 100

%, Lower is better

Promoter rate

feedback("nps.profile", "=", "promoter") / (feedback("nps.profile", "=", "promoter") + feedback("nps.profile", "=", "passive") + feedback("nps.profile", "=", "detractor")) * 100

%

CSAT (ratings of 4 or 5)

feedback("response.value", "=", [4, 5], "question.type", "=", "ratings") / feedback("question.type", "=", "ratings") * 100

%

Share of Google reviews

feedback("import.type", "=", "google_review") / feedback() * 100

%

Share of a chosen option

feedback("question.option_name", "=", "Option A") / feedback("question.type", "=", "choices") * 100

%

Resolution time

resolutionTime() / 3600

h, 0.0, Lower is better

Revenue at risk

financial("financial.type", "=", "risk")

Currency (negative value)

Detractors' average order value

attribute_avg("aggregate_attribute.name", "=", "order_amount", "nps.profile", "=", "detractor")

Currency

Response rate: only Feedier surveys generate invitations. On a source that mixes 57 survey responses and 181 CSV rows for 654 invitations, the rate is 57 / 654 = 8.7%: CSV rows are excluded.

Read an external value with url()

url("link.link", "=", "https://example.com/api/metric~data.value")

Element

Role

The URL

Called with GET, server-side, over http or https

The path after ~

The key to read in the JSON response (default: response)

{fql}

Replaced by the page's filters

{user.id}, {user.email}

Replaced by the user viewing the KPI

{apikey}

Replaced by the workspace's private key

The request contains your private key: only call endpoints you control. An endpoint that's too slow makes the whole formula fail.

Troubleshooting

Symptom

Cause

Solution

"This formula is invalid."

Syntax, unknown value or parameter not accepted

Check in this order: quotes and groups of three, exact values, Accepted parameters column

Operator rejected

== or !== outside question, response, topic; or anything other than = in push()

Go back to = or !=

The KPI shows 0

Division by zero, or nothing matches

Create the numerator and the denominator as two KPIs to find the empty one

push() returns 0

No Feedier Survey connection or source in the scope

Check the source being measured

Value off by a factor

resolutionTime() is in seconds, time() in minutes

Convert and adjust the suffix

url() fails

Timeout or nonexistent JSON path

Test the URL outside Feedier


Last reviewed: November 11, 2026, version 4.23.5.

Did this answer your question?