Skip to main content

Feedback Query Language (FQL)

FQL or Feedback Query Language is Feedier’s syntax for filtering feedback data across the platform or API.

J
Written by Julien Chil Hagopian

Where to use Feedback Query Language (FQL) ?

FQL allows you to create complexe filters on your feedback data. It can be used in :

What is the easiest way to build an FQL filter ?

  1. Create the filter in the platform

2. Copy paste the url of you browser.

3. Decode the URL in any decoder. For example here.

You will obtain something like :

https://bx.feedier.staging.alkalab.com/live-feed/feedback?fql=[[{"Form":{"$in":[453],"$type":"and"}}],[{"Attribute":{"$in":["United States"],"name":"country","$type":"and"}}],[{"Nps":{"$in":["promoter"],"$type":"and"}}]]&page=1

You will find the FQL in it 🎉

What are the available operators ?

A list of operators is available and can be used for perform a query on differents selectors.

Name

Operator

Accepted values

Description

Type

$type

  • and (default)

  • or

The OR comparaison is for the entire query.

Equal

$eq

  • int

  • string

Strict comparaison using = operator.

Not Equal

$ne

  • int

  • string

Strict comparaison using != operator.

Greater Than

$gt

  • int

  • string

Strict comparaison using > operator.

Lower Than

$lt

  • int

  • string

Strict comparaison using < operator.

Greater Than or Equal

$gte

  • int

  • string

Strict comparaison using >= operator.

Lower Than or Equal

$lte

  • int

  • string

Strict comparaison using <= operator.

Contains

$like

  • int

  • string

Containing one the given values.

Examples:

  • Match for new: “My new field”

  • Doesn’t match for My field: “My new field”

Does not contain

$nlike

  • int

  • string

Doesn’t contain the given values.

In

$in

  • array

Strict contain one the given values.

Not In

$nin

  • array

Strict doesn’t contain the given values.

Between

$btw

  • array

Ranges between the Start Date from the beginning of the day to the End Date end of the day

What are the available operators ?

Name

Example

Note

Attribute

[
{
"Attribute": {
"name": "age",
"$in": [
"23"
],
"$type":"and"}
}
}
]

Time period

filter is applied on created_at field

[
{
"TimePeriod": {
"$eq": "date_last_month",
"$type":"and"
}
},
{
"TimePeriod": {
"$gt": "2023-03-01T00:00:00.000Z",
"$type":"and"
}
},
]

You can use : date_last_day to target feedbacks from yesterday.

Source

[
{
"Form": {
"$in": [
28121
],
"$type":"and"
}
}
]

Feedback Id

[
{
"Id": {
"$in": [
12,
23
],
"$type":"and"
}
}
]

Satisfaction Ratio

[
{
"SatisfactionRatio": {
"$gt": "50",
"$type":"and"
}
}
]

Question Answer

[
{
"QuestionAnswer": {
"question_id": 1132803,
"question_type": "textarea",
"$eq": "50",
"$type":"and"
}
}
]
  1. question_id (optional) → ID of the question

  2. question_type (optional) → Type of the question

Team

[
{
"Team": {
"$in": [
13682
],
"$type":"and"
}
}
]

Completed

[
{
"completed": {
"$eq": 1
},
"$type":"and"
}
]

Owner

[
{
"Owner": {
"$in": [
17107
],
"$type":"and"
}
}
]

Status

[
{
"Status": {
"$eq": 1,
"$type":"and"
}
}
]

Completion time

[
{
"CompletionTime": {
"$gt": 0,
"$type":"and"
}
}
]

Topic

[
{
"Topic": {
"$in": [
2713
],
"$type":"and"
}
}
]

Feedback with at least 1 question answer with this topic

NPS

[
{
"NPS": {
"$in": [
"promoter"
]
}
}
]

Did this answer your question?