Skip to main content

Overview

A run is a batch execution of a decision flow against a target audience (segment). Runs are how you execute campaigns — selecting a flow, targeting a customer segment, and generating recommendations for every customer in that segment. After execution, you can view detailed results including offer and channel breakdowns and per-customer recommendations.

How Runs Work

Select Decision Flow → Choose Target Segment → Execute → View Results
  1. Select a decision flow — Choose which flow to execute
  2. Choose a target segment — Define the audience (a saved segment or ad-hoc filter)
  3. Execute — Kaireon processes every customer in the segment through the decision flow
  4. View results — See summary statistics, offer/channel breakdowns, and per-customer details

Run Status

Runs progress through a defined lifecycle:
StatusDescription
pendingRun has been created but execution has not started
runningCurrently processing customers through the decision flow
completedAll customers have been processed successfully
failedExecution encountered an error and stopped
pending → running → completed
                  → failed
Large runs (100K+ customers) are processed in parallel batches. The progress percentage and estimated time remaining are shown in the UI during execution.

Run Summary

After a run completes, the summary includes:

Overall Statistics

MetricDescription
Total customers processedNumber of customers in the target segment
Customers with recommendationsNumber of customers who received at least one offer
Total recommendations generatedTotal offer-customer pairs produced
Average offers per customerMean number of offers recommended per customer
Execution timeTotal processing duration

Offer Breakdown

Shows how many times each offer was recommended:
OfferCount% of Total
Premium Credit Card12,45034.2%
Personal Loan8,32022.8%
Savings Account15,68043.0%

Channel Breakdown

Shows recommendation distribution across channels:
ChannelCount% of Total
Email22,10060.6%
Push9,85027.0%
In-App4,50012.4%

Per-Customer Results

Drill down into individual customer recommendations:
{
  "customerId": "cust_12345",
  "recommendations": [
    {
      "offerId": "act_premium_cc",
      "offerName": "Premium Credit Card",
      "channelId": "ch_email",
      "score": 0.87,
      "rank": 1,
      "creativeId": "treat_cc_email_v1"
    },
    {
      "offerId": "act_savings",
      "offerName": "Savings Account",
      "channelId": "ch_push",
      "score": 0.72,
      "rank": 2,
      "creativeId": "treat_savings_push"
    }
  ],
  "qualification": {
    "offersConsidered": 15,
    "offersQualified": 8,
    "offersFiltered": 5,
    "offersReturned": 2
  }
}

Creating and Executing a Run

1

Navigate to Runs

Go to Runs in the sidebar.
2

Click New Run

Click the + New Run button.
3

Select a decision flow

Choose the decision flow to execute from the dropdown.
4

Select target segment

Choose a saved customer segment or define an ad-hoc filter for the target audience.
5

Configure output

Set the maximum number of offers per customer and the output format.
6

Execute

Click Execute Run. The run enters pending status and then transitions to running.
7

Monitor progress

Watch the progress bar and status updates. For large segments, execution runs in parallel batches.
8

Review results

Once completed, review the summary statistics, offer/channel breakdowns, and per-customer results.

API Reference

List Runs

GET /api/v1/runs
Response:
{
  "data": [
    {
      "id": "run_abc123",
      "decisionFlowId": "df_q1_campaign",
      "decisionFlowName": "Q1 Campaign Flow",
      "segmentId": "seg_high_value",
      "status": "completed",
      "totalCustomers": 45000,
      "customersWithRecommendations": 38500,
      "totalRecommendations": 72000,
      "executionTimeMs": 34500,
      "createdAt": "2026-03-10T10:00:00Z",
      "completedAt": "2026-03-10T10:00:34Z"
    }
  ]
}

Get Run Details

GET /api/v1/runs/:id
Returns the full run detail including summary statistics and breakdowns.

Get Run Results

GET /api/v1/runs/:id/results?page=1&pageSize=50
Returns paginated per-customer results for the run.

Create a Run

POST /api/v1/runs
Content-Type: application/json
Request body:
{
  "decisionFlowId": "df_q1_campaign",
  "segmentId": "seg_high_value",
  "maxOffersPerCustomer": 3,
  "outputFormat": "json"
}
Response (202 Accepted):
{
  "id": "run_abc123",
  "status": "pending",
  "decisionFlowId": "df_q1_campaign",
  "segmentId": "seg_high_value",
  "createdAt": "2026-03-10T14:30:00Z"
}
The create endpoint returns 202 Accepted because run execution is asynchronous. Poll the run status endpoint or use the UI to monitor progress.