Custom customer panel

Show customer details from your own system (Stripe subscription, internal CRM, user admin, etc.) right next to the conversation in your Boei inbox. When an agent opens a thread, Boei loads a page from your server as a sidebar iframe. You render whatever HTML you want: plan info, MRR, recent invoices, action buttons: and it appears next to the messages.

How to get there: Go to Settings → Business in the left menu → click your website → Inbox tab → Customer Panel.

The panel shows information to your team. To let the AI use account details in an answer, use Customer account lookup instead.

How it works

  1. In Boei, you configure a URL that points to a page on your server.
  2. Boei auto-generates a shared token: a long random string your server uses to verify requests.
  3. When an agent opens a conversation in the inbox, Boei loads your URL inside a sandboxed iframe, adding these query parameters:
    • email: the customer's email
    • thread: the Boei thread ID (optional, useful if you want to log something)
    • token: the shared token (your server checks this matches)
    • theme: light or dark
  4. Your page validates the token, looks up the customer, and renders HTML.
  5. The iframe auto-resizes to fit your content using a small JavaScript snippet.

No data flows back to Boei: your page just renders. The iframe is sandboxed, so it can't read anything from the rest of the Boei interface.

Setup

1. Build your page

Create an endpoint on your server (e.g. https://app.example.com/boei-customer-panel). It should:

  • Read the token, email, and theme query params
  • Reject the request (403) if the token doesn't match the one from Boei settings
  • Look up the customer in your database
  • Return an HTML response using our drop-in stylesheet

2. Configure in Boei

  1. Go to Settings → Business in the left menu, click your website, open the Inbox tab, and select Customer Panel.
  2. Paste your URL. A shared token is generated automatically: copy it.
  3. Paste the token into your server code as a constant (or environment variable).
  4. Open any conversation in the inbox: the sidebar should appear.

3. Verify the token

PHP:

if (($_GET['token'] ?? '') !== getenv('BOEI_PANEL_TOKEN')) {
    http_response_code(403);
    exit;
}

Node / Express:

if (req.query.token !== process.env.BOEI_PANEL_TOKEN) {
    return res.status(403).end();
}

Laravel:

if ($request->query('token') !== config('services.boei.panel_token')) {
    abort(403);
}

If you need to rotate the token (e.g. you leaked it in a screenshot), click Regenerate in the settings and update the value on your server.

HTML patterns

Include the stylesheet and set the theme on <body>:

<!doctype html>
<html><head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://app.boei.help/customer-panel.css">
</head>
<body class="boei-panel" data-theme="light">
  <!-- your content here -->
</body></html>

Set data-theme="dark" when theme=dark so the panel matches the agent's theme.

Sections

Group related rows inside a .boei-section:

<section class="boei-section">
  <div class="boei-section-title">Subscription</div>
  <div class="boei-section-body">
    <div class="boei-row">
      <span class="boei-row-label">Plan</span>
      <span class="boei-row-value">Pro</span>
    </div>
    <div class="boei-row">
      <span class="boei-row-label">MRR</span>
      <span class="boei-row-value">$49</span>
    </div>
  </div>
</section>

Collapsible sections

Use <details> + <summary>: no JavaScript needed, the disclosure arrow is styled for you:

<details class="boei-section">
  <summary class="boei-section-title">Recent invoices</summary>
  <div class="boei-section-body">
    <div class="boei-row">
      <span class="boei-row-label">Apr 01</span>
      <span class="boei-row-value">$49 paid</span>
    </div>
    <div class="boei-row">
      <span class="boei-row-label">Mar 01</span>
      <span class="boei-row-value">$49 paid</span>
    </div>
  </div>
</details>

Add the open attribute to start expanded: <details class="boei-section" open>.

Icons

The .boei-icon class sets 14×14px sizing so any SVG or icon-font glyph lines up with the text. You can also drop an emoji in for a quick preview:

<div class="boei-row">
  <span class="boei-row-label">
    <span class="boei-icon">📈</span> MRR
  </span>
  <span class="boei-row-value">$49</span>
</div>

With an inline SVG:

<span class="boei-icon">
  <svg viewBox="0 0 16 16" fill="currentColor"><!-- your SVG paths --></svg>
</span>

The .boei-icon class uses color: var(--boei-fg-muted) by default: set color yourself if you want a coloured icon.

Badges

Status pills in four variants:

<span class="boei-badge">Neutral</span>
<span class="boei-badge boei-badge-success">Active</span>
<span class="boei-badge boei-badge-warning">Past due</span>
<span class="boei-badge boei-badge-danger">Cancelled</span>
<span class="boei-badge boei-badge-info">Trial</span>

Common pattern: status next to a value:

<div class="boei-row">
  <span class="boei-row-label">Plan</span>
  <span class="boei-row-value">
    Pro <span class="boei-badge boei-badge-success">Active</span>
  </span>
</div>

Open links in a new tab so they don't try to load inside the narrow iframe:

<div class="boei-row">
  <span class="boei-row-label">Profile</span>
  <a class="boei-row-value" href="https://app.example.com/users/123"
     target="_blank" rel="noopener">View in admin ↗</a>
</div>

Action buttons

Buttons for common workflows (open in Stripe, start a refund, email the customer):

<div style="display:flex; gap:8px; margin-top:10px;">
  <a class="boei-button" href="https://dashboard.stripe.com/customers/cus_xxx"
     target="_blank" rel="noopener">Open in Stripe</a>
  <a class="boei-button" href="mailto:jane@example.com"
     target="_blank" rel="noopener">Email customer</a>
</div>

Empty state

When no customer is found for the email:

<div class="boei-empty">
  No customer found for jane@example.com
</div>

Auto-resize

The iframe doesn't know how tall your content is. Add this small script at the bottom of <body> so it auto-fits:

<script>
  const post = () => parent.postMessage(
    { type: 'boei-customer-panel:resize', height: document.documentElement.scrollHeight },
    '*'
  );
  window.addEventListener('load', post);
  new ResizeObserver(post).observe(document.documentElement);
</script>

This posts the content height whenever it changes (e.g. a section is collapsed/expanded) and Boei resizes the iframe accordingly. Height is clamped between 100px and 4000px.

Complete example

Putting it all together: a full PHP page showing Stripe-style subscription info:

<?php
if (($_GET['token'] ?? '') !== getenv('BOEI_PANEL_TOKEN')) {
    http_response_code(403);
    exit;
}

$email = $_GET['email'] ?? '';
$theme = ($_GET['theme'] ?? 'light') === 'dark' ? 'dark' : 'light';

// Look up your customer however you normally would
$customer = findCustomerByEmail($email);
?>
<!doctype html>
<html><head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://app.boei.help/customer-panel.css">
</head>
<body class="boei-panel" data-theme="<?= htmlspecialchars($theme) ?>">

<?php if (!$customer): ?>

  <div class="boei-empty">
    No account found for <?= htmlspecialchars($email) ?>
  </div>

<?php else: ?>

  <section class="boei-section">
    <div class="boei-section-title">Subscription</div>
    <div class="boei-section-body">
      <div class="boei-row">
        <span class="boei-row-label">Plan</span>
        <span class="boei-row-value">
          <?= htmlspecialchars($customer->plan) ?>
          <span class="boei-badge boei-badge-<?= $customer->active ? 'success' : 'danger' ?>">
            <?= $customer->active ? 'Active' : 'Cancelled' ?>
          </span>
        </span>
      </div>
      <div class="boei-row">
        <span class="boei-row-label">MRR</span>
        <span class="boei-row-value">$<?= number_format($customer->mrr) ?></span>
      </div>
      <div class="boei-row">
        <span class="boei-row-label">Signed up</span>
        <span class="boei-row-value"><?= $customer->created_at->format('M j, Y') ?></span>
      </div>
    </div>
  </section>

  <details class="boei-section">
    <summary class="boei-section-title">Recent invoices</summary>
    <div class="boei-section-body">
      <?php foreach ($customer->recentInvoices as $invoice): ?>
        <div class="boei-row">
          <span class="boei-row-label"><?= $invoice->date->format('M j') ?></span>
          <span class="boei-row-value">$<?= $invoice->amount ?> <?= $invoice->status ?></span>
        </div>
      <?php endforeach; ?>
    </div>
  </details>

  <div style="display:flex; gap:8px; margin-top:10px;">
    <a class="boei-button"
       href="https://dashboard.stripe.com/customers/<?= $customer->stripe_id ?>"
       target="_blank" rel="noopener">Open in Stripe</a>
    <a class="boei-button"
       href="https://app.example.com/admin/users/<?= $customer->id ?>"
       target="_blank" rel="noopener">Open in admin</a>
  </div>

<?php endif; ?>

<script>
  const post = () => parent.postMessage(
    { type: 'boei-customer-panel:resize', height: document.documentElement.scrollHeight },
    '*'
  );
  window.addEventListener('load', post);
  new ResizeObserver(post).observe(document.documentElement);
</script>

</body></html>

Use the setup prompt

The Customer Panel settings include Copy AI prompt to help a developer build the page. It includes your shared token. Treat the copied prompt as a secret and remove the token before sharing it outside a trusted development environment.

Troubleshooting

The sidebar doesn't appear at all.
Open a conversation where you know the customer's email. The sidebar only shows when the thread has an email identifier (SMS-only threads without an email won't trigger it).

"Refused to display in a frame" error.
Your server is sending an X-Frame-Options: DENY or strict Content-Security-Policy: frame-ancestors header. Ask your developer to allow https://app.boei.help to frame this specific panel URL. Keep framing restrictions for the rest of your site.

Clicking a link reloads Boei instead of opening a new tab.
Add target="_blank" rel="noopener" to your <a> tags. The iframe is sandboxed so regular navigation replaces the whole panel.

Height is wrong / content is cut off.
Make sure you've included the auto-resize script at the bottom of <body>. Test in isolation by loading your URL in a regular browser tab: the window.parent.postMessage call will no-op outside an iframe, which is fine.

Styling looks odd.
Check the stylesheet is loading (open the URL directly and inspect). The .boei-panel class on <body> is what applies the base typography and spacing.

Security notes

  • The token is a shared secret: keep it in an environment variable or secret manager, not in source control.
  • The iframe is sandboxed (allow-scripts allow-forms allow-popups), so your page can run JavaScript and open external links but can't read Boei's cookies or storage.
  • Query params appear in server access logs. The page loads in the team member's browser. Do not assume requests come from a Boei server IP. Ask your developer to apply your normal access checks before displaying sensitive customer information.