VTEX · Schema

Filter

CommerceE-CommerceRetailMarketplacePayments

Properties

Name Type Description
type string Determines what orders appear in the hook and how they are filtered. As shown in the examples above, there are two ways: - `FromWorkflow`: the hook will receive order updates only when there is a chan
status array List of order statuses that should be included in the hook. This should only be used in case `type` is `FromWorkflow`.
expression string JSONata query expression that defines what conditions must be met for an order to be included in the hook. This should only be used in case `type` is `FromOrders`.
disableSingleFire boolean Sets a limit to how many times a specific order shows on the hook, after it first meets filtering conditions. Using the `FromOrders` type configuration with JSONata filtering expressions might cause o
View JSON Schema on GitHub

JSON Schema

vtex-hookfilter-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/HookFilter",
  "title": "Filter",
  "required": [
    "type"
  ],
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Determines what orders appear in the hook and how they are filtered. As shown in the examples above, there are two ways:\r\n\r\n - `FromWorkflow`: the hook will receive order updates only when there is a change or update in the [order status](https://help.vtex.com/en/tutorial/order-flow-and-status--tutorials_196). You must send at least one value for the `status` field to determine by which status the orders will be filtered.\r\n\r\n - `FromOrders`: the hook will receive order updates when there is a change in the order. In this case, orders can be filtered by any property, according to JSONata expressions passed in the `expression` field. You must send the request with values for the `expression` and `disableSingleFire` fields.",
      "example": "FromWorkflow"
    },
    "status": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of order statuses that should be included in the hook. This should only be used in case `type` is `FromWorkflow`."
    },
    "expression": {
      "type": "string",
      "description": "JSONata query expression that defines what conditions must be met for an order to be included in the hook. This should only be used in case `type` is `FromOrders`."
    },
    "disableSingleFire": {
      "type": "boolean",
      "description": "Sets a limit to how many times a specific order shows on the hook, after it first meets filtering conditions. Using the `FromOrders` type configuration with JSONata filtering expressions might cause orders to appear more than once on a feed, whenever changes are made to that order. If this field is `false` orders will appear in the hook only once. Send this field if you want to filter `FromOrders`.",
      "example": false
    }
  }
}