<!-- BusyBot node reference — https://busybot.net/tools/customer-io/ -->

> Node: Customer.io (`customer_io`) · Action · v1
> Category: Communication · Credentials: Customer.io API (`customerIoApi`)
> Updated: 2026-08-16

# Customer.io

> Marketing automation — manage customers, track events, campaigns, and segments in Customer.io.

## Overview

Customer.io is a marketing automation platform. This tool supports: creating/updating/deleting customers via the Tracking API, tracking customer and anonymous events, retrieving campaign details and metrics via the App API, and adding/removing customers from manual segments. The region setting on the credential determines which tracking hostname is used (Global or EU).

**Category:** Communication  
**Tool Name:** `customer_io`  
**Version:** 1

**Appearance:** Icon: `lucide-Users` | Color: `#4BC2DF`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Customer.io API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/customer-io-api/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| Campaign | `campaign` |
| Customer | `customer` |
| Event | `event` |
| Segment | `segment` |

### Operations

| Resource | Operation | Value | Description |
|----------|-----------|-------|-------------|
| Campaign | Get | `get` | Retrieve a single campaign's details |
| Campaign | Get Many | `getAll` | Retrieve every campaign in the workspace |
| Campaign | Get Metrics | `getMetrics` | Retrieve a campaign's delivery metrics over time |
| Customer | Create or Update | `upsert` | Create a customer, or update them if the ID already exists |
| Customer | Delete | `delete` | Delete a customer |
| Event | Track | `track` | Track an event against a known customer |
| Event | Track Anonymous | `trackAnonymous` | Track an event with no customer attached |
| Segment | Add Customer | `add` | Add customers to a manual segment |
| Segment | Remove Customer | `remove` | Remove customers from a manual segment |

### Parameters

`Campaign: Get Many` takes no parameters of its own — see All Operations.

#### Campaign: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Campaign ID | `number` | Yes | `0` | The unique identifier for the campaign. Supports expressions. |

#### Campaign: Get Metrics

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Campaign ID | `number` | Yes | `0` | The unique identifier for the campaign. Supports expressions. |
| Period | `options` | No | `days` | Specify the metric period. |
| | | | | Options: `hours`, `days`, `weeks`, `months` |
| JSON Parameters | `boolean` | No | `false` | Whether to supply the additional fields as raw JSON instead of the structured field list. |
| Additional Fields (`additionalFieldsJson`) | `json` | No | — | Additional fields as raw JSON object. _(shown when JSON Parameters is `true`)_ |
| Additional Fields (`additionalFields`) | `collection` | No | `{}` | Additional fields in structured form. _(shown when JSON Parameters is `false`)_ |
| — Steps | `number` | No | `0` | Number of time periods to return. Max: 24 hours, 45 days, 12 weeks, 120 months. |
| — Type | `options` | No | `empty` | Specify the metric type. |
| | | | | Options: `email`, `empty` (no type filter — return the campaign's combined metrics), `push`, `slack`, `twilio`, `urbanAirship`, `webhook` |

#### Customer: Create or Update

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| ID | `string` | Yes | — | The unique identifier for the customer. Supports expressions. |
| JSON Parameters | `boolean` | No | `false` | Whether to supply the additional fields as raw JSON instead of the structured field list. |
| Additional Fields (`additionalFieldsJson`) | `json` | No | — | Additional customer fields as raw JSON. _(shown when JSON Parameters is `true`)_ |
| Additional Fields (`additionalFields`) | `collection` | No | `{}` | Additional customer fields in structured form. _(shown when JSON Parameters is `false`)_ |
| — Custom Properties | `fixedCollection` | No | `{}` | Your own attributes on the customer profile. Add one entry per property. |
| — — Key | `string` | Yes | — | Property name. |
| — — Value | `string` | Yes | — | Property value. |
| — Email | `string` | No | — | The email address of the customer. |
| — Created At | `dateTime` | No | — | The date/time the customer was created. Will be converted to UNIX timestamp (seconds). |

#### Customer: Delete

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| ID | `string` | Yes | — | The unique identifier for the customer. Supports expressions. |

#### Event: Track

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Customer ID | `string` | Yes | — | The unique identifier for the customer. Supports expressions. |
| Event Name | `string` | No | — | The name of the event to track. A value is required for the call to succeed. |
| JSON Parameters | `boolean` | No | `false` | Whether to supply the additional fields as raw JSON instead of the structured field list. |
| Additional Fields (`additionalFieldsJson`) | `json` | No | — | Additional event fields as raw JSON. _(shown when JSON Parameters is `true`)_ |
| Additional Fields (`additionalFields`) | `collection` | No | `{}` | Additional event fields in structured form. _(shown when JSON Parameters is `false`)_ |
| — Custom Attributes | `fixedCollection` | No | `{}` | Custom key-value attributes for the event. |
| — — Key | `string` | Yes | — | Attribute name. |
| — — Value | `string` | Yes | — | Attribute value. |
| — Type | `string` | No | — | Used to change event type. For Page View events, set to "page". |

#### Event: Track Anonymous

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Event Name | `string` | Yes | — | The name of the event to track. Supports expressions. |
| JSON Parameters | `boolean` | No | `false` | Whether to supply the additional fields as raw JSON instead of the structured field list. |
| Additional Fields (`additionalFieldsJson`) | `json` | No | — | Additional event fields as raw JSON. _(shown when JSON Parameters is `true`)_ |
| Additional Fields (`additionalFields`) | `collection` | No | `{}` | Additional event fields in structured form. _(shown when JSON Parameters is `false`)_ |
| — Custom Attributes | `fixedCollection` | No | `{}` | Custom key-value attributes for the event. |
| — — Key | `string` | Yes | — | Attribute name. |
| — — Value | `string` | Yes | — | Attribute value. |

#### Segment: Add Customer

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Segment ID | `number` | Yes | `0` | The unique identifier of the manual segment. Supports expressions. |
| Customer IDs | `string` | Yes | — | Comma-separated list of customer IDs to add to or remove from the segment. |

#### Segment: Remove Customer

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Segment ID | `number` | Yes | `0` | The unique identifier of the manual segment. Supports expressions. |
| Customer IDs | `string` | Yes | — | Comma-separated list of customer IDs to add to or remove from the segment. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

The response is merged into the item JSON — the incoming fields pass through and binary data is forwarded.

| Resource / Operation | Output |
|----------------------|--------|
| Campaign / `get` | One item carrying the campaign record |
| Campaign / `getAll` | **One item per campaign** in the workspace |
| Campaign / `getMetrics` | One item carrying the metric series for the campaign |
| Customer / `upsert` | One item with `id` plus the profile fields that were written — `email`, `created_at` (a UNIX timestamp in seconds) and `data` holding your custom properties. Customer.io returns an empty body on success, so the node reports back what it stored |
| Customer / `delete` | `success: true` |
| Event / `track` | `success: true` |
| Event / `trackAnonymous` | `success: true` |
| Segment / `add` | `success: true` |
| Segment / `remove` | `success: true` |

Reference a field downstream by expression, e.g. `{{ $json.id }}`.

## Usage Examples

- Create or update a customer in Customer.io
- Track a customer event in Customer.io
- Get all campaigns from Customer.io
- Add a customer to a segment in Customer.io
- Delete a customer from Customer.io

## Example Configuration

Get one campaign:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "campaign",
    "operation": "get",
    "campaignId": 123
  }
}
```

List every campaign:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "campaign",
    "operation": "getAll"
  }
}
```

Get five days of email metrics for a campaign:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "campaign",
    "operation": "getMetrics",
    "campaignId": 456,
    "period": "days",
    "jsonParameters": false,
    "additionalFields": {
      "steps": 5,
      "type": "email"
    }
  }
}
```

The same request with the additional fields supplied as raw JSON:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "campaign",
    "operation": "getMetrics",
    "campaignId": 456,
    "period": "weeks",
    "jsonParameters": true,
    "additionalFieldsJson": "{\"steps\": 10, \"type\": \"push\"}"
  }
}
```

Create or update a customer with custom properties:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "customer",
    "operation": "upsert",
    "id": "{{ $json.userId }}",
    "jsonParameters": false,
    "additionalFields": {
      "email": "john.doe@example.com",
      "createdAt": "2024-01-15T10:30:00Z",
      "customProperties": {
        "customProperty": [
          { "key": "subscription", "value": "premium" },
          { "key": "region", "value": "us-west" }
        ]
      }
    }
  }
}
```

Delete a customer:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "customer",
    "operation": "delete",
    "id": "user123"
  }
}
```

Track a purchase against a known customer:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "event",
    "operation": "track",
    "customerId": "{{ $json.userId }}",
    "eventName": "purchase_completed",
    "jsonParameters": false,
    "additionalFields": {
      "customAttributes": {
        "customAttribute": [
          { "key": "amount", "value": "99.99" },
          { "key": "currency", "value": "USD" }
        ]
      }
    }
  }
}
```

Track an event with no customer attached:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "event",
    "operation": "trackAnonymous",
    "eventName": "newsletter_signup",
    "jsonParameters": false,
    "additionalFields": {
      "customAttributes": {
        "customAttribute": [
          { "key": "source", "value": "homepage" }
        ]
      }
    }
  }
}
```

Add several customers to a manual segment in one call:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "segment",
    "operation": "add",
    "segmentId": 789,
    "customerIds": "user123,user456,user789"
  }
}
```

Remove a customer from a segment:

```json
{
  "type": "customer_io",
  "parameters": {
    "resource": "segment",
    "operation": "remove",
    "segmentId": 789,
    "customerIds": "user456"
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Use Customer.io to manage customers, track events, view campaigns, and manage segment membership in the Customer.io marketing automation platform.

### Notes

- **Create or Update is an upsert.** The ID you pass is the customer's identifier in Customer.io — a new profile is created if it does not exist, and merged into if it does.
- **Event Name must be set on Event: Track**, even though the field is not marked required in the editor; the call fails without it.
- **Additional Fields as raw JSON must be a JSON string,** not an object — for example `"{\"steps\": 10}"`. Anything that is not valid JSON is skipped rather than sent.
- **Custom Properties and Custom Attributes use their group key.** The entries go under `customProperties.customProperty` and `customAttributes.customAttribute` respectively, each a `{ "key": …, "value": … }` object.
- **Created At is converted to a UNIX timestamp** in seconds before it is sent.
- **Segments must be manual.** Add Customer and Remove Customer only apply to manual segments; membership of a data-driven segment is computed by Customer.io and cannot be edited here.
- **Customer IDs is one comma-separated string,** so a single node run can move a whole batch of customers in or out of a segment.

### Choosing between the two Additional Fields inputs

- Leave **JSON Parameters** off to pick fields from the structured list — the editor validates them and shows you what each one does.
- Turn it on to build the whole field object with an expression, which is the right choice when the shape is decided at run time.