File tree 1 file changed +7
-1
lines changed
core-api/src/main/java/com/optimizely/ab/notification
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ public static class ExperimentDecisionNotificationBuilder {
103
103
private String type ;
104
104
private String experimentKey ;
105
105
private String experimentId ;
106
+ private String variationId ;
106
107
private Variation variation ;
107
108
private String userId ;
108
109
private Map <String , ?> attributes ;
@@ -138,6 +139,11 @@ public ExperimentDecisionNotificationBuilder withExperimentId(String experimentI
138
139
return this ;
139
140
}
140
141
142
+ public ExperimentDecisionNotificationBuilder withVariationId (String variationId ) {
143
+ this .variationId = variationId ;
144
+ return this ;
145
+ }
146
+
141
147
public DecisionNotification build () {
142
148
if (type == null ) {
143
149
throw new OptimizelyRuntimeException ("type not set" );
@@ -151,7 +157,7 @@ public DecisionNotification build() {
151
157
decisionInfo .put (EXPERIMENT_KEY , experimentKey );
152
158
decisionInfo .put (EXPERIMENT_ID , experimentId );
153
159
decisionInfo .put (VARIATION_KEY , variation != null ? variation .getKey () : null );
154
- decisionInfo .put (VARIATION_ID , variation != null ? variation . getId () : null );
160
+ decisionInfo .put (VARIATION_ID , variationId );
155
161
156
162
return new DecisionNotification (
157
163
type ,
You can’t perform that action at this time.
0 commit comments