> ## 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 Reply To Fin: Inputs, Cost & CLI Example

> Reply to Fin. Intercom Intercom Reply To Fin docs include request fields, response shape, pricing notes, and Deepline CLI examples.

## 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_reply_to_fin:{"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.                                                     |
| `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. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Once Fin has returned a response to a user's message, its status will be `awaiting_user_reply`. If a user replies, use this endpoint to send this response to Fin. {% admonition type=\"warning\" %} Please reach out to your accounts team to discuss access. {% /admonition %}",
    "properties": {
      "conversation_id": {
        "type": "string",
        "description": "The ID of the conversation."
      },
      "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
        }
      }
    },
    "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_reply_to_fin --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`.
