Customer Subscription Status
isSubscribedToChannel expression
Use the isSubscribedToChannel expression to check if a customer has opted in to a specific communication channel. This is important for compliance with messaging regulations like CAN-SPAM, GDPR, and CASL, which often require explicit consent for promotional messages.
Purpose
Prevent sending messages to users who haven't subscribed to a particular channel.
Usage
- Profile: 
currentCustomer() - Attribute: 
isSubscribedToChannel - Data type: 
ENUM 
Supported channels
You can check subscription status for the following channels:
MOBILEEMAILANDROID(push notifications)IOS(push notifications)WHATSAPPWECHATLINEVIBERXENGAGERCSZALO
Syntax
currentCustomer.isSubscribedToChannel("CHANNEL_NAME")Examples
| Example 1: Write a rule to check if the customer is subscribed to email communications. | 
|---|
| currentCustomer.isSubscribedToChannel("EMAIL") | 
| Example 2: Write a rule to check if the customer is subscribed to iOS push notifications. | 
|---|
| currentCustomer.isSubscribedToChannel("IOS") | 
| Example 3: Write a rule to check if the customer is subscribed to SMS and WhatsApp communication. | 
|---|
| currentCustomer.isSubscribedToChannel("SMS")&&Customer.isSubscribedToChannel("WHATSAPP") | 
Updated 2 months ago
