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

# Maxio

> Unlock the full potential of your subscription business by syncing data from your data warehouse to Maxio

## Supported syncing

| Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Customers** | Sync data from any source to Customers | Upsert, Update, Insert | [Customers docs](https://developers.chargify.com/docs/api-docs/18237bcfe5cbb-create-customer) |
| **Subscriptions** | Sync data from any source to Subscriptions | Upsert, Update, Insert | [Subscriptions docs](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription) |
| **Usage** | Sync data from any source to Usage | Insert | [Usage docs](https://developers.chargify.com/docs/api-docs/9954fb40d117d-create-usage) |
| **Events** | Sync data from any source to Events-Based Billing | Insert | [Event docs](https://developers.chargify.com/docs/api-docs/b8ffb590f236a-event-ingestion) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to Maxio

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Maxio** and click **Continue**. You can then authenticate Hightouch to **Maxio** by entering the following required fields into Hightouch:

* **Subdomain**: Part of your URL, for example, `example-subdomain` in `https://example-subdomain.chargify.com`
* **API key**: A valid Maxio API key, follow [Maxio's instructions](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405281550477#api) to view or create a new API key
* **Password**: The same one you used to log into your account

## Sync configuration

Once you've set up your Maxio destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the Maxio destination you want to sync to.

### Syncing customers

When syncing customers, you can choose from upsert, update, or insert modes.

#### Record matching

To match rows from your model to customers in Maxio, you need to select a model column and corresponding Maxio field. You can match on any of the following Maxio fields:

* **email**
* **id**
* **reference**

> [!NOTE]
>
> In **Insert** mode, Maxio automatically generates an identifier for every new record synced, so there is no need to match an existing record.

#### Field mapping

You can map data from any of your model columns to fields in Maxio. Maxio requires the following fields, so you must map them to complete your configuration:

* **first\_name**
* **last\_name**
* **email**

Ensure the data types of your model columns match the data types of the fields you want to sync to.

#### Delete behavior

The [delete behavior](https://docs.hightouch.com/syncs/overview.md#delete-behavior) you select dictates what to do when a row no longer appears in your model's query results. You have the following options:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the record in Maxio with all its synced fields |
| **Clear** | Unset all the mapped fields, but keep the record in Maxio |
| **Delete** | Delete the synced record from your Maxio customer |

### Syncing subscriptions

When syncing subscriptions, you can choose from upsert, update, or insert modes.

#### Record matching

To match rows from your model to records in Maxio, you need to select the model column that contains values that match the **reference** field.

> [!NOTE]
>
> In **Insert** mode, Maxio automatically generates an identifier for every new record synced, so there is no need to match an existing record.

#### Field mapping

You can map data from any of your model columns to fields in Maxio. Maxio requires the following fields, so you must map them to complete your configuration:

* **customer\_attributes**, **customer\_id** or **customer\_reference**
* **payment\_profile\_id**
* **product\_handle** or **product\_id**

Ensure the data types of your model columns match the data types of the fields you want to sync to.

### Syncing usage data

Hightouch lets you report usage events to Maxio. To do so, you must select the Maxio subscription and component you would like to sync to.

#### Record matching

Maxio automatically generates an identifier for every new record synced, so there is no need to match an existing record.

#### Field mapping

You can sync columns from your model to Maxio default usage fields. Check out Maxio's [usage docs](https://developers.chargify.com/docs/api-docs/9954fb40d117d-create-usage) to learn more.

### Syncing events

Maxio requires the following event parameters:

* `api-handle`: You can either provide a static value or select to **use a column** from your model.
* `subdomain`: Hightouch uses the subdomain you entered when [connecting to Maxio](#connect-to-maxio)

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

#### Event timestamp

You can optionally select a column that contains timestamps of when events occurred. If this field is empty, Hightouch uses the time the event arrives at the server. Hightouch syncs the timestamp as the `event_time` parameter the Maxio requires.

#### Record matching

Maxio automatically generates an identifier for every new event synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync event properties via default and custom mappings.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
