Skip to content

Commit 96e5c1f

Browse files
authored
Update actions.md Added comprehensive migration strategy
Walkthrough provided for a comprehensive classic/actions migration strategy
1 parent 078e8a6 commit 96e5c1f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

src/connections/destinations/actions.md

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

85+
For a more comprehensive migration from a classic destination to an actions-based destination, please follow the steps outlined below. This implementation strategy is only available for customers on a Segment Business Tier plan with access to Destination Filters. To remove the possibility of duplicate events or dropped events, adding an additional line of defense with Destination Filters will ensure that events sent before/after a specified `received_at` timestamp will be sent to each destination.
86+
87+
This migration strategy involves configuring a destination filter on both the Classic destination as well as the Actions destination. The Classic destination filter will be configured 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]([url](https://docs.segmentapis.com/tag/Destination-Filters/)) created by the [Public API]([url](https://segment.com/docs/api/public-api/)) using [FQL]([url](https://segment.com/docs/api/public-api/fql/)). Since 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.
88+
89+
The idea behind combining these Filters is that events will send through the Classic integration up until a specified time, and then they’ll be blocked after that time. Then the Actions integration will block events until that specified time, and only allow events beginning at that specified time.
90+
91+
Classic Destination's Destination Filter : Public API - [Create Filter for Destination]([url](https://docs.segmentapis.com/tag/Destination-Filters#operation/createFilterForDestination))
92+
ENDPOINT : `POST` `https://api.segmentapis.com/destination/classic_destination_id_from_url/filters`
93+
```
94+
// JSON BODY :
95+
{
96+
"sourceId": "add_source_id_here",
97+
"destinationId": "classic_destination_id_from_url",
98+
"title": "drop event after (timestamp) received_at > value April 4, 2023 19:55pm",
99+
"description": "drop event after (timestamp) received_at > value April 4, 2023 19:55pm",
100+
"if": "(received_at >= '2023-04-21T19:55:00.933Z')",
101+
"actions": [
102+
{
103+
"type":"DROP"
104+
}
105+
],
106+
"enabled": true
107+
}
108+
```
109+
110+
Actions Destination's Destination Filter : Public API - [Create Filter for Destination]([url](https://docs.segmentapis.com/tag/Destination-Filters#operation/createFilterForDestination))
111+
ENDPOINT : `POST` `https://api.segmentapis.com/destination/actions_destination_id_from_url/filters`
112+
```
113+
// JSON BODY :
114+
{
115+
"sourceId": "add_source_id_here",
116+
"destinationId": "actions_destination_id_from_url",
117+
"title": "drop event before (timestamp) received_at < value April 4, 2023 19:55pm",
118+
"description": "drop event before (timestamp) received_at < value April 4, 2023 19:55pm",
119+
"if": "(received_at < '2023-04-21T19:55:00.933Z')",
120+
"actions": [
121+
{
122+
"type":"DROP"
123+
}
124+
],
125+
"enabled": true
126+
}
127+
```
128+
129+
Once the Destination Filter is configured on both the Classic and Actions destination, visit each destination's Filter's tab and enable the filters. Once the migration is complete, you can disable the Classic destination on its Settings page, and remove each of the filters from both destinations.
130+
85131
## Edit a destination action
86132
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.
87133

0 commit comments

Comments
 (0)