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

# Richpanel

> Surface Order Protection claims inside Richpanel — every claim opens a ticket with a deep link back to the full conversation in Order Protection, and resolved claims auto-snooze.

<Note>
  Richpanel is a **visibility layer** for your support team. Every Order
  Protection claim opens a Richpanel ticket so brand agents can see new
  cases land and triage them in their helpdesk. The full conversation
  between the customer and Order Protection lives in the Order
  Protection dashboard — the Richpanel ticket carries a deep link to it.
  **Order Protection owns all customer communication for claims** —
  replies, decisions, refunds, and reships are sent from inside Order
  Protection so the customer only ever hears from one channel.
</Note>

<Warning>
  **Brand agents should not reply to the customer from Richpanel.** A
  reply typed into Richpanel will be sent by Richpanel directly to the
  customer's email, but it will not be recorded against the claim in
  Order Protection — bypassing claim-state automation, attachments, and
  the audit trail. Treat the Richpanel ticket as read-only for the
  brand: use **Add Note** for internal commentary, and reply to the
  customer from Order Protection.
</Warning>

## What you get

* **Automatic ticket creation** — every new claim opens a Richpanel
  conversation with the customer's contact info, an order summary, the
  claim type and status, and a clickable link back to the full claim
  conversation in Order Protection.
* **Auto-snoozing on resolution** — when a claim moves to **Approved**
  or **Resolved**, Order Protection snoozes the Richpanel ticket
  (`snoozed_till: "0"`) so it falls out of agent queues until a customer
  reply re-opens it.
* **In-widget context** — Richpanel agents see the customer's recent
  orders and existing claims directly inside the Richpanel UI without
  switching tabs.
* **Default routing** — optionally auto-assign new tickets to a team and
  set a default channel (email, message, SMS, etc.) at install time.

<Tip>
  We do not forward individual claim messages or status update bodies
  from Order Protection to Richpanel. That's deliberate — on Richpanel's
  `email` channel, every `send-message` call dispatches a customer
  email, which would double up on the notifications Order Protection
  already sends. Instead, the ticket carries a link back to Order
  Protection where the live conversation, decisions, and timeline live.
</Tip>

## Installation

Follow these steps to connect Order Protection with Richpanel.

<Steps>
  <Step title="Generate a Richpanel API key">
    Sign in to your Richpanel admin and head to **Settings → API**. Create
    an API key with permission to read & write conversations, teams,
    channels, and tags. Copy the key — it begins with `rp_`.

    <Warning>
      Treat this key like a password. Order Protection encrypts it at rest
      using your store's encryption key, but anyone with the raw value can
      act as your Richpanel account.
    </Warning>
  </Step>

  <Step title="Open the Richpanel integration in Order Protection">
    Sign in to your [Order Protection
    Dashboard](https://app.orderprotection.com/). From the left nav go to
    **Settings → Integrations** and click **Richpanel**.
  </Step>

  <Step title="Paste your API key">
    Paste the `rp_…` key into the **API Key** field. It's stored
    encrypted — once saved you'll only see a masked value.
  </Step>

  <Step title="(Optional) Pick a default team">
    If you want every new ticket auto-assigned, paste a Richpanel **Team
    UUID** into **Default Team ID**. Leave it blank to let Richpanel
    auto-route based on its own rules.

    <Tip>
      Don't know your team UUID? After saving the API key, Order
      Protection can list your teams via its internal Richpanel API — ask
      your developer to hit `/internal/integrations/richpanel/stores/{storeId}/teams`,
      or fetch it directly from Richpanel's `/v1/teams` endpoint.
    </Tip>
  </Step>

  <Step title="(Optional) Pick a default channel">
    Set **Default Channel** to one of: `email`, `message`, `twilio-sms`,
    `attentive`, `aircall`, `facebook_message`, `instagram`,
    `facebook_feed_comment`. Most stores use `email`.
  </Step>

  <Step title="Save" icon="party-horn">
    Hit **Save**. The next claim filed against your store will open a
    Richpanel conversation within a few seconds.
  </Step>
</Steps>

### How it works

Once the integration is enabled, two things happen automatically:

#### 1. New claim → new Richpanel ticket

When a customer files a claim, Order Protection sends a `POST /v1/tickets`
to Richpanel containing:

* The customer's email, name, and phone (when available)
* The associated order number, items, and pricing summary
* A short summary of the claim type and status
* A clickable link to the full claim in the Order Protection dashboard

If you set a **Default Team ID** at install time, the new ticket is
assigned to that team in the same step.

#### 2. Claim approved or resolved → ticket auto-snoozed

When a claim moves to **Approved** or **Resolved**, Order Protection
calls `PUT /v1/tickets/{id}/snooze` with `snoozed_till: "0"`, which
takes the Richpanel ticket out of agent queues until the customer
replies. No message body is posted on the Richpanel side — Order
Protection sends its own notifications to the customer through its
own channels.

**Where Richpanel fits in the Order Protection event flow:**

```
   Claim filed in OP        ─►  POST  /v1/tickets        (with OP claim link)
   Claim approved/resolved  ─►  PUT   /v1/tickets/{id}/snooze
```

That's it. No `send-message` calls, no message-body forwards — Order
Protection holds the entire conversation, and Richpanel is the brand's
read-mostly window into what's happening.

### In-widget order & claim context

Richpanel can render an Order Protection panel directly inside the agent
UI showing the customer's recent orders and all existing claims. This is
served by Order Protection's widget endpoint and authenticated via an
HMAC-signed header — no extra credential management on Richpanel's side.

If you'd like the widget enabled in your Richpanel workspace, contact
your Order Protection account manager and we'll provision the iframe URL
for your store.

## How brand agents should use Richpanel

Richpanel is a **read-mostly view** for your team. The recommended
workflow:

| Action                                                           | Where to do it                                          |
| ---------------------------------------------------------------- | ------------------------------------------------------- |
| See that a new claim was filed                                   | Richpanel inbox                                         |
| Read the full conversation between customer and Order Protection | **Click the OP claim link inside the Richpanel ticket** |
| Triage / route the ticket internally                             | Richpanel (assign, snooze, tag)                         |
| Add an **internal note** the customer should never see           | Richpanel — use **Add Note**, not Reply                 |
| **Reply to the customer**                                        | Order Protection dashboard                              |
| Decide / approve / resolve the claim                             | Order Protection dashboard                              |

<Tip>
  Order Protection is the source of truth for claim state, so any
  customer-facing action (reply, approve, deny, refund, reship) must
  happen there. Anything you type as a public reply in Richpanel will
  reach the customer through Richpanel's channel but will not be
  associated with the claim — so it's invisible to whoever picks up the
  case next.
</Tip>

<Note>
  Bidirectional sync — surfacing the Order Protection conversation
  inline inside the Richpanel ticket, and capturing Richpanel "Add Note"
  entries back as Order Protection notes — is on our roadmap. Contact
  your account manager if this is a hard requirement for your workflow.
</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Tickets are not appearing in Richpanel">
    Check that the API key under **Settings → Integrations → Richpanel**
    is still valid. Order Protection re-validates it by calling
    Richpanel's `/v1/teams` endpoint — if that 401s, the field is showing
    as masked but the underlying value is wrong. Re-paste the key.
  </Accordion>

  <Accordion title="Tickets are created but not assigned to a team">
    The **Default Team ID** field expects a UUID, not a team name. If you
    pasted the team's display name, the assign call silently no-ops on
    Richpanel's side. Pull the UUID from your Richpanel admin (or from
    `/v1/teams`) and re-save.
  </Accordion>

  <Accordion title="The Richpanel ticket shows the claim summary but no replies">
    That's by design. Order Protection does not forward individual claim
    messages to Richpanel because doing so on the `email` channel would
    re-email the customer for every reply we already sent. Click the
    **View the full claim conversation** link inside the ticket body to
    open the claim in the Order Protection dashboard.
  </Accordion>

  <Accordion title="A brand agent replied in Richpanel — what now?">
    The reply will reach the customer through Richpanel's channel, but
    Order Protection has no record of it. To capture the reply on the
    claim, re-send it from Order Protection. To prevent this happening
    again, coach agents to use **Add Note** in Richpanel for any
    brand-internal commentary, and treat the public Reply box as "for
    OP only".
  </Accordion>

  <Accordion title="Richpanel started rate-limiting us">
    Richpanel returns HTTP `492` with a `Retry-After` header when you
    exceed your account quota. Order Protection respects the header and
    automatically retries with backoff via its background job queue —
    no action required, but reach out if you see sustained delays.
  </Accordion>
</AccordionGroup>
