Class MarketingConsentSubscription
dw.customer.consent
Class MarketingConsentSubscription
dw.customer.consent.MarketingConsentSubscription
Represents a marketing consent subscription for a shopper.
A marketing consent subscription defines a communication preference category (e.g., "Newsletter", "Product Updates")
with associated channels (EMAIL, SMS, WHATSAPP) through which the shopper can receive marketing communications.
Example usage:
var subscriptions = dw.customer.consent.ShopperConsentMgr.getSubscriptions();
for each (var sub in subscriptions) {
trace('Subscription: ' + sub.subscriptionId + ' - ' + sub.title);
trace('Channels: ' + sub.channels);
}
channels
:
String []
(Read Only)
The available channels for this subscription.
Channels represent the communication methods (EMAIL, SMS, WHATSAPP) available for this subscription.
consentRequired
:
boolean
(Read Only)
Returns whether consent is required for this subscription.
consentStatus
:
Collection
(Read Only)
The consent status entries for this subscription.
This is only populated when the 'includeConsentStatus' parameter is true in the getSubscriptions call, and the
customer is authenticated.
consentType
:
String
(Read Only)
The consent type for this subscription.
defaultStatus
:
String
(Read Only)
The default consent status for this subscription.
subscriptionId
:
String
(Read Only)
The unique identifier for this subscription.
subtitle
:
String
(Read Only)
The localized subtitle of this subscription.
tags
:
String []
(Read Only)
The tags associated with this subscription.
Tags can be used to categorize and filter subscriptions.
title
:
String
(Read Only)
The localized title of this subscription.
This class does not have a constructor, so you cannot create it directly.
getTags ()
:
String []
Returns the tags associated with this subscription.
assign ,
create ,
create ,
defineProperties ,
defineProperty ,
entries ,
freeze ,
fromEntries ,
getOwnPropertyDescriptor ,
getOwnPropertyNames ,
getOwnPropertySymbols ,
getPrototypeOf ,
hasOwnProperty ,
is ,
isExtensible ,
isFrozen ,
isPrototypeOf ,
isSealed ,
keys ,
preventExtensions ,
propertyIsEnumerable ,
seal ,
setPrototypeOf ,
toLocaleString ,
toString ,
valueOf ,
values
getChannels
Returns the available channels for this subscription.
Channels represent the communication methods (EMAIL, SMS, WHATSAPP) available for this subscription.
Returns:
A list of channel strings (lowercase).
getConsentRequired
getConsentRequired ()
:
boolean
Returns whether consent is required for this subscription.
Returns:
True if consent is required, false otherwise.
getConsentStatus
Returns the consent status entries for this subscription.
This is only populated when the 'includeConsentStatus' parameter is true in the getSubscriptions call, and the
customer is authenticated.
Returns:
A collection of ConsentStatusEntry objects, or null if not requested.
getConsentType
Returns the consent type for this subscription.
Returns:
The consent type (e.g., "SINGLE_OPT_IN", "DOUBLE_OPT_IN").
getDefaultStatus
Returns the default consent status for this subscription.
Returns:
The default status (e.g., "OPT_IN", "OPT_OUT").
getSubscriptionId
Returns the unique identifier for this subscription.
Returns:
The subscription ID.
getSubtitle
Returns the localized subtitle of this subscription.
Returns:
The subscription subtitle.
getTags
Returns the tags associated with this subscription.
Tags can be used to categorize and filter subscriptions.
Returns:
A list of tag strings.
getTitle
Returns the localized title of this subscription.
Returns:
The subscription title.
© Copyright 2000-2026, salesforce.com inc. All rights reserved. Various trademarks held by their respective owners.