> ## 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 Retrieve Visitor With User Id: Inputs, Cost & CLI

> Retrieve a visitor with User ID. 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_retrieve_visitor_with_user_id:{"user_id":"{{user_id}}"}' --json
```

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

## Input Schema

| Name              | Type     | Required | Default | Description                                       |
| ----------------- | -------- | -------- | ------- | ------------------------------------------------- |
| `payload.user_id` | `string` | Yes      |         | The user\_id of the Visitor you want to retrieve. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "You can fetch the details of a single visitor.",
    "properties": {
      "user_id": {
        "type": "string",
        "description": "The user_id of the Visitor you want to retrieve."
      }
    },
    "required": [
      "user_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                                                                                                                                                                                                                                   |
| ------------- | -------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.data` | `object` | Yes      |         | Visitors are useful for representing anonymous people that have not yet been identified. They usually represent website visitors. Visitors are not visible in Intercom platform. The Visitors resource provides methods to fetch, update, convert and delete. |
| `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",
          "null"
        ],
        "description": "Visitors are useful for representing anonymous people that have not yet been identified. They usually represent website visitors. Visitors are not visible in Intercom platform. The Visitors resource provides methods to fetch, update, convert and delete.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Value is 'visitor'",
            "default": "visitor"
          },
          "id": {
            "type": "string",
            "description": "The Intercom defined id representing the Visitor."
          },
          "user_id": {
            "type": "string",
            "description": "Automatically generated identifier for the Visitor."
          },
          "anonymous": {
            "type": "boolean",
            "description": "Identifies if this visitor is anonymous."
          },
          "email": {
            "type": "string",
            "description": "The email of the visitor.",
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The phone number of the visitor."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the visitor."
          },
          "pseudonym": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pseudonym of the visitor."
          },
          "avatar": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "avatar"
              },
              "image_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "This object represents the avatar associated with the visitor.",
                "format": "uri"
              }
            },
            "additionalProperties": false
          },
          "app_id": {
            "type": "string",
            "description": "The id of the app the visitor is associated with."
          },
          "companies": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the object",
                "enum": [
                  "company.list"
                ]
              },
              "companies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "description": "Companies allow you to represent organizations using your product. Each company will have its own description and be associated with contacts. You can fetch, create, update and list companies.",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Value is `company`",
                      "enum": [
                        "company"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "description": "The Intercom defined id representing the company."
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the company."
                    },
                    "app_id": {
                      "type": "string",
                      "description": "The Intercom defined code of the workspace the company is associated to."
                    },
                    "plan": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Value is always \"plan\""
                        },
                        "id": {
                          "type": "string",
                          "description": "The id of the plan"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the plan"
                        }
                      },
                      "additionalProperties": false
                    },
                    "company_id": {
                      "type": "string",
                      "description": "The company id you have defined for the company."
                    },
                    "remote_created_at": {
                      "type": "integer",
                      "description": "The time the company was created by you."
                    },
                    "created_at": {
                      "type": "integer",
                      "description": "The time the company was added in Intercom."
                    },
                    "updated_at": {
                      "type": "integer",
                      "description": "The last time the company was updated."
                    },
                    "last_request_at": {
                      "type": "integer",
                      "description": "The time the company last recorded making a request."
                    },
                    "size": {
                      "type": "integer",
                      "description": "The number of employees in the company."
                    },
                    "website": {
                      "type": "string",
                      "description": "The URL for the company website."
                    },
                    "industry": {
                      "type": "string",
                      "description": "The industry that the company operates in."
                    },
                    "monthly_spend": {
                      "type": "integer",
                      "description": "How much revenue the company generates for your business."
                    },
                    "session_count": {
                      "type": "integer",
                      "description": "How many sessions the company has recorded."
                    },
                    "user_count": {
                      "type": "integer",
                      "description": "The number of users in the company."
                    },
                    "custom_attributes": {
                      "type": "object",
                      "description": "The custom attributes you have set on the company.",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "tags": {
                      "type": "object",
                      "description": "The list of tags associated with the company",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the object",
                          "enum": [
                            "tag.list"
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "A tag allows you to label your contacts, companies, and conversations and list them using that tag.",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "value is \"tag\""
                              },
                              "id": {
                                "type": "string",
                                "description": "The id of the tag"
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the tag"
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "segments": {
                      "type": "object",
                      "description": "The list of segments associated with the company",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the object",
                          "enum": [
                            "segment.list"
                          ]
                        },
                        "segments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "A segment is a group of your contacts defined by the rules that you set.",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "The type of object.",
                                "enum": [
                                  "segment"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "The unique identifier representing the segment."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the segment."
                              },
                              "created_at": {
                                "type": "integer",
                                "description": "The time the segment was created."
                              },
                              "updated_at": {
                                "type": "integer",
                                "description": "The time the segment was updated."
                              },
                              "person_type": {
                                "type": "string",
                                "description": "Type of the contact: contact (lead) or user.",
                                "enum": [
                                  "contact",
                                  "user"
                                ]
                              },
                              "count": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "The number of items in the user segment. It's returned when `include_count=true` is included in the request."
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "location_data": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "location_data"
              },
              "city_name": {
                "type": "string",
                "description": "The city name of the visitor."
              },
              "continent_code": {
                "type": "string",
                "description": "The continent code of the visitor."
              },
              "country_code": {
                "type": "string",
                "description": "The country code of the visitor."
              },
              "country_name": {
                "type": "string",
                "description": "The country name of the visitor."
              },
              "postal_code": {
                "type": "string",
                "description": "The postal code of the visitor."
              },
              "region_name": {
                "type": "string",
                "description": "The region name of the visitor."
              },
              "timezone": {
                "type": "string",
                "description": "The timezone of the visitor."
              }
            },
            "additionalProperties": false
          },
          "las_request_at": {
            "type": "integer",
            "description": "The time the Lead last recorded making a request."
          },
          "created_at": {
            "type": "integer",
            "description": "The time the Visitor was added to Intercom."
          },
          "remote_created_at": {
            "type": "integer",
            "description": "The time the Visitor was added to Intercom."
          },
          "signed_up_at": {
            "type": "integer",
            "description": "The time the Visitor signed up for your product."
          },
          "updated_at": {
            "type": "integer",
            "description": "The last time the Visitor was updated."
          },
          "session_count": {
            "type": "integer",
            "description": "The number of sessions the Visitor has had."
          },
          "social_profiles": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the object",
                "enum": [
                  "social_profile.list"
                ]
              },
              "social_profiles": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id of the admin that owns the Visitor."
          },
          "unsubscribed_from_emails": {
            "type": "boolean",
            "description": "Whether the Visitor is unsubscribed from emails."
          },
          "marked_email_as_spam": {
            "type": "boolean",
            "description": "Identifies if this visitor has marked an email as spam."
          },
          "has_hard_bounced": {
            "type": "boolean",
            "description": "Identifies if this visitor has had a hard bounce."
          },
          "tags": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the object",
                "enum": [
                  "tag.list"
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The type of the object",
                      "enum": [
                        "tag"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "description": "The id of the tag."
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the tag."
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "segments": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the object",
                "enum": [
                  "segment.list"
                ]
              },
              "segments": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "custom_attributes": {
            "type": "object",
            "description": "The custom attributes you have set on the Visitor.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "referrer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The referer of the visitor."
          },
          "utm_campaign": {
            "type": [
              "string",
              "null"
            ],
            "description": "The utm_campaign of the visitor."
          },
          "utm_content": {
            "type": [
              "string",
              "null"
            ],
            "description": "The utm_content of the visitor."
          },
          "utm_medium": {
            "type": [
              "string",
              "null"
            ],
            "description": "The utm_medium of the visitor."
          },
          "utm_source": {
            "type": [
              "string",
              "null"
            ],
            "description": "The utm_source of the visitor."
          },
          "utm_term": {
            "type": [
              "string",
              "null"
            ],
            "description": "The utm_term of the visitor."
          },
          "do_not_track": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Identifies if this visitor has do not track enabled."
          }
        },
        "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_retrieve_visitor_with_user_id --payload '{
  "user_id": "string"
}' --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`.
