Using IQL

IQL stands for Inbenta Query Language. It allows you to perform complex requests that would otherwise be difficult or even impossible with simple parameters in the Case Management API.

Syntax

Raw comparison

Operator Negate Description Example
IS IS NOT Makes sure the field has a value equal to the one provided director IS "Steven Spielberg"
IS EMPTY IS NOT EMPTY

Makes sure the field has a value of either:

  • 0 elements (if it is an array),
  • 0 characters (if it is a string),
  • is 0 (if it is an integer), or
  • is null
director is EMPTY

Numerical comparison

Operator Negate Description Example
> - Makes sure the field has a value that is greater than the given number movie.score > 3
< -

Makes sure the field has a value that is less than the given number

movie.score < 5
>= -

Makes sure the field has a value that is equal to or greater than the given number

movie.score >= 3
<= -

Makes sure the field has a value that is equal to or less than the given number

movie.score <= 5

Logic operators

Operator Negate Description Example
AND - makes sure that two conditions are met director IS "Steven Spielberg" AND movie is "Jurassic Park"
OR -

Makes sure at least one of the two conditions is met

director IS "Steven Spielberg" OR director is "Martin Scorsese"

Others

Operator Negate Description Example
(, ) - Evaluates the content of the parentheses individually director is "Martin Scorsese" OR (director IS "Steven Spielberg" AND movie is "Jurassic Park")

Operands

  • text: Text operands should be wrapped betweek quotes. i.e: "some text"
  • numbers: Numbers can be used directly.
  • variables: Variables are references to fields and should be written without quotes i.e: some_variable

See the example below to view these operands in action.

Use Case

IQL can be used in:

  • [GET] /tickets
  • [GET] /tickets-search

Example

To all the tickets created after the timestamp "1538571758" that contain the email "example@inbenta.com" as the value for the ticket extra data field "email":
created > 1538571758 AND extra.email IS "example@inbenta.com"