> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/activate/event-streaming/destinations/attribution-and-affiliate/postie.md).

# Postie

Postie is a direct mail retargeting platform, powered by Letterpress, that connects online behavior to physical mail campaigns. This destination loads the Letterpress JavaScript SDK in the browser and forwards page views, email captures and order completions to power Postie's retargeting workflows. There is no server-side component.

## Getting started

The Letterpress SDK loads automatically, so you don't install any script yourself. You need your Postie account ID. Find it in your Postie account settings.

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **Account ID** (required): your Postie account ID. Chord uses it to load the Postie tracking script.
* **Consent Requirements** (optional): the consent categories a visitor must accept before Chord sends data to this destination. See [Consent](/activate/event-streaming/consent.md).

## Connect

Add **Postie** from the destination catalog, using the settings above. See [Connect a destination](/activate/event-streaming/connect-a-destination.md) for the full steps.

## Event mapping

| Chord event                                                                                                                       | Postie event                                                                       | Notes |
| --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----- |
| `page`                                                                                                                            | `letterpress("trackPageView")`                                                     |       |
| [`User Created`](/collect-data/tracking-plan/user-created.md) / [`Email Captured`](/collect-data/tracking-plan/email-captured.md) | `letterpress("trackUnstructEvent", { schema, data })`                              |       |
| [`Order Completed`](/collect-data/tracking-plan/order-completed.md)                                                               | `letterpress("addTrans")` + `letterpress("addItem")` + `letterpress("trackTrans")` |       |

## Page events

Fires a Postie page view call.

**Letterpress SDK call:** `letterpress("trackPageView")`

No additional attributes are sent with page events.

## Email capture (User Created / Email Captured)

Sends an email capture event using Postie's Iglu schema.

**Letterpress SDK call:** `letterpress("trackUnstructEvent", { schema, data })`

| Chord source (priority order)                                  | Postie field | Notes                                               |
| -------------------------------------------------------------- | ------------ | --------------------------------------------------- |
| *(hardcoded)* `iglu:com.getletterpress/email/jsonschema/1-0-0` | `schema`     |                                                     |
| `properties.email` > `traits.email`                            | `data.email` | Required; the event is skipped if no email is found |

## Order Completed

Sends a full ecommerce transaction to Postie. The event is skipped, with a console warning, if `properties.products` is empty.

**Transaction attributes**

**Letterpress SDK call:** `letterpress("addTrans", orderId, affiliation, total, tax, shipping, city, state, country, currency, addressContext)`

| Chord source (priority order)                                                                                                          | Postie field  | Notes                                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------- |
| `properties.cart_id` > `properties.cartId` > `properties.order_id` > `properties.orderId` > `properties.id` > `properties.checkout_id` | `orderId`     | A cart ID wins over an order ID when both are present. Empty string if none is present. |
| `properties.affiliation`                                                                                                               | `affiliation` | Empty string if absent                                                                  |
| `properties.total` > `properties.value` > `properties.price` > sum of product `price × quantity`                                       | `total`       | Formatted to 2 decimal places; defaults to `"0.00"`                                     |
| `properties.tax`                                                                                                                       | `tax`         | Formatted to 2 decimal places; defaults to `"0.00"`                                     |
| `properties.shipping`                                                                                                                  | `shipping`    | Formatted to 2 decimal places; defaults to `"0.00"`                                     |
| `properties.shipping_city` > address `city`                                                                                            | `city`        | Empty string if absent                                                                  |
| `properties.shipping_state` > address `state`                                                                                          | `state`       | Empty string if absent                                                                  |
| `properties.shipping_country` > address `country`                                                                                      | `country`     | Empty string if absent                                                                  |
| `properties.currency` > `properties.meta.i18n.currency`                                                                                | `currency`    | Defaults to `"USD"`                                                                     |

**Address context**

An address context object (schema `iglu:com.getletterpress/address/jsonschema/1-0-0`) is added to the `addTrans` call.

Chord reads "address" values from `properties.address`, then `context.traits.address`, then `traits.address`. Within each, it reads `address1` before `street` and `address2` before `street2`. It reads `zipcode` before `zip` and `postalCode`.

| Chord source (priority order)                                                                                                                                                                                                 | Postie field    | Notes                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- |
| first name: `properties.first_name` > `properties.firstName` > `context.traits.first_name` > `traits.first_name`; last name: `properties.last_name` > `properties.lastName` > `context.traits.last_name` > `traits.last_name` | `data.name`     | The two are joined and trimmed. Falls back to the first two words of the address `name`. |
| address `address1` > `street`                                                                                                                                                                                                 | `data.street`   | Empty string if absent                                                                   |
| address `address2` > `street2`                                                                                                                                                                                                | `data.street_2` | Empty string if absent                                                                   |
| `properties.shipping_zipcode` > address `zipcode` > `zip` > `postalCode`                                                                                                                                                      | `data.zip`      | Empty string if absent                                                                   |
| Same as transaction `city`                                                                                                                                                                                                    | `data.city`     |                                                                                          |
| Same as transaction `state`                                                                                                                                                                                                   | `data.state`    |                                                                                          |
| Same as transaction `country`                                                                                                                                                                                                 | `data.country`  |                                                                                          |
| `properties.email` > `properties.emailAddress` > `context.traits.email` > `traits.email`                                                                                                                                      | `data.email`    | Empty string if absent                                                                   |

**Item attributes**

Each product in `properties.products[]` is sent in a separate `addItem` call.

**Letterpress SDK call:** `letterpress("addItem", orderId, sku, name, category, price, quantity, currency)`

| Chord source (priority order)                                                                 | Postie field | Notes                                               |
| --------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------- |
| Same as transaction `orderId`                                                                 | `orderId`    |                                                     |
| `properties.products[].sku` > `properties.products[].product_id` > `properties.products[].id` | `sku`        | Empty string if none is present                     |
| `properties.products[].name`                                                                  | `name`       | Empty string if absent                              |
| `properties.products[].category` > `properties.products[].variant`                            | `category`   | Empty string if neither is present                  |
| `properties.products[].price`                                                                 | `price`      | Formatted to 2 decimal places; defaults to `"0.00"` |
| `properties.products[].quantity`                                                              | `quantity`   | Defaults to `"1"`                                   |
| Same as transaction `currency`                                                                | `currency`   |                                                     |

After all items are added, the transaction is finalized with `letterpress("trackTrans")`.

## Custom events

Chord does not send other track events to Postie, because Postie accepts only the events above. Other track events are skipped with a console warning.

## Initialization

Chord loads `https://scripts.postie.com/{accountId}/lp.1.js` on the first event it receives. It tracks loading state (`fresh` → `loading` → `loaded`/`failed`) to prevent duplicate script loads. Events that arrive while the script is loading are queued and processed after initialization completes. If the script fails to load, later events are silently dropped.

## CSP requirements

If your site uses a Content Security Policy, allow the following domains:

| Directive     | Domain                         |
| ------------- | ------------------------------ |
| `script-src`  | `https://scripts.postie.com`   |
| `connect-src` | `https://t.getletterpress.com` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/activate/event-streaming/destinations/attribution-and-affiliate/postie.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
