ConsentStatusEntry
MarketingConsentSubscription
ShopperConsentErrorCodes
ShopperConsentException
ShopperConsentMgr
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
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:
1var subscriptions = dw.customer.consent.ShopperConsentMgr.getSubscriptions();
2for each (var sub in subscriptions) {
3 trace('Subscription: ' + sub.subscriptionId + ' - ' + sub.title);
4 trace('Channels: ' + sub.channels);
5}| Property | Description |
|---|---|
channels: String[] (read-only) | Returns the available channels for this subscription. |
consentRequired: Boolean (read-only) | Returns whether consent is required for this subscription. |
consentStatus: Collection (read-only) | Returns the consent status entries for this subscription. |
consentType: String (read-only) | Returns the consent type for this subscription. |
defaultStatus: String (read-only) | Returns the default consent status for this subscription. |
subscriptionId: String (read-only) | Returns the unique identifier for this subscription. |
subtitle: String (read-only) | Returns the localized subtitle of this subscription. |
tags: String[] (read-only) | Returns the tags associated with this subscription. |
title: String (read-only) | Returns the localized title of this subscription. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getChannels() | Returns the available channels for this subscription. |
| getConsentRequired() | Returns whether consent is required for this subscription. |
| getConsentStatus() | Returns the consent status entries for this subscription. |
| getConsentType() | Returns the consent type for this subscription. |
| getDefaultStatus() | Returns the default consent status for this subscription. |
| getSubscriptionId() | Returns the unique identifier for this subscription. |
| getSubtitle() | Returns the localized subtitle of this subscription. |
| getTags() | Returns the tags associated with this subscription. |
| getTitle() | Returns the localized title of 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
(read-only)Returns the available channels for this subscription.
Channels represent the communication methods (EMAIL, SMS, WHATSAPP) available for this subscription.
(read-only)Returns whether consent is required for this subscription.
(read-only)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.
(read-only)Returns the consent type for this subscription.
(read-only)Returns the default consent status for this subscription.
(read-only)Returns the unique identifier for this subscription.
(read-only)Returns the localized subtitle of this subscription.
(read-only)Returns the tags associated with this subscription.
Tags can be used to categorize and filter subscriptions.
(read-only)Returns the localized title of this subscription.
Returns the available channels for this subscription.
Channels represent the communication methods (EMAIL, SMS, WHATSAPP) available for this subscription.
Returns:
Returns whether consent is required for this subscription.
Returns:
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:
Returns the consent type for this subscription.
Returns:
Returns the default consent status for this subscription.
Returns:
Returns the unique identifier for this subscription.
Returns:
Returns the localized subtitle of this subscription.
Returns:
Returns the tags associated with this subscription.
Tags can be used to categorize and filter subscriptions.
Returns:
Returns the localized title of this subscription.
Returns: