> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hicap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Define business-outcome dimensions and segments

> Extend established base and identity context with business dimensions and segments for ROI analysis

Use this prompt after base attribution and applicable identity attribution. It learns the definitions already established, understands how AI contributes to the business, and adds only the custom dimensions and segments needed to answer concrete outcome and ROI questions.

Outcome instrumentation is a follow-up when a measurement gap requires it. Request tags describe context known when the request is sent; they do not prove a later result.

## How the prompt works

Business outcomes answers: **which business questions should our attribution help us answer?**

**1. Inspect: inherit the established model**

Read earlier base and identity reports, verify the actual emitted values, and trace the business workflows they describe.

**You get:** an evidence-backed baseline, existing segments, and the outcomes and ROI questions the application can support.

**2. Decide: design useful dimensions and segments**

Map each business question to its metric, existing dimensions, necessary custom dimensions, and named segment predicates.

**You get:** a justified dimension dictionary and segment specifications, with sources, allowed values, overlap rules, and measurement gaps.

**3. Change: extend the existing attribution**

Add approved, source-backed custom context through the existing helper and caller boundaries. Prepare segment definitions using supported rule semantics.

**You get:** focused tagging changes and reviewable segment definitions that preserve base and identity context. Platform configuration is reported separately from proposals.

**4. Prove: test the questions against the data**

Verify final outgoing tags and positive, negative, missing-value, and overlapping segment cases. Check the evidence available for each metric.

**You get:** tested dimensions and segment membership, plus an honest account of which ROI questions remain unanswerable.

**After the code changes:** verify fresh tagged traffic and configured segment behavior after approved deployment. Keep proposed segments, locally tested rules, saved platform configuration, observed outcomes, and demonstrated ROI distinct.

## Full prompt

```text wrap title="Business dimensions and segments" theme={null}
Extend this application's established attribution with custom business dimensions
and segments for understood business outcomes and ROI questions.
Build on the base and identity steps; do not replace them with generic analytics.

1. Learn the existing baseline before proposing changes.
   Read repository instructions, current .hicap base-attribution and identity
   reports, approved definitions, helper configuration, caller mappings, tests,
   existing segment rules, and relevant product/business documentation.
   Verify the inspected revision and actual emitted values against current code.
   Map env, system, domain, feature, operation, agent, approved identity context,
   and existing custom keys. Distinguish observed, approved, proposed, missing,
   and intentionally non-applicable fields. Do not assume a report means deployed.
   Reuse approved names and values; do not rename, overwrite, or duplicate them.
   Require the existing Hicap client and tagging helper for implementation.
   If missing, report the prerequisite and defer dependent tagging changes.
   User, organization, and tier context are independently optional. Reuse available approved
   customer organization, initiating user, user tier, and trigger context;
   never recreate identities, infer user tier from organization plan, or bypass
   the identity prompt's privacy and capability gates.
   A users-only app does not need customer_org, and an app without personal tiers
   does not need user_tier. Reuse permitted user context without inventing either.
   Carry the identity report's per-field applicability and synthetic-test versus
   production status forward. Not applicable is not an integration failure.
   If one field is missing or blocked, continue questions using other permitted
   context and mark only questions requiring that field unanswerable. Do not
   require an organization, tier, or identity segment for workflow-level analysis.

2. Understand the business before designing labels.
   Trace the capabilities and workflows described by the established dimensions.
   Use code, product documentation, business rules, and approved user context to
   identify intended outcomes and why AI is used: revenue, conversion, retention,
   service quality, labor efficiency, or risk reduction where supported.
   Distinguish observed behavior from inferred intent; ask only for unresolved
   business definitions that affect the design. Do not infer successful outcomes
   or financial value from feature names or successful model responses.
   Discover candidate questions from the application before asking the owner to
   supply a taxonomy. Inventory authoritative bounded business fields, including
   any plan, ticket/work type, workflow stage, service class, or vehicle/product
   class present in the actual app. For each candidate, state a decision it could
   inform and why to include, reject, or defer it. Do not add every available field.
   Prioritize a small set of actionable questions; do not invent a generic taxonomy.
   Example question, only if supported: how does AI support cost and resolution
   rate vary by established user tier and support channel in production?

3. Produce a decision table before editing.
   For every question show:
   business question -> outcome/ROI metric -> existing base and identity dimensions
   -> necessary custom dimensions -> segment rules -> data sources and gaps.
   Reuse an existing key or segment when it already answers the question.
   A new dimension must provide a useful distinction that existing context lacks.
   Propose low-cardinality business context such as channel, workflow stage,
   service class, or experiment cohort only when backed by authoritative sources.
   Avoid synonyms for feature, operation, domain, user tier, or customer organization.
   Record unjustified candidates as rejected or deferred instead of implementing them.
   Assess a shared organization plan separately from personal user tier. If useful
   and authoritative, reuse an existing name or propose organization_plan; being
   different from user_tier is not a reason to discard plan-based analysis.
   Users-only apps may instead have a personal plan, or no plan at all. Preserve
   its actual scope; never invent organizations or tiers for segment predicates.

4. Specify each custom dimension and each segment.
   Dimension dictionary: key, business meaning, question served, allowed values,
   source/provenance, service versus per-call scope, owning call sites,
   request-time availability, expected cardinality, normalization, missing-value
   policy, privacy classification, and merge precedence.
   Use strings in one x-hicap-tags JSON object and respect current wire limits.
   Preserve approved base and identity values. Do not introduce new identity
   references here; use the identity prompt for changes to their policy or capture.
   Never add secrets, personal identifiers, prompt text, raw URLs, request/session
   IDs, or unbounded transaction amounts as custom business dimensions.
   A future outcome cannot be tagged as already observed on an earlier request.
   Later outcomes come from their source of truth; historical request tags are not
   retroactively rewritten. Keep correlation identifiers in an approved system,
   not ordinary high-cardinality business tags.

   Segment specification: name, business question, application/environment scope,
   explicit predicates over existing and custom dimensions, AND/OR grouping,
   supported operators, missing-value behavior, and positive/negative examples.
   Segments select traffic; they are not extra tags or new dimensions.
   Verify operator semantics against the current supported platform schema.
   Do not invent a segment API or claim unsupported predicates are configurable;
   provide a clearly labeled logical proposal when platform capability is unknown.
   Document overlap: a request may match multiple segments. Do not sum overlapping
   segment costs or outcomes as if the groups were mutually exclusive.
   Identify a disjoint partition or deduplication rule when totals are required.
   Avoid one segment per individual user; preserve approved exact-user analysis
   as a separate capability with its cardinality and access limitations.
   If existing rules/configuration are inaccessible, report that limitation.

5. Specify the measurement contract.
   For each metric identify benefit/outcome definition, source of truth, unit,
   cost scope, denominator, baseline/comparison, time window, and cohort.
   Separate AI spend, total workflow cost, human review effort, and business benefit.
   Cost per completion is an efficiency metric, not ROI by itself.
   If financial ROI is proposed, define (attributable benefit - relevant cost) /
   relevant cost, include the stated cost scope, and require evidenced benefit
   and baseline assumptions. Otherwise label it a hypothesis, not measured ROI.
   Address failed attempts, retries, multiple model calls, delayed outcomes,
   duplicate events, and segment overlap. Missing data is unavailable, not zero;
   do not divide by zero. Correlation does not establish causal impact.
   Request tags can attribute spend to cohorts; actual outcome denominators and
   benefits require separately verified sources. Do not put an achieved outcome
   or monetary return on a request merely because it is the workflow's goal.

   Inspect supported cost and correlation sources before declaring them absent:
   existing adapters, SDK response handling, pinned API contracts, approved
   redacted examples, and billing exports. A response may expose a request
   reference or usage.cost; verify semantics, units/currency, availability and
   whether it is estimated, response-reported, or reconciled billed cost.
   Do not assume these fields exist or cover retries, failures, streaming, or
   every provider. Do not make a live call merely to discover them.
   When supported and within established access/retention policy, preserve an
   application-owned association from request/attempt to workflow or suggestion
   and later outcome. Scope it to the authorized user/resource, plus tenant when
   present. Keep references and costs in the application record, not tag values.
   Verify uniqueness and retry/failed-attempt semantics; a successful response ID
   alone does not prove complete billable-attempt coverage. Report unmatched
   requests/costs explicitly rather than treating them as zero.
   Optional measurement and association writes must not turn a successful model
   response into a failed user request. Make failures observable without exposing
   sensitive data, and report missing associations. Make retries idempotent using
   stable scoped event or attempt identities; detect conflicting associations and
   leave them unresolved for review rather than silently overwriting or joining
   them to the wrong user, tenant, workflow or outcome. Test failed writes,
   duplicate delivery and conflicting identities when implementing these writes.
   Approval metrics need durable, timestamped events with stable event identity,
   defined first/repeated/revoked-approval behavior and deduplication. A mutable
   approved flag or latest approver is not an outcome history. Proposal-only
   observation windows are not approved definitions; pause dependent changes
   while continuing independently justified dimensions and segment work.

6. Implement only justified changes.
   Extend the existing helper and trusted caller context for approved, source-backed
   custom values. Preserve routes, models, credentials, provider settings,
   fallback behavior, existing base/identity values, and reviewed merge precedence.
   Keep per-call context immutable across concurrent work, queues, and retries.
   Send tags only on Hicap-bound requests; other providers receive no Hicap key
   or attribution headers.
   Prepare versioned, reviewable segment definitions using existing repository
   conventions. Distinguish a logical proposal from a platform-ready definition
   and a saved platform segment. Do not change live dashboard rules without authorization.
   New outcome-event instrumentation is conditional: propose it only for an
   identified measurement gap. Reuse existing analytics/events first; do not
   turn this task into a general analytics migration. Report unsupported work.

7. Verify and hand off with evidence.
   Use mocked provider responses and synthetic workflow fixtures; block unexpected
   network calls and await concurrent work and retries.
   Capture final outgoing headers from real application functions. Assert base
   and identity values are preserved, custom values belong to the correct caller,
   and non-Hicap destinations receive no Hicap tags or credentials.
   Derive expected values from independent workflow evidence, not emitted tags
   or the implementation registry. Demonstrate a negative control: swapped or
   missing business context must fail; restore correct code afterward.
   Test segment membership with positive, negative, missing-dimension, and
   overlapping fixtures, including AND/OR precedence and tenant/tier boundaries
   where relevant. Users-only segments must not require an organization; segments
   unrelated to tier must still match when tier is not applicable. Include shared
   organization-plan cases without fabricating personal user tiers.
   A locally correct rule does not prove platform configuration.
   Check metric calculations against the stated denominator, scope, zero cases,
   retries, duplicates, and overlap without inventing observed business results.

   Save a new .hicap business-outcomes report, preserving previous reports.
   Include source/prompt revisions, inherited baseline, the decision table,
   dimension dictionary, segment definitions and examples, measurement contracts,
   implementation/coverage evidence, tests, rejected candidates, and blockers.
   Use synthetic/redacted examples. Show the exact report path.
   Distinguish configured source, mocked outgoing tags, fresh recorded dimensions,
   tested segment rules, saved platform segments, observed outcomes, and verified
   ROI evidence. Report precisely which questions can and cannot be answered.
   Do not deploy, generate paid traffic, expose new identifiers, or change live
   dashboard rules without applicable authorization.
```

Review [Tags, Dimensions & Segments](https://docs.hicap.ai/concepts/tags-dimensions-segments.md). Start with [base attribution](https://docs.hicap.ai/onboarding-prompts/attribution.md) and [identity](https://docs.hicap.ai/onboarding-prompts/identity.md) where applicable, or return to the [Quickstart](https://docs.hicap.ai/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.