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

# Customer cards

> Show data from your own systems next to a thread, and add actions your team can click.

[**Customer cards**](/docs/customer-cards) let you show information from your own systems and configure clickable actions that trigger a Plain workflow, without your team needing to leave the conversation or open a separate menu.

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=581f15fe1493d3e64d7a58d0d3dd3d10" alt="Customer cards in Plain" width="2400" height="1400" data-path="public/images/customer-cards.png" />
</Frame>

## How does data from my system get displayed in customer cards?

Customer cards:

* Pull from your backend, so you do not have to sync your customer data to Plain.

* The data is short-lived, so it is permanently stored in Plain beyond the time frame you set.

* Defined in JSON, so you do not write any styling.

* Automatically reloaded if a user is viewing a customer and the data expires.

## Workflow triggers from customer cards

When a thread is opened and your customer card API is called, you can include a `componentWorkflowButton` in your card response. Plain renders this as a button inside the card. When a team member clicks it, Plain runs the specified workflow in the context of that thread.

### Setting up workflow triggers:

This requires your engineering team to update your customer card API. Here's the two-step process:

**Step 1: Create the workflow in Plain.**

Go to **Settings → Workflows** and create the workflow you want the button to trigger. Your developer will need the workflow ID, which is visible in the workflow settings.

**Step 2: Add the button to your customer card API**

Your developer adds a `componentWorkflowButton` to your card API response, pointing it at the workflow ID. Your API can also include logic to only show the button in certain situations. For example, only when a customer's billing is in an error state.

## Use cases:

* **Billing operations**: resync a billing record, apply a credit, or trigger a refund

* **Account operations**: rename a team, allowlist a user, reset a rate limit

* **Escalation**: escalate a thread to the right team with a single click

* **Debugging**: trigger a diagnostics workflow tied to that customer's account

[**Jump to documentation →**](/docs/customer-cards)

## Examples:

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards-example-subscription-status.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=789d1af333e5193d65c48b04978d14bd" alt="Customer cards: example subscription status" width="720" height="256" data-path="public/images/customer-cards-example-subscription-status.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards-example-usage.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=f719c0dfb5c3723a932d0390612eb3cd" alt="Customer cards: example usage" width="720" height="550" data-path="public/images/customer-cards-example-usage.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards-example-last-order.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=4ef4308d3b2e4ac0944ba2bdd69ccc98" alt="Customer cards: example last order" width="720" height="654" data-path="public/images/customer-cards-example-last-order.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards-example-latest-invoice.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=5d824364d6cc5eb5ba9cc15c674965c6" alt="Customer cards: example latest invoice" width="720" height="686" data-path="public/images/customer-cards-example-latest-invoice.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards-example-sentry.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=55c4df412c88ce8ed2ac57c9a43df9ff" alt="Customer cards: example sentry" width="720" height="1338" data-path="public/images/customer-cards-example-sentry.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/customer-cards-example-details.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=11d2a0a67629e3d7775e452e519d9b46" alt="Customer cards: example details" width="720" height="392" data-path="public/images/customer-cards-example-details.png" />
</Frame>

## Try the examples

The [example cards repo](https://github.com/team-plain/example-customer-cards) is a working API you can point at your workspace. Each card is available at:

```plaintext theme={null}
https://example-customer-cards.plain.com/?cardKey=CARD_KEY
```

| **Card**            | **Key**               |
| ------------------- | --------------------- |
| Subscription status | `subscription-status` |
| Latest invoice      | `latest-invoice`      |
| Usage               | `usage`               |
| Sentry errors       | `sentry`              |
| Account details     | `customer-details`    |
| Last order          | `last-order`          |
| Workflow button     | `workflow-card`       |

To add one: go to **Settings → Customer Cards**, click **Add card**, enter the URL above with the relevant key, and open any thread to see it load.
