Experiments return assignment context for the current customer and placement.
getExperiment never returns null. When the customer is not in the experiment, isEnrolled is false, variantKey is null, and every typed getter (boolValue, stringValue, intValue, doubleValue with a defaultValue, and ["key"] for JSON payloads) returns your default — so control renders with no extra branch. The raw nullable assignment is .assignment (or getExperimentAssignment); Java callers use AppActorJava.getExperimentAsync. Use assignments for host-app decisions like:
  • which paywall variant to render
  • which offer emphasis to show
  • which onboarding path to take
  • whether a user is in a holdout group

Cache and identity

Assignments are customer-context decisions. Re-resolve assignment after login, logout, reset, or entitlement-sensitive changes if the screen is purchase critical.

Guardrails

  • Do not hard-code local variant overrides in production.
  • Do not treat an experiment variant as an entitlement.
  • Keep fallback UI safe when assignment fetch fails.

Launch Experiments

Read the product-level experiment launch checklist.