I'm trying to think through how to make it easier ...
# support
t
I'm trying to think through how to make it easier for us to change the listID that someone is default subscribed to for a Klaviyo destination. I know that Klaviyo has a destination settings config that can specify the list ID but we still need to pass in a trait of
subscribe: true
to get it to subscribe. Would this be a good use of Transforms to do this controlled completely within Rudderstack?
Copy code
export function transformEvent(event, metadata) {
    const eventType = event.type?.toLowerCase();
    if (eventType == 'identify') {
        event.context.traits.subscribe = true;
        event.context.traits.listId = '1234'
    }
    return event;
}
Main reason for this is to minimize business logic related to destinations within our codebase and offload that to Klaivyo. We can then make changes more easily decoupled from our engineering team. The only pitfall I can think of is this will then consume one of my 5 transformations i have available in our Starter plan (which is absurdly small # btw). Also I think that Transformations are more intended for destination specific things vs on ingest like I'm doing there, but correct me if I'm wrong.
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Trevin, So a few questions here 1. Are you using Klaviyo in cloud mode or device mode? 2. Do all your users have the same listId or does it change? 3. This seems like a decent use of a user-transformation but if 2 above is true, you can send these attributes from the source directly.
t
1. Cloud 2. Same listID for now but could see this changing over time 3. Yeah could send it from source but that then bakes the listID into our code and I have been wanting to make this business logic contained within rudderstack