Class

ExperienceManager

ExperienceManager(config, dependencies)

Provides experiences specific logic
Constructor

# new ExperienceManager(config, dependencies)

Parameters:
Name Type Attributes Description
config
dependencies Record.<string, any>
dataManager DataManagerInterface
loggerManager LogManagerInterface <optional>
Implements:
  • ExperienceManagerInterface

View Source src/experience-manager.ts, line 9

Classes

ExperienceManager
ExperienceManager

Methods

# getExperience(key) → {Experience}

Get the entity by key
Parameters:
Name Type Description
key string

View Source src/experience-manager.ts, line 142

An experience
Experience

# getExperienceById(id) → {Experience}

Get the entity by id
Parameters:
Name Type Description
id Id

View Source src/experience-manager.ts, line 149

Get single experience
Experience

# getExperiences(keys) → {Array.<Experience>}

Get specific entities by array of keys
Parameters:
Name Type Description
keys Array.<string>

View Source src/experience-manager.ts, line 156

Array.<Experience>

# getList() → {Array.<Experience>}

Get a list of all entities

View Source src/experience-manager.ts, line 135

Experiences list
Array.<Experience>

# getVariation(experienceKey, variationKey) → {Variation}

Get experience's variation by key
Parameters:
Name Type Description
experienceKey string
variationKey string

View Source src/experience-manager.ts, line 196

Variation

# getVariationById(experienceId, variationId) → {Variation}

Get experience's variation by id
Parameters:
Name Type Description
experienceId
variationId

View Source src/experience-manager.ts, line 204

Variation

# selectVariation(visitorId, experienceKey, visitorProperties, locationProperties, environmentopt) → {BucketedVariation|null}

Select variation for specific visitor
Parameters:
Name Type Attributes Description
visitorId Id
experienceKey string
visitorProperties Record.<string, any>
locationProperties string
environment string <optional>

View Source src/experience-manager.ts, line 167

BucketedVariation | null

# selectVariationById(visitorId, experienceId, visitorProperties, locationProperties, environmentopt) → {BucketedVariation|null}

Select variation for specific visitor
Parameters:
Name Type Attributes Description
visitorId Id
experienceId Id
visitorProperties Record.<string, any>
locationProperties string
environment string <optional>

View Source src/experience-manager.ts, line 178

BucketedVariation | null

# selectVariations(visitorId, visitorProperties, locationProperties, environmentopt) → {Array.<BucketedVariation>}

Select all variations across all experiences for specific visitor
Parameters:
Name Type Attributes Description
visitorId Id
visitorProperties Record.<string, any>
locationProperties string
environment string <optional>

View Source src/experience-manager.ts, line 188

Array.<BucketedVariation>