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

# Intercom Start Fin Conversation: Inputs, Cost & CLI

> Start a conversation with Fin. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=intercom_start_fin_conversation:{"conversation_id":"{{conversation_id}}","message":{},"user":{}}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                            | Type     | Required | Default | Description                                                                     |
| ------------------------------- | -------- | -------- | ------- | ------------------------------------------------------------------------------- |
| `payload.conversation_id`       | `string` | Yes      |         | The ID of the conversation that is calling Fin via this API.                    |
| `payload.message`               | `object` | Yes      |         | A message exchanged within a Fin Agent conversation.                            |
| `payload.user`                  | `object` | Yes      |         | A user object representing the user in a Fin Agent conversation.                |
| `payload.attachments`           | `array`  | No       |         | An array of attachments to include with the message. Maximum of 10 attachments. |
| `payload.conversation_metadata` | `object` | No       |         | Metadata about the conversation, including history and attributes.              |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Initialize Fin by passing it the user's message along with conversation history and user details. These additional pieces of context will be used by Fin to provide a better and more contextual answer to the user. {% admonition type=\"warning\" %} Please reach out to your accounts team to discuss access. {% /admonition %} Once Fin is initialized, it progresses through a series of statuses such as *thinking*, *awaiting_user_reply*, or *resolved* before ending with a status of *complete*. During this workflow, the client should allow Fin to continue uninterrupted until a final *complete* status is returned via webhook, at which point control of the conversation passes back to the client.",
    "properties": {
      "conversation_id": {
        "type": "string",
        "description": "The ID of the conversation that is calling Fin via this API."
      },
      "message": {
        "type": "object",
        "description": "A message exchanged within a Fin Agent conversation.",
        "properties": {
          "author": {
            "type": "string",
            "description": "The author that created the message.",
            "enum": [
              "user",
              "agent",
              "fin"
            ]
          },
          "body": {
            "type": "string",
            "description": "The body of the message. Accepts both plain text and HTML format. When sending a message to Fin, this should contain the user's message. Fin's response will be returned as HTML."
          },
          "timestamp": {
            "type": "string",
            "description": "The timestamp when the message was created. Used to deduplicate messages sent within a 5 minute window. Ideally should include milliseconds for higher precision.",
            "format": "date-time"
          },
          "timestamp_ms": {
            "type": "string",
            "description": "The timestamp when the message was created, with millisecond precision. Only present in webhook event responses (fin_replied).",
            "format": "date-time"
          }
        },
        "required": [
          "author",
          "body",
          "timestamp"
        ],
        "additionalProperties": false
      },
      "user": {
        "type": "object",
        "description": "A user object representing the user in a Fin Agent conversation.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the user. This value will be used to uniquely identify the user during a conversation with Fin. Maps to the user_id field on the Intercom User object."
          },
          "name": {
            "type": "string",
            "description": "The name of the user."
          },
          "email": {
            "type": "string",
            "description": "The email of the user.",
            "format": "email"
          },
          "attributes": {
            "type": "object",
            "description": "A hash of attributes associated with the user. Attributes can be used by Fin to target content and responses. Limit to 10 attributes.",
            "additionalProperties": true
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "attachments": {
        "type": "array",
        "description": "An array of attachments to include with the message. Maximum of 10 attachments.",
        "maxItems": 10,
        "items": {
          "type": "object",
          "description": "An attachment object representing a file or URL attachment included with a message. Attachments can be used to provide additional context to Fin. Maximum of 10 attachments per request.",
          "properties": {
            "type": {
              "type": "string",
              "description": "The type of attachment.",
              "enum": [
                "url",
                "file"
              ]
            },
            "url": {
              "type": "string",
              "description": "The URL of the attachment. Required when type is 'url'. Must be publicly accessible.",
              "format": "uri"
            },
            "name": {
              "type": "string",
              "description": "The name of the file. Required when type is 'file'."
            },
            "content_type": {
              "type": "string",
              "description": "The MIME type of the file. Required when type is 'file'."
            },
            "data": {
              "type": "string",
              "description": "Base64-encoded file data. Required when type is 'file'.",
              "format": "byte"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        }
      },
      "conversation_metadata": {
        "type": "object",
        "description": "Metadata about the conversation, including history and attributes.",
        "properties": {
          "history": {
            "type": "array",
            "description": "An array of previous messages in the conversation before Fin is initialized. This data provides context to Fin and helps generate a better answer. Limit to the last 10 messages.",
            "maxItems": 10,
            "items": {
              "type": "object",
              "description": "A message exchanged within a Fin Agent conversation.",
              "properties": {
                "author": {
                  "type": "string",
                  "description": "The author that created the message.",
                  "enum": [
                    "user",
                    "agent",
                    "fin"
                  ]
                },
                "body": {
                  "type": "string",
                  "description": "The body of the message. Accepts both plain text and HTML format. When sending a message to Fin, this should contain the user's message. Fin's response will be returned as HTML."
                },
                "timestamp": {
                  "type": "string",
                  "description": "The timestamp when the message was created. Used to deduplicate messages sent within a 5 minute window. Ideally should include milliseconds for higher precision.",
                  "format": "date-time"
                },
                "timestamp_ms": {
                  "type": "string",
                  "description": "The timestamp when the message was created, with millisecond precision. Only present in webhook event responses (fin_replied).",
                  "format": "date-time"
                }
              },
              "required": [
                "author",
                "body",
                "timestamp"
              ],
              "additionalProperties": false
            }
          },
          "attributes": {
            "type": "object",
            "description": "A hash of attributes associated with the conversation. These attributes can be used by Fin to provide more contextual responses. Limit to 10 attributes.",
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      }
    },
    "required": [
      "conversation_id",
      "message",
      "user"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "conversation_id": {
            "type": "string",
            "description": "The ID of the conversation."
          },
          "user_id": {
            "type": "string",
            "description": "The ID of the user."
          },
          "status": {
            "type": "string",
            "description": "Fin's current status in the conversation workflow.",
            "enum": [
              "thinking",
              "awaiting_user_reply",
              "escalated",
              "resolved",
              "complete"
            ]
          },
          "created_at_ms": {
            "type": "string",
            "description": "The timestamp the response was created at, with millisecond precision.",
            "format": "date-time"
          },
          "errors": {
            "type": "object",
            "description": "Contains error details if any user or conversation attribute updates failed.",
            "properties": {
              "user": {
                "type": "object",
                "description": "User-related attribute errors.",
                "properties": {
                  "attributes": {
                    "type": "object",
                    "description": "Map of user attribute names to error messages.",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              },
              "conversation": {
                "type": "object",
                "description": "Conversation-related attribute errors.",
                "properties": {
                  "attributes": {
                    "type": "object",
                    "description": "Map of conversation attribute names to error messages.",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "sse_subscription_url": {
            "type": "string",
            "description": "Optional. A URL to subscribe to Server-Sent Events (SSE) for this conversation, if SSE is enabled. The access token is a JWT with a 3-minute TTL. The token is revoked when Fin sets the conversation to awaiting_user_reply or complete status."
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute intercom_start_fin_conversation --payload '{
  "conversation_id": "string",
  "message": {},
  "user": {}
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
