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

# Preview a Salesforce case filter

> Runs a SOQL WHERE clause on Case: whether it is valid, how many cases it returns and a few. Calls Salesforce. A preview that Salesforce refuses or cannot answer, for any reason (an expired session or a used-up API limit included), answers is_valid false with a fixed message: Salesforce's reason is not passed on. The object list is a 502 when Salesforce does not answer, and the fields of an object it does not describe are a 404. A 500 on an unexpected failure.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/integrations/salesforce/preview/case-filter
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/salesforce/preview/case-filter:
    post:
      tags:
        - integrations
      summary: Preview a Salesforce case filter
      description: >-
        Runs a SOQL WHERE clause on Case: whether it is valid, how many cases it
        returns and a few. Calls Salesforce. A preview that Salesforce refuses
        or cannot answer, for any reason (an expired session or a used-up API
        limit included), answers is_valid false with a fixed message:
        Salesforce's reason is not passed on. The object list is a 502 when
        Salesforce does not answer, and the fields of an object it does not
        describe are a 404. A 500 on an unexpected failure.
      operationId: integrations_salesforce_preview_case_filter
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                filter_string:
                  description: SOQL WHERE clause to validate
                  title: Filter String
                  type: string
                limit:
                  default: 5
                  description: Number of sample records to return
                  maximum: 20
                  minimum: 1
                  title: Limit
                  type: integer
                overlap_filters:
                  description: >-
                    Filters whose accounts this filter also returns are counted
                    in overlaps
                  items:
                    $ref: '#/components/schemas/OverlapFilter'
                  maxItems: 20
                  title: Overlap Filters
                  type: array
              required:
                - filter_string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesforceCaseFilterPreview'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    OverlapFilter:
      description: A known-type filter to count against the previewed inert filter.
      properties:
        filter:
          title: Filter
          type: string
        type:
          title: Type
          type: string
      required:
        - type
        - filter
      title: OverlapFilter
      type: object
    SalesforceCaseFilterPreview:
      description: >-
        Whether the case filter runs, how many cases it returns, and a few of
        them.
      properties:
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        is_valid:
          title: Is Valid
          type: boolean
        sample_cases:
          items:
            $ref: '#/components/schemas/CaseSample'
          title: Sample Cases
          type: array
        total_count:
          default: 0
          title: Total Count
          type: integer
      required:
        - is_valid
      title: SalesforceCaseFilterPreview
      type: object
    CaseSample:
      description: Sample case from case filter preview.
      properties:
        case_number:
          title: Case Number
          type: string
        id:
          title: Id
          type: string
      required:
        - id
        - case_number
      title: CaseSample
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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