Skip to content

Commit 447bcda

Browse files
Merge pull request #4807 from segmentio/lizkane222-patch-17
Update actions.md Added comprehensive migration strategy
2 parents b6de6df + 3775ea0 commit 447bcda

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/connections/destinations/actions.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,55 @@ Moving from a classic destination to an actions-based destination is a manual pr
7575
5. Verify that data is flowing from the development or test source to the partner tool.
7676
6. Repeat the steps above with your production source.
7777

78+
### Migrate to an actions-based destination using Destination Filters
79+
For a more comprehensive migration from a classic destination to an actions-based destination, follow the steps outlined below. This implementation strategy is only available for customers on a Segment Business Tier plan with access to [Destination Filters](/docs/connections/destinations/destination-filters/). By adding additional line of defense with Destination Filters, you remove the possibility of duplicate events or dropped events and ensure that events sent before/after a specified `received_at` timestamp are sent to each destination.
80+
81+
This migration strategy involves configuring a destination filter on both the Classic destination and the Actions destination. Configure the classic destination filter to block events by the `received_at` field with a certain value, and the Actions destination to drop events until the `received_at` timestamp field reaches that same value. Destination Filters within the UI have a limitation where they cannot access any top-level fields, but this is not a limitation for [Destination Filters](https://docs.segmentapis.com/tag/Destination-Filters/){:target="_blank”} created by the [Public API](https://segment.com/docs/api/public-api/){:target="_blank”} using [FQL](https://segment.com/docs/api/public-api/fql/){:target="_blank”}. Because the `received_at` is a top-level field in the payload, you'll need to create a destination filter with the Public API and submit the request with that FQL information described below.
82+
83+
By combining these Filters, Segment sends events through the Classic integration up until a specified time and then blocks events after that time. Then the Actions integration blocks events until that specified time, and only allows events beginning at that specified time.
84+
85+
The following code samples show you how you can create filters for your destinations using the [Create Filter for Destination](https://docs.segmentapis.com/tag/Destination-Filters#operation/createFilterForDestination){:target="_blank”} Public API operation.
86+
87+
#### Classic destination
88+
_Endpoint_: `POST` `https://api.segmentapis.com/destination/classic_destination_id_from_url/filters`
89+
```
90+
// JSON BODY :
91+
{
92+
"sourceId": "add_source_id_here",
93+
"destinationId": "classic_destination_id_from_url",
94+
"title": "drop event after (timestamp) received_at > value April 4, 2023 19:55pm",
95+
"description": "drop event after (timestamp) received_at > value April 4, 2023 19:55pm",
96+
"if": "(received_at >= '2023-04-21T19:55:00.933Z')",
97+
"actions": [
98+
{
99+
"type":"DROP"
100+
}
101+
],
102+
"enabled": true
103+
}
104+
```
105+
106+
#### Actions destination
107+
_Endpoint_: `POST` `https://api.segmentapis.com/destination/actions_destination_id_from_url/filters`
108+
```
109+
// JSON BODY :
110+
{
111+
"sourceId": "add_source_id_here",
112+
"destinationId": "actions_destination_id_from_url",
113+
"title": "drop event before (timestamp) received_at < value April 4, 2023 19:55pm",
114+
"description": "drop event before (timestamp) received_at < value April 4, 2023 19:55pm",
115+
"if": "(received_at < '2023-04-21T19:55:00.933Z')",
116+
"actions": [
117+
{
118+
"type":"DROP"
119+
}
120+
],
121+
"enabled": true
122+
}
123+
```
124+
125+
After configuring the Destination Filter on both the Classic and Actions destination, see each destination's Filters tab and enable the filters. After completing the migration, you can disable the Classic destination on the Settings page, and remove each of the filters from both destinations.
126+
78127
## Edit a destination action
79128
You can add or remove, disable and re-enable, and rename individual actions from the Actions tab on the destination's information page in the Segment app. Click an individual action to edit it.
80129

0 commit comments

Comments
 (0)