Skip to main content

Filters in Definition

You can utilize filters within the body of your operation's definition, which corresponds to your request payload. It Filters automatically exclude empty or undefined values during request processing.

info

By default, all filters are set to true, meaning all values, including empty ones, are included unless explicitly configured otherwise.

Available Filters

  1. Allow empty object: Determines if empty objects ({}) should be included. When set to false, objects without keys (i.e., {}) are excluded.
"filters": {
"body": {
"allowEmptyObject": false,
}
}
  1. Allow empty array: Determines if empty arrays ([]) should be included. When set to false, arrays of length zero (i.e. []) are filtered out.
"filters": {
"body": {
"allowEmptyArray": false,
}
}
  1. Allow empty value: Filters out scalar values if empty or undefined. When set to false, the following values will be excluded:
    • undefined
    • null
    • Empty strings ("")
    • String values: "undefined", "null"
"filters": {
"body": {
"allowEmptyValue": false
}
}

Example

Setup

Your integration definition includes:

"filters": {
"body": {
"allowEmptyObject": false,
"allowEmptyArray": false,
"allowEmptyValue": false
}
}

Input Parameters

{
"to": "+14155552671",
"from": "+14155551234",
"body": "", // Empty string — triggers allowEmptyValue
"mediaUrl": null, // null — triggers allowEmptyValue
"callback": {}, // Empty object — triggers allowEmptyObject
"tags": [] // Empty array — triggers allowEmptyArray
}

Intended Request Body (Before Filter)

{
"To": "+14155552671",
"From": "+14155551234",
"Body": "",
"MediaUrl": null,
"Callback": {},
"Tags": []
}

Values Filtered Out

  • "Body": "": Removed due to allowEmptyValue: false
  • "MediaUrl": null: Removed due to allowEmptyValue: false
  • "Callback": {}: Removed due to allowEmptyObject: false
  • "Tags": []: Removed due to allowEmptyArray: false

Final Request Body Sent

To=+14155552671&
From=+14155551234

The filters ensures the request payload contains only meaningful data, avoiding unnecessary or empty values in requests.