> ## 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: Create Phone Switch

> Send a contact on a phone call a text message that moves them to Intercom Messenger. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Send a contact on a phone call a text message that moves them to Intercom Messenger.

> [!NOTE]
>
> Tool ID: `intercom_create_phone_switch`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'intercom_create_phone_switch',
  {
    "phone": "+14155550123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute intercom_create_phone_switch --input '{
  "phone": "+14155550123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "type": "phone_call_redirect",
    "phone": "+14155550123"
  }
}
```

Use `deepline describe intercom_create_phone_switch --json` for the latest machine-readable contract.

## Input reference

You can create an phone switch

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.phone` | `string` | Yes | — | Phone number in E.164 format, that will receive the SMS to continue the conversation in the Messenger. |
| `payload.custom_attributes` | `record` | No | — | An object containing the different custom attributes associated to the conversation as key-value pairs. For relationship attributes the value will be a list of custom object instance models. System-defined attributes such as "CX Score rating" and "CX Score explanation" may also be included. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "You can create an phone switch",
    "properties": {
      "phone": {
        "type": "string",
        "description": "Phone number in E.164 format, that will receive the SMS to continue the conversation in the Messenger."
      },
      "custom_attributes": {
        "type": "object",
        "description": "An object containing the different custom attributes associated to the conversation as key-value pairs. For relationship attributes the value will be a list of custom object instance models. System-defined attributes such as \"CX Score rating\" and \"CX Score explanation\" may also be included.",
        "additionalProperties": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "object",
              "description": "The list of associated custom object instances for a given reference attribute on the parent object.",
              "properties": {
                "type": {
                  "type": "string"
                },
                "instances": {
                  "type": "array",
                  "description": "The list of associated custom object instances for a given reference attribute on the parent object.",
                  "items": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "A Custom Object Instance represents an instance of a custom object type. This allows you to create and set custom attributes to store data about your customers that is not already captured by Intercom. The parent object includes recommended default attributes and you can add your own custom attributes.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The Intercom defined id representing the custom object instance."
                      },
                      "external_id": {
                        "type": "string",
                        "description": "The id you have defined for the custom object instance."
                      },
                      "external_created_at": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "The time when the Custom Object instance was created in the external system it originated from.",
                        "format": "date-time"
                      },
                      "external_updated_at": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "The time when the Custom Object instance was last updated in the external system it originated from.",
                        "format": "date-time"
                      },
                      "created_at": {
                        "type": "integer",
                        "description": "The time the attribute was created as a UTC Unix timestamp",
                        "format": "date-time"
                      },
                      "updated_at": {
                        "type": "integer",
                        "description": "The time the attribute was last updated as a UTC Unix timestamp",
                        "format": "date-time"
                      },
                      "type": {
                        "type": "string",
                        "description": "The identifier of the custom object type that defines the structure of the custom object instance."
                      },
                      "custom_attributes": {
                        "type": "object",
                        "description": "The custom attributes you have set on the custom object instance.",
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          ]
        }
      }
    },
    "required": [
      "phone"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Phone Switch Response |
| `result.data.type` | `"phone_call_redirect"` | No | `"phone_call_redirect"` | Allowed: `phone_call_redirect`. |
| `result.data.phone` | `string` | No | — | Phone number in E.164 format, that has received the SMS to continue the conversation in the Messenger. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": [
          "object",
          "null"
        ],
        "description": "Phone Switch Response",
        "properties": {
          "type": {
            "type": "string",
            "default": "phone_call_redirect",
            "enum": [
              "phone_call_redirect"
            ]
          },
          "phone": {
            "type": "string",
            "description": "Phone number in E.164 format, that has received the SMS to continue the conversation in the Messenger."
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

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

## Related documentation

* [Intercom provider guide](https://deepline.com/docs/providers/intercom/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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