Skip to content

Commit bb6a435

Browse files
spencerattickmarkzegarelli
andauthored
add example for removing userId (#4209)
* add example for removing userId Some customer over time have reached out wanting to remove the `userId` from their payloads for certain destinations. This was previously not possible but now the Public API allows for this functionality. This example will help customers achieve this solution. * Update src/connections/destinations/destination-filters.md * Update src/connections/destinations/destination-filters.md --------- Co-authored-by: markzegarelli <[email protected]>
1 parent 95b5df0 commit bb6a435

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/connections/destinations/destination-filters.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following examples illustrate common destinations filters use cases:
6969
* [Sample a percentage of events](#sample-a-percentage-of-events)
7070
* [Drop events](#drop-events)
7171
* [Only send events with userId](#only-send-events-with-userid)
72+
* [Remove userId from payload](#remove-userid-from-payload)
7273

7374
### PII management
7475

@@ -129,6 +130,30 @@ Use the [Public API](https://docs.segmentapis.com/tag/Destination-Filters/){:tar
129130
}
130131
```
131132

133+
### Remove userId from payload
134+
135+
There are certain destinations to which you may not want to send the `userId`. To accomplish this, you can use the [Public API](https://docs.segmentapis.com/tag/Destination-Filters/) to create a Filter that will target and remove the `userId` (or any other top-level field) like this:
136+
137+
```json
138+
{
139+
"sourceId": "<sourceId>",
140+
"destinationId": "<destinationId>",
141+
"title": "Don't send userId at all",
142+
"description": "Drop userId on all requests",
143+
"if": "all",
144+
"actions": [
145+
{
146+
"type": "DROP_PROPERTIES",
147+
"fields": {
148+
"":["userId"]
149+
}
150+
}
151+
],
152+
"enabled": true
153+
}
154+
```
155+
156+
132157
## Important notes
133158

134159
#### Conflicting settings

0 commit comments

Comments
 (0)