Decision notification listener
This topic describes the DECISION notification listener which sends a stream of all feature flag decisions.
The DECISION notification listener sends a stream of all feature flag decisions. It is most commonly used to send decisions to an analytics provider or to an internal data warehouse to join it with other data that you have about your users. Note that if you only want impression-emitting decisions, you can use the deprecated ACTIVATE notification listener.
To track feature usage:
- Sign up for an analytics provider of your choice (for example, Segment)
- Set up a DECISION notification listener.
- Follow your analytics provider's documentation and send events from within the decision listener callback
Steps 1 and 3 are not covered in this documentation. However, the DECISION notification listener is covered below.
The following tables show the information provided to the listener when it is triggered:
|type||string||Decision type varies depending on which method triggers the listener.|
See type parameter.
|decision info||map||Key-value map that consists of data corresponding to the decision and based on the |
See type parameter and decision-info parameter.
|user ID||string||The user ID.|
|attributes||map||A map of custom key-value string pairs specifying attributes for the user that are used for audience targeting. Non-string values are only supported in the 3.0 SDK and above.|
The following tables shows details about the parameters for the DECISION notification listener.
The following table shows how the
type parameter populates with the following values depending on which method triggers the DECISION notification listener:
|Triggering method||method sets type field to:|
decision info parameter
The following table shows how the decision info parameter populates, depending on the decision
type provided to the notification when triggered:
|decision info parameter contents depending on type||feature||feature-variable||all-feature-variables||ab-test||feature-test|
String id of the feature.
True or false based on whether the feature is enabled for the user.
String denoting how user gained access to the feature. Value is:
- rollout if the feature became enabled or disabled for the user because of the rollout configuration associated with the feature.
- feature test if the feature became enabled or disabled because of a feature test.
Contains experiment and variation keys
|experiment key||N/A, available in source info instead.||N/A, available in source info instead.||N/A, available in source info instead.||✓||✓|
|variation key||N/A, available in source info instead.||N/A, available in source info instead.||N/A, available in source info instead.||✓||✓|
Feature variable key
Feature variable type
Feature value for the specified user (default if user doesn't qualify for experiment)
|variable values Contains the response of the Get All Feature Variables method, i.e. dictionary of all key-value feature variables for the feature flag.||✓|
For example code, see the notification listener topic in your SDK language.
Updated over 1 year ago