Optimizely · Schema

RuleInput

Input for creating or updating a rule

A/B TestingContent ManagementCustomer DataE-CommerceExperimentationFeature FlagsMarketing

Properties

Name Type Description
key string Unique key for the rule
type string Type of rule
audience_conditions string JSON-encoded audience conditions
percentage_included integer Percentage of traffic included
variations array Variations and their traffic allocation
View JSON Schema on GitHub

JSON Schema

optimizely-ruleinput-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/RuleInput",
  "title": "RuleInput",
  "type": "object",
  "description": "Input for creating or updating a rule",
  "properties": {
    "key": {
      "type": "string",
      "description": "Unique key for the rule"
    },
    "type": {
      "type": "string",
      "description": "Type of rule",
      "enum": [
        "a/b_test",
        "targeted_delivery",
        "personalization"
      ]
    },
    "audience_conditions": {
      "type": "string",
      "description": "JSON-encoded audience conditions"
    },
    "percentage_included": {
      "type": "integer",
      "description": "Percentage of traffic included",
      "minimum": 0,
      "maximum": 10000
    },
    "variations": {
      "type": "array",
      "description": "Variations and their traffic allocation",
      "items": {
        "type": "object",
        "properties": {
          "variation_key": {
            "type": "string",
            "description": "Key of the variation"
          },
          "weight": {
            "type": "integer",
            "description": "Traffic weight",
            "minimum": 0,
            "maximum": 10000
          }
        }
      }
    }
  }
}