Class ABTestMgr

Manager class used to access AB-test information in the storefront.

Property Summary 

PropertyDescription
assignedTestSegments: Collection (read-only)Return the AB-test segments to which the current customer is assigned.

Constructor Summary 

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

Method Summary 

MethodDescription
static getAssignedTestSegments()Return the AB-test segments to which the current customer is assigned.
static isParticipant(String, String)Test whether the current customer is a member of the specified AB-test segment.

Methods inherited from class Object 

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

Property Details 

assignedTestSegments 

assignedTestSegments: Collection (read-only)

Return the AB-test segments to which the current customer is assigned. AB-test segments deleted in the meantime will not be returned.


Method Details 

getAssignedTestSegments() 

static getAssignedTestSegments(): Collection

Return the AB-test segments to which the current customer is assigned. AB-test segments deleted in the meantime will not be returned.

Returns:

  • unordered collection of ABTestSegment instances representing the AB-test segments to which the current customer is assigned.

isParticipant(String, String) 

static isParticipant(testID: String, segmentID: String): Boolean

Test whether the current customer is a member of the specified AB-test segment. This method can be used to customize the storefront experience in ways that are not supported using Business Manager configuration alone.

Parameters:

  • testID - The ID of the AB-test, must not be null.
  • segmentID - The ID of the segment within the AB-test, must not be null.

Returns:

  • true if the current customer is a member of the specified AB-test segment, false otherwise.