System Field Filters

Using System Field Filters in Workflows

You can use the same filter structure inside workflow scripts.

Example: Filter by autoId

async function script(C) {
  const response = await C.filterEntries({
    filter: [
      {
        subject: "1",
        type: "text:systemField",
        operator: "equals",
        value: "447",
      },
    ],
    recordInternalId: "kalysys-sales",
  });

  return { response };
}

Using System Field Filters in the External API

When using filters in the External API, the filter parameter must be URL-encoded.

JSON Filter

filter=[{"subject":"autoId","type":"text:systemField","operator":"equals","value":"R[1]"}]

URL-Encoded Filter

filter=%5B%7B%22subject%22%3A%22autoId%22%2C%22type%22%3A%22text%3AsystemField%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22R%5B1%5D%22%7D%5D

cURL Example

curl -X 'GET' \
  'https://apiqa.clevero.co/api/external/v1/records/the-demo-account-qa-test/entries?filter=%5B%7B%22subject%22%3A%22autoId%22%2C%22type%22%3A%22text%3AsystemField%22%2C%22operator%22%3A%22equals%22%2C%22value%22%3A%22R%5B1%5D%22%7D%5D' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {{record_api_token}}'

Common Filter Operators

Number Field Operators

OperatorDescriptionExample
equalsEquals5
not_equalsNot equals5
gtGreater than5
gteGreater than or equal to5
ltLess than5
lteLess than or equal to5
betweenBetween two values1000–1500
not_betweenNot between two values1000–1500

Examples

{
  "subject": "current-mrr",
  "type": "number",
  "operator": "equals",
  "value": 5
}
{
  "subject": "current-mrr",
  "type": "number",
  "operator": "between",
  "valueA": "1000",
  "valueB": "1500"
}

Text Field Operators

OperatorDescriptionExample
equalsExact match"ABC"
not_equalsNot equal"ABC"
likeContains text"123"
not_emptyIs not empty

Example

{
  "subject": "1918262-no-matched-clinic",
  "type": "text",
  "operator": "equals",
  "ignoreCase": true,
  "value": "ABC"
}