| filtering_conditions |
\OpenAPI\Client\Model\ParamDefinitionFilteringConditionsFilterCondition |
<p>Defines the logic for filtering webhooks based on the entity's data. If provided, the webhook will only be sent if the entity matches the specified conditions. Pass <strong>null</strong> to disable filtering and receive all webhooks (for <strong>webhook.update</strong> method).</p><p>The filter accepts a recursive JSON object. The maximum nesting level is <strong>5</strong>. Exceeding this will result in a validation error. <p><strong>Strict Rule:</strong> Each level of the object must contain <strong>exactly one</strong> of the following keys:</p><ul><li><strong>Logical Groups:</strong><code>and</code>, <code>or</code>, <code>not</code> (used to combine multiple conditions).</li><li><strong>Condition:</strong><code>field</code>, <code>operator</code> and <code>value</code></li></ul><br/><p><strong>Logical Operators:</strong><ul><li><code>and</code>: Accepts an array of objects. All conditions must be true.</li><li><code>or</code>: Accepts an array of objects. At least one condition must be true.</li><li><code>not</code>: Accepts a single object. The condition inside must be false.</li></ul></p><br/><p><strong>Condition Object:</strong><ul><li><code>field</code>: The dot-notation path to the attribute (e.g., id, customer.email, items.price).</li><li><code>operator</code>: The comparison method (see list below).</li><li><code>value</code>: The value to compare against.</li></ul></p><br/><p>The list of available fields for filtering is returned by the <strong>webhook.events</strong> method in the <strong>filterable_fields</strong> property. The available fields depend on the webhook entity. If the list for a specific webhook is empty, it means that filtering is not supported for this entity or action.</p><p>The system validates operators against the field type defined in the entity schema.</p><p><ul><li><strong>string:</strong><code>eq</code>, <code>neq</code>, <code>in</code>, <code>not_in</code>, <code>like</code>, <code>not_like</code>.</li><li><strong>integer:</strong><code>eq</code>, <code>neq</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>.</li><li><strong>number:</strong><code>eq</code>, <code>neq</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>.</li><li><strong>boolean:</strong><code>eq</code>, <code>neq</code>.</li><li><strong>date:</strong><code>eq</code>, <code>neq</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>.</li><li><strong>array:</strong><code>eq</code>, <code>neq</code>, <code>in</code>, <code>not_in</code>.</li></ul></p><br/><p><strong>Operators:</strong><ul><li><code>eq</code>: Exact match. The field value must match the specified value exactly (case sensitive). For array-type fields, compares two arrays regardless of the element order.</li><li><code>neq</code>: Not equal. The field value must be different from the specified value.</li><li><code>like</code>: Partial match (SQL-style). Case-insensitive. Supported wildcards:<ul><li><strong>%</strong> - matches any sequence of characters (0 or more).</li><li><strong></strong> - matches exactly one character.</li></ul> If the value contains the '%' or '' characters, they must be escaped using a backslash ('\'). For example, if the string is 'demo_', the value should be specified as 'demo\_'.</li><li><code>not_like</code>: Inverted Partial Match. Ensures the pattern does not match.</li><li><code>in</code>: In List. The field value must match one of the values in the provided array. For array-type fields, the condition is considered valid if at least one element from the provided list exists in the array.</li><li><code>not_in</code>: Not In List. The field value must not be present in the provided array. For array-type fields, the condition is considered valid if none of the elements in the array exist in the provided list.</li><li><code>lt</code>: Less (Strictly Less). The value is strictly less than value.</li><li><code>lte</code>: Less than or equal to.</li><li><code>gt</code>: Strictly Greater. The value is strictly greater than value.</li><li><code>gte</code>: Greater than or equal to.</li></ul></p><br/><p><strong>Please note: the filter is universal for all platforms; however, for some platforms, certain fields may never be populated. Before defining a filter, make sure that the field is populated for the specific platform. Otherwise, a webhook configured with such a filter may never be triggered.</strong></p><br/> |
[optional] |