Skip to content

Filter on payload attributes' value #51

Description

@rvailleux

(this is a TLDR, I can develop the idea if accepted)

Problem

Our SaaS event webhooks are plugged to some of our clients' low/no-code platform. They pay per execution.
They want to save unecessary execution by filtering events upstream with simple conditions.

The way to solve it today

  • Create a label to mirror attribute value (ie : "paid") to enable filtering.
    or
  • Filter event trigger on our side based on payload value.

Proposed solution

Introduce a filter declaration at subscription creation.

Something like :

{
  "payload_filter": {
    "all": [              #or "any"
      { "path": "status", "op": "eq", "value": "paid" },
      { "path": "amount", "op": "gt", "value": 1000 }
    ]
  }
}

Impacts

  • API interface
  • Event matching logic : additionnaly to event_type & labels, add payload_filter evaluation.

Afterthoughts:

  • this filtering format only works with json ==> what would match wider range of payload format? RegEx ?

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions