View as Markdown
Eppo icon

Eppo ACTION

Create Experiment

Create a new experiment analysis in Eppo. Use List Experiments first to find valid entityId and assignmentSourceId values — these numeric IDs are not available separately and must be copied from an existing experiment. Use List Metrics to find metric IDs to attach to the experiment. experimentKey must be a unique slug matching the assignment logging key in your codebase. IMPORTANT: variations is a JSON array where each object requires variant_key, is_active, and is_control fields. Exactly one variation must have is_control: true. Example variations: [{"variant_key": "control", "name": "Control", "is_active": true, "is_control": true}, {"variant_key": "treatment", "name": "Treatment", "is_active": true, "is_control": false}]. IMPORTANT: metrics is a JSON array of objects with metric_id (integer) and is_primary (boolean) fields. Exactly one metric must have is_primary: true. Example metrics: [{"metric_id": 333870, "is_primary": true}]. Dates must be ISO 8601 format: 2024-01-01T00:00:00Z. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Eppo account once, then configure and run Create Experiment from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "eppo-create-experiment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    eppo: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    experimentKey: "Experiment Key",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Experiment inputs
Property Type Description
name Name string
A human-readable display name for the experiment.
Required
experimentKey Experiment Key string
A unique slug that matches the assignment logging key in your codebase (e.g. welcome-banner-test).
Required
entityId Entity ID integer
The numeric ID of the entity type being randomized (e.g. user, session). Use List Experiments to find this value from an existing experiment's entity_id field.
Required
assignmentSourceId Assignment Source ID integer
The numeric ID of the assignment source (logging integration). Use List Experiments to find this value from an existing experiment's assignment_source_id field.
Required
metrics Metrics string
JSON array of metric objects. Each requires metric_id (integer) and is_primary (boolean). Exactly one metric must have is_primary: true. Use List Metrics to find IDs. Example: [{"metric_id": 333870, "is_primary": true}, {"metric_id": 333871, "is_primary": false}].
Required
variations Variations string
JSON array of variation objects. Each requires variant_key (slug), is_active (boolean), and is_control (boolean). Exactly one variation must have is_control: true. Do NOT use key — use variant_key. Example: [{"variant_key": "control", "name": "Control", "is_active": true, "is_control": true}, {"variant_key": "treatment", "name": "Treatment", "is_active": true, "is_control": false}].
Required
assignmentsStartDate Assignments Start Date string
ISO 8601 date-time for when assignment logging began. Example: 2024-01-01T00:00:00Z.
Optional
assignmentsEndDate Assignments End Date string
ISO 8601 date-time for when assignment logging ended. Omit for ongoing experiments.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
eppo-create-experiment
Version
0.0.2
App
Eppo
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes