Constructor
# new ExperienceManager(config, dependencies)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
config |
|||
dependencies |
Record.<string, any>
|
||
dataManager |
DataManagerInterface
|
||
loggerManager |
LogManagerInterface
|
<optional> |
- Implements:
- ExperienceManagerInterface
Classes
Methods
# getExperience(key) → {Experience}
Get the entity by key
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string
|
An experience
Experience
# getExperienceById(id) → {Experience}
Get the entity by id
Parameters:
| Name | Type | Description |
|---|---|---|
id |
Id
|
Get single experience
Experience
# getExperiences(keys) → {Array.<Experience>}
Get specific entities by array of keys
Parameters:
| Name | Type | Description |
|---|---|---|
keys |
Array.<string>
|
Array.<Experience>
# getVariation(experienceKey, variationKey) → {Variation}
Get experience's variation by key
Parameters:
| Name | Type | Description |
|---|---|---|
experienceKey |
string
|
|
variationKey |
string
|
Variation
# getVariationById(experienceId, variationId) → {Variation}
Get experience's variation by id
Parameters:
| Name | Type | Description |
|---|---|---|
experienceId |
||
variationId |
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> |
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> |
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> |
Array.<BucketedVariation>