adorable-yak-64266
12/29/2023, 7:00 AMmillions-activity-52391
12/29/2023, 7:00 AMadorable-yak-64266
12/29/2023, 7:01 AMadorable-yak-64266
12/29/2023, 7:51 AMmillions-activity-52391
12/29/2023, 9:25 AMmillions-activity-52391
12/29/2023, 10:28 AMmillions-activity-52391
12/29/2023, 10:30 AMadorable-yak-64266
12/29/2023, 10:50 AMmillions-activity-52391
12/29/2023, 11:05 AMadorable-yak-64266
12/29/2023, 11:06 AMmillions-activity-52391
12/29/2023, 11:26 AMexport function transformEvent(event, metadata) {
let updatedEvent = event;
const met = metadata(event);
if (
met &&
met.sourceId === "shopify_source_id_1" &&
event &&
event.properties
) {
updatedEvent.properties.storeId = "storeId_1";
} else if (
met &&
met.sourceId === "shopify_source_id_2" &&
event &&
event.properties
) {
updatedEvent.properties.storeId = "storeId_2";
}
return updatedEvent;
}
Notes:-
1. Kindly test out the transformation thoroughly before deploying in production.
2. The metadata(event) method is not available to the sample events(since the sample events are just dummy events), but should be available to live events. Docs hereadorable-yak-64266
12/29/2023, 11:28 AMmillions-activity-52391
12/29/2023, 11:28 AMadorable-yak-64266
12/29/2023, 11:28 AMadorable-yak-64266
12/29/2023, 11:30 AMmillions-activity-52391
12/29/2023, 11:33 AMadorable-yak-64266
12/29/2023, 11:36 AMadorable-yak-64266
12/29/2023, 11:36 AMmillions-activity-52391
12/29/2023, 11:37 AMmillions-activity-52391
12/29/2023, 11:38 AMadorable-yak-64266
12/29/2023, 11:39 AMmillions-activity-52391
12/29/2023, 11:40 AMadorable-yak-64266
12/29/2023, 11:40 AMadorable-yak-64266
12/29/2023, 11:40 AMmillions-activity-52391
12/29/2023, 11:41 AMadorable-yak-64266
12/29/2023, 11:43 AMmillions-activity-52391
12/29/2023, 11:45 AMadorable-yak-64266
12/29/2023, 11:48 AMX-Shopify-Shop-Domain] not included in rudderstack events.
Thanks.millions-activity-52391
12/29/2023, 11:49 AMadorable-yak-64266
12/29/2023, 11:51 AMmillions-activity-52391
12/29/2023, 11:54 AMadorable-yak-64266
12/29/2023, 11:54 AMadorable-yak-64266
12/29/2023, 11:55 AMadorable-yak-64266
12/29/2023, 12:17 PMmillions-activity-52391
12/29/2023, 12:24 PM