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

# Update Salesforce integration settings

> Change Salesforce Case management or messaging settings. Omitted fields keep their value.



## OpenAPI

````yaml patch /integrations/salesforce/settings
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /integrations/salesforce/settings:
    patch:
      summary: Update Salesforce integration settings
      description: >-
        Partially update the Salesforce settings; omitted fields stay unchanged.
        `case_management` needs Case management connected and `miaw` needs
        messaging configured (400 otherwise). Set `draft_from_address` only to a
        verified org-wide address (see the org-wide addresses route). 404 when
        Salesforce is not connected.
      operationId: updateSalesforceIntegrationSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSalesforcePublicSettingsDto'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesforcePublicSettingsResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    UpdateSalesforcePublicSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/UpdateSalesforcePublicSettingsDtoInput'
      type: object
      properties:
        case_management:
          type: object
          properties:
            assist_replies_as_drafts:
              type: boolean
              description: >-
                true = assist-mode suggestions are posted as editable email
                drafts on the Case instead of private Case comments
            draft_from_address:
              anyOf:
                - type: string
                - type: 'null'
              description: >-
                Verified org-wide email address used as From on those drafts;
                null = the composer default
            autofill_fields_on_assist_mode:
              type: boolean
              description: >-
                true = AI Case-field auto-fill writes to the Case on assist-mode
                sessions too, instead of suggesting values
            include_session_url_in_case_comment:
              type: boolean
              description: true = Case comments OpenCX posts include a link to the session
            post_handoff_case_comment:
              type: boolean
              description: true = a handoff posts a summary comment on the Case
            prefer_first_email_content:
              type: boolean
              description: >-
                true = a new session starts from the Case's first email instead
                of the Case description
        miaw:
          type: object
          properties:
            es_developer_name:
              anyOf:
                - type: string
                - type: 'null'
              description: >-
                Developer name of the Salesforce Embedded Service deployment
                that handles messaging
            salesforce_org_id:
              anyOf:
                - type: string
                - type: 'null'
              description: Salesforce org id (00D…)
    SalesforcePublicSettingsResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SalesforcePublicSettingsResponseDto'
      type: object
      properties:
        connected:
          type: boolean
          description: >-
            false = neither Case management nor messaging is connected; settings
            is null
        settings:
          anyOf:
            - $ref: '#/components/schemas/SalesforcePublicSettingsDto'
            - type: 'null'
      required:
        - connected
        - settings
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
    SalesforcePublicSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SalesforcePublicSettingsDto'
      type: object
      properties:
        case_management:
          anyOf:
            - $ref: '#/components/schemas/SalesforcePublicCaseManagementSettingsDto'
            - type: 'null'
          description: Case management (Email-to-Case) settings; null when not connected
        miaw:
          anyOf:
            - $ref: '#/components/schemas/SalesforcePublicMiawSettingsDto'
            - type: 'null'
          description: Messaging (MIAW) settings; null when not configured
      required:
        - case_management
        - miaw
      additionalProperties: false
    SalesforcePublicCaseManagementSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SalesforcePublicCaseManagementSettingsDto'
      type: object
      properties:
        assist_replies_as_drafts:
          type: boolean
          description: >-
            true = assist-mode suggestions are posted as editable email drafts
            on the Case instead of private Case comments
        draft_from_address:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Verified org-wide email address used as From on those drafts; null =
            the composer default
        autofill_fields_on_assist_mode:
          type: boolean
          description: >-
            true = AI Case-field auto-fill writes to the Case on assist-mode
            sessions too, instead of suggesting values
        include_session_url_in_case_comment:
          type: boolean
          description: true = Case comments OpenCX posts include a link to the session
        post_handoff_case_comment:
          type: boolean
          description: true = a handoff posts a summary comment on the Case
        prefer_first_email_content:
          type: boolean
          description: >-
            true = a new session starts from the Case's first email instead of
            the Case description
      required:
        - assist_replies_as_drafts
        - draft_from_address
        - autofill_fields_on_assist_mode
        - include_session_url_in_case_comment
        - post_handoff_case_comment
        - prefer_first_email_content
      additionalProperties: false
    SalesforcePublicMiawSettingsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/SalesforcePublicMiawSettingsDto'
      type: object
      properties:
        es_developer_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Developer name of the Salesforce Embedded Service deployment that
            handles messaging
        salesforce_org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Salesforce org id (00D…)
        instance_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Salesforce instance URL (read-only here)
        miaw_auth_key_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Key id of the messaging auth key (read-only here)
        has_miaw_auth_private_key:
          type: boolean
          description: >-
            Whether a messaging auth private key is stored (the key itself is
            never returned)
      required:
        - es_developer_name
        - salesforce_org_id
        - instance_url
        - miaw_auth_key_id
        - has_miaw_auth_private_key
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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