Skip to main content

I want to be able to control the NotificationChannel to which a Klaviyo notification is posted. I see that the KlaviyoRemoteMessage object already povides an extension property RemoteMessage.channel_id.

However, this seems to always return “Default”. If I put a breakpoint in onMessageReceived, I see that the RemoteMessage object does not have the channel_id key.

I tried adding it to the custom data in the notification editor in Klaviyo. However, if I do that, it appears inside the key_value_pairs key and not at the top level.

So, the question is: How can I set the channel_id on a notification?

Hi ​@kiran.rao ,

Great question—and you're close to the answer.

Right now, Klaviyo’s Android SDK doesn’t support setting channel_id directly at the top level of the push payload. When you add it in the editor, it goes into key_value_pairs, which Android doesn't recognize for channel assignment.

In simple terms: Android only uses channel_id if it's in the main (top-level) payload—not inside custom data. Unfortunately, Klaviyo doesn't expose that directly right now.

Workaround: You’ll likely need to create a custom handler in your app that reads the value from key_value_pairs and manually assigns the notification channel before displaying it.

Let me know if you’d like a sample implementation for that.

Best,
Micheal


Hey ​@kiran.rao,

Thanks for your question in the community. Unfortunately, we don’t currently support this feature. Notification channels are not something that’s able to be controlled through push. That being said, I’m happy to share some feedback with our team regarding this. Could you let me know how you’d use this feature, and why it would be important to have? Thanks!

-Byrne


Hey ​@kiran.rao,

Thanks for your question in the community. Unfortunately, we don’t currently support this feature. Notification channels are not something that’s able to be controlled through push. That being said, I’m happy to share some feedback with our team regarding this. Could you let me know how you’d use this feature, and why it would be important to have? Thanks!

-Byrne

Hey Bryne,

Thanks for your answer. The use case is as follows:

We use Klaviyo for mutliple types of push notifications. We want the user to be able to control availibility for each type individually. The easiest way to achieve this is to associate the notification with a channel on Android.