- Used to match the rules against a particular target.
- Used to determine which split variant to evaluate.
key
is the unique key for a particular userattributes
is a flat key-value object containing either astring
ornumber
, or astring[]
ornumber[]
attributes are directly assignable to the usersessionAttributes
is a flat key-value object containing either astring
ornumber
, or astring[]
ornumber[]
- session attributes are not stored against the user and typically reflect current context such as date.
Example:
{
"key": "string",
"attributes": {
"key1": "value",
"key2": ["value1","value2"]
},
"sessionAttributes": {
"key1": "value",
"key2": ["value1","value2"]
}
}
This object is passed to featureflow.evaluate('key', user)
to help the matching process.
Featureflow adds additional session attributes for free out of the box. When creating the user object you must also merge the following values:
featureflow.key
a replication of the key value at the root of the context object
Example:
{
"key": "my-key",
"sessionAttributes": {
"featureflow.key": "my-key",
}
}