Skip to content

Commit c365214

Browse files
committed
Add first draft to document aep filtering
1 parent 7cb7482 commit c365214

File tree

3 files changed

+108
-1
lines changed

3 files changed

+108
-1
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Event Filters
2+
3+
Event filters let you **narrow down the events** sent to your destination by applying simple matching rules. They’re useful when you're only interested in specific types of changes—like ignoring automated updates or focusing on certain attributes.
4+
5+
**Filters are optional**: if no filter is defined, your subscription will receive **all events** matching its type and source.
6+
7+
Filters are defined when configuring [your subscription](/event-platform/concepts.html) and are automatically evaluated during event routing.
8+
9+
> ⚠️ **Note:** For now, only **one filter** can be configured per subscription. Combining multiple filters (e.g., filtering by both user and attribute) is not yet supported.
10+
11+
---
12+
13+
## `user` *(available)*
14+
15+
Use this filter to receive only events triggered by a specific user.
16+
17+
- **Syntax**
18+
`user=user_identifier`
19+
- **Parameters**
20+
- `user_identifier`: The UUID of the user who authored the event.
21+
22+
- **Example**
23+
`user=57616f6f-1a4d-490e-bc23-c5877d2b30d9`
24+
25+
---
26+
27+
## `attribute` *(available soon)*
28+
29+
Use this filter to receive only delta events where a specific attribute was updated.
30+
31+
- **Syntax**
32+
`attribute=attribute_code`
33+
- **Parameters**
34+
- `attribute_code`: The code of the attribute you want to track.
35+
36+
- **Example**
37+
`attribute=short_description`
38+
39+
---
40+
41+
## `scope` *(available soon)*
42+
43+
Use this filter to receive only delta events related to a specific scope.
44+
45+
- **Syntax**
46+
`scope=scope_code`
47+
- **Parameters**
48+
- `scope_code`: The scope code of the updated data.
49+
50+
- **Example**
51+
`scope=my_scope`
52+
53+
---
54+
55+
## `locale` *(available soon)*
56+
57+
Use this filter to receive only delta events for a specific locale.
58+
59+
- **Syntax**
60+
`locale=locale_code`
61+
- **Parameters**
62+
- `locale_code`: The locale code of the updated data.
63+
64+
- **Example**
65+
`locale=en_US`
66+
67+
---

content/event-platform/concepts.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,41 @@ We currently use a static IP address provided by Google Cloud: `34.140.80.128`
173173

174174
**However, we cannot guarantee that this IP address will remain unchanged indefinitely.** Therefore, we strongly recommend whitelisting the `europe-west1` IP ranges from [Google Cloud's IP ranges list](https://www.gstatic.com/ipranges/cloud.json) to ensure continuous access.
175175

176+
## Subscriptions Filters
177+
178+
When configuring a subscription, you can optionally define a **filter** to receive **only the events that match specific criteria**.
179+
180+
Here's the available filters you can use:
181+
- user
182+
183+
The following filters will be available soon:
184+
- attribute
185+
- scope
186+
- locale
187+
188+
In the future, additional filters and advanced conditions (such as combining multiple filters with `AND` or `OR` operators) will become available.
189+
190+
You can find the list of currently available filters and the correct syntax to use [here](/event-platform/available-filters.html).
191+
192+
### Example
193+
Let’s say you want to receive only the events triggered by a specific user, identified by the UUID `ea0fe94f-417e-4078-a40b-38645ba90ebe`.
194+
You can configure your subscription with the following filter:
195+
196+
```json[snippet:Filtered subscription]
197+
{
198+
"source": "pim",
199+
"subject": "https://my-pim.cloud.akeneo.com",
200+
"events": [
201+
"com.akeneo.pim.v1.product.updated"
202+
],
203+
"type": "https",
204+
"config": {
205+
"url": "https://your_webhook_url",
206+
}
207+
"filter": "user=ea0fe94f-417e-4078-a40b-38645ba90ebe"
208+
}
209+
```
210+
176211
## Events Format
177212

178213
Our platform standardises event data across services using the [CloudEvents specification](https://github.com/cloudevents/spec). CloudEvents provides a consistent structure for event data, ensuring interoperability and simplifying event handling. Each event includes essential metadata such as the event type, source, ID, and timestamp.
@@ -220,4 +255,4 @@ Example of an event payload for a productDeleted event
220255
For more information, consult the [CloudEvents spec attributes](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md).
221256

222257
::: panel-link Authorization and authentication requirements [Next](/event-platform/authentication-and-authorization.html)
223-
:::
258+
:::

src/partials/layout.handlebars

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
151151
<li><a href="/event-platform/available-events.html">Available events</a></li>
152152
</ul>
153153
</li>
154+
<li>
155+
<ul>
156+
<li><a href="/event-platform/available-filters.html">Available filters</a></li>
157+
</ul>
158+
</li>
154159
<!--
155160
<li>
156161
<ul>

0 commit comments

Comments
 (0)