Class Campaign

A Campaign is a set of experiences (or site configurations) which may be deployed as a single unit for a given time frame. The system currently supports 3 types of experience that may be assigned to a campaign:

  • Promotions
  • Slot Configurations
  • Sorting Rules

This list may be extended in the future.

A campaign can have a start and end date or be open-ended. It may also have "qualifiers" which determine which customers the campaign applies to. The currently supported qualifiers are:

  • Customer groups (where "Everyone" is a possible customer group)
  • Source codes
  • Coupons

A campaign can have list of stores or store groups where it can be applicable to.

PropertyDescription
ID: String (read-only)Returns the unique campaign ID.
active: Boolean (read-only)Returns 'true' if the campaign is currently active, otherwise 'false'.
applicableInStore: Boolean (read-only)Returns true if campaign is applicable to store, otherwise false.
applicableOnline: Boolean (read-only)Returns true if campaign is applicable to online site, otherwise false.
coupons: Collection (read-only)Returns the coupons assigned to the campaign.
customerGroups: Collection (read-only)Returns the customer groups assigned to the campaign.
description: String (read-only)Returns the internal description of the campaign.
enabled: Boolean (read-only)Returns true if campaign is enabled, otherwise false.
endDate: Date (read-only)Returns the end date of the campaign.
promotions: Collection (read-only)Returns promotions defined in this campaign in no particular order.
sourceCodeGroups: Collection (read-only)Returns the source codes assigned to the campaign.
startDate: Date (read-only)Returns the start date of the campaign.
storeGroups: Collection (read-only)Returns store groups assigned to the campaign.
stores: Collection (read-only)Returns stores assigned to the campaign.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getCoupons()Returns the coupons assigned to the campaign.
getCustomerGroups()Returns the customer groups assigned to the campaign.
getDescription()Returns the internal description of the campaign.
getEndDate()Returns the end date of the campaign.
getID()Returns the unique campaign ID.
getPromotions()Returns promotions defined in this campaign in no particular order.
getSourceCodeGroups()Returns the source codes assigned to the campaign.
getStartDate()Returns the start date of the campaign.
getStoreGroups()Returns store groups assigned to the campaign.
getStores()Returns stores assigned to the campaign.
isActive()Returns 'true' if the campaign is currently active, otherwise 'false'.
isApplicableInStore()Returns true if campaign is applicable to store, otherwise false.
isApplicableOnline()Returns true if campaign is applicable to online site, otherwise false.
isEnabled()Returns true if campaign is enabled, otherwise false.

describe, getCustom

getCreationDate, getLastModified, getUUID

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

ID: String (read-only)

Returns the unique campaign ID.


active: Boolean (read-only)

Returns 'true' if the campaign is currently active, otherwise 'false'.

A campaign is active if it is enabled and scheduled for now.


applicableInStore: Boolean (read-only)

Returns true if campaign is applicable to store, otherwise false.


applicableOnline: Boolean (read-only)

Returns true if campaign is applicable to online site, otherwise false.


coupons: Collection (read-only)

Returns the coupons assigned to the campaign.


customerGroups: Collection (read-only)

Returns the customer groups assigned to the campaign.


description: String (read-only)

Returns the internal description of the campaign.


enabled: Boolean (read-only)

Returns true if campaign is enabled, otherwise false.


endDate: Date (read-only)

Returns the end date of the campaign. If no end date is defined for the campaign, null is returned. A campaign w/o end date will run forever.


promotions: Collection (read-only)

Returns promotions defined in this campaign in no particular order.


sourceCodeGroups: Collection (read-only)

Returns the source codes assigned to the campaign.


startDate: Date (read-only)

Returns the start date of the campaign. If no start date is defined for the campaign, null is returned. A campaign w/o start date is immediately effective.


storeGroups: Collection (read-only)

Returns store groups assigned to the campaign.


stores: Collection (read-only)

Returns stores assigned to the campaign.


getCoupons(): Collection

Returns the coupons assigned to the campaign.

Returns:

  • All coupons assigned to the campaign.

getCustomerGroups(): Collection

Returns the customer groups assigned to the campaign.

Returns:

  • Customer groups assigned to campaign.

getDescription(): String

Returns the internal description of the campaign.

Returns:

  • Internal description of campaign.

getEndDate(): Date

Returns the end date of the campaign. If no end date is defined for the campaign, null is returned. A campaign w/o end date will run forever.

Returns:

  • End date of campaign.

getID(): String

Returns the unique campaign ID.

Returns:

  • ID of the campaign.

getPromotions(): Collection

Returns promotions defined in this campaign in no particular order.

Returns:

  • All promotions defined in campaign.

getSourceCodeGroups(): Collection

Returns the source codes assigned to the campaign.

Returns:

  • All source code groups assigned to campaign.

getStartDate(): Date

Returns the start date of the campaign. If no start date is defined for the campaign, null is returned. A campaign w/o start date is immediately effective.

Returns:

  • Start date of campaign.

getStoreGroups(): Collection

Returns store groups assigned to the campaign.

Returns:

  • All store groups assigned to the campaign.

getStores(): Collection

Returns stores assigned to the campaign.

Returns:

  • All stores assigned to the campaign.

isActive(): Boolean

Returns 'true' if the campaign is currently active, otherwise 'false'.

A campaign is active if it is enabled and scheduled for now.

Returns:

  • true of campaign is active, otherwise false.

isApplicableInStore(): Boolean

Returns true if campaign is applicable to store, otherwise false.

Returns:

  • true if campaign is applicable to store, otherwise false.

isApplicableOnline(): Boolean

Returns true if campaign is applicable to online site, otherwise false.

Returns:

  • true if campaign is applicable to online site, otherwise false.

isEnabled(): Boolean

Returns true if campaign is enabled, otherwise false.

Returns:

  • true if campaign is enabled, otherwise false.