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

# enrich_worksheet

> **Analyze with AI**

Add AI columns to a worksheet that classify themes and root causes, score records or extract evidence. Each row's answer uses its full conversation transcript, found through the worksheet's `ticket_sid` column or the column whose kind is `external_gradable_reference`, plus any `contextColumnIds` values; a worksheet with neither reference is judged on its own columns instead. Results persist as columns that can be filtered and aggregated.

Only rows already on the worksheet are processed; rows that load after the job starts are not enriched. All columns requested together are filled in a single LLM call per row.

The job runs in the background and this returns its `jobId` at once; get_enrich_status with the worksheetId and jobId reports progress and completion. `columns` pairs each new column's display name with its `id`, and queries take the `id`.



## OpenAPI

````yaml /api-reference/tools-openapi.json post /v1/enrich_worksheet
openapi: 3.1.0
info:
  title: Rippit API
  version: 1.0.0
  description: Every operation is also an MCP tool with the same name and parameters.
servers:
  - url: https://api.rippit.com
security:
  - bearer: []
paths:
  /v1/enrich_worksheet:
    post:
      summary: enrich_worksheet
      description: >-
        **Analyze with AI**


        Add AI columns to a worksheet that classify themes and root causes,
        score records or extract evidence. Each row's answer uses its full
        conversation transcript, found through the worksheet's `ticket_sid`
        column or the column whose kind is `external_gradable_reference`, plus
        any `contextColumnIds` values; a worksheet with neither reference is
        judged on its own columns instead. Results persist as columns that can
        be filtered and aggregated.


        Only rows already on the worksheet are processed; rows that load after
        the job starts are not enriched. All columns requested together are
        filled in a single LLM call per row.


        The job runs in the background and this returns its `jobId` at once;
        get_enrich_status with the worksheetId and jobId reports progress and
        completion. `columns` pairs each new column's display name with its
        `id`, and queries take the `id`.
      operationId: enrich_worksheet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                worksheetId:
                  type: string
                  minLength: 1
                  pattern: ^[A-Za-z0-9_-]+$
                  description: Worksheet to add the columns to.
                enrichments:
                  minItems: 1
                  maxItems: 25
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 120
                        description: >-
                          New column display name, unique within the call
                          ignoring case and treating spaces as underscores.
                      instructions:
                        type: string
                        minLength: 1
                        maxLength: 10000
                        description: >-
                          Per-row task for the model. With `overrides`, the
                          default for rows no override matches.
                      outputType:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - string
                                  - array(string)
                                  - integer
                                  - array(integer)
                                  - float
                                  - boolean
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: enum
                              values:
                                anyOf:
                                  - minItems: 2
                                    type: array
                                    items:
                                      type: string
                                  - minItems: 2
                                    type: array
                                    items:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                description: >-
                                  Allowed labels; rows the model cannot judge
                                  are forced into one unless a catch-all such as
                                  "unknown" is listed.
                              multi:
                                type: boolean
                            required:
                              - type
                              - values
                            additionalProperties: false
                        description: >-
                          Result type; `enum` values are stored as text labels.
                          With `overrides`, the default-case type.
                      overrideCaseColumnId:
                        description: >-
                          Existing pipeline-born column whose row value selects
                          the override; required with `overrides`. Every column
                          in one call that uses overrides must branch on the
                          same column.
                        type: string
                      overrides:
                        description: >-
                          Per-value instructions, one entry per
                          overrideCaseColumnId value; rows matching no entry use
                          the column-level instructions and outputType.
                        minItems: 1
                        maxItems: 60
                        type: array
                        items:
                          type: object
                          properties:
                            case:
                              type: string
                              minLength: 1
                              description: >-
                                The overrideCaseColumnId row value this entry
                                applies to: an enum column's label text, or a
                                bucketed column's `opt_*` id.
                            instructions:
                              type: string
                              minLength: 1
                              maxLength: 10000
                              description: >-
                                Instructions for rows whose overrideCaseColumnId
                                matches `case`.
                            outputType:
                              description: >-
                                This branch's output type; omitted reuses the
                                column's. It must keep the default's underlying
                                data type (string enums and plain strings mix).
                              oneOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - string
                                        - array(string)
                                        - integer
                                        - array(integer)
                                        - float
                                        - boolean
                                  required:
                                    - type
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      const: enum
                                    values:
                                      anyOf:
                                        - minItems: 2
                                          type: array
                                          items:
                                            type: string
                                        - minItems: 2
                                          type: array
                                          items:
                                            type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                      description: >-
                                        Allowed labels; rows the model cannot
                                        judge are forced into one unless a
                                        catch-all such as "unknown" is listed.
                                    multi:
                                      type: boolean
                                  required:
                                    - type
                                    - values
                                  additionalProperties: false
                          required:
                            - case
                            - instructions
                          additionalProperties: false
                    required:
                      - name
                      - instructions
                      - outputType
                    additionalProperties: false
                  description: Columns to create and fill.
                contextColumnIds:
                  description: >-
                    Existing column ids whose per-row values the model reads
                    alongside the conversation.
                  type: array
                  items:
                    type: string
                where:
                  description: Enrich only rows matching these filters.
                  maxItems: 20
                  type: array
                  items:
                    $ref: '#/components/schemas/enrich_worksheet____schema0'
                sampleRows:
                  description: >-
                    Enrich only a uniform random sample of this many rows, drawn
                    after `where` and fresh on each run.
                  type: integer
                  minimum: 1
                  maximum: 10000
                model:
                  description: >-
                    Model id; omitted uses the server default. Choose another
                    supported model when the task calls for it. Ids are
                    tenant-specific, and unknown ones are rejected.
                  type: string
                  minLength: 1
                createScaffoldIfMissing:
                  description: >-
                    True turns a worksheet with no pipeline columns into a
                    reusable pipeline on this enrichment; unset runs a plain
                    one-off job.
                  type: boolean
              required:
                - worksheetId
                - enrichments
              additionalProperties: false
      responses:
        '200':
          description: Tool result.
components:
  schemas:
    enrich_worksheet____schema0:
      anyOf:
        - type: object
          properties:
            columnId:
              type: string
              minLength: 1
              description: Column id, not its label.
            operator:
              type: string
              enum:
                - '='
                - '!='
                - '>'
                - <
                - '>='
                - <=
                - IN
                - NOT IN
                - LIKE
                - CONTAINS_ALL
                - ANY
                - ALL
                - NONE
                - NOT_EMPTY
                - EMPTY
                - IS
                - IS NOT
              description: >-
                IN/NOT IN match exact values or array elements; CONTAINS_ALL
                needs all. ANY/ALL/NONE: case-insensitive substring matches,
                never for id columns (they over-match).
            value:
              description: >-
                Array for multi-value operators (ANY/ALL/NONE: at most 250
                strings). singleSelect and bucketed columns store option ids
                (opt_*): filter by id; a label matches no rows. describe_column
                with `search` resolves a label to its id.
              anyOf:
                - type:
                    - string
                    - number
                    - boolean
                    - 'null'
                - type: array
                  items:
                    type:
                      - string
                      - number
                      - boolean
                      - 'null'
          required:
            - columnId
            - operator
          additionalProperties: false
        - type: object
          properties:
            columnId:
              type: string
              minLength: 1
              description: Column id, not its label.
            operator:
              type: string
              const: BETWEEN
            date_from:
              type: string
              description: >-
                Inclusive. Plain dates cover whole days, and times without an
                offset are clock times, in the reported timezone or UTC.
            date_to:
              type: string
              description: Inclusive; a plain date covers that whole day.
          required:
            - columnId
            - operator
            - date_from
            - date_to
          additionalProperties: false
        - type: object
          properties:
            columnId:
              type: string
              minLength: 1
              description: Column id, not its label.
            period:
              type: object
              properties:
                'n':
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                  description: Signed units; negative values reach into the past.
                unit:
                  type: string
                  enum:
                    - hours
                    - days
                    - weeks
                    - months
                    - years
              required:
                - 'n'
                - unit
              additionalProperties: false
              description: >-
                Whole days in the read timezone, including today: { n: -7, unit:
                "days" } keeps today and the six prior days. Months/years follow
                the calendar; hours are exact. Reads re-resolve; worksheets keep
                a snapshot.
            offset:
              description: >-
                Shifts the anchor before period applies; { n: -1, unit: "weeks"
                } moves it one week into the past.
              type: object
              properties:
                'n':
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                  description: Signed units; negative values reach into the past.
                unit:
                  type: string
                  enum:
                    - hours
                    - days
                    - weeks
                    - months
                    - years
              required:
                - 'n'
                - unit
              additionalProperties: false
          required:
            - columnId
            - period
          additionalProperties: false
        - type: object
          properties:
            or_filters:
              minItems: 1
              type: array
              items:
                minItems: 1
                type: array
                items:
                  $ref: '#/components/schemas/enrich_worksheet____schema0'
              description: ORs branches of ANDed items.
          required:
            - or_filters
          additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

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